Advertisement
ReportCards

Untitled

Apr 8th, 2017
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.25 KB | None | 0 0
  1. #-------------------------------------------
  2. # "Get Combo\ed" by JaydenJinx & WaterXCubic
  3. # Version 2.3Beta
  4. # Feel free to do whatever is needed!
  5. #-------------------------------------------
  6. on skript load:
  7. if {combo.arenacount} is not set:
  8. set {combo.arenacount} to 0
  9. command "/getcomboed" [<text>] [<text>] [<text>]:
  10. aliases: /gc
  11. trigger:
  12. if arg 1 is not set:
  13. if player has permission "combo.admin":
  14. message "&6-----&7GetCombo\ed &8&lAdmin&6-----"
  15. message "&c/gc duel [Player] &7- &eRequest to duel someone!"
  16. message "&c/gc cancel [Player] &7- &eCancels a duel request!"
  17. message "&c/gc stats [Player] &7- &eViews yours or another player's stats!"
  18. message "&c/gc createarena [Arena] &7- &eCreate an arena!"
  19. message "&c/gc deletearena [Arena] &7- &eDelete an arena!"
  20. message "&c/gc setspawn [Arena] [Spawn A/B] &7- &eSet the arena's spawns!"
  21. message "&c/gc listarenas &7- &eList all arenas!"
  22. stop
  23. else:
  24. message "&6-----&7GetCombo\ed&6-----"
  25. message "&c/gc duel [Player] &7- &eRequest to duel someone!"
  26. message "&c/gc cancel [Player] &7- &eCancels a duel request!"
  27. message "&c/gc stats [Player] &7- &eViews yours or another player's stats!"
  28. if arg 1 is "createarena":
  29. if player has permission "combo.admin":
  30. if arg 2 is set:
  31. if {combo.arena::%arg 2%} is set:
  32. message "&7GetCombo\ed &6>> &cThere's already an arena by the name of %arg 2%!"
  33. stop
  34. else if {combo.arena::%arg 2%} is not set:
  35. add 1 to {combo.arenacount}
  36. set {combo.arena::%arg 2%} to {combo.arenacount}
  37. set {combo.arena.inuse::%arg 2%} to arg 2
  38. message "&7GetCombo\ed &6>> &aCreated an arena called %arg 2%!"
  39. message "&cMake sure to set the player spawns!"
  40. stop
  41. else:
  42. message "&7GetCombo\ed &6>> &cSupply a name for the new arena!"
  43. stop
  44. else:
  45. message "&7GetCombo\ed &6>> &cInvalid Permissions!"
  46. if arg 1 is "setspawn":
  47. if player has permission "combo.admin":
  48. if arg 2 is set:
  49. if {combo.arena::%arg 2%} is not set:
  50. message "&7GetCombo\ed &6>> &cThat arena does not exist!"
  51. stop
  52. if arg 3 is set:
  53. if arg 3 is "a":
  54. set {combo.spawn::%arg 2%::a} to location of player
  55. message "&7GetCombo\ed &6>> &aSet A's spawn for the arena %arg 2%!"
  56. if {combo.spawn::%arg 2%::b} is set:
  57. set {combo.arena.notinuse::%arg 2%} to arg 2
  58. stop
  59. else if arg 3 is "b":
  60. set {combo.spawn::%arg 2%::b} to location of player
  61. message "&7GetCombo\ed &6>> &aSet B's spawn for the arena %arg 2%!"
  62. if {combo.spawn::%arg 2%::a} is set:
  63. set {combo.arena.notinuse::%arg 2%} to arg 2
  64. stop
  65. else:
  66. message "&7GetCombo\ed &6>> &c%arg 2% is not spawn A or B!"
  67. stop
  68. else if arg 2 is not set:
  69. message "&7GetCombo\ed &6>> &cYou must supply an arena to set the spawns for!"
  70. stop
  71. else:
  72. message "&7GetCombo\ed &6>> &cInvalid Permissions!"
  73. if arg 1 is "deletearena":
  74. if player has permission "combo.admin":
  75. if arg 2 is set:
  76. if {combo.arena::%arg 2%} is set:
  77. delete {combo.arena::%arg 2%}
  78. delete {combo.spawn::%arg 2%::*}
  79. remove 1 from {combo.arenacount}
  80. message "&7GetCombo\ed &6>> &aDeleted an arena named %arg 2%!"
  81. stop
  82. else:
  83. message "&7GetCombo\ed &6>> &cThere is no arena named %arg 2%!"
  84. stop
  85. else:
  86. message "&7GetCombo\ed &6>> &cSupply an arena to delete!"
  87. else:
  88. message "&7GetCombo\ed &6>> &cInvalid Permissions!"
  89. if arg 1 is "duel":
  90. if arg 2 is set:
  91. if arg 2 parsed as a player is player:
  92. message "&7GetCombo\ed &6>> &cYou can't duel yourself!"
  93. stop
  94. if arg 2 parsed as a player is online:
  95. set {combo.%player%.invited::%arg 2%} to arg 2
  96. message "&7GetCombo\ed &6>> &d%player% has challenged you to a duel." to arg 2 parsed as a player
  97. message "&7GetCombo\ed &6>> &dYou have challenged %arg 2% to a duel."
  98. message "&cWait for them to accept..."
  99. else:
  100. message "&7GetCombo\ed &6>> &c%arg 2% is not online!"
  101. else:
  102. message "&7GetCombo\ed &6>> &cSupply a player to duel!"
  103. if arg 1 is "cancel":
  104. if arg 2 is set:
  105. if arg 2 parsed as a player is online:
  106. if {combo.%player%.invited::%arg 2%} is set:
  107. delete {combo.%player%.invited:%arg 2%}
  108. message "&7GetCombo\ed &6>> &2You have canceled your request to duel!"
  109. else:
  110. message "&7GetCombo\ed &6>> &cYou haven't requested to duel %arg 2% yet!"
  111. stop
  112. else:
  113. message "&7GetCombo\ed &6>> &cThat player is not online!"
  114. else:
  115. message "&7GetCombo\ed &6>> &cSupply a player to cancel with!"
  116. if arg 1 is "accept":
  117. if arg 2 is set:
  118. if arg 2 parsed as a player is online:
  119. if {combo.%arg 2%.invited::%player%} is set:
  120. if size of {combo.arena.notinuse::*} > 0:
  121. loop {combo.arena.notinuse::*}:
  122. set {_a} to random string out of loop-index
  123. else:
  124. message "&7GetCombo\ed &6>> &cEither all arenas are in use or there are no ready arenas!"
  125. delete {combo.%player%.invited::%arg 2%}
  126. stop
  127. delete {combo.arena.notinuse::%{_a}%}
  128. set {combo.arena.inuse::%{_a}%} to true
  129. set {_o} to arg 2 parsed as a player
  130. set {_p} to player
  131. heal {_p}
  132. heal {_o}
  133. set {combo.ingame::%{_p}%} to "%{_a}%"
  134. set {combo.ingame::%{_o}%} to "%{_a}%"
  135. set {combo.pos.%{_p}%} to location of {_p}
  136. set {combo.pos.%{_o}%} to location of {_o}
  137. set {combo.armor::%{_p}%::helmet} to the helmet of {_p}
  138. set {combo.armor::%{_p}%::chestplate} to the chestplate of {_p}
  139. set {combo.armor::%{_p}%::leggings} to the leggings of {_p}
  140. set {combo.armor::%{_p}%::boots} to the boots of {_p}
  141. loop all items in inventory of {_p}:
  142. add loop-item to {combo.inv::%{_p}%::*}
  143. loop all items in inventory of {_o}:
  144. add loop-item to {combo.inv::%{_o}%::*}
  145. set {combo.armor::%{_o}%::helmet} to the helmet of {_o}
  146. set {combo.armor::%{_o}%::chestplate} to the chestplate of {_o}
  147. set {combo.armor::%{_o}%::leggings} to the leggings of {_o}
  148. set {combo.armor::%{_o}%::boots} to the boots of {_o}
  149. clear {_p}'s inventory
  150. clear {_o}'s inventory
  151. teleport {_p} to {combo.spawn::%{_a}%::a}
  152. teleport {_o} to {combo.spawn::%{_a}%::b}
  153. send "&7GetCombo\ed &6>> &2You're playing on map %{_a}%!" to {_p}
  154. send "&7GetCombo\ed &6>> &2You're playing on map %{_a}%!" to {_o}
  155. set {combo.arena.inuse::%arg 2%} to true
  156. message "&7GetCombo\ed &6>> &c%{_p}% has accepted your duel!" to {_o}
  157. message "&7GetCombo\ed &6>> &cYou have accepted %{_o}%'s duel!" to {_p}
  158. give {_p} 1 diamond sword of sharpness 5 and unbreaking 3 named "&7GetCombo\ed &6Duel Sword"
  159. give {_o} 1 diamond sword of sharpness 5 and unbreaking 3 named "&7GetCombo\ed &6Duel Sword"
  160. give {_p} 64 enchanted golden apple named "&7GetCombo\ed &dGapples"
  161. give {_p} 2 potion of strength 2 named "&7GetCombo\ed &dStrength"
  162. give {_p} 2 potion of speed 2 named "&7GetCombo\ed &dSpeed"
  163. give {_o} 64 enchanted golden apple named "&7GetCombo\ed &dGapples"
  164. give {_o} 2 potion of strength 2 named "&7GetCombo\ed &dStrength"
  165. give {_o} 2 potion of speed 2 named "&7GetCombo\ed &dSpeed"
  166. equip {_p} with all diamond armour of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour"
  167. equip {_o} with all diamond armour of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour"
  168. else:
  169. message "&7GetCombo\ed &6>> &cThat player has not requested to duel! Duel them with /gc duel %arg 2%!"
  170. else:
  171. message "&7GetCombo\ed &6>> &c%arg 2% is not online!"
  172. else:
  173. message "&7GetCombo\ed &6>> &cSupply a player to accept!"
  174. if arg 1 is "leave":
  175. if {combo.ingame::%player%} is set:
  176. message "&7GetCombo\ed &c>> &4How could you leave your opponent!"
  177. kill player
  178. else:
  179. message "&7GetCombo\ed &6>> &cYou aren't in a duel!"
  180. if arg 1 is "stats":
  181. if arg 2 is set:
  182. if {combo.wins::%arg 2%} is not set:
  183. set {combo.wins::%arg 2%} to 0
  184. if {combo.loses::%arg 2%} is not set:
  185. set {combo.loses::%arg 2%} to 0
  186. message "&6-----&7GetCombo\ed &6%arg 2%'s &8&lStats&6-----"
  187. message "&CWins &7- &e%{combo.wins::%arg 2%}%"
  188. message "&cLoses &7- &e%{combo.loses::%arg 2%}%"
  189. set {_wl} to {combo.wins::%arg 2%} / {combo.loses::%arg 2%}
  190. message "&cW/L Ratio &7- &e%{_wl}%"
  191. else:
  192. message "&6-----&7GetCombo\ed &8&lStats&6-----"
  193. message "&CWins &7- &e%{combo.wins::%player%}%"
  194. message "&cLoses &7- &e%{combo.loses::%player%}%"
  195. set {_wl} to {combo.wins::%player%} / {combo.loses::%player%}
  196. message "&cW/L Ratio &7- &e%{_wl}%"
  197. if arg 1 is "listarenas":
  198. if player has permission "combo.admin":
  199. message "&6-----&7GetCombo\ed &8&lArenas&6-----"
  200. if {combo.arenacount} is not set:
  201. message "&4No arenas have been made!"
  202. else if {combo.arenacount} is 0:
  203. message "&4No arenas have been made!"
  204. loop {combo.arena::*}:
  205. message "&7%loop-index%"
  206. else:
  207. message "&7GetCombo\ed &6>> &cInvalid Permissions!"
  208. if arg 1 is "reload":
  209. if player has permission "combo.admin":
  210. message "&7GetCombo\ed &6>> &5&lBegan reload!"
  211. make console execute command "sk reload getcomboed.sk"
  212. message "&7GetCombo\ed &6>> &2Reload finished!"
  213. else:
  214. message "&7GetCombo\ed &6>> &cInvalid Permissions!"
  215. on disconnect:
  216. if {combo.ingame::%player%} is set:
  217. kill player
  218. loop all players:
  219. if {combo.ingame::%loop-player%} is set:
  220. message "&7GetCombo\ed &6>> &dYou have won because the player you were fighting has left!"
  221. on death:
  222. if {combo.ingame::%victim%} is set:
  223. broadcast "&7GetCombo\ed &6>> &4&l%attacker% has defeated %victim%!"
  224. delete {combo.%attacker%.invited::%victim%}
  225. delete {combo.%victim%.invited::%attacker%}
  226. set the death message to ""
  227. clear drops
  228. delete {combo.arena.inuse::%{combo.ingame::%victim%}%}
  229. set {combo.arena.notinuse::%{combo.ingame::%victim%}%} to {combo.ingame::%victim%}
  230. clear attacker's inventory
  231. teleport attacker to {combo.pos.%attacker%}
  232. delete {combo.ingame::%attacker%}
  233. delete {combo.pos.%attacker%}
  234. remove speed from attacker
  235. remove strength from attacker
  236. remove regeneration from attacker
  237. remove absorption from attacker
  238. remove fire resistance from attacker
  239. remove resistance from attacker
  240. add 1 to {combo.wins::%attacker%}
  241. add 1 to {combo.loses::%victim%}
  242. set {combo.ks::%attacker%} to 0
  243. set {combo.ks::%victim%} to 0
  244. set the helmet of the attacker to {combo.armor::%attacker%::helmet}
  245. set the chestplate of the attacker to {combo.armor::%attacker%::chestplate}
  246. set the leggings of the attacker to {combo.armor::%attacker%::leggings}
  247. set the boots of the attacker to {combo.armor::%attacker%::boots}
  248. wait 1 tick
  249. delete {combo.armor::%attacker%::*}
  250. loop {combo.inv::%attacker%::*}:
  251. give attacker loop-value
  252. wait 1 tick
  253. delete {combo.inv::%attacker%::*}
  254. on command:
  255. if command is "/gc leave":
  256. stop
  257. if {combo.ingame::%player%} is true:
  258. cancel event
  259. message "&7GetCombo\ed &6>> &cYou can't use commands while in the arena!"
  260. message "&cUse /gc leave to leave the arena!"
  261. on join:
  262. if {combo.wins::%player%} is not set:
  263. set {combo.wins::%player%} to 0
  264. if {combo.loses::%player%} is not set:
  265. set {combo.loses::%player%} to 0
  266. set {combo.hs::%player%} to 0
  267. on damage:
  268. if {combo.ingame::%victim%} is set:
  269. if {combo.ingame::%attacker%} is not set:
  270. victim's health is less than 2
  271. cancel event
  272. if {combo.%attacker%.invited::%victim%} is not set:
  273. set {_a} to false
  274. else:
  275. set {_a} to true
  276. if {combo.%victim%.invited::%attacker%} is not set:
  277. set {_b} to false
  278. else:
  279. set {_b} to true
  280. if {_a} and {_b} are false:
  281. cancel event
  282. stop
  283. attacker is a player
  284. set the no damage time of victim to 1 tick
  285. set {combo.hs::%victim%} to 0
  286. add 1 to {combo.hs::%attacker%}
  287. set action bar of attacker to "&cYou're on a %{combo.hs::%attacker%}% hit streak!"
  288. on respawn:
  289. if {combo.ingame::%player%} is set:
  290. clear player's inventory
  291. delete {combo.ingame::%player%}
  292. teleport player to {combo.pos.%player%}
  293. delete {combo.pos.%player%}
  294. set the helmet of the player to {combo.armor::%player%::helmet}
  295. set the chestplate of the player to {combo.armor::%player%::chestplate}
  296. set the leggings of the player to {combo.armor::%player%::leggings}
  297. set the boots of the player to {combo.armor::%player%::boots}
  298. wait 1 tick
  299. delete {combo.armor::%player%::*}
  300. loop {combo.inv::%player%::*}:
  301. give player loop-value
  302. wait 1 tick
  303. delete {combo.inv::%player%::*}
  304. on pick up:
  305. if item is diamond helmet of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  306. cancel event
  307. if item is diamond chestplate of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  308. cancel event
  309. if item is diamond leggings of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  310. cancel event
  311. if item is diamond boots of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  312. cancel event
  313. if item is enchanted golden apple named "&7GetCombo\ed &dGapples":
  314. cancel event
  315. if item is potion of speed 2 named "&7GetCombo\ed &dSpeed":
  316. cancel event
  317. if item is potion of strength 2 named "&7GetCombo\ed &dStrength":
  318. cancel event
  319. if item is diamond sword of sharpness 5 and unbreaking 3 named "&7GetCombo\ed &6Duel Sword":
  320. cancel event
  321. on drop:
  322. if item is diamond helmet of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  323. cancel event
  324. if item is diamond chestplate of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  325. cancel event
  326. if item is diamond leggings of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  327. cancel event
  328. if item is diamond boots of unbreaking 3 and protection 4 named "&7GetCombo\ed &6Duel Armour":
  329. cancel event
  330. if item is diamond sword of sharpness 5 and unbreaking 3 named "&7GetCombo\ed &6Duel Sword":
  331. cancel event
  332. if item is enchanted golden apple named "&7GetCombo\ed &dGapples":
  333. cancel event
  334. if item is potion of speed 2 named "&7GetCombo\ed &dSpeed":
  335. cancel event
  336. if item is potion of strength 2 named "&7GetCombo\ed &dStrength":
  337. cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement