Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.34 KB | None | 0 0
  1. options:
  2. P: &3[&9&lPvP&3]
  3. C: &b
  4. H: &a
  5. World: "newarena"
  6. Spawn: "UHCspawn"
  7. LongshotBlocks: 50
  8.  
  9. command /pvpwarps:
  10. permission: skript.warps
  11. trigger:
  12. loop 20 times:
  13. command "/warp pvp%loop-number% %command sender%"
  14. broadcast "{@P}{@C} Setting warp {@H}%loop-number%!"
  15. set {PvPWarp::%loop-number%} to (location at command sender)
  16. loop all players:
  17. command "/playsound note.harp %loop-player%"
  18. wait 2 ticks
  19.  
  20. command /p:
  21. trigger:
  22. if {PvPArena} is set:
  23. if player is not in {@World}:
  24. message "{@P}{@C} You entered PvP!"
  25. heal the player
  26. clear inventory of player
  27. set {_warp} to a random integer between 1 and 20
  28. teleport (player) to {PvPWarp::%{_warp}%}
  29. give player iron sword
  30. give player bow
  31. give player 32 arrows
  32. set the chestplate of player to a iron chestplate
  33. set the leggings of player to iron leggings
  34. set the boots of player to iron boots
  35. set the helmet of player to a iron helmet
  36. else:
  37. message "{@P}{@C} You're already in the arena!"
  38. else:
  39. message "{@P}{@C} Not enabled!"
  40. command /pvparena:
  41. trigger:
  42. if (command sender) does not have permission "skript.pvparena":
  43. message "{@P}{@C} You're not allowed to do that!"
  44. else:
  45. if {PvPArena} is set:
  46. broadcast "{@P}{@C} Arena disabled!"
  47. delete {PVPArena}
  48. else:
  49. set {PvPArena} to true
  50. broadcast "{@P}{@C} Arena enabled!"
  51. on damage:
  52. {PvPArena} is set
  53. victim is in {@World}
  54. damage was caused by fall
  55. cancel the event
  56.  
  57. on damage of player:
  58. {PvPArena} is set
  59. victim is in {@World}
  60. damage was caused by projectile
  61. set {_distance} to round distance between attacker and victim
  62. {_distance} is greater than {@LongshotBlocks}
  63. broadcast "{@P}{@C} %attacker% got a longshot of {@H}%{_distance}% blocks!"
  64.  
  65. on death of player:
  66. {PvPArena} is set
  67. attacker is a player
  68. attacker is in {@World}
  69. message "{@P}{@C} You killed {@H}%victim%!" to attacker
  70. message "{@P}{@C} You were killed by {@H}%attacker%!" to victim
  71. give 1 golden apple to attacker
  72. apply regeneration 4 to attacker for 2 seconds
  73. apply speed 2 to attacker for 2 seconds
  74. give ((a random integer between 20 and 32) of arrow) to attacker
  75. clear the victim's inventory
  76.  
  77. loop items in attacker's inventory:
  78. if loop-item is bow:
  79. damage was caused by projectile
  80. if loop-item is not enchanted:
  81. set name of loop-item to "Power 1"
  82. enchant loop-item with power 1
  83. set {_power} to "enchanted with power 1!"
  84. else if loop-item is enchanted with power 1:
  85. set name of loop-item to "Power 2"
  86. enchant loop-item with power 2
  87. set {_power} to "enchanted with power 2!"
  88. else if loop-item is enchanted with power 2:
  89. set name of loop-item to "Power 3"
  90. enchant loop-item with power 3
  91. set {_power} to "enchanted with power 3!"
  92. else if loop-item is enchanted with power 3:
  93. set name of loop-item to "Power 4"
  94. enchant loop-item with power 4
  95. set {_power} to "enchanted with power 4!"
  96. else if loop-item is enchanted with power 4:
  97. set name of loop-item to "Power 5"
  98. enchant loop-item with power 5
  99. set {_power} to "enchanted with power 5!"
  100. else:
  101. set {_power} to "maxed out!"
  102. message "{@P}{@C} Your bow is %{_power}%" to attacker
  103.  
  104. if loop-item is iron sword:
  105. damage was caused by attack
  106. if loop-item is not enchanted:
  107. set name of loop-item to "Sharpness 1"
  108. enchant loop-item with sharpness 1
  109. set {_sharpness} to "enchanted with sharpness 1!"
  110. else if loop-item is enchanted with sharpness 1:
  111. set name of loop-item to "Sharpness 2"
  112. enchant loop-item with sharpness 2
  113. set {_sharpness} to "enchanted with sharpness 2!"
  114. else if loop-item is enchanted with sharpness 2:
  115. set name of loop-item to "Sharpness 3"
  116. enchant loop-item with sharpness 3
  117. set {_sharpness} to "enchanted with sharpness 3!"
  118. else if loop-item is enchanted with sharpness 3:
  119. set name of loop-item to "Sharpness 4"
  120. enchant loop-item with sharpness 4
  121. set {_sharpness} to "enchanted with sharpness 4!"
  122. else if loop-item is enchanted with sharpness 4:
  123. set name of loop-item to "Sharpness 5"
  124. enchant loop-item with sharpness 5
  125. set {_sharpness} to "enchanted with sharpness 5!"
  126. else:
  127. set {_sharpness} to "maxed out!"
  128. message "{@P}{@C} Your sword is {@H}%{_sharpness}%" to attacker
  129.  
  130. on death of player:
  131. player is in {@World} or {@Spawn}
  132. set death message to ""
  133.  
  134. on hunger meter change:
  135. {PvPArena} is set
  136. set player's hunger meter to 10
  137.  
  138. on quit:
  139. event-player is in {@World}
  140. kill event-player
  141.  
  142. on projectile hit:
  143. event-projectile is in world "{@World}":
  144. wait 5 seconds
  145. delete the arrow
  146.  
  147.  
  148. command /autopvp <text>:
  149. trigger:
  150. if arg 1 is "on":
  151. set {autopvp.%command sender%} to true
  152. if arg 1 is "off":
  153. set {autopvp.%command sender%} to false
  154. on respawn:
  155. if {Arena} is true:
  156. {autopvp.%player%} is true:
  157. wait 1 second
  158. make player execute "/p"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement