akon1248

Untitled

Nov 8th, 2018
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.26 KB | None | 0 0
  1. variables:
  2. {freezetick.%player%} = 0
  3. {invincibletick.%player%} = 0
  4. on load:
  5. execute console command "scoreboard teams add invader"
  6. execute console command "gamerule doTileDrops false"
  7. execute console command "gamerule keepInventory true"
  8. execute console command "difficulty 3"
  9. on damage:
  10. if damage was caused by void:
  11. set damage to 2147483647
  12. on damage:
  13. if {invincibletick.%victim%} is greater than or equal to 1:
  14. set damage to 0
  15. cancel event
  16. every tick:
  17. loop all players:
  18. remove 1 from {invincibletick.%loop-player%}
  19. on damage:
  20. victim is a player
  21. set {_attacker} to attacker
  22. set {_shooter} to shooter
  23. if damage is greater than or equal to victim's health:
  24. set damage to 0
  25. set {freezetick.%victim%} to 3
  26. set {invincibletick.%victim%} to 10
  27. set victim's health to max health of victim
  28. set victim's food to 10
  29. execute console command "tp %UUID of victim% -184 6 37 0 0"
  30. wait 3 tick
  31. execute console command "effect %UUID of victim% clear"
  32. ignite victim for 0 tick
  33. if {_attacker} is set:
  34. if attacker is TNT:
  35. broadcast "%victim%&7 was blew up"
  36. stop
  37. if attacker is falling block:
  38. broadcast "%victim%&7 was crushed by falling block"
  39. stop
  40. if {_shooter} is set:
  41. if attacker is a player:
  42. if {_attacker} is victim:
  43. broadcast "%victim%&7 was suicide"
  44. stop
  45. set {_weapon} to name of attacker's held item
  46. if {_weapon} is set:
  47. broadcast "%victim%&7 was shot by &r%attacker%&7 using &r%{_weapon}%"
  48. stop
  49. else:
  50. broadcast "%victim%&7 was shot by &r%attacker%"
  51. stop
  52. else:
  53. set {_name} to name of attacker
  54. if {_name} is set:
  55. broadcast "%victim%&7 was shot by &r%{_name}%"
  56. stop
  57. if {_name} is not set:
  58. broadcast "%victim%&7 was shot by &r%attacker%"
  59. stop
  60.  
  61. if damage was caused by entity explosion:
  62. if attacker is a player:
  63. broadcast "%victim%&7 was blow up by &r%attacker%"
  64. stop
  65. else:
  66. set {_name} to name of attacker
  67. if {_name} is set:
  68. broadcast "%victim%&7 was blow up by &r%{_name}%"
  69. stop
  70. if {_name} is not set:
  71. broadcast "%victim%&7 was blow up by &r%attacker%"
  72. stop
  73. if damage was caused by block explosion:
  74. if attacker is a player:
  75. broadcast "%victim%&7 was blow up by &r%attacker%"
  76. stop
  77. else:
  78. set {_name} to name of attacker
  79. if {_name} is set:
  80. broadcast "%victim%&7 was blow up by &r%{_name}%"
  81. stop
  82. if {_name} is not set:
  83. broadcast "%victim%&7 was blow up by &r%attacker%"
  84. stop
  85. stop
  86. if damage was caused by potion:
  87. if attacker is a player:
  88. broadcast "%victim%&7 was killed by &r%attacker%&7's magic"
  89. stop
  90. else:
  91. set {_name} to name of attacker
  92. if {_name} is set:
  93. broadcast "%victim%&7 was killed by &r%{_name}%&7's magic"
  94. stop
  95. if {_name} is not set:
  96. broadcast "%victim%&7 was killed by &r%attacker%&7's magic"
  97. stop
  98. else:
  99. if attacker is a player:
  100. set {_weapon} to name of attacker's held item
  101. if {_weapon} is set:
  102. broadcast "%victim%&7 was slain by &r%attacker%&7 using &r%{_weapon}%"
  103. stop
  104. else:
  105. broadcast "%victim%&7 was slain by &r%attacker%"
  106. stop
  107. else:
  108. set {_name} to name of attacker
  109. if {_name} is set:
  110. broadcast "%victim%&7 was slain by &r%{_name}%"
  111. stop
  112. if {_name} is not set:
  113. broadcast "%victim%&7 was slain by &r%attacker%"
  114. stop
  115. else:
  116. if damage was caused by fall:
  117. broadcast "%victim%&7 is died due to fall"
  118. stop
  119. if damage was caused by lava:
  120. broadcast "%victim%&7 is died due to lava"
  121. stop
  122. if damage was caused by fire, burning or melting:
  123. broadcast "%victim%&7 is died by burned"
  124. stop
  125. if damage was caused by drowning:
  126. broadcast "%victim%&7 is drowned"
  127. stop
  128. if damage was caused by potion:
  129. broadcast "%victim%&7 is killed by magic"
  130. stop
  131. if damage was caused by entity explosion:
  132. broadcast "%victim%&7 was blew up"
  133. stop
  134. if damage was caused by block explosion:
  135. broadcast "%victim%&7 was blew up"
  136. stop
  137. if damage was caused by lightning:
  138. broadcast "%victim%&7 was striked by lightning"
  139. stop
  140. if damage was caused by starvation:
  141. broadcast "%victim%&7 was starved to death"
  142. stop
  143. if damage was caused by suicide:
  144. broadcast "%victim%&7 was suicide"
  145. stop
  146. if damage was caused by projectile:
  147. broadcast "%victim%&7 was shot trough"
  148. stop
  149. if damage was caused by void:
  150. broadcast "%victim%&7 is fell into the void"
  151. stop
  152. if damage was caused by wither:
  153. broadcast "%victim%&7 was killed by wither"
  154. stop
  155. if damage was caused by suffocation:
  156. broadcast "%victim%&7 was suffocated"
  157. stop
  158. if damage was caused by unknown:
  159. broadcast "%victim%&7 is died"
  160. stop
  161. on any movement:
  162. if {freezetick.%player%} is greater than or equal to 1:
  163. cancel event
  164. every tick:
  165. loop all players:
  166. remove 1 from {freezetick.%loop-player%}
  167. every tick:
  168. set max health of all players to 20
  169. on rightclick with crafting table:
  170. player's gamemode is not creative
  171. cancel event
  172. open crafting table for player
  173. every tick:
  174. execute console command "effect @e[tag=nexus] 14 1000000 0 true"
  175. execute console command "entitydata @e[tag=nexus] {Fire:-1s}"
  176. execute console command "execute @e[tag=nexus] ~ ~ ~ entitydata @e[type=creeper,team=invader,r=3] {ignited:1b}"
  177. on damage of iron golem:
  178. name of victim is "Nexus"
  179. if {startednexus} is 1:
  180. if attacker is a player:
  181. if attacker's gamemode is creative:
  182. set {_x} to x-coordinate of {nexus}
  183. set {_y} to y-coordinate of {nexus}
  184. set {_z} to z-coordinate of {nexus}
  185. execute console command "setblock %{_x}% %{_y}% %{_z}% beacon 0 destroy"
  186. set {nexushp} to round(health of victim*2-damage)
  187. play sound "block_anvil_place" to all players with volume 1 and pitch 3
  188. if shooter is a player:
  189. cancel event
  190. else:
  191. cancel event
  192. if attacker is not a player:
  193. execute console command "setblock %{_x}% %{_y}% %{_z}% beacon 0 destroy"
  194. set {nexushp} to round(health of victim*2-damage)
  195. play sound "block_anvil_place" to all players with volume 1 and pitch 3
  196. on death of iron golem:
  197. if name of victim is "Nexus":
  198. if {startednexus} is 1:
  199. send all players title "&c&lGAME OVER" with subtitle "&cNexus was destroyed by invaders" for 3 seconds with 1 seconds fade in and 1 seconds fade out
  200. play sound "entity_wither_death" to all players with volume 1 and pitch 5
  201. delete {startedgame}
  202. delete {startednexus}
  203. delete {phase}
  204. delete {countS}
  205. delete {countM}
  206. delete {nexushp}
  207. set block at {nexus} to bedrock
  208. create safe explosion of power 7 at location 1 meter above {nexus}
  209. execute console command "kill @e[team=invader]"
  210. wait 5 seconds
  211. execute console command "kill @e[team=invader]"
  212. execute console command "kill @e[type=arrow]"
  213. execute console command "kill @e[type=item]"
  214. execute console command "kill @e[type=ender_pearl]"
  215. execute console command "kill @e[type=xp_orb]"
  216. set block at {nexus} to beacon
  217. execute console command "tp @a 0 64 0 0 0"
  218. set level of all players to 0
  219. set level progress of all players to 0
  220. execute console command "effect @a clear"
  221. clear inventory of all players
  222. ignite victim for 0 tick
  223. loop all players:
  224. clear loop-player's ender chest
  225. set loop-player's food to 10
  226. set health of loop-player to max health of loop-player
  227. command /setnexus:
  228. permission: invasion.admin
  229. permission message: &cYou do not have permission to use this command.
  230. trigger:
  231. if target block is set:
  232. if target block is beacon:
  233. if {nexus} is set:
  234. execute console command "kill @e[type=villager_golem,tag=nexus]"
  235. delete {nexus}
  236. set {nexus} to location at target block
  237. send "&6Nexusの設置に成功しました"
  238. stop
  239. if {nexus} is not set:
  240. set {nexus} to location at target block
  241. send "&6Nexusの設置に成功しました"
  242. stop
  243. else:
  244. send "&cビーコンにカーソルを合わせてください"
  245. else:
  246. send "&cビーコンにカーソルを合わせてください"
  247. command /deletenexus:
  248. aliases: /delnexus
  249. permission: invasion.admin
  250. permission message: &cYou do not have permission to use this command.
  251. trigger:
  252. if {nexus} is set:
  253. execute console command "kill @e[tag=nexus]"
  254. delete {nexus}
  255. send "&6Nexusを消去しました"
  256. stop
  257. if {nexus} is not set:
  258. send "&cNexusが存在していません"
  259. command /startup:
  260. permission: invasion.admin
  261. permission message: &cYou do not have permission to use this command.
  262. trigger:
  263. {nexus} is set
  264. set {startedgame} to 1
  265. set {starting} to 1
  266. set {startupprogress} to 0
  267. broadcast "&6Starting nexus.."
  268. every 6 second:
  269. if {starting} is 1:
  270. add 1 to {startupprogress}
  271. if {startupprogress} is 100:
  272. wait 1 second
  273. delete {starting}
  274. delete {startupprogress}
  275. set {_x} to x-coordinate of {nexus}
  276. set {_y} to y-coordinate of {nexus}
  277. set {_z} to z-coordinate of {nexus}
  278. broadcast "&6Nexus startup is complete!"
  279. play sound "block_anvil_use" to all players with volume 1 and pitch 11
  280. wait 1 second
  281. execute console command "summon villager_golem %{_x}% %{_y}-0.5% %{_z}% {CustomName:""Nexus"",Tags:[""nexus""],Team:Nexus,PersistenceRequired:1b,DeathTime:19s,Silent:1b,NoAI:1b,DeathLootTable:""minecraft:empty"",Health:500f,Attributes:[{Name:generic.maxHealth,Base:500d}],ArmorItems:[{},{},{},{id:""minecraft:leather_helmet"",Damage:0s,Count:1b,tag:{Unbreakable:1b,ench:[{id:7s,lvl:5s}],AttributeModifiers:[{Name:""create by akon"",UUIDLeast:1142252443l,UUIDMost:1142252443l,Operation:0,AttributeName:""generic.armor"",Amount:0d,Slot:""mainhand""},{Name:""create by akon"",UUIDLeast:1142252443l,UUIDMost:1142252443l,Operation:0,AttributeName:""generic.armorToughness"",Amount:0d,Slot:""mainhand""}]}}],ArmorDropChances:[-0.1f,-0.1f,-0.1f,-0.1f]}"
  282. broadcast "&6Start &4&lINVASION"
  283. play sound "block_end_portal_spawn" to all players with volume 1 and pitch 5
  284. set {startednexus} to 1
  285. set {phase} to "&aPhase 1"
  286. set {countM} to 3
  287. set {countS} to 0
  288. set {nexushp} to 500
  289. command /forcestartup:
  290. permission: invasion.admin
  291. permission message: &cYou do not have permission to use this command.
  292. trigger:
  293. {nexus} is set
  294. set {startedgame} to 1
  295. delete {starting}
  296. delete {startupprogress}
  297. set {_x} to x-coordinate of {nexus}
  298. set {_y} to y-coordinate of {nexus}
  299. set {_z} to z-coordinate of {nexus}
  300. broadcast "&6Nexus startup is complete!"
  301. play sound "block_anvil_use" to all players with volume 1 and pitch 11
  302. wait 1 second
  303. execute console command "summon villager_golem %{_x}% %{_y}-0.5% %{_z}% {CustomName:""Nexus"",Tags:[""nexus""],Team:Nexus,PersistenceRequired:1b,DeathTime:19s,Silent:1b,NoAI:1b,DeathLootTable:""minecraft:empty"",Health:500f,Attributes:[{Name:generic.maxHealth,Base:500d}],ArmorItems:[{},{},{},{id:""minecraft:leather_helmet"",Damage:0s,Count:1b,tag:{Unbreakable:1b,ench:[{id:7s,lvl:5s}],AttributeModifiers:[{Name:""create by akon"",UUIDLeast:1142252443l,UUIDMost:1142252443l,Operation:0,AttributeName:""generic.armor"",Amount:0d,Slot:""mainhand""},{Name:""create by akon"",UUIDLeast:1142252443l,UUIDMost:1142252443l,Operation:0,AttributeName:""generic.armorToughness"",Amount:0d,Slot:""mainhand""}]}}],ArmorDropChances:[-0.1f,-0.1f,-0.1f,-0.1f]}"
  304. broadcast "&6Start &4&lINVASION"
  305. play sound "block_end_portal_spawn" to all players with volume 3 and pitch 5
  306. set {startednexus} to 1
  307. set {phase} to "&aPhase 1"
  308. set {countM} to 3
  309. set {countS} to 0
  310. set {nexushp} to 500
  311. command /setphase [<integer>]:
  312. permission: invasion.admin
  313. permission message: &cYou do not have permission to use this command.
  314. trigger:
  315. if arg-1 is 1:
  316. if {startednexus} is 1:
  317. set {phase} to "&aPhase 1"
  318. if arg-1 is 2:
  319. if {startednexus} is 1:
  320. set {phase} to "&ePhase 2"
  321. if arg-1 is 3:
  322. if {startednexus} is 1:
  323. set {phase} to "&cPhase 3"
  324. every tick:
  325. if {starting} is 1:
  326. send action bar from "&6Progress of nexus startup: &b%{startupprogress}%%%" to all players
  327. if {startednexus} is 1:
  328. if {countS} is smaller than 10:
  329. set {_displaycountS} to "0%{countS}%"
  330. if {countS} is greater than or equal to 10:
  331. set {_displaycountS} to "%{countS}%"
  332. send action bar from "&6Timer: &b%{countM}%:%{_displaycountS}% &6Nexus HP: &b%{nexushp}% &6Phase: %{phase}%" to all players
  333. every second:
  334. if {startednexus} is 1:
  335. if {phase} is "&aPhase 1" or "&ePhase 2" or "&cPhase 3":
  336. remove 1 from {countS}
  337. if {countS} is -1:
  338. remove 1 from {countM}
  339. set {countS} to 59
  340. if {countM} is -1:
  341. set {countM} to 0
  342. set {countS} to 0
  343. if {phase} is "&aPhase 1":
  344. set {phase} to "&aPhase 1 &5&l- Boss Battle -"
  345. broadcast "&5&lWither &6appeared!"
  346. play sound "entity_enderdragon_ambient" to all players with volume 3 and pitch 5
  347. set {_x} to x-coordinate of {nexus}+random integer between -3 and 3
  348. set {_y} to y-coordinate of {nexus}+7
  349. set {_z} to z-coordinate of {nexus}+random integer between -3 and 3
  350. execute console command "mm m s WitherInvader 1 world,%{_x}%,%{_y}%,%{_z}%"
  351. if {phase} is "&ePhase 2":
  352. set {phase} to "&ePhase 2 &5&l- Boss Battle -"
  353. broadcast "&c&lAlpha Blaze &6appeared!"
  354. play sound "entity_enderdragon_ambient" to all players with volume 3 and pitch 5
  355. set {_x} to x-coordinate of {nexus}+random integer between -3 and 3
  356. set {_y} to y-coordinate of {nexus}+7
  357. set {_z} to z-coordinate of {nexus}+random integer between -3 and 3
  358. execute console command "mm m s AlphaBlaze 1 world,%{_x}%,%{_y}%,%{_z}%"
  359. if {phase} is "&cPhase 3":
  360. set {phase} to "&cPhase 3 &5&l- Last Boss Battle -"
  361. broadcast "&5&lSkeleton King &6appeared!"
  362. play sound "entity_enderdragon_ambient" to all players with volume 3 and pitch 5
  363. set {_x} to x-coordinate of {nexus}+random integer between -3 and 3
  364. set {_y} to y-coordinate of {nexus}+7
  365. set {_z} to z-coordinate of {nexus}+random integer between -3 and 3
  366. execute console command "mm m s SkeletonKing2 1 world,%{_x}%,%{_y}%,%{_z}%"
  367. on death:
  368. if victim is a wither:
  369. if name of victim is "&5&lWither":
  370. if {phase} is "&aPhase 1 &5&l- Boss Battle -":
  371. play sound "entity_player_levelup" to all players with volume 3 and pitch 0
  372. set {phase} to "&ePhase 2"
  373. set {countS} to 0
  374. set {countM} to 3
  375. set {_attacker} to attacker
  376. if {_attacker} is set:
  377. if attacker is a player:
  378. broadcast "&5&lWither&7 was killed by &r%{_attacker}%&7!"
  379. stop
  380. else:
  381. broadcast "&5&lWither&7 died!"
  382. stop
  383. else:
  384. broadcast "&5&lWither&7 died!"
  385. stop
  386. if victim is a blaze:
  387. if name of victim is "&c&lAlpha Blaze":
  388. if {phase} is "&ePhase 2 &5&l- Boss Battle -":
  389. play sound "entity_player_levelup" to all players with volume 3 and pitch 0
  390. set {phase} to "&cPhase 3"
  391. set {countS} to 0
  392. set {countM} to 3
  393. set {_attacker} to attacker
  394. if {_attacker} is set:
  395. if attacker is a player:
  396. broadcast "&c&lAlpha Blaze&7 was killed by &r%{_attacker}%&7!"
  397. stop
  398. else:
  399. broadcast "&c&lAlpha Blaze&7 died!"
  400. stop
  401. else:
  402. broadcast "&c&lAlpha Blaze&7 died!"
  403. stop
  404. if victim is a skeleton:
  405. if name of victim is "&5&lSkeleton King":
  406. if {phase} is "&cPhase 3 &5&l- Last Boss Battle -":
  407. play sound "ui_toast_challenge_complete" to all players with volume 3 and pitch 5
  408. set {_attacker} to attacker
  409. if {_attacker} is set:
  410. if attacker is a player:
  411. broadcast "&5&lSkeleton King&7 was killed by &r%{_attacker}%&7!"
  412. else:
  413. broadcast "&5&lSkeleton King&7 died!"
  414. else:
  415. broadcast "&5&lSkeleton King&7 died!"
  416. delete {startednexus}
  417. delete {phase}
  418. delete {countS}
  419. delete {countM}
  420. delete {nexushp}
  421. delete {startedgame}
  422. execute console command "kill @e[team=invader]"
  423. execute console command "kill @e[tag=nexus]"
  424. send all players title "&6&lYOU WIN" for 3 seconds with 1 seconds fade in and 1 seconds fade out
  425. wait 5 seconds
  426. execute console command "kill @e[team=invader]"
  427. execute console command "kill @e[type=arrow]"
  428. execute console command "kill @e[type=item]"
  429. execute console command "kill @e[type=ender_pearl]"
  430. execute console command "kill @e[type=xp_orb]"
  431. execute console command "tp @a 0 64 0 0 0"
  432. set level of all players to 0
  433. set level progress of all players to 0
  434. execute console command "effect %victim% clear"
  435. clear inventory of all players
  436. ignite victim for 0 tick
  437. loop all players:
  438. clear loop-player's ender chest
  439. set loop-player's food to 10
  440. set health of loop-player to max health of loop-player
  441. on rightclick on beacon:
  442. location of block is {nexus}
  443. cancel event
  444. on break of beacon:
  445. event-location is {nexus}
  446. cancel event
  447. on death of player:
  448. clear victim's inventory
  449. set level of victim to 0
  450. set level progress of victim to 0
  451. on respawn:
  452. give player stone sword
  453. give player stone pickaxe
  454. give player stone shovel
  455. give player stone axe
  456. set player's helmet to leather helmet
  457. set player's chestplate to leather chestplate
  458. set player's leggings to leather leggings
  459. set player's boots to leather boots
  460. set player's offhand to shield
  461. on damage:
  462. attacker is a wither
  463. if name of attacker is "&5&lWither":
  464. execute console command "effect %UUID of victim% 20 0 0"
  465. execute console command "effect %UUID of victim% 20 40 0"
  466. execute console command "effect %UUID of victim% 15 10 0"
  467. on break:
  468. player's gamemode is not creative
  469. if event-block is not any_oak_wooden_logs_item:12:
  470. if event-block is not melon block:
  471. if event-block is not iron ore:
  472. if event-block is not diamond ore:
  473. if event-block is not emerald ore:
  474. cancel event
  475. on break:
  476. player's gamemode is not creative
  477. if event-block is melon block:
  478. give player 4 melon slice
  479. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  480. give 5 xp to player
  481. wait 10 second
  482. set block at event-location to melon block
  483. set {_x} to x-coordinate of event-location
  484. set {_y} to y-coordinate of event-location
  485. set {_z} to z-coordinate of event-location
  486. execute console command "setblock %{_x}% %{_y}% %{_z}% melon_block 0 destroy"
  487. if event-block is any_oak_wooden_logs_item:12:
  488. give player any_oak_wooden_logs_item:0
  489. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  490. give 5 xp to player
  491. wait 10 second
  492. set block at event-location to any_oak_wooden_logs_item:12
  493. set {_x} to x-coordinate of event-location
  494. set {_y} to y-coordinate of event-location
  495. set {_z} to z-coordinate of event-location
  496. execute console command "setblock %{_x}% %{_y}% %{_z}% log 12 destroy"
  497. if event-block is gravel:
  498. damage player's tool by 1
  499. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  500. give 5 xp to player
  501. set {_randomitem} to random integer between 1 and 100
  502. if {_randomitem} is between 1 and 20:
  503. give player string
  504. if {_randomitem} is between 21 and 40:
  505. give player flint
  506. if {_randomitem} is between 41 and 55:
  507. give player arrow
  508. if {_randomitem} is between 56 and 75:
  509. give player stick
  510. if {_randomitem} is between 76 and 95:
  511. give player feather
  512. if {_randomitem} is between 96 and 100:
  513. give player emerald
  514. set block at event-location to cobble stone
  515. set {emptyore.%event-location%} to event-location
  516. wait 10 second
  517. delete {emptyore.%event-location%}
  518. set block at event-location to gravel
  519. if event-block is iron ore:
  520. give player iron ingot
  521. damage player's tool by 1
  522. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  523. give 10 xp to player
  524. set block at event-location to cobble stone
  525. set {emptyore.%event-location%} to event-location
  526. wait 10 second
  527. delete {emptyore.%event-location%}
  528. set block at event-location to iron ore
  529. if event-block is diamond ore:
  530. give player diamond
  531. damage player's tool by 1
  532. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  533. give 12 xp to player
  534. set block at event-location to cobble stone
  535. set {emptyore.%event-location%} to event-location
  536. wait 10 second
  537. delete {emptyore.%event-location%}
  538. set block at event-location to diamond ore
  539. if event-block is emerald ore:
  540. give player emerald
  541. damage player's tool by 1
  542. play sound "entity_item_pickup" to player with volume 1 and pitch 10
  543. give 15 xp to player
  544. set block at event-location to cobble stone
  545. set {emptyore.%event-location%} to event-location
  546. wait 10 second
  547. delete {emptyore.%event-location%}
  548. set block at event-location to emerald ore
  549. on craft of melon block:
  550. cancel event
  551. on break:
  552. event-location is {emptyore.%event-location%}
  553. cancel event
  554. on place:
  555. player's gamemode is adventure or survival
  556. cancel event
  557. command /getportal:
  558. permission: invasion.admin
  559. permission message: &cYou do not have permission to use this command.
  560. trigger:
  561. execute console command "give %player% mob_spawner 1 0 {display:{Name:""&4Invader Portal""},ench:[{id:0s,lvl:0s}],HideFlags:1}"
  562. on spawn:
  563. if entity is vex:
  564. set {_name} to name of entity
  565. if {_name} is not set:
  566. set name of entity to "Vex Invader"
  567. execute console command "scoreboard teams join invader %UUID of entity%"
  568. on place of mob spawner:
  569. if player's gamemode is creative:
  570. if name of player's tool is "&4Invader Portal":
  571. if block at location 1 meter above event-location is air:
  572. set block at location 1 meter above event-location to ender gateway
  573. set block at event-location to ender gateway
  574. set {portal::%event-location%} to event-location
  575. else:
  576. cancel event
  577. on break of ender gateway:
  578. if event-location is {portal::%event-location%}:
  579. delete {portal::%event-location%}
  580. set {_x} to x-coordinate of event-location
  581. set {_y} to y-coordinate of event-location
  582. set {_z} to z-coordinate of event-location
  583. execute console command "setblock %{_x}% %{_y}+1% %{_z}% air 0 destroy"
  584. if location 1 meter below event-location is {portal::%location 1 meter below event-location%}:
  585. delete {portal::%location 1 meter below event-location%}
  586. set {_x} to x-coordinate of event-location
  587. set {_y} to y-coordinate of event-location
  588. set {_z} to z-coordinate of event-location
  589. execute console command "setblock %{_x}% %{_y}-1% %{_z}% air 0 destroy"
  590. every 3 second:
  591. if {startednexus} is 1:
  592. loop {portal::*}:
  593. set {_spawnchance} to random integer between 0 and 4
  594. if {_spawnchance} is 0:
  595. set {_x} to x-coordinate of {portal::%loop-value%}
  596. set {_y} to y-coordinate of {portal::%loop-value%}
  597. set {_z} to z-coordinate of {portal::%loop-value%}
  598. set {_invadertype} to random integer between 1 and 4
  599. if {phase} is "&aPhase 1" or "&aPhase 1 &5&l- Boss Battle -":
  600. if {_invadertype} is 1:
  601. execute console command "mm m s ZombieInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  602. if {_invadertype} is 2:
  603. execute console command "mm m s SkeletonInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  604. if {_invadertype} is 3:
  605. execute console command "mm m s CreeperInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  606. if {_invadertype} is 4:
  607. execute console command "mm m s SpiderInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  608. if {phase} is "&ePhase 2" or "&ePhase 2 &5&l- Boss Battle -":
  609. if {_invadertype} is 1:
  610. execute console command "mm m s ZombiePigmanInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  611. if {_invadertype} is 2:
  612. execute console command "mm m s WitherSkeletonInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  613. if {_invadertype} is 3:
  614. execute console command "mm m s BlazeInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  615. if {_invadertype} is 4:
  616. execute console command "mm m s CaveSpiderInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  617. every 3 second:
  618. if {startednexus} is 1:
  619. loop {portal::*}:
  620. set {_spawnchance} to random integer between 0 and 4
  621. if {_spawnchance} is 0:
  622. set {_x} to x-coordinate of {portal::%loop-value%}
  623. set {_y} to y-coordinate of {portal::%loop-value%}
  624. set {_z} to z-coordinate of {portal::%loop-value%}
  625. set {_invadertype} to random integer between 1 and 10
  626. if {phase} is "&cPhase 3" or "&cPhase 3 &5&l- Last Boss Battle -":
  627. if {_invadertype} is between 1 and 3:
  628. execute console command "mm m s HuskInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  629. if {_invadertype} is between 4 and 6:
  630. execute console command "mm m s StrayInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  631. if {_invadertype} is between 7 and 9:
  632. execute console command "mm m s EvokerInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  633. if {_invadertype} is 10:
  634. execute console command "mm m s VindicatorInvader%random integer between 1 and 2% 1 world,%{_x}%,%{_y}%,%{_z}%"
  635. on quit:
  636. if {startedgame} is 1:
  637. set {leavegame.%player%} to 1
  638. on join:
  639. if {startedgame} is 1:
  640. if {leavegame.%player%} is 1:
  641. delete {leavegame.%player%}
  642. stop
  643. if {leavegame.%player%} is not set:
  644. clear player's inventory
  645. ignite player for 0 tick
  646. execute console command "effect %player% clear"
  647. execute console command "tp %player% -184 6 37 0 0"
  648. set player's health to max health of player
  649. set player's food to 10
  650. give player stone sword
  651. give player stone pickaxe
  652. give player stone shovel
  653. give player stone axe
  654. set player's helmet to leather helmet
  655. set player's chestplate to leather chestplate
  656. set player's leggings to leather leggings
  657. set player's boots to leather boots
  658. set player's offhand to shield
  659. if {startedgame} is not set:
  660. clear player's inventory
  661. ignite player for 0 tick
  662. execute console command "effect %player% clear"
  663. execute console command "tp %player% 0 64 0 0 0"
  664. set player's health to max health of player
  665. set player's food to 10
  666. every tick:
  667. loop all players:
  668. if name of loop-player's tool is "&cMachine Gun&r&r ▪ «×»":
  669. execute console command "execute %loop-player% ~ ~ ~ effect @s 8 1 128 true"
  670. execute console command "execute %loop-player% ~ ~ ~ effect @s 2 1 255 true"
  671. on rightclick with clay bricks item:
  672. if name of player's tool is "&6カロリーメイト":
  673. cancel event
  674. play sound "entity_generic_eat" to player with volume 1 and pitch 5
  675. add 2.5 to player's food
  676. add 2 to player's health
  677. execute console command "execute %player% ~ ~ ~ effect @s 10 5 1 true"
  678. remove 1 clay bricks item from player's tool
  679. on eat of golden apple:0:
  680. cancel event
  681. if player's tool is golden apple:
  682. execute console command "execute %player% ~ ~ ~ effect @s 10 15 2"
  683. execute console command "execute %player% ~ ~ ~ effect @s 22 120 0"
  684. remove 1 golden apple from player's tool
  685. else if player's offhand is golden apple:
  686. execute console command "execute %player% ~ ~ ~ effect @s 10 15 2"
  687. execute console command "execute %player% ~ ~ ~ effect @s 22 120 0"
  688. remove 1 golden apple from slot 40 of player
  689. on eat of super golden apple:
  690. if player's tool is super golden apple:
  691. execute console command "execute %player% ~ ~ ~ effect @s 10 30 4"
  692. execute console command "execute %player% ~ ~ ~ effect @s 22 120 4"
  693. execute console command "execute %player% ~ ~ ~ effect @s 3 240 2"
  694. execute console command "execute %player% ~ ~ ~ effect @s 11 240 0"
  695. execute console command "execute %player% ~ ~ ~ effect @s 12 240 0"
  696. execute console command "execute %player% ~ ~ ~ effect @s 1 30 1"
  697. remove 1 super golden apple from player's tool
  698. else if player's offhand is super golden apple:
  699. execute console command "execute %player% ~ ~ ~ effect @s 10 30 4"
  700. execute console command "execute %player% ~ ~ ~ effect @s 22 120 4"
  701. execute console command "execute %player% ~ ~ ~ effect @s 3 240 2"
  702. execute console command "execute %player% ~ ~ ~ effect @s 11 240 0"
  703. execute console command "execute %player% ~ ~ ~ effect @s 12 240 0"
  704. execute console command "execute %player% ~ ~ ~ effect @s 1 30 1"
  705. remove 1 super golden apple from slot 40 of player
Advertisement
Add Comment
Please, Sign In to add comment