akon1248

Untitled

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