Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.88 KB | None | 0 0
  1. options:
  2. C: &8(*) &7
  3. p: &8(*) &7
  4. S: &r
  5. S1: &r
  6. C1: chemist
  7. PM: Unknown command. Type "/help" for help.
  8. variables:
  9. {joustarena} = false
  10. {joust1} = false
  11. on load:
  12. broadcast "{@C}{@S}Duels.sk&7 by Dittoo was loaded!"
  13. command /dtoggle:
  14. permission: {@C1}.dtoggle
  15. permission message: {@PM}
  16. trigger:
  17. if {joustarena} is false:
  18. set {joustarena} to true
  19. message "{@C}&7Duels are now enabled!"
  20. stop
  21. if {joustarena} is true:
  22. set {joustarena} to false
  23. message "{@C}&7Duels are now disabled!"
  24. stop
  25. command /duel <player>:
  26. usage: /duel <player>
  27. aliases: /1v1, /challenge, /d
  28. trigger:
  29. if argument 1 is equal to command sender:
  30. message "{@C}&7You cannot duel yourself!" to player
  31. stop
  32. if {joust1} is true:
  33. message "{@C}&7All arenas are in use, please try again later." to command sender
  34. stop
  35. if {joustarena} is true:
  36. if {joustinvite:%arg 1%:%command sender%} is set:
  37. send "{@C}You already have an active request!"
  38. stop
  39. else:
  40. message "{@C}You sent a duel request to {@S}%arg-1%&7!" to command sender
  41. set {joustinvite:%arg 1%:%command sender%} to true
  42. message "{@C}You were sent a duel invite from {@S}%command sender%&7, {@S}/accept {@S}%command sender%&7 to accept it!" to arg-1
  43. wait 30 seconds
  44. if {joustinvite:%arg-1%:%command sender%} is set:
  45. send "&7Your invitation from %command sender% has expired!" to arg-1
  46. send "&7Your invitation to %arg-1% has expired!" to command sender
  47. delete {joustinvite:%arg-1%:%command sender%}
  48. stop
  49. else:
  50. message "{@C}&7Duels are currently {@S}disabled&7! Try again later!"
  51. stop
  52.  
  53. command /accept <player>:
  54. aliases: a, acc
  55. trigger:
  56. if arg-1 is equal to command sender:
  57. message "{@C}&7You cannot joust yourself!" to player
  58. stop
  59. if {joustarena} is true:
  60. if {joustinvite:%command sender%:%arg 1%} is true:
  61. if {joust1} is false:
  62. message "{@C}&7You accepted a duel request from %arg 1%" to command sender
  63. message "{@C}&7Your request from %command sender% was accepted" to arg-1
  64. set {jouster1} to player
  65. set {jouster2} to argument 1
  66. broadcast "{@C}{@S}%arg 1% &7has challenged {@S}%command sender%&7!"
  67. heal arg-1 by 10.0 hearts
  68. heal command sender by 10.0 hearts
  69. execute console command "/gamemode adventure %command sender%"
  70. execute console command "/gamemode adventure %arg-1%"
  71. execute console command "/scoreboard teams join *GT %command sender%"
  72. execute console command "/scoreboard teams join *GT %arg-1%"
  73. delete {joustinvite:%command sender%:%arg 1%}
  74. delete {joustinvite:%arg-1%:%command sender%}
  75. make command sender execute command "/dwarp 1"
  76. make arg-1 execute command "/dwarp 2"
  77. set {joust1} to true
  78. stop
  79. else:
  80. send "{@C}All arenas are in use, please try again later."
  81. stop
  82. else:
  83. send "{@C}%arg-1% has not requested to duel you!"
  84. stop
  85. else:
  86. send "{@C}Duels are currently {@S}disabled&7."
  87. stop
  88.  
  89. on death of player:
  90. if {joustarena} is true:
  91. if {jouster1} is equal to victim:
  92. if {jouster2} is equal to attacker:
  93. broadcast "{@C}&7%{jouster2}% &7has defeated&7 %{jouster1}%!"
  94. execute console command "/spawn %{jouster2}%"
  95. heal {jouster2} by 10.0 hearts
  96. clear the inventory of {jouster2}
  97. clear the inventory of {jouster1}
  98. delete {jouster2}
  99. delete {jouster1}
  100. set {joust1} to false
  101. if {jouster2} is equal to victim:
  102. if {jouster1} is equal to attacker:
  103. broadcast "{@C}&7%{jouster1}% &7has defeated&7 %{jouster2}%!"
  104. execute console command "/spawn %{jouster1}%"
  105. heal {jouster1} by 10.0 hearts
  106. clear the inventory of {jouster1}
  107. clear the inventory of {jouster2}
  108. delete {jouster1}
  109. delete {jouster2}
  110. set {joust1} to false
  111. on quit:
  112. if {joustarena} is true:
  113. if {jouster1} is equal to player:
  114. broadcast "{@C}&7%{jouster2}% &7has defeated&7 %{jouster1}%!"
  115. execute console command "/win %{jouster2}%"
  116. heal {jouster2} by 10.0 hearts
  117. clear the inventory of {jouster2}
  118. clear the inventory of {jouster1}
  119. delete {jouster2}
  120. delete {jouster1}
  121. set {joust1} to false
  122. if {jouster2} is equal to player:
  123. broadcast "{@C}&7%{jouster1}% &7has defeated &7%{jouster2}%&7!"
  124. execute console command "/win %{jouster1}%"
  125. heal {jouster1} by 10.0 hearts
  126. clear the inventory of {jouster1}
  127. clear the inventory of {jouster2}
  128. delete {jouster1}
  129. delete {jouster2}
  130. set {joust1} to false
  131. on skript stop:
  132. delete {jouster1}
  133. delete {jouster2}
  134. set {joust1} to false
  135. on skript start:
  136. delete {jouster1}
  137. delete {jouster2}
  138. set {joust1} to false
  139.  
  140. command /dwarpset <integer>:
  141. permission: chemist.warpset
  142. permission message: {@PM}
  143. trigger:
  144. set {warp.%arg-1%} to location of player
  145. message "&7Duel spawn {@S}%arg-1%&7 is now at {@S}%location of player%&7!"
  146. command /dwarp <integer>:
  147. trigger:
  148. if {jouster1} is equal to player:
  149. teleport player to {warp.%arg-1%}
  150. message "&7Teleporting to duel spawn..."
  151. stop
  152. if {jouster2} is equal to player:
  153. teleport player to {warp.%arg-1%}
  154. message "&7Teleporting to duel spawn..."
  155. stop
  156. if {jouster1} is equal to player:
  157. stop
  158. if {jouster2} is equal to player:
  159. stop
  160. send "{@C}An error occurred, please try again."
  161. command /win <player>:
  162. executable by: players and console
  163. permission: tiger.core.op
  164. trigger:
  165. if argument 1 is equal to {jouster1}:
  166. broadcast "{@C}&7%{jouster1}% &7has defeated&7 %{jouster2}%!"
  167. if argument 1 is equal to {jouster2}:
  168. broadcast "{@C}&7%{jouster2}% &7has defeated&7 %{jouster1}%!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement