akon1248

Untitled

Jan 30th, 2019
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.76 KB | None | 0 0
  1. variables:
  2. {nextinfernaldragonchance} = 30
  3. every tick:
  4. loop all entities:
  5. if {infernal.%UUID of loop-entity%} is 1:
  6. health of loop-entity > 0
  7. if loop-entity is not a creeper:
  8. {bossbar.%UUID of loop-entity%} is not set
  9. set {bossbar.%UUID of loop-entity%} to new bossbar
  10. set name of bar {bossbar.%UUID of loop-entity%} to name of loop-entity
  11. set color of bar {bossbar.%UUID of loop-entity%} to RED
  12. if loop-entity is a creeper:
  13. {bossbar.%{infernalcreeperid.%UUID of loop-entity%}%} is not set
  14. set {bossbar.%{infernalcreeperid.%UUID of loop-entity%}%} to new bossbar
  15. set name of bar {bossbar.%{infernalcreeperid.%UUID of loop-entity%}%} to name of loop-entity
  16. set color of bar {bossbar.%{infernalcreeperid.%UUID of loop-entity%}%} to RED
  17. if loop-entity is a enderman:
  18. {infernalenderman::%UUID of loop-entity%} is not set
  19. set {infernalenderman::%UUID of loop-entity%} to loop-entity
  20. every tick:
  21. loop all entities:
  22. if {infernal.%UUID of loop-entity%} is 1:
  23. execute console command "execute %UUID of loop-entity% ~ ~ ~ particle reddust ~ ~1 ~ 0.5 0.5 0.5 1 5 force"
  24. if loop-entity is not a creeper:
  25. set progress of bar {bossbar.%UUID of loop-entity%} to health of loop-entity/max health of loop-entity
  26. loop all players:
  27. if distance between loop-entity-1 and loop-player-1 < 31:
  28. add loop-player-1 to bar {bossbar.%UUID of loop-entity-1%}
  29. if distance between loop-entity-1 and loop-player-1 > 30:
  30. remove loop-player-1 from bar {bossbar.%UUID of loop-entity-1%}
  31. if loop-entity is a creeper:
  32. set progress of bar {bossbar.%{infernalcreeperid.%UUID of loop-entity%}%} to health of loop-entity/max health of loop-entity
  33. loop all players:
  34. if distance between loop-entity-1 and loop-player-1 < 31:
  35. add loop-player-1 to bar {bossbar.%{infernalcreeperid.%UUID of loop-entity-1%}%}
  36. if distance between loop-entity-1 and loop-player-1 > 30:
  37. remove loop-player-1 from bar {bossbar.%{infernalcreeperid.%UUID of loop-entity-1%}%}
  38. if "%world of loop-entity-1%" is not "%loop-player-1's world%":
  39. remove loop-player-1 from bar {bossbar.%{infernalcreeperid.%UUID of loop-entity-1%}%}
  40. on spawn:
  41. if event-entity is a zombie:
  42. chance of 10%:
  43. wait 1 tick
  44. {infernal.%UUID of event-entity%} is not set
  45. {summonedzombie.%UUID of event-entity%} is not set
  46. {zombieinventory.%UUID of event-entity%::*} is not set
  47. set {infernal.%UUID of event-entity%} to 1
  48. strike fake fake lightning at event-entity
  49. add "{CustomName:""Infernal Zombie"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.attackDamage"",Base:10d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d},{Name:""zombie.spawnReinforcements"",Base:1d}]}" to nbt of event-entity
  50. if event-entity is a skeleton:
  51. chance of 10%:
  52. wait 1 tick
  53. {infernal.%UUID of event-entity%} is not set
  54. set {infernal.%UUID of event-entity%} to 1
  55. strike fake fake lightning at event-entity
  56. add "{CustomName:""Infernal Skeleton"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}],HandItems:[{tag:{ench:[{id:49s,lvl:5s}]},id:""minecraft:bow"",Count:1b,Damage:0s},{}],HandDropChances:[-0.1f,0f]}" to nbt of event-entity
  57. if event-entity is a enderman:
  58. chance of 10%:
  59. wait 1 tick
  60. {infernal.%UUID of event-entity%} is not set
  61. set {infernal.%UUID of event-entity%} to 1
  62. strike fake fake lightning at event-entity
  63. add "{CustomName:""Infernal Enderman"",PersistenceRequired:1b,Health:100f,Attributes:[{Name:""generic.maxHealth"",Base:100d},{Name:""generic.movementSpeed"",Base:0.4d},{Name:""generic.attackDamage"",Base:15d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}]}" to nbt of event-entity
  64. if event-entity is a creeper:
  65. chance of 10%:
  66. wait 1 tick
  67. {infernal.%UUID of event-entity%} is not set
  68. set {infernal.%UUID of event-entity%} to 1
  69. set {infernalcreeperid.%UUID of event-entity%} to "%UUID of event-entity%"
  70. strike fake fake lightning at event-entity
  71. add "{CustomName:""Infernal Creeper"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}],powered:1b,ExplosionRadius:5b,Fuse:30s}" to nbt of event-entity
  72. if event-entity is a spider:
  73. chance of 10%:
  74. wait 1 tick
  75. {infernal.%UUID of event-entity%} is not set
  76. set {infernal.%UUID of event-entity%} to 1
  77. strike fake fake lightning at event-entity
  78. add "{CustomName:""Infernal Spider"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.4d},{Name:""generic.attackDamage"",Base:5d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}]}" to nbt of event-entity
  79. if event-entity is a blaze:
  80. chance of 10%:
  81. wait 1 tick
  82. {infernal.%UUID of event-entity%} is not set
  83. set {infernal.%UUID of event-entity%} to 1
  84. strike fake fake lightning at event-entity
  85. add "{CustomName:""Infernal Blaze"",PersistenceRequired:1b,Health:80f,Attributes:[{Name:""generic.maxHealth"",Base:80d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:100d}]}" to nbt of event-entity
  86. if event-entity is a ender dragon:
  87. set {_spawnchance} to random integer between 1 and 100
  88. if {_spawnchance} is between 1 and {nextinfernaldragonchance}:
  89. wait 1 tick
  90. {infernal.%UUID of event-entity%} is not set
  91. set {infernaldragon::%UUID of event-entity%} to 1
  92. strike lightning effect at event-entity
  93. add "{CustomName:""&5&lInfernal Ender Dragon"",Health:2500f,Attributes:[{Name:""generic.maxHealth"",Base:2500d}]}" to nbt of event-entity
  94. set {infernaldragonattackcooltime.%UUID of event-entity%} to 0
  95. broadcast "&5&lInfernal Ender Dragon&e was spawned!"
  96. else:
  97. add "{CustomName:""Ender Dragon""}" to nbt of event-entity
  98. set {nextinfernaldragonchance} to 30
  99. on death of player:
  100. loop {infernaldragon::*}:
  101. if {dragontarget.%loop-index%} is victim:
  102. delete {dragontarget.%loop-index%}
  103. on damage:
  104. attacker is an ender dragon
  105. {infernaldragon::%UUID of attacker%} is 1
  106. damage was caused by projectile
  107. projectile is a small fireball
  108. add 2.5 to damage
  109. every tick:
  110. loop {infernaldragon::*}:
  111. if getEntityFromUUID(loop-index) is set:
  112. set {_infernaldragon} to getEntityFromUUID(loop-index)
  113. if tag "DragonPhase" of nbt of {_infernaldragon} is 9:
  114. strike fake fake lightning at {_infernaldragon}
  115. if tag "DragonPhase" of nbt of {_infernaldragon} is 2:
  116. add "{DragonPhase:0}" to nbt of {_infernaldragon}
  117. if tag "DragonPhase" of nbt of {_infernaldragon} is 3:
  118. add "{DragonPhase:0}" to nbt of {_infernaldragon}
  119. else if tag "DragonPhase" of nbt of {_infernaldragon} is not 9:
  120. if {dragontarget.%loop-index%} is dead:
  121. delete {dragontarget.%loop-index%}
  122. if distance between {_infernaldragon} and {dragontarget.%loop-index%} > 200:
  123. delete {dragontarget.%loop-index%}
  124. if {dragontarget.%loop-index%}'s gamemode is creative or spectator:
  125. delete {dragontarget.%loop-index%}
  126. if "%{_infernaldragon}'s world%" is not "%{dragontarget.%loop-index%}'s world%":
  127. delete {dragontarget.%loop-index%}
  128. if {dragontarget.%loop-index%} is not set:
  129. set {dragontarget.%loop-index%} to dragonTargetSearch(location of {_infernaldragon})
  130. {dragontarget.%loop-index%} is set
  131. add 1 to {infernaldragonattackcooltime.%loop-index%}
  132. if {infernaldragonattackcooltime.%loop-index%} is 60:
  133. set {_rand} to random integer between 1 and 3
  134. if {_rand} is 1:
  135. fireballRush({_infernaldragon}, location of {dragontarget.%loop-index%}, 5, 30, 3)
  136. if {_rand} is 2:
  137. set {_idleast} to random number between -2147483648 and 2147483647
  138. set {_idmost} to random number between -32147483648 and 2147483647
  139. set {homingbreath::%{_idleast}%-%{_idmost}%} to location of {_infernaldragon}
  140. set {homingbreathowneruuid::%{_idleast}%-%{_idmost}%} to UUID of {_infernaldragon}
  141. set {homingbreathage::%{_idleast}%-%{_idmost}%} to 0
  142. execute console command "execute %UUID of {_infernaldragon}% ~ ~ ~ playsound minecraft:entity.enderdragon.shoot master @a ~ ~ ~ 3"
  143. if {_rand} is 3:
  144. set {_shootloc} to location of {_infernaldragon}
  145. set yaw of {_shootloc} to yawAtan2({_infernaldragon}, {dragontarget.%loop-index%})
  146. set pitch of {_shootloc} to pitchAtan2({_infernaldragon}, {dragontarget.%loop-index%})
  147. shoot a fireball from {_shootloc} with speed 0.5
  148. set shooter of shot projectile to {_infernaldragon}
  149. add "{ExplosionPower:5}" to nbt of shot projectile
  150. execute console command "execute %UUID of {_infernaldragon}% ~ ~ ~ playsound minecraft:entity.enderdragon.shoot master @a ~ ~ ~ 3"
  151. set {homingdragonfireball::%UUID of shot projectile%} to 1
  152. set {homingdragonfireballowneruuid.%UUID of shot projectile%} to UUID of {_infernaldragon}
  153. if {infernaldragonattackcooltime.%loop-index%} >= 61:
  154. set {infernaldragonattackcooltime.%loop-index%} to 0
  155. if health of getLivingEntityFromUUID(loop-index) is 0:
  156. wait 180 tick
  157. delete {infernaldragon::%loop-index%}
  158. delete {infernaldragonattackcooltime.%loop-index%}
  159. delete {dragontarget.%loop-index%}
  160. delete {dragonprojectile.%loop-index%::*}
  161. loop {homingbreath::*}:
  162. if getEntityFromUUID({homingbreathowneruuid::%loop-index%}) is set:
  163. set {_owner} to getEntityFromUUID({homingbreathowneruuid::%loop-index%})
  164. add 1 to {homingbreathage::%loop-index%}
  165. execute console command "execute %UUID of {_owner}% ~ ~ ~ particle dragonbreath %x-coordinate of loop-value% %y-coordinate of loop-value% %z-coordinate of loop-value% 0.3 0.3 0.3 0.005 30 force"
  166. set yaw of {homingbreath::%loop-index%} to yawAtan2(loop-value, {dragontarget.%{homingbreathowneruuid::%loop-index%}%})
  167. set pitch of {homingbreath::%loop-index%} to pitchAtan2(loop-value, {dragontarget.%{homingbreathowneruuid::%loop-index%}%})
  168. set {homingbreath::%loop-index%} to location 0.75 meter forwards loop-value
  169. loop entities in radius 0.5 around loop-value:
  170. loop-entity is {dragontarget.%{homingbreathowneruuid::%loop-index%}%}
  171. create safe explosion with power 3 at loop-value-1
  172. loop entities in radius 2 around loop-value-1:
  173. execute console command "execute %UUID of loop-entity-2% ~ ~ ~ effect @s 20 30 2"
  174. execute console command "execute %UUID of loop-entity-2% ~ ~ ~ effect @s 9 10 0"
  175. execute console command "execute %UUID of loop-entity-2% ~ ~ ~ effect @s 15 10 0"
  176. delete {homingbreath::%loop-index%}
  177. delete {homingbreathowneruuid::%loop-index%}
  178. delete {homingbreathage::%loop-index%}
  179. if {homingbreathage::%loop-index%} >= 2400:
  180. create safe explosion with power 3 at loop-value
  181. loop entities in radius 2 around loop-value:
  182. execute console command "execute %UUID of loop-entity% ~ ~ ~ effect @s 20 30 2"
  183. execute console command "execute %UUID of loop-entity% ~ ~ ~ effect @s 9 10 0"
  184. execute console command "execute %UUID of loop-entity% ~ ~ ~ effect @s 15 10 0"
  185. delete {homingbreath::%loop-index%}
  186. delete {homingbreathowneruuid::%loop-index%}
  187. delete {homingbreathage::%loop-index%}
  188. else if getEntityFromUUID({homingbreathowneruuid::%loop-index%}) is not set:
  189. delete {homingbreath::%loop-index%}
  190. delete {homingbreathowneruuid::%loop-index%}
  191. delete {homingbreathage::%loop-index%}
  192. loop {homingdragonfireball::*}:
  193. if getEntityFromUUID(loop-index) is set:
  194. set {_homingdragonfireball} to getEntityFromUUID(loop-index)
  195. execute console command "execute %UUID of {_homingdragonfireball}% ~ ~ ~ particle flame ~ ~0.5 ~ 0.5 0.5 0.5 0.1 100 force"
  196. set shooter of {_homingdragonfireball} to getEntityFromUUID({homingdragonfireballowneruuid.%loop-index%})
  197. if {dragontarget.%{homingdragonfireballowneruuid.%loop-index%}%} is set:
  198. add "{power:[0.0d,0.0d,0.0d]}" to nbt of {_homingdragonfireball}
  199. push {_homingdragonfireball} direction from {_homingdragonfireball} to {dragontarget.%{homingdragonfireballowneruuid.%loop-index%}%} at speed 0.2
  200. else if getEntityFromUUID(loop-index) is not set:
  201. delete {homingdragonfireball::%loop-index%}
  202. delete {homingdragonfireballowneruuid.%loop-index%}
  203. on projectile hit:
  204. projectile is a small fireball
  205. {infernaldragon::%UUID of shooter%} is 1
  206. create safe explosion with power 1 at projectile
  207. function fireballRush(shooter: entity, loc: location, accuracy: number, num1: integer, num2: integer):
  208. loop {_num1} times:
  209. loop {_num2} times:
  210. set {_shootloc} to location of {_shooter}
  211. set {_targetloc} to location random number between 0-{_accuracy} and {_accuracy} meter east location random number between 0-{_accuracy} and {_accuracy} meter south location random number between 0-{_accuracy} and {_accuracy} meter above {_loc}
  212. set yaw of {_shootloc} to yawAtan2({_shootloc}, {_targetloc})
  213. set pitch of {_shootloc} to pitchAtan2({_shootloc}, {_targetloc})
  214. shoot a small fireball from {_shootloc} with speed 2
  215. execute console command "execute %UUID of {_shooter}% ~ ~ ~ playsound minecraft:entity.enderdragon.shoot master @a ~ ~ ~ 3"
  216. set shooter of shot projectile to {_shooter}
  217. wait 1 tick
  218. function pitchAtan2(loc1: location, loc2: location) :: number:
  219. set {_dx} to x-coordinate of {_loc2} - x-coordinate of {_loc1}
  220. set {_dy} to y-coordinate of {_loc2} - y-coordinate of {_loc1}
  221. set {_dz} to z-coordinate of {_loc2} - z-coordinate of {_loc1}
  222. set {_pitch} to 0-atan2(sqrt({_dx}^2+{_dz}^2), {_dy})
  223. return {_pitch}
  224. function yawAtan2(loc1: location, loc2: location) :: number:
  225. set {_dx} to x-coordinate of {_loc2} - x-coordinate of {_loc1}
  226. set {_dz} to z-coordinate of {_loc2} - z-coordinate of {_loc1}
  227. set {_yaw} to atan2({_dx}, {_dz})-90
  228. return {_yaw}
  229. function getEntityFromUUID(uuid: text) :: entity:
  230. loop all entities:
  231. if UUID of loop-entity is "%{_uuid}%":
  232. return loop-entity
  233. stop loop
  234. function getLivingEntityFromUUID(uuid: text) :: living entity:
  235. loop all entities:
  236. if UUID of loop-entity is "%{_uuid}%":
  237. return loop-entity
  238. stop loop
  239. function dragonTargetSearch(loc: location) :: entity:
  240. set {_shortdistance} to 201
  241. loop all entities in radius 200 around {_loc}:
  242. loop-entity is not ender dragon
  243. loop-entity is not armor stand
  244. loop-entity is a living entity
  245. if loop-entity is a player:
  246. loop-entity's gamemode is survival or adventure
  247. if {_target} is not set:
  248. set {_target} to loop-entity
  249. set {_shortdistance} to distance between {_loc} and loop-entity
  250. else if {_target} is set:
  251. if {_target} is not a player:
  252. set {_target} to loop-entity
  253. set {_shortdistance} to distance between {_loc} and loop-entity
  254. else if {_target} is a player:
  255. distance between {_loc} and loop-entity < {_shortdistance}
  256. set {_target} to loop-entity
  257. set {_shortdistance} to distance between {_loc} and loop-entity
  258. if loop-entity is not a player:
  259. if {_target} is not set:
  260. set {_target} to loop-entity
  261. set {_shortdistance} to distance between {_loc} and loop-entity
  262. else if {_target} is set:
  263. {_target} is not a player
  264. distance between {_loc} and loop-entity < {_shortdistance}
  265. set {_target} to loop-entity
  266. set {_shortdistance} to distance between {_loc} and loop-entity
  267. return {_target}
  268. on death:
  269. if {infernal.%UUID of victim%} is 1:
  270. if victim is not a creeper:
  271. wait 10 tick
  272. remove all players from bar {bossbar.%UUID of victim%}
  273. delete {bossbar.%UUID of victim%}
  274. if victim is a creeper:
  275. wait 10 tick
  276. remove all players from bar {bossbar.%{infernalcreeperid.%UUID of victim%}%}
  277. delete {bossbar.%{infernalcreeperid.%UUID of victim%}%}
  278. on damage:
  279. attacker is a zombie
  280. {infernal.%UUID of attacker%} is 1
  281. execute console command "execute %UUID of attacker% ~ ~ ~ effect %UUID of victim% 9 10 0"
  282. execute console command "execute %UUID of attacker% ~ ~ ~ effect %UUID of victim% 17 10 127"
  283. on death of player:
  284. attacker is a zombie
  285. {infernal.%UUID of attacker%} is 1
  286. spawn a zombie at victim
  287. add "{PersistenceRequired:1b,IsBaby:0b,ArmorItems:[{},{},{},{id:""minecraft:skull"",tag:{SkullOwner:%victim%},Count:1b,Damage:3s}]}" to nbt of last spawned zombie
  288. set chestplate of last spawned zombie to air
  289. set leggings of last spawned zombie to air
  290. set boots of last spawned zombie to air
  291. set tool of last spawned zombie to victim's tool
  292. set offhand tool of last spawned zombie to victim's offhand tool
  293. set chestplate of last spawned zombie to chestplate of victim
  294. set leggings of last spawned zombie to leggings of victim
  295. set boots of last spawned zombie to boots of victim
  296. set name of last spawned zombie to "%player%"
  297. set {_slot} to 0
  298. loop 41 times:
  299. set {zombieinventory.%UUID of last spawned zombie%::%{_slot}%} to slot {_slot} of victim's inventory
  300. add 1 to {_slot}
  301. wait 1 tick
  302. clear victim's inventory
  303. on death of zombie:
  304. if {zombieinventory.%UUID of victim%::*} is set:
  305. clear drops
  306. loop {zombieinventory.%UUID of victim%::*}:
  307. drop {zombieinventory.%UUID of victim%::%loop-index%} at victim
  308. delete {zombieinventory.%UUID of victim%::%loop-index%}
  309. on shoot:
  310. shooter is a skeleton
  311. projectile is an arrow
  312. {infernal.%UUID of shooter%} is 1
  313. add "{crit:1b,Potion:""minecraft:long_poison""}" to nbt of projectile
  314. push projectile in direction of shooter at speed 4
  315. set {_shootloc} to location 1.5 meter right location 1 meter forwards location 1.5 meter above location of shooter
  316. add 10 to yaw of {_shootloc}
  317. remove 10 from pitch of {_shootloc}
  318. shoot an arrow from {_shootloc} at speed 2
  319. set shooter of shot projectile to shooter
  320. add "{crit:1b,Potion:""minecraft:long_poison""}" to nbt of shot projectile
  321. set {_shootloc} to location 1.5 meter left location 1 meter forwards location 1.5 meter above location of shooter
  322. remove 10 from yaw of {_shootloc}
  323. remove 10 from pitch of {_shootloc}
  324. shoot an arrow from {_shootloc} at speed 2
  325. set shooter of shot projectile to shooter
  326. add "{crit:1b,Potion:""minecraft:long_poison""}" to nbt of shot projectile
  327. every tick:
  328. loop all living entities:
  329. if loop-entity is a enderman:
  330. if {infernal.%UUID of loop-entity%} is 1:
  331. if target of loop-entity is not set:
  332. set {_shortdistance} to 51
  333. loop all players in radius 50 around loop-entity:
  334. loop-player's gamemode is survival or adventure
  335. if distance between loop-entity-1 and loop-player-1 < {_shortdistance}:
  336. set target of loop-entity-1 to loop-player-1
  337. set {_shortdistance} to distance between loop-entity-1 and loop-player-1
  338. if {teleport.cooltime.%UUID of loop-entity%} is not set:
  339. if target of loop-entity is set:
  340. health of target of loop-entity > 0
  341. set {_teleportloc} to location random number between -2 and 2 meter east location random number between -2 and 2 meter north location of target of loop-entity
  342. block at {_teleportloc} is air
  343. block at location 1 meter above {_teleportloc} is air
  344. block at location 2 meter above {_teleportloc} is air
  345. teleport loop-entity to {_teleportloc}
  346. play ENTITY_ENDERMEN_TELEPORT at location of loop-entity with pitch 1
  347. set {teleport.cooltime.%UUID of loop-entity%} to random integer between 40 and 100
  348. if {teleport.cooltime.%UUID of loop-entity%} >= 1:
  349. remove 1 from {teleport.cooltime.%UUID of loop-entity%}
  350. if {teleport.cooltime.%UUID of loop-entity%} is 0:
  351. delete {teleport.cooltime.%UUID of loop-entity%}
  352. loop {infernalenderman::*}:
  353. if {having.%loop-index%} is 1:
  354. make {armstand.%loop-index%} ride {armstand2.%loop-index%}
  355. teleport {armstand2.%loop-index%} to location 1 meter above location 0.7 meter horizontally forwards location of loop-value
  356. if target of loop-value is set:
  357. set {_target} to target of loop-value
  358. if vehicle of {_target} is not set:
  359. make {_target} ride {armstand.%loop-index%}
  360. if vehicle of {_target} is set:
  361. if vehicle of {_target} is not {armstand.%loop-index%}:
  362. make {_target} ride {armstand.%loop-index%}
  363. if {havingtime.%loop-index%} >= 1:
  364. remove 1 from {havingtime.%loop-index%}
  365. if {havingtime.%loop-index%} is 0:
  366. kill {armstand.%loop-index%}
  367. kill {armstand2.%loop-index%}
  368. delete {havingtime.%loop-index%}
  369. delete {armstand.%loop-index%}
  370. delete {armstand2.%loop-index%}
  371. add "{NoAI:0b,carried:0s,carriedData:0s}" to nbt of loop-value
  372. wait 1 tick
  373. execute console command "execute %UUID of loop-value% ~ ~ ~ playsound entity.endermen.teleport master @a ~ ~ ~ 2"
  374. execute console command "execute %UUID of loop-value% ~ ~ ~ playsound entity.irongolem.attack master @a ~ ~ ~ 2"
  375. make loop-value damage {_target} by 30
  376. push {_target} upwards at speed 2
  377. push {_target} in horizontal direction of loop-value at speed 0.5
  378. delete {having.%loop-index%}
  379. loop 40 times:
  380. execute console command "execute %UUID of {_target}% ~ ~ ~ particle portal ~ ~ ~ 0.5 0.5 0.5 0.1 20"
  381. wait 1 tick
  382. on enderman pickup:
  383. if {infernal.%UUID of event-entity%} is 1:
  384. cancel event
  385. on damage:
  386. attacker is a enderman
  387. {infernal.%UUID of attacker%} is 1
  388. {having.%UUID of attacker%} is not set
  389. chance of 50%:
  390. set {having.%UUID of attacker%} to 1
  391. set {havingtime.%UUID of attacker%} to 10
  392. add "{NoAI:1b,carried:209s,carriedData:0s}" to nbt of attacker
  393. spawn a armor stand at location 1 meter above location 0.7 meter horizontally forwards location of attacker
  394. add "{NoGravity:1b,Invisible:1b,Marker:1b,Small:1b,NoBasePlate:1b,Health:0.001f,Attributes:[{Name:""generic.maxHealth"",Base:0.01f}]}" to nbt of last spawned armor stand
  395. set {armstand.%UUID of attacker%} to last spawned armor stand
  396. spawn a armor stand at location 1 meter above location 0.7 meter horizontally forwards location of attacker
  397. add "{NoGravity:1b,Invisible:1b,Marker:1b,Small:1b,NoBasePlate:1b,Health:0.001f,Attributes:[{Name:""generic.maxHealth"",Base:0.01f}]}" to nbt of last spawned armor stand
  398. set {armstand2.%UUID of attacker%} to last spawned armor stand
  399. on death of enderman:
  400. if {infernal.%UUID of victim%} is 1:
  401. kill {armstand.%UUID of victim%}
  402. kill {armstand2.%UUID of victim%}
  403. delete {having.%UUID of victim%}
  404. delete {havingtime.%UUID of victim%}
  405. delete {armstand.%UUID of victim%}
  406. delete {armstand2.%UUID of victim%}
  407. delete {infernalenderman::%UUID of victim%}
  408. delete {teleport.cooltime.%UUID of victim%}
  409. on explosion prime:
  410. event-entity is a creeper
  411. {infernal.%UUID of event-entity%} is 1
  412. set {_explosionradius} to tag "ExplosionRadius" of nbt of event-entity
  413. set {_fuse} to tag "Fuse" of nbt of event-entity
  414. set {_attributes} to tag "Attributes" of nbt of event-entity
  415. set {_health} to health of event-entity
  416. set {_maxhealth} to max health of event-entity
  417. set {_activeeffects} to tag "ActiveEffects" of nbt of event-entity
  418. set {_rotation} to tag "Rotation" of nbt of event-entity
  419. set {_name} to name of event-entity
  420. set {_target} to target of event-entity
  421. loop all living entities:
  422. loop-entity is not a player
  423. if target of loop-entity is event-entity:
  424. set {_targetingentities::%UUID of loop-entity%} to loop-entity
  425. delete {infernal.%UUID of event-entity%}
  426. spawn a creeper at event-entity
  427. set {infernalcreeperid.%UUID of last spawned creeper%} to "%{infernalcreeperid.%UUID of event-entity%}%"
  428. delete {infernalcreeperid.%UUID of event-entity%}
  429. loop {_targetingentities::*}:
  430. set target of loop-value to last spawned creeper
  431. set name of last spawned creeper to {_name}
  432. set max health of last spawned entity to {_maxhealth}
  433. set health of last spawned creeper to {_health}
  434. if {_target} is a player:
  435. {_target}'s gamemode is survival or adventure
  436. set target of last spawned creeper to {_target}
  437. else if {_target} is not a player:
  438. {_target} is alive
  439. set target of last spawned creeper to {_target}
  440. add "{Attributes:%{_attributes}%,Fuse:%{_fuse}%s,ExplosionRadius:%{_explosionradius}%b,Rotation:%{_rotation}%}" to nbt of last spawned creeper
  441. if {_activeeffects} is set:
  442. add "{ActiveEffects:%{_activeeffects}%}" to nbt of last spawned creeper
  443. set {infernal.%UUID of last spawned creeper%} to 1
  444. wait 1 tick
  445. add "{powered:1b}" to nbt of last spawned creeper
  446. on damage of creeper:
  447. {infernal.%UUID of victim%} is 1
  448. if damage was caused by entity explosion:
  449. cancel event
  450. if damage was caused by block explosion:
  451. cancel event
  452. if damage was caused by lightning:
  453. cancel event
  454. on damage:
  455. attacker is a spider
  456. {infernal.%UUID of attacker%} is 1
  457. damage was caused by attack
  458. apply poison 2 to victim for 5 second
  459. loop random integer between 1 and 3 times:
  460. set {_setloc} to location random integer between -1.5 and 1.5 meter east location random integer between -1.5 and 1.5 meter north location of victim
  461. if block at {_setloc} is air:
  462. set block at {_setloc} to cobweb
  463. every tick:
  464. loop all spiders:
  465. if {infernal.%UUID of loop-entity%} is 1:
  466. add "{FallDistance:0}" to nbt of loop-entity
  467. if {spiderjump.cooltime.%UUID of loop-entity%} is not set:
  468. if target of loop-entity is set:
  469. push loop-entity direction from loop-entity to location 1 meter forwards location of loop-entity at speed 1.5
  470. set {spiderjump.cooltime.%UUID of loop-entity%} to random integer between 40 and 140
  471. loop 20 times:
  472. loop entities in radius 1 around loop-entity:
  473. loop-entity-2 is target of loop-entity-1
  474. make loop-entity-1 damage loop-entity-2 by 10
  475. if {spiderjump.cooltime.%UUID of loop-entity%} >= 1:
  476. remove 1 from {spiderjump.cooltime.%UUID of loop-entity%}
  477. if {spiderjump.cooltime.%UUID of loop-entity%} is 0:
  478. delete {spiderjump.cooltime.%UUID of loop-entity%}
  479. on death of spider:
  480. {infernal.%UUID of victim%} is 1
  481. delete {spiderjump.cooltime.%UUID of victim%}
  482. on shoot:
  483. shooter is a blaze
  484. projectile is a small fireball
  485. {infernal.%UUID of shooter%} is 1
  486. set {_power} to tag "power" of nbt of projectile
  487. cancel event
  488. shoot a fireball from shooter at speed 1
  489. add "{direction:[0.0d,0.0d,0.0d],power:%{_power}%,ExplosionPower:3}" to nbt of shot projectile
  490. on damage of blaze:
  491. {infernal.%UUID of victim%} is 1
  492. if damage was caused by entity explosion:
  493. cancel event
  494. if damage was caused by block explosion:
  495. cancel event
  496. if damage was caused by projectile:
  497. projectile is a fireball:
  498. cancel event
  499. on damage:
  500. attacker is a blaze
  501. {infernal.%UUID of attacker%} is 1
  502. ignite victim for 10 second
  503. command /summoninfernalmob [<text>]:
  504. permission: infernal.admin
  505. permission message: &cYou do not have permission to use this command.
  506. usage: /summoninfernalmob <mobtype>
  507. trigger:
  508. if arg-1 is "zombie":
  509. spawn a zombie at player
  510. set {infernal.%UUID of last spawned zombie%} to 1
  511. strike fake fake lightning at event-entity
  512. add "{CustomName:""Infernal Zombie"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.attackDamage"",Base:10d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d},{Name:""zombie.spawnReinforcements"",Base:1d}]}" to nbt of last spawned zombie
  513. if arg-1 is "skeleton":
  514. spawn a skeleton at player
  515. set {infernal.%UUID of last spawned skeleton%} to 1
  516. strike fake fake lightning at event-entity
  517. add "{CustomName:""Infernal Skeleton"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}],HandItems:[{tag:{ench:[{id:49s,lvl:5s}]},id:""minecraft:bow"",Count:1b,Damage:0s},{}],HandDropChances:[-0.1f,0f]}" to nbt of last spawned skeleton
  518. if arg-1 is "enderman":
  519. spawn a enderman at player
  520. set {infernal.%UUID of last spawned enderman%} to 1
  521. strike fake fake lightning at event-entity
  522. add "{CustomName:""Infernal Enderman"",PersistenceRequired:1b,Health:100f,Attributes:[{Name:""generic.maxHealth"",Base:100d},{Name:""generic.movementSpeed"",Base:0.4d},{Name:""generic.attackDamage"",Base:15d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}]}" to nbt of last spawned enderman
  523. if arg-1 is "creeper":
  524. spawn a creeper at player
  525. set {infernal.%UUID of last spawned creeper%} to 1
  526. set {infernalcreeperid.%UUID of last spawned creeper%} to "%UUID of last spawned creeper%"
  527. strike fake fake lightning at event-entity
  528. add "{CustomName:""Infernal Creeper"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}],powered:1b,ExplosionRadius:5b,Fuse:30s}" to nbt of last spawned creeper
  529. if arg-1 is "spider":
  530. spawn a spider at player
  531. set {infernal.%UUID of last spawned spider%} to 1
  532. strike fake fake lightning at last spawned spider
  533. add "{CustomName:""Infernal Spider"",PersistenceRequired:1b,Health:50f,Attributes:[{Name:""generic.maxHealth"",Base:50d},{Name:""generic.movementSpeed"",Base:0.4d},{Name:""generic.attackDamage"",Base:5d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:50d}]}" to nbt of last spawned spider
  534. if arg-1 is "blaze":
  535. spawn a blaze at player
  536. set {infernal.%UUID of last spawned blaze%} to 1
  537. strike fake fake lightning at last spawned blaze
  538. add "{CustomName:""Infernal Blaze"",PersistenceRequired:1b,Health:80f,Attributes:[{Name:""generic.maxHealth"",Base:80d},{Name:""generic.knockbackResistance"",Base:1d},{Name:""generic.followRange"",Base:100d}]}" to nbt of last spawned blaze
  539. on death:
  540. {infernal.%UUID of victim%} is 1
  541. if victim is a skeleton:
  542. chance of 10%:
  543. drop bow with nbt "{display:{Name:""&6Machine Gun Bow""},ench:[{id:0s,lvl:0s}],HideFlags:1}" at victim
  544. if victim is a zombie:
  545. chance of 10%:
  546. drop golden hoe with nbt "{display:{Name:""&2Zombie summoner's Wand"",Lore:[""&7Zombie stock: 5""]},ench:[{id:0s,lvl:0s}],AttributeModifiers:[{Name:""generic.attackDamage"",UUIDLeast:970681094l,UUIDMost:970681094l,Operation:0,AttributeName:""generic.attackDamage"",Amount:0d,Slot:""mainhand""}],HideFlags:7}" at victim
  547. if victim is a creeper:
  548. chance of 10%:
  549. drop golden sword with nbt "{display:{Name:""&eElectric Explosive Sword"",Lore:[""&7Right click to Lightning shot!""]},ench:[{id:34s,lvl:5s},{id:16s,lvl:11s}],HideFlags:1}" at victim
  550. if victim is a blaze:
  551. damage cause is not drowning
  552. chance of 10%:
  553. drop blaze rod with nbt "{display:{Name:""&cFireball Wand"",Lore:[""&7Right click to use.""]},ench:[{id:0s,lvl:0s}],HideFlags:1}" at victim
  554. if victim is a enderman:
  555. chance of 5%:
  556. drop iron sword with nbt "{display:{Name:""&5&lEnder Sword"",Lore:[""&7How to use↓"",""&7Right click to Teleport (Required two ender pearls)"",""&7Shift + Right click to Ender Shot (Required fire charge and ender pearl)"",""&7Left click to Throw Ender pearl (Required a ender pearl)"",""&7Shift + Left cick to Swap Teleport (Required four ender pearls)""]},ench:[{id:16s,lvl:17s},{id:22s,lvl:10s}],Unbreakable:1b,HideFlags:1}" at victim
  557. command /getinfernalitem [<text>]:
  558. permission: infernal.admin
  559. permission message: &cYou do not have permission to use this command.
  560. usage: /getinfernalitem <mobtype>
  561. trigger:
  562. if arg-1 is "skeleton":
  563. give player bow with nbt "{display:{Name:""&6Machine Gun Bow""},ench:[{id:0s,lvl:0s}],HideFlags:1}"
  564. if arg-1 is "zombie":
  565. give player golden hoe with nbt "{display:{Name:""&2Zombie summoner's Wand"",Lore:[""&7Zombie stock: 5""]},ench:[{id:0s,lvl:0s}],AttributeModifiers:[{Name:""generic.attackDamage"",UUIDLeast:970681094l,UUIDMost:970681094l,Operation:0,AttributeName:""generic.attackDamage"",Amount:0d,Slot:""mainhand""}],HideFlags:7}"
  566. if arg-1 is "creeper":
  567. give player golden sword with nbt "{display:{Name:""&eElectric Explosive Sword"",Lore:[""&7Right click to Lightning shot!""]},ench:[{id:34s,lvl:5s},{id:16s,lvl:11s}],HideFlags:1}"
  568. if arg-1 is "blaze":
  569. give player blaze rod with nbt "{display:{Name:""&cFireball Wand"",Lore:[""&7Right click to use.""]},ench:[{id:0s,lvl:0s}],HideFlags:1}"
  570. if arg-1 is "enderman":
  571. give player iron sword with nbt "{display:{Name:""&5&lEnder Sword"",Lore:[""&7How to use↓"",""&7Right click to Teleport (Required two ender pearls)"",""&7Shift + Right click to Ender Shot (Required fire charge and ender pearl)"",""&7Left click to Throw Ender pearl (Required a ender pearl)"",""&7Shift + Left cick to Swap Teleport (Required four ender pearls)""]},ench:[{id:16s,lvl:17s},{id:22s,lvl:10s}],Unbreakable:1b,HideFlags:1}"
  572. on rightclick on dirt:
  573. if player's tool is golden hoe:
  574. name of player's tool is "&2Zombie summoner's Wand"
  575. cancel event
  576. else if player's offhand tool is golden hoe:
  577. name of player's offhand tool is "&2Zombie summoner's Wand"
  578. cancel event
  579. on rightclick on grass block:
  580. if player's tool is golden hoe:
  581. name of player's tool is "&2Zombie summoner's Wand"
  582. cancel event
  583. else if player's offhand tool is golden hoe:
  584. name of player's offhand tool is "&2Zombie summoner's Wand"
  585. cancel event
  586. on rightclick on grass path:
  587. if player's tool is golden hoe:
  588. name of player's tool is "&2Zombie summoner's Wand"
  589. cancel event
  590. else if player's offhand tool is golden hoe:
  591. name of player's offhand tool is "&2Zombie summoner's Wand"
  592. cancel event
  593. on rightclick:
  594. if player's tool is bow:
  595. name of player's tool is "&6Machine Gun Bow"
  596. if player's gamemode is creative:
  597. cancel event
  598. shoot an arrow from player at speed 3
  599. play ENTITY_ARROW_SHOOT at location of player with pitch 1.2
  600. add "{crit:1b,damage:5.0f}" to nbt of shot projectile
  601. add "{pickup:2b}" to nbt of shot projectile
  602. else if player's gamemode is survival or adventure:
  603. player has arrow
  604. cancel event
  605. shoot an arrow from player at speed 3
  606. play ENTITY_ARROW_SHOOT at location of player with pitch 1.2
  607. add "{crit:1b,damage:5.0f}" to nbt of shot projectile
  608. add "{pickup:1b}" to nbt of shot projectile
  609. remove an arrow from player's inventory
  610. damage player's tool by 1
  611. wait 1 tick
  612. set {_nbt} to tag "FallDistance" of nbt of player
  613. add "{FallDistance:%{_nbt}%}" to nbt of player
  614. else if player's offhand tool is bow:
  615. name of player's offhand tool is "&6Machine Gun Bow"
  616. if player's gamemode is creative:
  617. cancel event
  618. shoot an arrow from player at speed 3
  619. play ENTITY_ARROW_SHOOT at location of player with pitch 1.2
  620. add "{crit:1b}" to nbt of shot projectile
  621. add "{pickup:2b}" to nbt of shot projectile
  622. else if player's gamemode is survival or adventure:
  623. player has arrow
  624. cancel event
  625. shoot an arrow from player at speed 3
  626. play ENTITY_ARROW_SHOOT at location of player with pitch 1.2
  627. add "{crit:1b}" to nbt of shot projectile
  628. add "{pickup:1b}" to nbt of shot projectile
  629. remove an arrow from player's inventory
  630. damage player's offhand tool by 1
  631. wait 1 tick
  632. set {_nbt} to tag "FallDistance" of nbt of player
  633. add "{FallDistance:%{_nbt}%}" to nbt of player
  634. on rightclick with golden hoe:
  635. name of player's tool is "&2Zombie summoner's Wand"
  636. cancel event
  637. spawn a zombie at player
  638. play ENTITY_ZOMBIE_VILLAGER_CONVERTED at player with pitch 1
  639. execute console command "execute %player% ~ ~ ~ particle witchMagic ~ ~1 ~ 0.3 0.5 0.3 1 100 force"
  640. set {summonedzombie.%UUID of last spawned zombie%} to 1
  641. set {zombieowner.%UUID of last spawned zombie%} to player
  642. wait 1 tick
  643. add "{PersistenceRequired:1b,Attributes:[{Name:""generic.movementSpeed"",Base:0.3d},{Name:""generic.attackDamage"",Base:10d},{Name:""zombie.spawnReinforcements"",Base:1d}]}" to nbt of last spawned zombie
  644. if player's gamemode is survival or adventure:
  645. if lore of player's tool is "&7Zombie stock: 5":
  646. set lore of player's tool to "&7Zombie stock: 4"
  647. else if lore of player's tool is "&7Zombie stock: 4":
  648. set lore of player's tool to "&7Zombie stock: 3"
  649. else if lore of player's tool is "&7Zombie stock: 3":
  650. set lore of player's tool to "&7Zombie stock: 2"
  651. else if lore of player's tool is "&7Zombie stock: 2":
  652. set lore of player's tool to "&7Zombie stock: 1"
  653. else if lore of player's tool is "&7Zombie stock: 1":
  654. remove golden hoe from player's tool
  655. every tick:
  656. loop all zombies:
  657. if {summonedzombie.%UUID of loop-entity%} is 1:
  658. ignite loop-entity for 0 tick
  659. on target:
  660. if event-entity is a zombie:
  661. {summonedzombie.%UUID of event-entity%} is 1
  662. if target of event-entity is a player:
  663. cancel event
  664. if target of event-entity is a villager:
  665. cancel event
  666. if target of event-entity is a iron golem:
  667. cancel event
  668. if event-entity is a iron golem:
  669. if target of event-entity is a zombie:
  670. if {summonedzombie.%UUID of target of event-entity%} is 1:
  671. cancel event
  672. if event-entity is a snow golem:
  673. if target of event-entity is a zombie:
  674. if {summonedzombie.%UUID of target of event-entity%} is 1:
  675. cancel event
  676. on damage:
  677. if attacker is a player:
  678. loop all zombies:
  679. if health of victim > final damage:
  680. if {zombieowner.%UUID of loop-entity%} is attacker:
  681. if loop-entity is not victim:
  682. set target of loop-entity to victim
  683. if victim is a player:
  684. loop all zombies:
  685. if {zombieowner.%UUID of loop-entity%} is victim:
  686. set target of loop-entity to attacker
  687. on death of zombie:
  688. if {summonedzombie.%UUID of victim%} is 1:
  689. delete {summonedzombie.%UUID of victim%}
  690. delete {zombieowner.%UUID of victim%}
  691. on damage:
  692. attacker's tool is golden sword
  693. name of attacker's tool is "&eElectric Explosive Sword"
  694. damage was caused by attack
  695. chance of 50%:
  696. add 20 to damage
  697. strike lightning effect at victim
  698. execute console command "execute %UUID of victim% ~ ~ ~ particle hugeexplosion ~ ~0.5 ~ 0 0 0 0 1 force"
  699. execute console command "execute %UUID of victim% ~ ~ ~ playsound entity.generic.explode master @a ~ ~ ~ 4 0.7"
  700. on rightclick with golden sword:
  701. name of player's tool is "&eElectric Explosive Sword"
  702. cancel event
  703. shoot a arrow from player at speed 4
  704. play ENTITY_ARROW_SHOOT at location of player with pitch 1.2
  705. add "{Color:16777073,crit:1b,damage:10.0f}" to nbt of shot projectile
  706. set {electricarrow.%UUID of shot projectile%} to shot projectile
  707. if player's gamemode is survival or adventure:
  708. damage player's tool by 2
  709. on projectile hit:
  710. projectile is {electricarrow.%UUID of projectile%}
  711. wait 1 tick
  712. strike lightning effect at projectile
  713. create safe explosion with power 5 at projectile
  714. delete {electricarrow.%UUID of projectile%}
  715. kill projectile
  716. on dispense of golden sword:
  717. name of event-item is "&eElectric Explosive Sword"
  718. cancel event
  719. shoot an arrow from location 1 meter forwards location of event-block at speed 4
  720. play ENTITY_ARROW_SHOOT at location of event-block with pitch 1.2
  721. add "{Color:16777073,crit:1b,damage:10.0f}" to nbt of shot projectile
  722. set {electricarrow.%UUID of shot projectile%} to shot projectile
  723. on rightclick with blaze rod:
  724. name of player's tool is "&cFireball Wand"
  725. if player's gamemode is survival or adventure:
  726. player has fire charge
  727. shoot a fireball from player at speed 2
  728. add "{ExplosionPower:3}" to nbt of shot projectile
  729. execute console command "execute %player% ~ ~ ~ playsound entity.blaze.shoot master @a ~ ~ ~ 2"
  730. remove a fire charge from player's inventory
  731. if player's gamemode is creative:
  732. shoot a fireball from player at speed 2
  733. add "{ExplosionPower:3}" to nbt of shot projectile
  734. execute console command "execute %player% ~ ~ ~ playsound entity.blaze.shoot master @a ~ ~ ~ 2"
  735. on rightclick with iron sword:
  736. name of player's tool is "&5&lEnder Sword"
  737. if player is not sneaking:
  738. if player's gamemode is survival or adventure:
  739. player has 2 ender pearl
  740. remove 2 ender pearl from player's inventory
  741. add "{FallDistance:0}" to nbt of player
  742. if target block of player is set:
  743. if distance between target block of player and location of player <= 30:
  744. teleport player to location 1 meter above location of target block of player
  745. play ENTITY_ENDERMEN_TELEPORT at location of player with pitch 1
  746. else if distance between target block of player and location of player > 30:
  747. teleport player to location 30 meter forwards player
  748. play ENTITY_ENDERMEN_TELEPORT at location of player with pitch 1
  749. else if target block of player is not set:
  750. teleport player to location 30 meter forwards player
  751. play ENTITY_ENDERMEN_TELEPORT at location of player with pitch 1
  752. if player's gamemode is creative:
  753. add "{FallDistance:0}" to nbt of player
  754. if target block of player is set:
  755. if distance between target block of player and location of player <= 30:
  756. teleport player to location 1 meter above location of target block of player
  757. play ENTITY_ENDERMEN_TELEPORT at location of player with pitch 1
  758. else if distance between target block of player and location of player > 30:
  759. teleport player to location 30 meter forwards player
  760. play ENTITY_ENDERMEN_TELEPORT at location of player with pitch 1
  761. else if target block of player is not set:
  762. teleport player to location 30 meter forwards player
  763. play ENTITY_ENDERMEN_TELEPORT at location of player with pitch 1
  764. if player is sneaking:
  765. if player's gamemode is survival or adventure:
  766. player has fire charge
  767. player has ender pearl
  768. remove a fire charge from player's inventory
  769. remove a ender pearl from player's inventory
  770. set {_directionx} to "%x-coordinate of location 0.1 meter forwards location of player%" parsed as number
  771. set {_directiony} to "%y-coordinate of location 0.1 meter forwards location of player%" parsed as number
  772. set {_directionz} to "%z-coordinate of location 0.1 meter forwards location of player%" parsed as number
  773. set {_playerx} to "%x-coordinate of location of player%" parsed as number
  774. set {_playery} to "%y-coordinate of location of player%" parsed as number
  775. set {_playerz} to "%z-coordinate of location of player%" parsed as number
  776. set {_powerx} to {_directionx}-{_playerx}
  777. set {_powery} to {_directiony}-{_playery}
  778. set {_powerz} to {_directionz}-{_playerz}
  779. set {_x} to x-coordinate of location 1 meter above location 2 meter forwards location of player
  780. set {_y} to y-coordinate of location 1 meter above location 2 meter forwards location of player
  781. set {_z} to z-coordinate of location 1 meter above location 2 meter forwards location of player
  782. execute console command "execute %player% ~ ~ ~ playsound entity.enderdragon.shoot master @a ~ ~ ~ 2"
  783. execute console command "execute %player% ~ ~ ~ summon dragon_fireball %{_x}% %{_y}% %{_z}% {direction:[%{_powerx}%d,%{_powery}%d,%{_powerz}%d],power:[%{_powerx}%d,%{_powery}%d,%{_powerz}%d]}"
  784. loop fireballs in radius 4 around player:
  785. if "%tag ""power"" of nbt of loop-entity%" is "[%{_powerx}%d,%{_powery}%d,%{_powerz}%d]":
  786. set shooter of loop-entity to player
  787. if player's gamemode is creative:
  788. set {_directionx} to "%x-coordinate of location 0.1 meter forwards location of player%" parsed as number
  789. set {_directiony} to "%y-coordinate of location 0.1 meter forwards location of player%" parsed as number
  790. set {_directionz} to "%z-coordinate of location 0.1 meter forwards location of player%" parsed as number
  791. set {_playerx} to "%x-coordinate of location of player%" parsed as number
  792. set {_playery} to "%y-coordinate of location of player%" parsed as number
  793. set {_playerz} to "%z-coordinate of location of player%" parsed as number
  794. set {_powerx} to {_directionx}-{_playerx}
  795. set {_powery} to {_directiony}-{_playery}
  796. set {_powerz} to {_directionz}-{_playerz}
  797. set {_x} to x-coordinate of location 1 meter above location 2 meter forwards location of player
  798. set {_y} to y-coordinate of location 1 meter above location 2 meter forwards location of player
  799. set {_z} to z-coordinate of location 1 meter above location 2 meter forwards location of player
  800. execute console command "execute %player% ~ ~ ~ playsound entity.enderdragon.shoot master @a ~ ~ ~ 2"
  801. execute console command "execute %player% ~ ~ ~ summon dragon_fireball %{_x}% %{_y}% %{_z}% {direction:[%{_powerx}%d,%{_powery}%d,%{_powerz}%d],power:[%{_powerx}%d,%{_powery}%d,%{_powerz}%d]}"
  802. loop fireballs in radius 4 around player:
  803. if "%tag ""power"" of nbt of loop-entity%" is "[%{_powerx}%d,%{_powery}%d,%{_powerz}%d]":
  804. set shooter of loop-entity to player
  805. on leftclick with iron sword:
  806. name of player's tool is "&5&lEnder Sword"
  807. if player is not sneaking:
  808. if player's gamemode is survival or adventure:
  809. player has ender pearl
  810. remove a ender pearl from player's inventory
  811. if target of player is set:
  812. distance between player and target of player > 5
  813. shoot an ender pearl from player at speed 3
  814. add "{ownerName:0}" to nbt of shot projectile
  815. set {enderpearl.%UUID of shot projectile%} to shot projectile
  816. play ENTITY_ENDERPEARL_THROW at location of player with pitch 0
  817. else if target of player is not set:
  818. shoot an ender pearl from player at speed 3
  819. add "{ownerName:0}" to nbt of shot projectile
  820. set {enderpearl.%UUID of shot projectile%} to shot projectile
  821. play ENTITY_ENDERPEARL_THROW at location of player with pitch 0
  822. if player's gamemode is creative:
  823. if target of player is set:
  824. distance between player and target of player > 5
  825. shoot an ender pearl from player at speed 3
  826. add "{ownerName:0}" to nbt of shot projectile
  827. set {enderpearl.%UUID of shot projectile%} to shot projectile
  828. play ENTITY_ENDERPEARL_THROW at location of player with pitch 0
  829. else if target of player is not set:
  830. shoot an ender pearl from player at speed 3
  831. add "{ownerName:0}" to nbt of shot projectile
  832. set {enderpearl.%UUID of shot projectile%} to shot projectile
  833. play ENTITY_ENDERPEARL_THROW at location of player with pitch 0
  834. if player is sneaking:
  835. if player's gamemode is survival or adventure:
  836. target of player is set
  837. target of player is a living entity
  838. target of player is not armor stand
  839. distance between player and target of player <= 30
  840. player has 4 ender pearl
  841. remove 4 ender pearl from player's inventory
  842. set {_target} to target of player
  843. set {_playerloc} to location of player
  844. set yaw of {_playerloc} to 0
  845. set pitch of {_playerloc} to 0
  846. set {_targetloc} to location of {_target}
  847. set yaw of {_targetloc} to 0
  848. set pitch of {_targetloc} to 0
  849. play ENTITY_ENDERMEN_TELEPORT at {_playerloc} with pitch 1
  850. play ENTITY_ENDERMEN_TELEPORT at {_targetloc} with pitch 1
  851. teleport player to {_targetloc}
  852. teleport {_target} to {_playerloc}
  853. make player damage {_target} by 10
  854. if player's gamemode is creative:
  855. target of player is set
  856. target of player is a living entity
  857. target of player is not armor stand
  858. distance between player and target of player <= 30
  859. set {_target} to target of player
  860. set {_playerloc} to location of player
  861. set yaw of {_playerloc} to 0
  862. set pitch of {_playerloc} to 0
  863. set {_targetloc} to location of {_target}
  864. set yaw of {_targetloc} to 0
  865. set pitch of {_targetloc} to 0
  866. play ENTITY_ENDERMEN_TELEPORT at {_playerloc} with pitch 1
  867. play ENTITY_ENDERMEN_TELEPORT at {_targetloc} with pitch 1
  868. teleport player to {_targetloc}
  869. teleport {_target} to {_playerloc}
  870. make player damage {_target} by 10
  871.  
  872. every tick:
  873. loop all players:
  874. if loop-player's tool is iron sword:
  875. name of loop-player's tool is "&5&lEnder Sword"
  876. apply potion speed 4 to loop-player for 10 tick and ambient true
  877. loop-player's gamemode is survival or creative or adventure
  878. execute console command "execute %loop-player% ~ ~ ~ particle portal ~ ~0.5 ~ 0.5 0.7 0.5 0.5 5"
  879. if loop-player's gamemode is survival or adventure:
  880. loop items in loop-player's inventory:
  881. if loop-item is iron sword:
  882. name of loop-item is "&5&lEnder Sword"
  883. chance of 3%:
  884. give loop-player ender pearl
  885. on damage of player:
  886. victim's tool is iron sword
  887. name of victim's tool is "&5&lEnder Sword"
  888. damage was caused by attack
  889. attacker is a area effect cloud
  890. "%tag ""Particle"" of nbt of attacker%" is "dragonbreath"
  891. cancel event
  892. on damage:
  893. damage was caused by projectile
  894. projectile is {enderpearl.%UUID of projectile%}
  895. cancel event
  896. make shooter damage victim by 5
  897. on projectile hit:
  898. if projectile is {enderpearl.%UUID of projectile%}:
  899. shooter is a player
  900. delete {enderpearl.%UUID of projectile%}
  901. set {_tploc} to location of projectile
  902. set yaw of {_tploc} to 0
  903. set pitch of {_tploc} to 0
  904. teleport shooter to {_tploc}
  905. play ENTITY_ENDERMEN_TELEPORT at location of projectile with pitch 1
  906. command /setnextinfernaldragonspawnchance <integer>:
  907. aliases: /setnidsc
  908. permission: infernal.admin
  909. permission message: &cYou do not have permission to use this command.
  910. trigger:
  911. set {nextinfernaldragonchance} to arg
Advertisement
Add Comment
Please, Sign In to add comment