Oxalist

Untitled

Jan 15th, 2018
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.11 KB | None | 0 0
  1. on script load:
  2. set {queue1} to 0
  3. delete {queue::*}
  4.  
  5. command /resetqueue:
  6. trigger:
  7. delete {queue::*}
  8. set {queue1} to 0
  9. broadcast "&8» &7Queue was reset by &e%player%"
  10.  
  11. command /setloc:
  12. trigger:
  13. set {spawn} to location of player
  14.  
  15. command /queue [<text="check">]:
  16. usage: You can either use &c/queue join &for &c/queue leave
  17. trigger:
  18. if arg-1 is "check":
  19. send "&8» &7There are &e%{queue1}%/10 &7players in the queue!" to player
  20. if arg-1 is "join":
  21. set {checkqueue} to "True"
  22. if {queue1} >= 10:
  23. send "&8» &7The queue is full!" to player
  24. else if "%{queue::*}%" contains "%player%":
  25. send "&8» &7You are already in the queue!" to player
  26. stop
  27. else:
  28. add 1 to {queue1}
  29. add "%player%" to {queue::*}
  30. set {queue.%player%} to 1
  31. broadcast "&8» &7There are now &e%{queue1}%/10 &7players in the queue!"
  32. if executor is console:
  33. if arg-1 is "start":
  34. if {queue1} <= 1:
  35. broadcast "&8» &7Not enough players to start!"
  36. else:
  37. broadcast "&8» &7The match is about to start!"
  38. wait 1 second
  39. broadcast "&8» &7The match will begin in &e15 &7seconds.."
  40. wait 10 seconds
  41. broadcast "&8» &7The match will begin in &e5 &7seconds.."
  42. wait 1 seconds
  43. broadcast "&8» &7The match will begin in &e4 &7seconds.."
  44. wait 1 seconds
  45. broadcast "&8» &7The match will begin in &e3 &7seconds.."
  46. wait 1 seconds
  47. broadcast "&8» &7The match will begin in &e2 &7seconds.."
  48. wait 1 seconds
  49. broadcast "&8» &7The match will begin in &e1 &7seconds.."
  50. wait 1 second
  51. if {queue1} >= 2:
  52. broadcast "&8» &7The game has now started"
  53. loop {queue::*}:
  54. teleport loop-value parsed as player to {spawn}
  55. delete {queue::*}
  56. delete {queue1}
  57. else:
  58. broadcast "&8» &7Not enough players to start."
  59. if arg-1 is "leave":
  60. if {queue1} <= 0:
  61. send "&8» &7You are not in the queue."
  62. stop
  63. else if {queue.%player%} is 1:
  64. remove 1 from {queue1}
  65. send "&8» &7You have left the queue!"
  66. broadcast "&8» &7There are now &e%{queue1}%/10 &7players in the queue!"
  67. remove "%player%" from {queue::*}
  68. else:
  69. send "&8» &7You are not currently in a queue!"
  70. command /test:
  71. trigger:
  72. send "%{queue::*}%" to player
  73. send "%{queue1}%" to player
  74.  
  75. command /test2:
  76. trigger:
  77. add 1 to {queue1}
  78. broadcast "&8» &7There are now &e%{queue1}%/10 &7players in the queue!"
  79.  
  80. on death:
  81. if {queue.%player%} is 1:
  82. remove 1 from {queue1}
  83. set {queue.%player%} to 0
  84. if {queue1} is 0:
  85. broadcast "&8» &7The game is now over!"
  86. broadcast "&cUse &e/queue join &cto join the next queue!"
  87.  
  88. on join:
  89. set {queue.%player%} to 0
  90.  
  91. every 1 second:
  92. if {checkqueue} is "True":
  93. if {queue1} >= 2:
  94. make console execute "/queue start"
  95. set {checkqueue} to "False"
  96. stop
  97.  
  98. command /score:
  99. trigger:
  100. send ""
  101. send "&3Counter-Terrorists Have Won %{CTRoundsWon}% Round(s)"
  102. send "&cTerrorists Have Won %{TRoundsWon}% Round(s)"
  103. send ""
  104.  
  105. command /resetdefuser:
  106. permission: reset.admin
  107. trigger:
  108. set {DefusingBomb::%player%} to "False"
  109. set {Defused.Bomb} to "False"
  110.  
  111. command /reset:
  112. permission: reset.admin
  113. trigger:
  114. set {Bomb.Explode} to "False"
  115. set {Bomb.Defuse} to "False"
  116. set {BombIs.Defused} to "False"
  117. set {DefusingBomb::%player%} to "False"
  118. set {Defused.Bomb} to "False"
  119. set action bar of player to "&8» &7Reset-all Complete."
  120.  
  121. command /resetrounds:
  122. permission: reset.admin
  123. trigger:
  124. set {CTRoundsWon} to 0
  125. set {TRoundsWon} to 0
  126. set action bar of player to "&8» &7Reset-Rounds Complete."
  127.  
  128. on place of a daylight sensor:
  129. set action bar of player to "&8» &7Bomb Planting in &e5 &7Seconds."
  130. wait 1 second
  131. set action bar of player to "&8» &7Bomb Planting in &e4 &7Seconds."
  132. wait 1 second
  133. set action bar of player to "&8» &7Bomb Planting in &e3 &7Seconds."
  134. wait 1 second
  135. set action bar of player to "&8» &7Bomb Planting in &e2 &7Seconds."
  136. wait 1 second
  137. set action bar of player to "&8» &7Bomb Planting in &e1 &7Seconds."
  138. wait 1 second
  139. broadcast "&8» &7The bomb has been planted!"
  140.  
  141.  
  142. if {BombIs.Defused} is "True":
  143. make console execute "/reset"
  144. stop
  145. broadcast "&8» &7Bomb exploding in &e30 &7seconds."
  146. wait 10 seconds
  147. if {BombIs.Defused} is "True":
  148. make console execute "/reset"
  149. stop
  150. broadcast "&8» &7Bomb exploding in &e20 &7seconds."
  151. wait 10 seconds
  152. if {BombIs.Defused} is "True":
  153. make console execute "/reset"
  154. stop
  155. broadcast "&8» &7Bomb exploding in &e10 &7seconds."
  156. wait 5 seconds
  157. if {BombIs.Defused} is "True":
  158. make console execute "/reset"
  159. stop
  160. broadcast "&8» &7Bomb exploding in &e5 &7seconds."
  161. wait 2 second
  162. if {BombIs.Defused} is "True":
  163. make console execute "/reset"
  164. stop
  165. broadcast "&8» &7Bomb exploding in &e3 &7seconds."
  166. wait 1 second
  167. if {BombIs.Defused} is "True":
  168. make console execute "/reset"
  169. stop
  170. broadcast "&8» &7Bomb exploding in &e2 &7seconds."
  171. wait 1 second
  172. if {BombIs.Defused} is "True":
  173. make console execute "/reset"
  174. stop
  175. broadcast "&8» &7Bomb exploding in &e1 &7seconds."
  176. wait 1 second
  177. if {BombIs.Defused} is "True":
  178. make console execute "/reset"
  179. stop
  180. broadcast "&8» &7The bomb has exploded"
  181. set {DefusingBomb::%player%} to "False"
  182. set {Defused.Bomb} to "False"
  183. set {BombIs.Defused} to "False"
  184. set {Bomb.Explode} to "True"
  185. set event-block to air
  186. show large explosion at the event-block to the player
  187. show large explosion at the event-block to the player
  188.  
  189. on rightclick on daylight sensor with shears:
  190. if player is holding shears named "&fDefuser":
  191. set {Defused.Bomb} to "False"
  192. set {DefusingBomb::%player%} to "True"
  193. if {DefusingBomb::%player%} is "True":
  194. if {DefusingBomb::%player%} is "False":
  195. stop
  196. set action bar of player to "&8» &7Defusing bomb in &e8 &7seconds."
  197. wait 1 second
  198. if {DefusingBomb::%player%} is "False":
  199. stop
  200. set action bar of player to "&8» &7Defusing bomb in &e7 &7seconds."
  201. wait 1 second
  202. if {DefusingBomb::%player%} is "False":
  203. stop
  204. set action bar of player to "&8» &7Defusing bomb in &e6 &7seconds."
  205. wait 1 second
  206. if {DefusingBomb::%player%} is "False":
  207. stop
  208. set action bar of player to "&8» &7Defusing bomb in &e5 &7seconds."
  209. wait 1 second
  210. if {DefusingBomb::%player%} is "False":
  211. stop
  212. set action bar of player to "&8» &7Defusing bomb in &e4 &7seconds."
  213. wait 1 second
  214. if {DefusingBomb::%player%} is "False":
  215. stop
  216. set action bar of player to "&8» &7Defusing bomb in &e3 &7seconds."
  217. wait 1 second
  218. if {DefusingBomb::%player%} is "False":
  219. stop
  220. set action bar of player to "&8» &7Defusing bomb in &e2 &7seconds."
  221. wait 1 second
  222. if {DefusingBomb::%player%} is "False":
  223. stop
  224. set action bar of player to "&8» &7Defusing bomb in &e1 &7seconds."
  225. wait 1 second
  226. if {DefusingBomb::%player%} is "False":
  227. stop
  228. broadcast "&8» &7The bomb has been defused."
  229. set {Bomb.Defuse} to "True"
  230. set {BombIs.Defused} to "True"
  231. set event-block to air
  232. show red dust at the event-block to the player
  233. show red dust at the event-block to the player
  234. show red dust at the event-block to the player
  235. set {Defused.Bomb} to "False"
  236. set {DefusingBomb::%player%} to "False"
  237.  
  238. on any move:
  239. if {DefusingBomb::%player%} is "True":
  240. remove all shears from player's inventory
  241. add 1 shears named "&fDefuser" to player's inventory
  242. set action bar of player to "&8» &cBomb defusing has been canceled, do not move!"
  243. set {Defusingbomb::%player%} to "False"
  244.  
  245. every second:
  246. if {Bomb.Defuse} is "True":
  247. broadcast ""
  248. broadcast "&8» &eCounter-Terrorists &7have won the round"
  249. broadcast ""
  250. add 1 to {CTRoundsWon}
  251. set {Bomb.Defuse} to "False"
  252. stop
  253.  
  254. if {Bomb.Explode} is "True":
  255. broadcast ""
  256. broadcast "&8» &eTerrorists &7have won the round"
  257. broadcast ""
  258. add 1 to {TRoundsWon}
  259. set {Bomb.Explode} to "False"
  260. stop
  261.  
  262. if {CTRoundsWon} = 8:
  263. broadcast ""
  264. broadcast "&8» &eCounter-Terrorists &7have won the game"
  265. broadcast ""
  266. set {CTRoundsWon} to 0
  267. set {TRoundsWon} to 0
  268. make console execute "/spawn @a"
  269. stop
  270.  
  271. if {TRoundsWon} = 8:
  272. broadcast ""
  273. broadcast "&8» &eTerrorists &7have won the game"
  274. broadcast ""
  275. set {TRoundsWon} to 0
  276. set {CTRoundsWon} to 0
  277. make console execute "/spawn @a"
  278. stop
  279.  
  280. command /CTSpawn:
  281. permission: spawn.admin
  282. trigger:
  283. set {CTSpawn} to player's location
  284. send "&8» &7Counter Terrorist Spawn Set"
  285.  
  286. command /TSpawn:
  287. permission: spawn.admin
  288. trigger:
  289. set {TSpawn} to player's location
  290. send "&8» &7Terrorist Spawn Set"
  291.  
  292. command /timer:
  293. permission: timer.admin
  294. trigger:
  295. set {timer} to 300
  296. if {timer} = 300:
  297. broadcast ""
  298. broadcast "&8» &75:00 remaining"
  299. broadcast ""
  300. while {timer} > 270:
  301. wait 1 second
  302. remove 1 from {timer}
  303. if {timer} = 270:
  304. broadcast ""
  305. broadcast "&8» &74:30 remaining"
  306. broadcast ""
  307. while {timer} > 240:
  308. wait 1 second
  309. remove 1 from {timer}
  310. if {timer} = 240:
  311. broadcast ""
  312. broadcast "&8» &74:00 remaining"
  313. broadcast ""
  314. while {timer} > 210:
  315. wait 1 second
  316. remove 1 from {timer}
  317. if {timer} = 210:
  318. broadcast ""
  319. broadcast "&8» &73:30 remaining"
  320. broadcast ""
  321. while {timer} > 180:
  322. wait 1 second
  323. remove 1 from {timer}
  324. if {timer} = 180:
  325. broadcast ""
  326. broadcast "&8» &73:00 remaining"
  327. broadcast ""
  328. while {timer} > 150:
  329. wait 1 second
  330. remove 1 from {timer}
  331. if {timer} = 150:
  332. broadcast ""
  333. broadcast "&8» &72:30 remaining"
  334. broadcast ""
  335. while {timer} > 120:
  336. wait 1 second
  337. remove 1 from {timer}
  338. if {timer} = 120:
  339. broadcast ""
  340. broadcast "&8» &72:00 remaining"
  341. broadcast ""
  342. while {timer} > 90:
  343. wait 1 second
  344. remove 1 from {timer}
  345. if {timer} = 90:
  346. broadcast ""
  347. broadcast "&8» &71:30 remaining"
  348. broadcast ""
  349. while {timer} > 60:
  350. wait 1 second
  351. remove 1 from {timer}
  352. if {timer} = 60:
  353. broadcast ""
  354. broadcast "&8» &71:00 remaining"
  355. broadcast ""
  356. while {timer} > 30:
  357. wait 1 second
  358. remove 1 from {timer}
  359. if {timer} = 30:
  360. broadcast ""
  361. broadcast "&8» &70:30 remaining"
  362. broadcast ""
  363. while {timer} > 10:
  364. wait 1 second
  365. remove 1 from {timer}
  366. if {timer} = 10:
  367. broadcast ""
  368. broadcast "&8» &70:10 remaining"
  369. broadcast ""
  370. while {timer} > 3:
  371. wait 1 second
  372. remove 1 from {timer}
  373. if {timer} = 3:
  374. broadcast ""
  375. broadcast "&8» &70:03 remaining"
  376. broadcast ""
  377. while {timer} > 2:
  378. wait 1 second
  379. remove 1 from {timer}
  380. if {timer} = 2:
  381. broadcast ""
  382. broadcast "&8» &70:02 remaining"
  383. broadcast ""
  384. while {timer} > 1:
  385. wait 1 second
  386. remove 1 from {timer}
  387. if {timer} = 1:
  388. broadcast ""
  389. broadcast "&8» &70:01 remaining"
  390. broadcast ""
  391. while {timer} > 0:
  392. wait 1 second
  393. remove 1 from {timer}
  394. if {timer} = 0:
  395. broadcast ""
  396. broadcast "&8» &7Round Over. &eCounter-Terrorists Win!"
  397. broadcast ""
  398.  
  399. command /time:
  400. permission: timer.access
  401. trigger:
  402. if {timer} = 0:
  403. send "&8» &7There are currently no games running."
  404. else:
  405. send "&8» &e%{timer}% &7seconds remaining"
  406.  
  407. command /resettimer:
  408. permission: timer.admin
  409. trigger:
  410. set {timer} to 0
Advertisement
Add Comment
Please, Sign In to add comment