akon1248

KitPvP-4

Apr 4th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.76 KB | None | 0 0
  1. on flight toggle:
  2. player is not flying
  3. player's gamemode is survival or adventure
  4. player's tool is feather
  5. name of player's tool is "&bDouble Jump"
  6. {kitpvp.timers.%player%::doublejump} is not set
  7. add "{Motion:[0.0d,0.0d,0.0d]}" to nbt of player
  8. push player horizontal forwards with speed 1.5
  9. push player upwards with speed 1.5
  10. cancel event
  11. set player's flight mode to false
  12. set {kitpvp.timers.%player%::doublejump} to 200
  13. every tick:
  14. loop all players:
  15. if loop-player have feather named "&bDouble Jump" with lore "&d&oUndroppable":
  16. loop-player's gamemode is survival or adventure
  17. if loop-player's tool is feather:
  18. if name of loop-player's tool is "&bDouble Jump":
  19. {kitpvp.timers.%loop-player%::doublejump} is not set
  20. set loop-player's flight mode to true
  21. else:
  22. set loop-player's flight mode to false
  23. else:
  24. set loop-player's flight mode to false
  25. if {kitpvp.timers.%loop-player%::doublejump} >= 1:
  26. remove 1 from {kitpvp.timers.%loop-player%::doublejump}
  27. if loop-player's tool is feather:
  28. name of loop-player's tool is "&bDouble Jump"
  29. send action bar from "&bDouble Jump&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::doublejump}/20)%秒" to loop-player
  30. {kitpvp.timers.%loop-player%::doublejump} is 0
  31. delete {kitpvp.timers.%loop-player%::doublejump}
  32. send action bar from "&bDouble Jump&aが使用可能になりました" to loop-player
  33. on rightclick with iron sword:
  34. name of player's tool is "&bThrowing Knife"
  35. {kitpvp.timers.%player%::throwingknife} is not set
  36. play sound "entity.arrow.shoot" to all players at player with volume 1 pitch 1.2
  37. set {_loc} to location 1.5 meter above location of player
  38. spawn an armor stand at location sin(90-pitch of player*-1)*0.4 meter below location cos(90-pitch of player*-1)*0.4 meter horizontal forwards location 0.75 meter below location 0.1875 meter horizontal to the right location 0.3 meter backwards location 1 meter forwards location 1.5 meter above location of player
  39. add "{NoGravity:1b,Invisible:1b,Marker:1b,Small:1b,Rotation:[%yaw of player%f,0f],Pose:{Head:[90f,%pitch of player*-1+45%f,90f]}}" to nbt of last spawned armor stand
  40. wait 1 tick
  41. add "{ArmorItems:[{},{},{},{id:""minecraft:iron_sword"",Count:1b,Damage:0s}]}" to nbt of last spawned armor stand
  42. set {knife::%UUID of last spawned armor stand%} to {_loc}
  43. set {knifeage.%UUID of last spawned armor stand%} to 200
  44. set {knifeshooter.%UUID of last spawned armor stand%} to player
  45. set {kitpvp.timers.%player%::throwingknife} to 60
  46. function getEntityFromUUID(uuid: text) :: entity:
  47. loop all entities:
  48. if UUID of loop-entity is "%{_uuid}%":
  49. return loop-entity
  50. stop loop
  51. every tick:
  52. loop {knife::*}:
  53. {knifeage.%loop-index%} >= 1
  54. set {_knife} to getEntityFromUUID(loop-index)
  55. set {_nohitblocks::*} to 0, 6, 8, 9, 10, 11, 30, 31, 32, 36, 37, 38, 39, 40, 50, 51, 55, 63, 65, 68, 69, 70, 72, 76, 77, 93, 94, 131, 143, 147, 148, 149, 150, 175 and 425
  56. loop 12 times:
  57. set {knife::%loop-index%} to location 0.25 meter forwards {knife::%loop-index%}
  58. teleport {_knife} to location sin(90-pitch of {knife::%loop-index%}*-1)*0.4 meter below location cos(90-pitch of {knife::%loop-index%}*-1)*0.4 meter horizontal forwards location 0.7 meter below location 0.1875 meter horizontal to the right location 0.3 meter backwards {knife::%loop-index%}
  59. loop entities in radius 0.5 around {knife::%loop-index%}:
  60. loop-entity is a living entity
  61. loop-entity is not armor stand
  62. loop-entity is not {knifeshooter.%loop-index%}
  63. if loop-entity is a player:
  64. loop-entity's gamemode is survival or adventure
  65. make {knifeshooter.%loop-index%} damage loop-entity by 8
  66. delete {knife::%loop-index%}
  67. delete {knifeage.%loop-index%}
  68. delete {knifeshooter.%loop-index%}
  69. kill {_knife}
  70. else if loop-entity is not a player:
  71. make {knifeshooter.%loop-index%} damage loop-entity by 8
  72. delete {knife::%loop-index%}
  73. delete {knifeage.%loop-index%}
  74. delete {knifeshooter.%loop-index%}
  75. kill {_knife}
  76. if {_nohitblocks::*} do not contain id of block at location 0.3 meter forwards {knife::%loop-index%}:
  77. play sound "entity.zombie.attack_iron_door" to all players at {knife::%loop-index%} with volume 1 pitch 2
  78. play sound "entity.item.break" to all players at {knife::%loop-index%} with volume 1 pitch 2
  79. delete {knife::%loop-index%}
  80. delete {knifeage.%loop-index%}
  81. delete {knifeshooter.%loop-index%}
  82. delayKill({_knife}, 60)
  83. remove 1 from {knifeage.%loop-index%}
  84. {knifeage.%loop-index%} is 0
  85. delete {knife::%loop-index%}
  86. delete {knifeage.%loop-index%}
  87. delete {knifeshooter.%loop-index%}
  88. kill {_knife}
  89. loop all players:
  90. {kitpvp.timers.%loop-player%::throwingknife} >= 1
  91. remove 1 from {kitpvp.timers.%loop-player%::throwingknife}
  92. if loop-player's tool is iron sword:
  93. name of loop-player's tool is "&bThrowing Knife"
  94. send action bar from "&bThrowing Knife&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::throwingknife}/20)%秒" to loop-player
  95. {kitpvp.timers.%loop-player%::throwingknife} is 0
  96. delete {kitpvp.timers.%loop-player%::throwingknife}
  97. send action bar from "&bThrowing Knife&aが使用可能になりました" to loop-player
  98. function delayKill(e: entity, delay: number):
  99. if {_delay} is 0:
  100. kill {_e}
  101. else:
  102. loop {_delay} times:
  103. wait 1 tick
  104. kill {_e}
  105. on damage of player:
  106. victim's boots is leather boots
  107. name of victim's boots is "&bAcrobat Boots"
  108. damage was caused by fall
  109. cancel event
  110. every tick:
  111. loop all players:
  112. loop-player's boots is leather boots
  113. name of loop-player's boots is "&bAcrobat Boots"
  114. execute console command "execute %loop-player% ~ ~ ~ effect @s 1 1 0 true"
  115. execute console command "execute %loop-player% ~ ~ ~ effect @s 8 1 4 true"
  116. on damage of player:
  117. attacker is a player
  118. attacker's tool is iron sword
  119. name of attacker's tool is "&4Spider Sword"
  120. chance of 20%:
  121. apply poison 2 to victim
  122. loop random integer between 1 and 3 times:
  123. set {_loc} to location random integer between -2 and 2 meter east location random integer between -2 and 2 meter south location of block at victim
  124. block at {_loc} is air
  125. set block at {_loc} to cobweb
  126. set {cobweb::%{_loc}%-%victim's world%} to {_loc}
  127. set {cobwebowner.%{_loc}%-%victim's world%} to "%attacker%" parsed as player
  128. set {cobwebtime.%{_loc}%-%victim's world%} to 200
  129. every tick:
  130. loop all players:
  131. loop items in loop-player's inventory:
  132. loop-item is iron sword
  133. name of loop-item is "&4Spider Sword"
  134. amount of cobweb in loop-player's inventory < 16
  135. chance of 1%:
  136. give loop-player cobweb
  137. on rightclick with cobweb:
  138. cancel event
  139. shoot an armor stand from player with speed 2
  140. add "{Tags:[""cobweb"",""owner:%player%""],Invisible:1b,Small:1b,DisabledSlots:2039583}" to nbt of shot armor stand
  141. set {_armorstand} to shot armor stand
  142. spawn a falling cobweb at player
  143. add "{NoGravity:1b,DropItem:0b,Time:400}" to nbt of last spawned falling cobweb
  144. make last spawned falling cobweb ride {_armorstand}
  145. player's gamemode is survival or adventure
  146. remove a cobweb from player's tool
  147. every tick:
  148. loop all armor stands:
  149. set {_tags::*} to getTagValues(loop-entity)
  150. {_tags::*} contain "cobweb"
  151. if passenger of loop-entity is not set:
  152. kill loop-entity
  153. loop-entity is on ground
  154. if block at loop-entity is air:
  155. set block at loop-entity to cobweb
  156. set {cobweb::%location of block at loop-entity%-%loop-entity's world%} to location of block at loop-entity
  157. set {cobwebowner.%location of block at loop-entity%-%loop-entity's world%} to getOwnerTag("%tag ""Tags"" of nbt of loop-entity%")
  158. set {cobwebtime.%location of block at loop-entity%-%loop-entity's world%} to 200
  159. kill passenger of loop-entity
  160. kill loop-entity
  161. on leftclick on cobweb:
  162. loop {cobweb::*}:
  163. loop-value is event-location
  164. set {_cobwebid} to loop-index
  165. player is {cobwebowner.%{_cobwebid}%}
  166. delete {cobweb::%{_cobwebid}%}
  167. delete {cobwebowner.%{_cobwebid}%}
  168. delete {cobwebtime.%{_cobwebid}%}
  169. execute console command "execute %player% ~ ~ ~ setblock %x-coordinate of clicked block% %y-coordinate of clicked block% %z-coordinate of clicked block% air 0 destroy"
  170. on break of cobweb:
  171. loop {cobweb::*}:
  172. loop-value is event-location
  173. set {_cobwebid} to loop-index
  174. player is not {cobwebowner.%{_cobwebid}%}
  175. cancel event
  176. every tick:
  177. loop {cobweb::*}:
  178. {cobwebtime.%loop-index%} >= 1
  179. remove 1 from {cobwebtime.%loop-index%}
  180. {cobwebtime.%loop-index%} is 0
  181. if block at loop-value is cobweb:
  182. set block at loop-value to air
  183. delete {cobweb::%loop-index%}
  184. delete {cobwebowner.%loop-index%}
  185. delete {cobwebtime.%loop-index%}
  186. every tick:
  187. loop all players:
  188. loop-player's gamemode is survival or adventure
  189. loop-player's boots is leather boots
  190. name of loop-player's boots is "&4Spider Boots"
  191. set {_nowallblockids::*} to 0, 6, 8, 9, 10, 11, 30, 31, 32, 36, 37, 38, 39, 40, 50, 51, 55, 63, 65, 68, 69, 70, 72, 76, 77, 90, 93, 94, 119, 131, 143, 147, 148, 149, 150, 175, 209 and 425
  192. if {_nowallblockids::*} do not contain id of block at location 0.7 meter horizontal forwards location of loop-player:
  193. {spiderskillcooldown.%loop-player%} is not set
  194. if {timers.%loop-player%::spiderskill} is not set:
  195. set {timers.%loop-player%::spiderskill} to 60
  196. if {timers.%loop-player%::spiderskill} >= 1:
  197. remove 1 from {timers.%loop-player%::spiderskill}
  198. {timers.%loop-player%::spiderskill} is 0
  199. set loop-player's fly speed to 0.1
  200. loop-player's gamemode is survival or adventure
  201. set loop-player's flight mode to false
  202. delete {flight.%UUID of loop-player%}
  203. delete {timers.%loop-player%::spiderskill}
  204. set {spiderskillcooldown.%loop-player%} to 1
  205. {spiderskillcooldown.%loop-player%} is not set
  206. loop-player is not flying
  207. loop-player is not on ground
  208. set loop-player's flight mode to true
  209. force loop-player to start flying
  210. set loop-player's fly speed to 0.05
  211. else:
  212. set loop-player's fly speed to 0.1
  213. loop-player's gamemode is survival or adventure
  214. set loop-player's flight mode to false
  215. delete {flight.%UUID of loop-player%}
  216. delete {_spiderskill}
  217. if loop-player is on ground:
  218. if {spiderskillcooldown.%loop-player%} is 1:
  219. delete {spiderskillcooldown.%loop-player%}
  220. if {timers.%loop-player%::spiderskill} >= 1:
  221. delete {timers.%loop-player%::spiderskill}
  222. on flight toggle:
  223. player is flying
  224. "%player's fly speed%" is "0.05"
  225. cancel event
  226. on damage of player:
  227. victim's boots is leather boots
  228. name of victim's boots is "&4Spider Boots"
  229. damage was caused by fall
  230. cancel event
  231. on damage:
  232. attacker is a player
  233. attacker's tool is iron sword
  234. name of attacker's tool is "&4Vampire Sword"
  235. damage > 0.1
  236. chance of 20%:
  237. heal attacker by damage*0.4
  238. execute console command "execute %UUID of victim% ~ ~ ~ particle blockdust ~ ~1 ~ 0.3 0.5 0.3 0.05 100 normal @a 152"
  239. loop 2 times:
  240. play sound "block.stone.break" to all players at victim with volume 1.2 pitch 1
  241. function resetDamageDelay(e: entity):
  242. set {_damagedelay} to damage delay of {_e}
  243. set damage delay of {_e} to 0 tick
  244. wait 1 tick
  245. set damage delay of {_e} to {_damagedelay}
  246. on damage of player:
  247. attacker is a player
  248. damage was caused by attack
  249. attacker's tool is fermented spider eye
  250. name of attacker's tool is "&4Health Drain"
  251. event is not cancelled
  252. {kitpvp.timers.%attacker%::healthdrain} is not set
  253. apply potion slowness 4 to victim for 5 second and ambient true
  254. apply potion weakness 1 to attacker for 5 second and ambient true
  255. resetDamageDelay(victim)
  256. set {kitpvp.timers.%attacker%::healthdrain} to 900
  257. add "{Attributes:[{Name:""generic.knockbackResistance"",Base:1.0d}]}" to nbt of victim
  258. loop 100 times:
  259. if victim is dead:
  260. stop loop
  261. if attacker is dead:
  262. stop loop
  263. set {_vector} to vector between attacker and victim
  264. set {_loc} to location of attacker's head
  265. set yaw of {_loc} to vector yaw of {_vector}
  266. set pitch of {_loc} to vector pitch of {_vector}
  267. loop round(sqrt(x of {_vector}^2+y of {_vector}^2+z of {_vector}^2))*4 times:
  268. show 1 redstone particles at {_loc} with color 255, 0, 0 offset by 0, 0, 0
  269. set {_loc} to location 0.25 meter forwards {_loc}
  270. make attacker damage victim by 0.15
  271. heal attacker by 0.15
  272. wait 1 tick
  273. resetDamageDelay(victim)
  274. add "{Attributes:[{Name:""generic.knockbackResistance"",Base:0.0d}]}" to nbt of victim
  275. every tick:
  276. loop all players:
  277. {kitpvp.timers.%loop-player%::healthdrain} >= 1
  278. remove 1 from {kitpvp.timers.%loop-player%::healthdrain}
  279. if loop-player's tool is fermented spider eye:
  280. name of loop-player's tool is "&4Health Drain"
  281. send action bar from "&4Health Drain&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::healthdrain}/20)%秒" to loop-player
  282. {kitpvp.timers.%loop-player%::healthdrain} is 0
  283. delete {kitpvp.timers.%loop-player%::healthdrain}
  284. send action bar from "&4Health Drain&aが使用可能になりました" to loop-player
  285. on fishing:
  286. name of player's tool is "&6Grapple"
  287. if fishing state is FISHING:
  288. if {grapplecooltime.%player%} is set:
  289. send "&aCooldown: &c%ceil({grapplecooltime.%player%}/20)% seconds"
  290. cancel event
  291. else:
  292. push fishing hook in direction of player
  293. else if fishing state is IN_GROUND:
  294. set {grapplecooltime.%player%} to 200
  295. push player direction from player to fishing hook at speed distance between player and fishing hook/10
  296. difference between y-coordinate of player and y-coordinate of fishing hook <= 2
  297. set {_speed} to distance between player and fishing hook/30
  298. {_speed} < 0.5
  299. distance between player and fishing hook >= 2
  300. set {_speed} to 0.5
  301. push player upwards at speed {_speed}
  302. every tick:
  303. loop all players:
  304. {grapplecooltime.%loop-player%} is set
  305. remove 1 from {grapplecooltime.%loop-player%}
  306. {grapplecooltime.%loop-player%} <= 0
  307. delete {grapplecooltime.%loop-player%}
  308. on damage of player:
  309. victim's tool is fishing rod
  310. name of victim's tool is "&6Grapple"
  311. damage was caused by fall
  312. cancel event
  313. function getVector(e: entity) :: vector:
  314. set {_nbttag} to "%tag ""Motion"" of nbt of {_e}%"
  315. replace "[", "]" and "d" in {_nbttag} with ""
  316. set {_strvalues::*} to split {_nbttag} by ","
  317. return new vector from {_strvalues::1} parsed as number, {_strvalues::2} parsed as number, {_strvalues::3} parsed as number
  318. on shoot:
  319. shooter is a player
  320. projectile is an arrow
  321. name of shooter's tool is "&3Sniper Bow"
  322. if line 2 of lore of shooter's tool is "&7- Tier 0 -":
  323. set {_tier} to 0
  324. if line 2 of lore of shooter's tool is "&c- Tier 1 -":
  325. set {_tier} to 1
  326. if line 2 of lore of shooter's tool is "&6- Tier 2 -":
  327. set {_tier} to 2
  328. if line 2 of lore of shooter's tool is "&e- Tier 3 -":
  329. set {_tier} to 3
  330. if line 2 of lore of shooter's tool is "&a- Tier 4 -":
  331. set {_tier} to 4
  332. if line 2 of lore of shooter's tool is "&3- Tier 5 -":
  333. set {_tier} to 5
  334. set {_arrowvector} to getVector(projectile)
  335. add "{Tags:[""sniperarrow""],NoGravity:1b,Color:43690,Motion:[%x of {_arrowvector}*(1+{_tier}/5)%d,%y of {_arrowvector}*(1+{_tier}/5)%d,%z of {_arrowvector}*(1+{_tier}/5)%d]}" to nbt of projectile
  336. wait 1 tick
  337. set {_vectorsize} to getVectorSizeFromMotionNBT(projectile)
  338. delayKill(projectile, 600)
  339. set {_damage} to tag "damage" of nbt of projectile
  340. while getEntityFromUUID(UUID of projectile) is set:
  341. add "{damage:%{_damage}%d,Motion:[%x of {_arrowvector}*(1+{_tier}/5)%d,%y of {_arrowvector}*(1+{_tier}/5)%d,%z of {_arrowvector}*(1+{_tier}/5)%d]}" to nbt of projectile
  342. add {_vectorsize}/10 to {_damage}
  343. wait 1 tick
  344. on death of player:
  345. attacker is a player
  346. projectile is an arrow
  347. set {_tags::*} to getTagValues(projectile)
  348. {_tags::*} contain "sniperarrow"
  349. loop items in attacker's inventory:
  350. loop-item is bow
  351. name of loop-item is "&3Sniper Bow"
  352. if line 2 of lore of loop-item is "&7- Tier 0 -":
  353. set line 2 of lore of loop-item to "&c- Tier 1 -"
  354. play sound "ENTITY_WITHER_SPAWN" to attacker with volume 1 and pitch 15
  355. else if line 2 of lore of loop-item is "&c- Tier 1 -":
  356. set line 2 of lore of loop-item to "&6- Tier 2 -"
  357. play sound "ENTITY_WITHER_SPAWN" to attacker with volume 1 and pitch 15
  358. else if line 2 of lore of loop-item is "&6- Tier 2 -":
  359. set line 2 of lore of loop-item to "&e- Tier 3 -"
  360. play sound "ENTITY_WITHER_SPAWN" to attacker with volume 1 and pitch 15
  361. else if line 2 of lore of loop-item is "&e- Tier 3 -":
  362. set line 2 of lore of loop-item to "&a- Tier 4 -"
  363. play sound "ENTITY_WITHER_SPAWN" to attacker with volume 1 and pitch 15
  364. else if line 2 of lore of loop-item is "&a- Tier 4 -":
  365. set line 2 of lore of loop-item to "&3- Tier 5 -"
  366. play sound "ENTITY_WITHER_SPAWN" to attacker with volume 1 and pitch 15
  367. on death of player:
  368. attacker is a player
  369. damage was caused by attack
  370. attacker's tool is iron sword
  371. name of attacker's tool is "&4Murderer Sword"
  372. enchant level of sharpness of attacker's tool < 7
  373. set {_p} to attacker
  374. evaluate "enchant {_p}'s tool with Sharpness %enchant level of sharpness of attacker's tool+1%"
  375. play sound "ENTITY_WITHER_SPAWN" to attacker with volume 1 and pitch 15
  376. on rightclick with magma cream:
  377. name of player's tool is "&4Madness Charger"
  378. {kitpvp.timers.%player%::madnesscharger} is not set
  379. set {kitpvp.timers.%player%::madnesscharger} to 2400
  380. set {_timergage} to new bossbar
  381. set {madness.%player%} to 0
  382. set {_timer} to 200
  383. set progress of bar {_timergage} to 1
  384. set name of bar {_timergage} to "&4Charged Madness: &c%{madness.%player%}%%%"
  385. set color of bar {_timergage} to RED
  386. set style of bar {_timergage} to SOLID
  387. add player to bar {_timergage}
  388. loop 200 times:
  389. wait 1 tick
  390. remove 1 from {_timer}
  391. set name of bar {_timergage} to "&4Charged Madness: &c%{madness.%player%}%%%"
  392. set progress of bar {_timergage} to {_timer}/200
  393. if player is dead:
  394. stop loop
  395. if {madness.%player%} is 100:
  396. stop loop
  397. if {madness.%player%} > 0:
  398. play sound "ENTITY_ELDER_GUARDIAN_CURSE" to player with volume 1 and pitch 5
  399. set {damagemagnification.%player%} to 1+{madness.%player%}/100
  400. set {madnesstimer.%player%} to 400
  401. remove player from bar {_timergage}
  402. delete {madness.%player%}
  403. on damage of player:
  404. attacker is a player
  405. damage was caused by attack
  406. if {madness.%attacker%} is set:
  407. event is not cancelled
  408. if {madness.%attacker%}+round(damage*1.5) >= 100:
  409. set {madness.%attacker%} to 100
  410. else:
  411. add round(damage*1.5) to {madness.%attacker%}
  412. if {damagemagnification.%attacker%} is set:
  413. set damage to damage*{damagemagnification.%attacker%}
  414. on join:
  415. delete {madness.%player%}
  416. delete {damagemagnification.%player%}
  417. delete {madnesstimer.%player%}
  418. on death of player:
  419. delete {madness.%victim%}
  420. delete {damagemagnification.%victim%}
  421. delete {madnesstimer.%victim%}
  422. every tick:
  423. loop all players:
  424. if {kitpvp.timers.%loop-player%::madnesscharger} >= 1:
  425. remove 1 from {kitpvp.timers.%loop-player%::madnesscharger}
  426. if loop-player's tool is magma cream:
  427. name of loop-player's tool is "&4Madness Charger"
  428. send action bar from "&4Madness Charger&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::madnesscharger}/20)%秒" to loop-player
  429. {kitpvp.timers.%loop-player%::madnesscharger} is 0
  430. delete {kitpvp.timers.%loop-player%::madnesscharger}
  431. send action bar from "&4Madness Charger&aが使用可能になりました" to loop-player
  432. if {damagemagnification.%loop-player%} is set:
  433. execute console command "execute %loop-player% ~ ~ ~ particle mobSpell ~%random number between -0.3 and 0.3% ~%random number between 0 and 2% ~%random number between -0.3 and 0.3% 0.73 0 0 1 0"
  434. if {madnesstimer.%loop-player%} >= 1:
  435. remove 1 from {madnesstimer.%loop-player%}
  436. {madnesstimer.%loop-player%} is 0
  437. delete {damagemagnification.%loop-player%}
  438. delete {madnesstimer.%loop-player%}
Add Comment
Please, Sign In to add comment