Advertisement
JavaWinter__

PvP Arena

Dec 14th, 2014
1,304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. #Winter's Arena Skript
  2. #Ok let's do this
  3.  
  4. options:
  5. P : &8[&9Arena&8]&f
  6. C : &f
  7. H : &b
  8.  
  9. Error : &8[&4ERROR&8]&f
  10.  
  11. Permission: skript.op
  12. PermissionDeny: &cYou don't have the required permission.
  13.  
  14. command /arena [<text>]:
  15. permission: {@Permission}
  16. permission message: {@PermissionDeny}
  17. trigger:
  18. if arg-1 is not set:
  19. message "{@Error} Invalid Syntax."
  20. else if arg-1 is "on" or "enable":
  21. set {Arena} to true
  22. broadcast "{@P} Arena enabled!"
  23. broadcast "{@P} Use {@H}/pvp {@C}to join!"
  24. else if arg-1 is "off" or "disable":
  25. delete {Arena}
  26. broadcast "{@P} Arena disabled!"
  27. command sender command "/spawn"
  28. command sender command "/moveall"
  29. clear inventories of all players
  30.  
  31. command /pvp:
  32. trigger:
  33. if {Arena} is true:
  34. if {Arena::%command sender%} is not set:
  35. set {_p} to (command sender)
  36. set {Arena::%command sender%} to true
  37.  
  38. #- Armour Equip -#
  39. equip {_p} with iron leggings, iron boots, iron chestplate, and iron helmet
  40.  
  41. #- Weapons -#
  42. give {_p} iron sword named "&cSword"
  43. give {_p} bow of infinity 1 named "&bBow"
  44. give {_p} 480 mushrooms
  45. give {_p} 1 arrow named "&8Ammo"
  46. remove 480 mushrooms from {_p}
  47.  
  48. #- Teleport -#
  49. set {_spawn} to random integer between 1 and 50
  50. execute console command "warp pvp%{_spawn}% %{_p}%"
  51.  
  52. #- Extra Things -#
  53. message "{@P} You have entered the arena!"
  54. message "{@P} Current Killcount: {@H}%{Arena::Kills::%{_p}%}%"
  55. else:
  56. message "{@P} You are already in the arena!"
  57. else:
  58. message "{@P} Arena is currently disabled!"
  59.  
  60. command /stats:
  61. trigger:
  62. set {_KDR} to {Arena::Kills::%command sender%}/{Arena::Deaths::%command sender%}
  63. set {_ACC} to {Arena::ShotsFired::%command sender%}/{Arena::ShotsHit::%command sender%}
  64. message "&8----------------------------------"
  65. message " %command sender%'s Stats "
  66. message "&cKills: {@H}%{Arena::Kills::%command sender%}%"
  67. message "&cDeaths: {@H}%{Arena::Deaths::%command sender%}%"
  68. message "&cKDR: {@H}%{_KDR}%"
  69. message "&cShots Fired: {@H}%{Arena::ShotsFired::%command sender%}%"
  70. message "&cSuccessful Shots: {@H}%{Arena::ShotsHit::%command sender%}%"
  71. message "&cAccuracy {@H}%{_ACC}%"
  72. message "&8----------------------------------"
  73.  
  74. command /resetstats [<text>]:
  75. permission: {@Permission}
  76. permission message: {@PermissionDeny}
  77. trigger:
  78. if arg-1 is not set:
  79. message "{@P} You are trying to reset stats!"
  80. message "{@P} Are you sure about this?"
  81. message "{@P} If you are, do {@H}/resetstats confirm"
  82. else if arg-1 is "confirm":
  83. delete {Arena::*}
  84. broadcast "{@P} {@H}%command sender% {@C}reset all arena stats!"
  85.  
  86.  
  87.  
  88. on death of player:
  89. {Arena} is true
  90.  
  91. #- Stat Variables -#
  92. add 1 to {Arena::Kills::%attacker%}
  93. add 1 to {Arena::Deaths::%victim%}
  94.  
  95. #- Messaging -#
  96. message "&aYou killed %victim%!" to attacker
  97. message "&cYou died to %attacker%!"
  98.  
  99. #- Regen -#
  100. apply regeneration 4 to attacker for 4 seconds
  101.  
  102. on shoot:
  103. {Arena} is true
  104. add 1 to {Arena::ShotsFired::%shooter%}
  105.  
  106. on damage of player:
  107. {Arena} is true
  108. damage cause is projectile:
  109. add 1 to {Arena::ShotsHit::%attacker%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement