Advertisement
Guest User

1v1.sk

a guest
Apr 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.67 KB | None | 0 0
  1. on damage:
  2. victim is a player:
  3. if attacker is holding an diamond sword:
  4. if {infight.%victim%} is false:
  5. if {infight.%attacker%} is false:
  6. cancel event
  7. if {request.from.%victim%.to.%attacker%} is false:
  8. if {request.from.%attacker%.to.%victim%} is true:
  9. send "&cThis player has no requests from you anymore." to attacker
  10. set {request.from.%attacker%.to.%victim%} to false
  11. else:
  12. send "&8You got a fighting request from &l%attacker%&r&8." to victim
  13. set {request.from.%attacker%.to.%victim%} to true
  14. send "&8Hit the player of interest or execute /accept %attacker%." to victim
  15. send "&aYou challenged %victim%." to attacker
  16. wait 20 seconds
  17. set {request.from.%attacker%.to.%victim%} to false
  18. else if {request.from.%victim%.to.%attacker%} is true:
  19. set {infight.%attacker%} to true
  20. set {infight.%victim%} to true
  21. set {operated.%attacker%%victim%} to false
  22. set {arenasearch.%attacker%} to 1
  23. wait 5 seconds
  24. if {operated.%attacker%%victim%} is false:
  25. set {operated.%attacker%%victim%} to true
  26. send "&cAt this time all arenas are full." to victim and attacker
  27. send "&6Try again later or buy Premium on [URL]." to victim and attacker
  28. while {operated.%attacker%%victim%} is false:
  29. if {free.arena%{arenasearch.%attacker%}%} is true:
  30. set {p.%{arenasearch.%attacker%}%.1} to attacker
  31. set {p.%{arenasearch.%victim%}%.2} to victim
  32. set {operated.%attacker%%victim%} to true
  33. set {free.arena%{arenasearch.%attacker%}%} to false
  34. teleport attacker to {arenaspawn.%{arenasearch.%attacker%}%.attacker}
  35. teleport victim to {arenaspawn.%{arenasearch.%attacker%}%.victim}
  36. clear inventory of victim
  37. clear inventory of attacker
  38. set gamemode of victim to survival
  39. set gamemode of attacker to survival
  40. set action bar of victim to "&4Fight starts in:"
  41. set action bar of attacker to "&4Fight starts in:"
  42. wait 0.5 seconds
  43. set level of attacker to 60
  44. set level of victim to 60
  45. wait 1 second
  46. while level of attacker is higher than 0:
  47. reduce level of attacker by 1
  48. wait 1 second
  49. while level of victim is higher than 0:
  50. reduce level of victim by 1
  51. wait 1 second
  52. wait 5 seconds
  53. set action bar of attacker to "&aChoose your kit!"
  54. set action bar of victim to "&aChoose your kit!"
  55. give attacker 1 chest named "&8Kits" with lore "&7Rightclick to choose."
  56. give victim 1 chest named "&8Kits" with lore "&7Rightclick to choose."
  57. wait 54 seconds
  58. clear inventory of attacker
  59. clear inventory of victim
  60. set {fighting.%attacker%} to true
  61. set {fighting.%victim%} to true
  62. set slot 0 of victim to iron sword
  63. set slot 0 of attacker to iron sword
  64. set chestplate slot of attacker to iron chestplate
  65. set chestplate slot of victim to iron chestplate
  66. set {fight.kills.%attacker%} to 0
  67. set {fight.kills.%victim%} to 0
  68. set {fight.fights.%attacker%} to 0
  69. set {fight.fights.%victim%} to 0
  70. else:
  71. increase {arenasearch.&%attacker%} by 1
  72. wait 0.1 seconds
  73. else:
  74. if {fighting.%victim%} is false:
  75. cancel event
  76.  
  77. on rightclick holding chest:
  78. if {infight.%player%} is true:
  79. if {fighting.%player%} is false:
  80. clear inventory of player
  81. set slot 0 of player to iron sword
  82.  
  83.  
  84. on place of a chest:
  85. if {infight.%player%} is true:
  86. if {fighting.%player%} is false:
  87. cancel event
  88.  
  89.  
  90. command /challenge [<player>]:
  91. trigger:
  92. if arg 1 is a player:
  93. if arg 1 is player:
  94. send "&cYou cannot challenge yourself."
  95. else:
  96. if {infight.%arg 1%} is false:
  97. if {infight.%player%} is false:
  98. if {request.from.%arg 1%.to.%player%} is false:
  99. if {request.from.%player%.to.%arg 1%} is true:
  100. send "&cThis player has no requests from you anymore." to player
  101. set {request.from.%player%.to.%arg 1%} to false
  102. else:
  103. send "&8You got a fighting request from &l%player%&r&8." to arg 1
  104. set {request.from.%player%.to.%arg 1%} to true
  105. send "&8Hit the player of interest or execute /accept %player%." to arg 1
  106. send "&aYou challenged %arg 1%." to player
  107. wait 20 seconds
  108. set {request.from.%player%.to.%arg 1%} to false
  109. else if {request.from.%arg 1%.to.%player%} is true:
  110. set {infight.%player%} to true
  111. set {infight.%arg 1%} to true
  112. set {operated.%player%%arg 1%} to false
  113. set {arenasearch.%player%} to 1
  114. wait 5 seconds
  115. if {operated.%player%%arg 1%} is false:
  116. set {operated.%player%%arg 1%} to true
  117. send "&cAt this time all arenas are full." to arg 1 and player
  118. send "&6Try again later or buy Premium on [URL]." to arg 1 and player
  119. while {operated.%player%%arg 1%} is false:
  120. if {free.arena%{arenasearch.%player%}%} is true:
  121. set {operated.%player%%arg 1%} to true
  122. set {p.%{arenasearch.%player%}%.1} to player
  123. set {p.%{arenasearch.%arg 1%}%.2} to arg 1
  124. set {free.arena%{arenasearch.%player%}%} to false
  125. teleport player to {arenaspawn.%{arenasearch.%player%}%attacker}
  126. teleport arg 1 to {arenaspawn.%{arenasearch.%player%}%victim}
  127. clear inventory of arg 1
  128. clear inventory of player
  129. set gamemode of arg 1 to survival
  130. set gamemode of player to survival
  131. set action bar of arg 1 to "&4Fight starts in:"
  132. set action bar of player to "&4Fight starts in:"
  133. wait 0.5 seconds
  134. set level of player to 60
  135. set level of arg 1 to 60
  136. wait 1 second
  137. while level of player is higher than 0:
  138. reduce level of player by 1
  139. wait 1 second
  140. while level of arg 1 is higher than 0:
  141. reduce level of arg 1 by 1
  142. wait 1 second
  143. wait 5 seconds
  144. set action bar of player to "&aChoose your kit!"
  145. set action bar of arg 1 to "&aChoose your kit!"
  146. set {arg1} to arg 1
  147. give player 1 chest named "&8Kits" with lore "&7Rightclick to choose."
  148. give {arg1} 1 chest named "&8Kits" with lore "&7Rightclick to choose."
  149. wait 54 seconds
  150. clear inventory of player
  151. clear inventory of arg 1
  152. set {fighting.%player%} to true
  153. set {fighting.%arg 1%} to true
  154. set slot 0 of arg 1 to iron sword
  155. set slot 0 of player to iron sword
  156. set chestplate slot of player to iron chestplate
  157. set chestplate slot of arg 1 to iron chestplate
  158. set {fight.kills.%player%} to 0
  159. set {fight.kills.%arg 1%} to 0
  160. set {fight.fights.%player%} to 0
  161. set {fight.fights.%arg 1%} to 0
  162. else:
  163. increase {arenasearch.&%player%} by 1
  164. wait 0.1 seconds
  165. else:
  166. send "&cYou are currently fighting." to player
  167. else:
  168. send "&cPlayer is currently fighting." to player
  169. command /reset [<text>]:
  170. trigger:
  171. if arg 1 is not set:
  172. send "&cWhat do you want to reset?"
  173. else if arg 1 is "all":
  174. send "&cSuccesfully resetted everything."
  175. loop all players:
  176. set {fight.fights.%loop-player%} to 0
  177. set {fight.kills.%loop-player%} to 0
  178. set {infight.%loop-player%} to false
  179. set {resetted.arenas} to false
  180. set {resetted.arenas.number} to 1
  181. while {resetted.arenas} is false:
  182. if {free.arena%{resetted.arenas.number}%} is false:
  183. set {free.arena%{resetted.arenas.number}%} to true
  184. increase {resetted.arenas.number} by 1
  185. else:
  186. increase {resetted.arenas.number} by 1
  187. else:
  188. send "&cCan't reset this."
  189.  
  190. command /accept [<player>]:
  191. trigger:
  192. if arg 1 is a player:
  193. if arg 1 is player:
  194. send "&cYou cannot challenge yourself."
  195. else:
  196. if {infight.%arg 1%} is false:
  197. if {infight.%player%} is false:
  198. if {request.from.%arg 1%.to.%player%} is false:
  199. send "&cThis player didn't send you a request."
  200. else if {request.from.%arg 1%.to.%player%} is true:
  201. set {infight.%player%} to true
  202. set {infight.%arg 1%} to true
  203. set {operated.%player%%arg 1%} to false
  204. set {arenasearch.%player%} to 1
  205. wait 5 seconds
  206. if {operated.%player%%arg 1%} is false:
  207. set {operated.%player%%arg 1%} to true
  208. send "&cAt this time all arenas are full." to arg 1 and player
  209. send "&6Try again later or buy Premium on [URL]." to arg 1 and player
  210. while {operated.%player%%arg 1%} is false:
  211. if {free.arena%{arenasearch.%player%}%} is true:
  212. set {p.%{arenasearch.%player%}%.1} to player
  213. set {p.%{arenasearch.%arg 1%}%.2} to arg 1
  214. set {operated.%player%%arg 1%} to true
  215. set {free.arena%{arenasearch.%player%}%} to false
  216. teleport player to {arenaspawn.%{arenasearch.%player%}%attacker}
  217. teleport arg 1 to {arenaspawn.%{arenasearch.%player%}%victim}
  218. clear inventory of arg 1
  219. clear inventory of player
  220. set gamemode of arg 1 to survival
  221. set gamemode of player to survival
  222. set action bar of arg 1 to "&4Fight starts in:"
  223. set action bar of player to "&4Fight starts in:"
  224. wait 0.5 seconds
  225. set level of player to 60
  226. set level of arg 1 to 60
  227. wait 1 second
  228. while level of player is higher than 0:
  229. reduce level of player by 1
  230. wait 1 second
  231. while level of arg 1 is higher than 0:
  232. reduce level of arg 1 by 1
  233. wait 1 second
  234. wait 5 seconds
  235. set action bar of player to "&aChoose your kit!"
  236. set action bar of arg 1 to "&aChoose your kit!"
  237. set {arg1} to arg 1
  238. give player 1 chest named "&8Kits" with lore "&7Rightclick to choose."
  239. give {arg1} 1 chest named "&8Kits" with lore "&7Rightclick to choose."
  240. wait 54 seconds
  241. clear inventory of player
  242. clear inventory of arg 1
  243. set {fighting.%player%} to true
  244. set {fighting.%arg 1%} to true
  245. set slot 0 of arg 1 to iron sword
  246. set slot 0 of player to iron sword
  247. set chestplate slot of player to iron chestplate
  248. set chestplate slot of arg 1 to iron chestplate
  249. set {fight.kills.%player%} to 0
  250. set {fight.kills.%arg 1%} to 0
  251. set {fight.fights.%player%} to 0
  252. set {fight.fights.%arg 1%} to 0
  253. else:
  254. increase {arenasearch.&%player%} by 1
  255. wait 0.1 seconds
  256.  
  257. on death:
  258. clear drops
  259. set {findplayer2} to false
  260. set {player2number} to 1
  261. while {findplayer2} is false:
  262. if player is {p.%{player2number}%.1}:
  263. set {p1} to {p.%{player2number}%.1}
  264. set {p2} to {p.%{player2number}%.2}
  265. set {findplayer2} to true
  266. else if player is {p.%{player2number}%.2}:
  267. set {p1} to {p.%{player2number}%.2}
  268. set {p2} to {p.%{player2number}%.1}
  269. set {findplayer2} to true
  270. else:
  271. increase {player2number} by 1
  272. if {infight.%player%} is false:
  273. teleport player to {spawn.%{rank.%player%}%}
  274. clear inventory of player
  275. give player 1 diamond sword
  276. set gamemode of player to survival
  277. heal player
  278. else:
  279. if {fight.fights.%player%} < 9:
  280. increase {fight.fights.%{p1}%} by 1
  281. increase {fight.fights.%{p2}%} by 1
  282. increase {fight.kills.%{p2}%} by 1
  283. heal {p2}
  284. teleport {p2} to {arenaspawn.%{playernumber}%attacker}
  285. give 1 iron sword to {p2}
  286. else:
  287. if {fight.kills.%{p1}%} > {fight.kills.%{p2}%}:
  288. send "&aYou won!" to {p1}
  289. send "&4%{p1}% won!" to {p2}
  290. increase {kills.%{p2}%} by 1
  291. increase {deaths.%{p1}%} by 1
  292. increase {fights.%{p1}%} by 1
  293. increase {fights.%{p2}%} by 1
  294. increase {wins.%{p1}%} by 1
  295. increase {loses.%{p2}%} by 1
  296. teleport player to {spawn.%{rank.%player%}%}
  297. clear inventory of player
  298. give player 1 diamond sword
  299. set gamemode of player to survival
  300. heal player
  301. teleport {p2} to {spawn.%{rank.%{p2}%}%}
  302. clear inventory of {p2}
  303. give {p2} 1 diamond sword
  304. set gamemode of {p2} to survival
  305. heal {p2}
  306. set {infight.%{p1}%} to false
  307. set {infight.%{p2}%} to false
  308. set {fighting.%{p1}%} to false
  309. set {fighting.%{p2}%} to false
  310. else:
  311. send "&aYou won!" to {p2}
  312. send "&4%{p2}% won!" to {p2}
  313. increase {kills.%{p2}%} by 1
  314. increase {deaths.%{p1}%} by 1
  315. increase {fights.%{p1}%} by 1
  316. increase {fights.%{p2}%} by 1
  317. increase {wins.%{p2}%} by 1
  318. increase {loses.%{p1}%} by 1
  319. teleport player to {spawn.%{rank.%player%}%}
  320. clear inventory of player
  321. give player 1 diamond sword
  322. set gamemode of player to survival
  323. heal player
  324. teleport {p2} to {spawn.%{rank.%{p2}%}%}
  325. clear inventory of {p2}
  326. give {p2} 1 diamond sword
  327. set gamemode of {p2} to survival
  328. heal {p2}
  329. set {infight.%{p1}%} to false
  330. set {infight.%{p2}%} to false
  331. set {fighting.%{p1}%} to false
  332. set {fighting.%{p2}%} to false
  333.  
  334. on respawn:
  335. set {playernumber3} to 1
  336. while {findplayer3} is false:
  337. if player is {p.%{playernumber3}%.1}:
  338. set {findplayer2} to true
  339. else if player is {p.%{playernumber3}%.2}:
  340. set {findplayer2} to true
  341. else:
  342. increase {playernumber3} by 1
  343. if {infight.%player%} is true:
  344. teleport player to {arenaspawn.%{playernumber3}%}
  345. give 1 iron sword to player
  346. else:
  347. teleport player to {spawn.%{rank.%player%}%}
  348. clear inventory of player
  349. give player 1 diamond sword
  350. set gamemode of player to survival
  351. heal player
  352.  
  353. command /hub:
  354. aliases: /l, /lobby, /leave
  355. trigger:
  356. if {infight.%player%} is false:
  357. teleport player to {spawn.%{rank.%player%}%}
  358. clear inventory of player
  359. give player 1 diamond sword
  360. set gamemode of player to survival
  361. heal player
  362. else:
  363. set {find.%player%} to false
  364. set {playernumber} to 1
  365. while {find.%player%} is false:
  366. if player is {p.%{playernumber}%.1}:
  367. set {find.%player%} to true
  368. set {free.arena%{playernumber}%} to true
  369. teleport {p.%{playernumber}%.1} to {spawn.%{rank.%player%}%}
  370. teleport {p.%{playernumber}%.2} to {spawn.%{rank.%{p.%{playernumber}%.2}%}%}
  371. clear inventory of player
  372. clear inventory of {p.%{playernumber}%.2}
  373. give 1 diamond sword to {p.%{playernumber}%.2}
  374. give 1 diamond sword to player
  375. set gamemode of {p.%{playernumber}%.2} to survival
  376. set gamemode of player to survival
  377. heal player
  378. heal {p.%{playernumber}%.2}
  379. add 1 to {loses.%player%}
  380. add 1 to {wins.%{p.%{playernumber}%.2}%}
  381. add 1 to {fights.%{p.%{playernumber}%.2}%}
  382. add 1 to {fights.%player%}
  383. else:
  384. if player is {p.%{playernumber}%.2}:
  385. set {find.%player%} to true
  386. set {free.arena%{playernumber}%} to true
  387. teleport {p.%{playernumber}%.2} to {spawn.%{rank.%player%}%}
  388. teleport {p.%{playernumber}%.1} to {spawn.%{rank.%{p.%{playernumber}%.1}%}%}
  389. clear inventory of player
  390. clear inventory of {p.%{playernumber}%.1}
  391. give 1 diamond sword to {p.%{playernumber}%.1}
  392. give 1 diamond sword to player
  393. set gamemode of {p.%{playernumber}%.1} to survival
  394. set gamemode of player to survival
  395. heal player
  396. heal {p.%{playernumber}%.1}
  397. add 1 to {loses.%player%}
  398. add 1 to {wins.%{p.%{playernumber}%.1}%}
  399. add 1 to {fights.%{p.%{playernumber}%.1}%}
  400. add 1 to {fights.%player%}
  401.  
  402. else:
  403. increase {playernumber} by 1
  404.  
  405.  
  406. command /setarenaspawn [<text>] [<text>]:
  407. aliases: /sas [<text>] [<text>]
  408. trigger:
  409. set {arenaspawn.%arg 1%.%arg 2%} to player's location
  410. send "&aSpawn of arena %arg 1% for %arg 2% set."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement