Oxalist

Untitled

Jan 6th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.76 KB | None | 0 0
  1. # Just realised there are two folders and i had to redo the coordinates for a fifth time
  2. # Not doing HellMap until map is confirm
  3. # 1 & 2 in vars are sides and 's' is the shark spawnpoint
  4.  
  5. options:
  6. 1: "yes"
  7. #HellMap !Todo!
  8. #S1: (location at -3, 0, -92 of "world") to (location at 129, 150, -84 of "world")
  9. #S2: (location at 129, 0, 70 of "world") to (location at -3, 150, 62 of "world")
  10. ##Lobby
  11. #Lobby: (location at -658, 94, 61 of "world")
  12. ##IceMap
  13. #I1: (location at 106, 64, 57 of "world") to (location at 102, 64, 52 of "world")
  14. #I2: (location at 12, 62, 64 of "world") to (location at 15, 62, 67 of "world")
  15. #IS: location at 51, 71, 70 of "world"
  16. ##ExoticMap
  17. #E1: (location at -661, 7, 996 of "world") to (location at -657, 7, 999 of "world")
  18. #E2: (location at -741, 7, 995 of "world") to (location at -735, 7, 999 of "world")
  19.  
  20. on load:
  21. wait a tick
  22. set {lobby} to (location at -658, 94, 61 of "world")
  23. set {map::s::1} to (location at -3, 0, -92 of "world") to (location at 129, 150, -84 of "world")
  24. set {map::s::2} to (location at 129, 0, 70 of "world") to (location at -3, 150, 62 of "world")
  25. set {map::s::s} to location at
  26. set {map::i::1} to (location at 106, 64, 57 of "world") to (location at 102, 64, 52 of "world")
  27. set {map::i::2} to (location at 12, 62, 64 of "world") to (location at 15, 62, 67 of "world")
  28. set {map::i::s} to location at 51, 71, 70 of "world"
  29. set {map::e::1} to (location at -661, 7, 996 of "world") to (location at -657, 7, 999 of "world")
  30. set {map::e::2} to (location at -741, 7, 995 of "world") to (location at -735, 7, 999 of "world")
  31.  
  32. function dogging(b: boolean = false) :: string:
  33. add "E" to {_maps::*}
  34. add "I" to {_maps::*}
  35. add "S" to {_maps::*}
  36. set {_map} to a random object out of {_maps::*}
  37. return {_map}
  38.  
  39. function getState(b: boolean = true) :: integer:
  40. return value of sql var "game::snm1::state" parsed as integer
  41.  
  42. function getWins(p: offlineplayer) :: integer:
  43. return value of sql var "stats::snm::wins::%{_p}%" parsed as integer
  44.  
  45. function loadKits(b: boolean = true):
  46. loop all players:
  47. if {game::minnows::%loop-player%} is set:
  48. if {game::mkit::%loop-player%} is 0:
  49. clear loop-player's inventory
  50. equip loop-player with leather helmet
  51. equip loop-player with leather leggings
  52. equip loop-player with leather boots
  53. equip loop-player with leather chestplate
  54. dye loop-player's helmet yellow
  55. dye loop-player's chestplate blue
  56. dye loop-player's leggings yellow
  57. dye loop-player's boots blue
  58. set slot 0 of loop-player's inventory to a fishing rod named "&5Flipper"
  59. else if {game::mkit::%loop-player%} is 1:
  60. clear loop-player's inventory
  61. equip loop-player with leather helmet
  62. equip loop-player with leather leggings
  63. equip loop-player with leather boots
  64. equip loop-player with leather chestplate
  65. dye loop-player's helmet orange
  66. dye loop-player's chestplate white
  67. dye loop-player's leggings orange
  68. dye loop-player's boots white
  69. set slot 0 of loop-player's inventory to a fishing rod named "&5Flipper"
  70. else:
  71. clear loop-player's inventory
  72. equip loop-player with leather helmet
  73. equip loop-player with leather leggings
  74. equip loop-player with leather boots
  75. equip loop-player with leather chestplate
  76. dye loop-player's helmet blue
  77. dye loop-player's chestplate white
  78. dye loop-player's leggings blue
  79. dye loop-player's boots white
  80. set slot 0 of loop-player's inventory to a fishing rod named "&5Flipper"
  81. else if {game::sharks::%loop-player%} is set:
  82. if {game::skit::%loop-player%} is 0:
  83. clear loop-player's inventory
  84. equip loop-player with leather chestplate
  85. dye loop-player's chestplate cyan
  86. set slot 0 of loop-player's inventory to a ghast tear of sharpness 6 named "&fTeeth"
  87. set slot 1 of loop-player's inventory to a stone hoe named "&6Charge" with lore "&7Right click for a 5 second speed boost"
  88. else if {game::skit::%loop-player%} is 1:
  89. clear loop-player's inventory
  90. equip loop-player with leather chestplate
  91. equip loop-player with leather leggings
  92. dye loop-player's chestplate brown
  93. dye loop-player's chestplate grey
  94. set slot 0 of loop-player's inventory to a ghast tear of sharpness 5 named "&fTeeth"
  95. set slot 1 of loop-player's inventory to a wooden hoe named "&6Confusion Blitz" with lore "&7Right click to confuse the minnows||&7You are currently pursuing"
  96.  
  97.  
  98. function startLoop(b: boolean = true):
  99. while true:
  100. loop all players:
  101. if {game::sharks::%loop-player%} is set:
  102. if loop-player is within {map::%{map}%::1}:
  103. set {_loc} to location at x-coordinate of loop-player, y-coordinate of loop-player, z-coordinate of loop-player + (difference between z-coordinate of loop-player and -84.5 + 1) of "world"
  104. while block at location 1 above {_loc} is not air:
  105. set {_loc} to location 1 above {_loc}
  106. teleport loop-player to location 1 above {_loc}
  107. send "&cYou cannot enter that area!" to loop-player
  108. else if loop-player is within {map::%{map}%::2}:
  109. set {_loc} to location at x-coordinate of loop-player, y-coordinate of loop-player, z-coordinate of loop-player - (difference between z-coordinate of loop-player and 62.5 - 1) of "world"
  110. while block at location 1 above {_loc} is not air:
  111. set {_loc} to location 1 above {_loc}
  112. teleport loop-player to location 1 above {_loc}
  113. send "&cYou cannot enter that area!" to loop-player
  114. else if {game::minnows::%loop-player%} is set:
  115. if {game::safeside} is 1:
  116. if {game::safe::%loop-player%} is set:
  117. loop-player is not within {map::%{map}%::1}
  118. set {_loc} to location at x-coordinate of loop-player, y-coordinate of loop-player, z-coordinate of loop-player - (difference between z-coordinate of loop-player and -84.5 - 1) of "world"
  119. while block at location 1 above {_loc} is not air:
  120. set {_loc} to location 1 above {_loc}
  121. teleport loop-player to location 1 above {_loc}
  122. send "&cYou cannot leave the safe zone once you have entered it!" to loop-player
  123. else:
  124. {game::start} is true
  125. loop-player is within {map::%{map}%::1}
  126. set {game::safe::%loop-player%} to true
  127. send "&eYou are now safe from sharks!" to loop-player
  128. addCoins(loop-player, 15)
  129. else if {game::safeside} is 2:
  130. if {game::safe::%loop-player%} is set:
  131. loop-player is not within {map::%{map}%::2}
  132. set {_loc} to location at x-coordinate of loop-player, y-coordinate of loop-player, z-coordinate of loop-player + (difference between z-coordinate of loop-player and 62.5 + 1) of "world"
  133. while block at location 1 above {_loc} is not air:
  134. set {_loc} to location 1 above {_loc}
  135. teleport loop-player to location 1 above {_loc}
  136. send "&cYou cannot leave the safe zone once you have entered it!" to loop-player
  137. else:
  138. {game::start} is true
  139. loop-player is within {map::%{map}%::1}
  140. set {game::safe::%loop-player%} to true
  141. send "&eYou are now safe from sharks!" to loop-player
  142. addCoins(loop-player, 15)
  143. wait 6 ticks
  144.  
  145. function getKills(p: offlineplayer) :: integer:
  146. return value of sql var "stats::snm::kills::%{_p}%" parsed as integer
  147.  
  148. function getPlays(p: offlineplayer) :: integer:
  149. return value of sql var "stats::snm::gamesplayed::%{_p}%" parsed as integer
  150.  
  151. function switchSides(b: boolean = true):
  152. loop blocks within {map::%{map}%::1}:
  153. if loop-block is red hardened clay:
  154. set loop-block to green hardened clay
  155. else if loop-block is green hardened clay:
  156. set loop-block to red hardened clay
  157. loop blocks within {map::%{map}%::2}:
  158. if loop-block is red hardened clay:
  159. set loop-block to green hardened clay
  160. else if loop-block is green hardened clay:
  161. set loop-block to red hardened clay
  162.  
  163. function checkforWins(b: boolean = true) :: boolean:
  164. if size of {game::minnows::*} is more than 0:
  165. return true
  166. else:
  167. if size of {game::sharks::*} is more than 0:
  168. return false
  169.  
  170. function processWin(s: string) :: boolean:
  171. if {_s} is "Minnows":
  172. broadcast "&7========================="
  173. broadcast "&eMinnows win the game!"
  174. broadcast "&7========================="
  175. loop 10 times:
  176. command "/playsound fireworks.launch @a"
  177. wait 10 ticks
  178. loop all players:
  179. if {game::minnows::%loop-player%} is set:
  180. addCoins(loop-player, 100)
  181. send "&e100 coins on winning!" to loop-player
  182. else if {game::sharks::%loop-player%} is set:
  183. addCoins(loop-player, 50)
  184. send "&e50 coins on participating!" to loop-player
  185. send loop-player to "lobby1"
  186. delete {game::*}
  187. set sql var "game::snm1:state" to "0"
  188. wait 10 seconds
  189. command "/stop"
  190. else if {_s} is "Sharks":
  191. broadcast "&7========================="
  192. broadcast "&eSharks win the game!"
  193. broadcast "&7========================="
  194. loop 10 times:
  195. command "/playsound fireworks.launch @a"
  196. wait 10 ticks
  197. loop all players:
  198. if {game::minnows::%loop-player%} is set:
  199. addCoins(loop-player, 50)
  200. send "&e50 coins on participating!" to loop-player
  201. else if {game::sharks::%loop-player%} is set:
  202. addCoins(loop-player, 100)
  203. send "&e100 coins on winning!" to loop-player
  204. send loop-player to "lobby1"
  205. delete {game::*}
  206. set sql var "game::snm1:state" to "0"
  207. wait 10 seconds
  208. command "/stop"
  209. else if {_s} is "None":
  210. delete {game::*}
  211. set sql var "game::snm1:state" to "0"
  212. wait 10 seconds
  213. command "/stop"
  214.  
  215. function startRound(b: boolean = true):
  216. getState() is 3
  217. delete {game::safe::*}
  218. delete {game::temp::*}
  219. {game::start} is not set
  220. set {game::start} to true
  221. add 1 to {game::rounds::*}
  222. wait 2 ticks
  223. loop all players:
  224. wipe loop-player's sidebar
  225. set name of sidebar of loop-player to "&7Sharks & Minnows"
  226. set id score "&7Round: &e%size of {game::rounds::*}%" in sidebar of loop-player to 11 with id "Round.%loop-player%"
  227. set id score "&7Round Time: &e60" in sidebar of loop-player to 8 with id "RoundTime.%loop-player%"
  228. set id score " " in sidebar of loop-player to 6 with id "Space3.%loop-player%"
  229. set id score "&7Sharks: &e%size of {game::sharks::*}%" in sidebar of loop-player to 5 with id "Sharks.%loop-player%"
  230. set id score "&7Minnows: &e%size of {game::minnows::*}%" in sidebar of loop-player to 2 with id "Minnows.%loop-player%"
  231. set id score "&ewww.minealot.net" in sidebar of loop-player to 0 with id "Website.%loop-player%"
  232. if size of {game::rounds::*} is less than 9:
  233. loop 60 times:
  234. getState() is 3
  235. loop all players:
  236. update score id "RoundTime.%loop-player%" to "&7Round Time: &e%60 - loop-number%" and 8
  237. if size of {game::safe::*} is size of {game::minnows::*}:
  238. broadcast "&7All minnows have made it to their side safely!"
  239. stop loop
  240. wait 1 second
  241. loop all players:
  242. update score id "RoundTime.%loop-player%" to "&7Round Time: &e0" and 8
  243. broadcast "&7Round &e%size of {game::rounds::*}% &7is now over!"
  244. loop {game::sharks::*}:
  245. teleport loop-value to location at 63, 26, -10 of the world "world"
  246. loop {game::minnows::*}:
  247. {game::safe::%loop-value%} is not set
  248. kill loop-value
  249. delete {game::start}
  250. if size of {game::minnows::*} is 0:
  251. processWin("Sharks")
  252. delete {game::*}
  253. set sql var "game::snm1:state" to "0"
  254. wait 10 seconds
  255. command "/stop"
  256. loop 15 times:
  257. getState() is 3
  258. loop all players:
  259. set loop-player's level to 15 - loop-number
  260. update score id "RoundTime.%loop-player%" to "&7Next Round &e%15 - loop-number%" and 8
  261. command "/playsound note.hat @a ~ ~ ~ 1 1 1"
  262. wait 1 second
  263. switchSides()
  264. if {game::safeside} is 1:
  265. set {game::safeside} to 2
  266. else:
  267. set {game::safeside} to 1
  268. getState() is 3
  269. startRound()
  270. else:
  271. if "%checkforWins()%" is "true":
  272. processWin("Minnows")
  273. else if "%checkforWins()%" is "false":
  274. processWin("Sharks")
  275. else:
  276. processWin("None")
  277.  
  278. on load:
  279. command "/save-off"
  280.  
  281. on projectile hit:
  282. wait 5 ticks
  283. delete projectile
  284.  
  285. on drop:
  286. cancel the event
  287.  
  288. on item spawn:
  289. cancel the event
  290.  
  291. on spawn:
  292. cancel the event
  293.  
  294. on break:
  295. cancel the event
  296.  
  297. on place:
  298. cancel the event
  299.  
  300. on death of a player:
  301. clear drops
  302. set death message to ""
  303. getState() is 3
  304. delete {game::minnows::%victim%}
  305. set {game::sharks::%victim%} to player
  306. if attacker is set:
  307. broadcast "&e%victim%&7 has been eliminated by a shark &e(%attacker%)&7 and have now became one, beware!"
  308. addCoins(attacker, 15)
  309. else:
  310. broadcast "&e%victim%&7 has been eliminated for not reaching the safe zone! They have transformed into a shark."
  311. if checkforWins() is true:
  312. wait 5 ticks
  313. force respawn victim
  314. loop all players:
  315. update score id "Sharks.%loop-player%" to "&7Sharks: &e%size of {game::sharks::*}%" and 5
  316. update score id "Minnows.%loop-player%" to "&7Minnows: &e%size of {game::minnows::*}%" and 2
  317. else if checkforWins() is false:
  318. if attacker is set:
  319. processWin("Sharks")
  320. else:
  321. processWin("None")
  322.  
  323. on weather change:
  324. set weather to sun
  325.  
  326. on block damage:
  327. cancel the event
  328.  
  329. on hunger meter change:
  330. cancel the event
  331. set player's food level to 10
  332.  
  333. on damage of a player:
  334. if damage-cause is void:
  335. cancel event
  336. teleport player to {lobby}
  337. if getState() is 1 or 2:
  338. cancel the event
  339. heal victim
  340. else if getState() is 3:
  341. if "%{game::sharks::%victim%}%%{game::sharks::%attacker%}%" is "%victim%%attacker%":
  342. cancel the event
  343. else if "%{game::minnows::%victim%}%%{game::minnows::%attacker%}%" is "%victim%%attacker%":
  344. cancel the event
  345. else if {game::safe::%victim%} is set:
  346. cancel the event
  347. else if damage cause is fall:
  348. cancel the event
  349.  
  350. command /eval <text>:
  351. permission: skript.op
  352. trigger:
  353. evaluate "%arg-1%"
  354.  
  355. on skript unload:
  356. delete {game::*}
  357.  
  358. on skript load:
  359. delete {game::*}
  360. delete {map::*}
  361. delete {map}
  362. wait 2 ticks
  363. set {map} to dogging(true)
  364. set sql var "game::snm1::state" to "1"
  365. while amount of players is less than 5:
  366. loop all players:
  367. set loop-player's action bar to " &7Need &e%5 - amount of players% &7more players to start the game."
  368. wait 2 seconds
  369. while true:
  370. wait 1 second
  371. if {game::time} is set:
  372. difference between {game::time} and now is greater than 30 seconds
  373. delete {game::time}
  374. getState() is 2
  375. set sql var "game::snm1::state" to "3"
  376. loop all players:
  377. {game::minnows::%loop-player%} is not set
  378. {game::sharks::%loop-player%} is not set
  379. if size of {game::sharks::*} is not floor(amount of players/3):
  380. set {game::sharks::%loop-player%} to loop-player
  381. else:
  382. set {game::minnows::%loop-player%} to loop-player
  383. set sql var "stats::snm::gamesplayed::%loop-player%" to "%getPlays(loop-player) + 1%"
  384. clear loop-player's inventory
  385. update inventory of loop-player
  386. loop {game::minnows::*}:
  387. update inventory of loop-value
  388. teleport loop-value to a random location between {map::%{map}%::1}
  389. teleport loop-value to 1 block above location at loop-value
  390. #evaluate "teleport loop-value to a random location between {@%{map}%1}"
  391. set loop-value's level to 0
  392. set loop-value's gamemode to adventure
  393. set {game::temp::mins::%loop-value%::x} to x coordinate of (location at loop-value)
  394. set {game::temp::mins::%loop-value%::z} to z coordinate of (location at loop-value)
  395. loop {game::sharks::*}:
  396. update inventory of loop-value
  397. teleport loop-value to {Lobby}
  398. set loop-value's level to 0
  399. set loop-value's gamemode to adventure
  400. clear loop-value's inventory
  401. set {game::temp::shr::%loop-value%::x} to x coordinate of (location at loop-value)
  402. set {game::temp::shr::%loop-value%::z} to z coordinate of (location at loop-value)
  403. loop 15 times:
  404. loop all players:
  405. set loop-player's level to 15 - loop-number
  406. if loop-number >= 10:
  407. if loop-number is not 15:
  408. send loop-player title "&7%15 - loop-number%" with subtitle "&7&ogame starting in..." for 2 seconds
  409. else:
  410. send loop-player title "&7&LGO!" with subtitle "&eGame started!" for 2 seconds
  411. if {game::temp::mins::%loop-player%::x} is set:
  412. apply slowness 10 to loop-player for 2 seconds
  413. if x coordinate of loop-player is not {game::temp::mins::%loop-player%::x}:
  414. teleport loop-player to (the location at ({game::temp::mins::%loop-player%::x}), 27, ({game::temp::mins::%loop-player%::z}) of the world "world")
  415. else if z coordinate of loop-player is not {game::temp::mins::%loop-player%::z}:
  416. teleport loop-player to (the location at ({game::temp::mins::%loop-player%::x}), 27, ({game::temp::mins::%loop-player%::z}) of the world "world")
  417. if {game::temp::shr::%loop-player%::x} is set:
  418. apply slowness 10 to loop-player for 2 seconds
  419. apply blindness 10 to loop-player for 2 seconds
  420. if x coordinate of loop-player is not {game::temp::mins::%loop-player%::x}:
  421. teleport loop-player to (the location at ({game::temp::shr::%loop-player%::x}), 26, ({game::temp::shr::%loop-player%::z}) of the world "world")
  422. else if z coordinate of loop-player is not {game::temp::mins::%loop-player%::z}:
  423. teleport loop-player to (the location at ({game::temp::shr::%loop-player%::x}), 26, ({game::temp::shr::%loop-player%::z}) of the world "world")
  424. if loop-number > 13:
  425. clear loop-player's inventory
  426. if {game::minnows::%loop-player%} is set:
  427. remove slowness from loop-player
  428. else if {game::sharks::%loop-player%} is set:
  429. remove slowness from loop-player
  430. remove blindness from loop-player
  431. update score id "RoundTime.%loop-player%" to "&7Next Round &e%15 - loop-number%" and 8
  432. command "/playsound note.hat @a ~ ~ ~ 1 1 1"
  433. wait 1 second
  434. wait 2 ticks
  435. startLoop()
  436. set {game::safeside} to 2
  437. #loop {game::minnows::*}: !! this was originally here s
  438. # teleport loop-value to location at (a random number between 0.28 and 126), 27, (a random number between -84 and -88) of the world "world"
  439. # set {game::safeside} to 2
  440. # set loop-value's level to 0
  441. # set loop-value's gamemode to adventure
  442. # clear loop-value's inventory
  443. loop {game::sharks::*}:
  444. teleport loop-value to location at 63, 26, -10 of the world "world"
  445. set loop-value's level to 0
  446. set loop-value's gamemode to adventure
  447. clear loop-value's inventory
  448. wait 5 ticks
  449. loadKits()
  450. startRound()
  451. if getState() is 1:
  452. loop all players:
  453. set loop-player's action bar to "&7Need at least &e%5 - amount of players%&7 more players to start!"
  454. else if getState() is 2:
  455. if amount of players is less than 1:
  456. set sql var "game::snm1::state" to "1"
  457. loop all players:
  458. set loop-player's level to 0
  459. set loop-player's action bar to "&7Need at least &e%5 - amount of players%&7 more players to start!"
  460. else:
  461. loop all players:
  462. set {_time} to difference between {game::time} and now
  463. set {_time} to "%difference between {_time} and 30 second%"
  464. set {_time::*} to {_time} split at "."
  465. set {_time} to {_time::1} parsed as integer
  466. set loop-player's level to {_time}
  467. set loop-player's action bar to "&7Starting in &e%{_time}% seconds"
  468. if {_time} is less than 11:
  469. command "/playsound random.click @a ~ ~ ~ 1 0.5 1"
  470. else if getState() is 3:
  471. wait 1 tick
  472.  
  473. on join:
  474. heal player
  475. set join message to ""
  476. clear player's inventory
  477. set player's gamemode to adventure
  478. set player's level to 0
  479. teleport player to {lobby}
  480. set slot 2 of player's inventory to a clock named "&7Team Selector"
  481. if {game::multiplier} is not set:
  482. set slot 4 of player's inventory to a glowing gold ingot named "&7Multipliers"
  483. set slot 6 of player's inventory to a gunpowder named "&7Kit Selector"
  484. if amount of players is less than 3:
  485. set sql var "game::snm1::state" to "1"
  486. delete {game::time}
  487. else if amount of players is greater than or equal to 3:
  488. getState() is not 2 or 3
  489. set sql var "game::snm1::state" to "2"
  490. set {game::time} to now
  491. wipe player's sidebar
  492. set name of sidebar of player to "&7Sharks & Minnows"
  493. set id score "&7&r " in sidebar of player to 3 with id "Space1.%player%"
  494. set id score "&7Players:&e %amount of players%/24" in sidebar of player to 2 with id "Players.%player%"
  495. set id score "&r " in sidebar of player to 1 with id "Space2.%player%"
  496. set id score "&ewww.minealot.net" in sidebar of player to 0 with id "Website.%player%"
  497. while sidebar name for player is "&7Sharks & Minnows":
  498. wait 15 tick
  499. update score id "Players.%player%" to "&7Players:&e %amount of players%/24" and 2
  500.  
  501. on quit:
  502. if {game::minnows::%player%} is set:
  503. delete {game::minnows::%player%}
  504. if size of {game::minnows::*} is less than 1:
  505. if checkforWins() is false:
  506. processWin("Sharks")
  507. else:
  508. processWin("None")
  509. else if {game::sharks::%player%} is set:
  510. delete {game::sharks::%player%}
  511. if size of all players < 1:
  512. processWin("None")
  513. loop all players:
  514. update score id "Sharks.%loop-player%" to "&7Sharks: &e%size of {game::sharks::*}%" and 5
  515. update score id "Minnows.%loop-player%" to "&7Minnows: &e%size of {game::minnows::*}%" and 2
  516.  
  517. on rightclick holding wooden hoe:
  518. if difference between {game::skit::%player%::cd::1} and now is less than 30 seconds:
  519. message "&7Wait &e%difference between {game::skit::%player%::cd::1} and now%&7 before doing this again."
  520. stop trigger
  521. set {game::skit::%player%::cd::1} to now
  522. set {_p} to player
  523. if {_p} is player:
  524. loop 22 times:
  525. set {_loop-number} to loop-integer
  526. set {_ice.effect-loc} to the location {_loop-number} meters in front of {_p}'s head
  527. 1.8 spawn 25 of particle Magic Crit:0 offset by 0.3, 0.3, 0.3 at {_ice.effect-loc}
  528. play raw sound "dig.glass" at {_ice.effect-loc} with pitch 1 volume 1
  529. if block at {_ice.effect-loc} is not air:
  530. exit loop
  531. wait 2 ticks
  532. #launch flickering trailing burst firework colored cyan and white at the block below block at {_ice.effect-loc} timed .01
  533. #pop ball large firework colored cyan at the block at {_ice.effect-loc} to players
  534. 1.8 spawn 120 of particle Magic Crit:0 offset by 3, 3, 3 at {_ice.effect-loc} with data 0
  535. loop living entities in radius 5 around the block at {_ice.effect-loc}:
  536. if loop-entity is {_p}:
  537. exit 1 loop
  538. if {game::sharks::%loop-entity%} is set:
  539. exit 1 loop
  540. make {_p} damage loop-entities by 2
  541. apply slowness 2 to the loop-entities for 3 seconds
  542. apply nausea 5 to the loop-entities for 6 seconds
  543.  
  544. on rightclick holding stone hoe:
  545. if (difference between {game::skit::%player%::cd::0} and now) is less than 20 seconds:
  546. message "&7Wait &e%difference between {game::skit::%player%::cd::0} and now%&7 before doing this again."
  547. stop
  548. set {game::skit::%player%::cd::0} to now
  549. apply speed 6 to player for 5 seconds
  550. apply jump boost 2 to player for 5 seconds
  551. 1.8 spawn 25 of particle red dust:0 offset by 1, 1, 1 at player with data 0
  552.  
  553. on rightclick holding clock:
  554. open chest with 1 row named "&7Team Selector" to player
  555. wait 1 tick
  556. while inventory name of player's current inventory is "&7Team Selector":
  557. if size of {game::sharks::*} is not floor(amount of players/3):
  558. set slot 3 of player's current inventory to a raw fish named "&7Sharks:&e %size of {game::sharks::*}%/%ceil(amount of players/3)%"
  559. else:
  560. set slot 3 of player's current inventory to a raw fish named "&7Sharks:&e %size of {game::sharks::*}%/%ceil(amount of players/3)%"
  561. set slot 5 of player's current inventory to a cooked fish named "&7Minnows: &e%size of {game::minnows::*}%/%amount of players - floor(amount of players/3)%"
  562. wait 4 ticks
  563.  
  564. on rightclick holding gunpowder:
  565. if {game::sharks::%player%} is set:
  566. if {game::skit::%player%} is set:
  567. send "&7You have already chosen a kit!" to player
  568. else:
  569. open chest with 2 row named "&7Shark Kits" to player
  570. wait 1 tick
  571. set slot 0 of player's current inventory to a iron axe named "&7Hammerhead" with lore "&eUnlocked"
  572. set slot 1 of player's current inventory to a brown carpet named "&7Angel" with lore "&eUnlocked"
  573. set slot 13 of player's current inventory to a gold ingot named "&7Coins: &e%getCoins(player)%"
  574. else if {game::minnows::%player%} is set:
  575. if {game::mkit::%player%} is set:
  576. send "&7You have already chosen a kit!" to player
  577. else:
  578. open chest with 2 rows named "&7Minnow Kits" to player
  579. wait 1 tick
  580. set slot 0 of player's current inventory to a pufferfish named "&7Pufferfish" with lore "&eUnlocked"
  581. set slot 1 of player's current inventory to a clownfish named "&7Clownfish" with lore "&eUnlocked"
  582. set slot 2 of player's current inventory to a raw fish named "&7Raw fish" with lore "&eUnlocked"
  583. else:
  584. send "&7You need to choose a team to pick a kit!"
  585.  
  586. on inventory click:
  587. cancel the event
  588. if inventory name of player's current inventory is "&7Team Selector":
  589. if clicked item is a raw fish:
  590. if size of {game::minnows::*} >= 1:
  591. size of {game::sharks::*} is not ceil(amount of players/3)
  592. set {game::sharks::%player%} to player
  593. send "&7You joined the &eSharks &7team"
  594. delete {game::minnows::%player%}
  595. else:
  596. send "&7There needs to be a player on the minnow team to start."
  597. else if clicked item is a cooked fish:
  598. size of {game::minnows::*} is not amount of players - floor(amount of players/3)
  599. set {game::minnows::%player%} to player
  600. send "&7You joined the &eMinnows &7team"
  601. delete {game::sharks::%player%}
  602. else if inventory name of player's current inventory is "&7Minnow Kits":
  603. if clicked item is a pufferfish:
  604. set {game::mkit::%player%} to 0
  605. close inventory of player
  606. send "&7You have choosen the pufferfish kit!" to player
  607. else if clicked item is a clownfish:
  608. set {game::mkit::%player%} to 1
  609. close inventory of player
  610. send "&7You have choosen the clownfish kit" to player
  611. else if clicked item is a fish:
  612. set {game::mkit::%player%} to 2
  613. close inventory of player
  614. send "&7You have choosen the frozen raw fish kit" to player
  615. else if inventory name of player's current inventory is "&7Shark Kits":
  616. if clicked item is a iron axe:
  617. set {game::skit::%player%} to 0
  618. close inventory of player
  619. send "&7You have choosen the hammerhead kit" to player
  620. else if clicked item is a brown carpet:
  621. set {game::skit::%player%} to 1
  622. close inventory of player
  623. send "&7You have choosen the angel kit" to player
  624.  
  625. # Multipliers Sk
  626. on right click holding a gold ingot:
  627. cancel the event
  628. open chest with 1 row named "&7Multipliers" to player
  629. wait 1 tick
  630. set {_2} to value of sql var "multipliers::double::%player%" parsed as integer
  631. set {_3} to value of sql var "multipliers::triple::%player%" parsed as integer
  632. set {_4} to value of sql var "multipliers::quadruple::%player%" parsed as integer
  633. if "%{_2}%" is "<none>" or "0":
  634. set slot 2 of player's current inventory to a gold nugget named "&7Double Coins Multiplier:&e 0"
  635. else:
  636. set slot 2 of player's current inventory to a gold nugget named "&7Double Coins Multiplier:&e %{_2}%" with lore "&7Click to activate double coins multiplier for this game!"
  637. if "%{_3}%" is "<none>" or "0":
  638. set slot 4 of player's current inventory to a gold ingot named "&7Triple Coins Multiplier:&e 0"
  639. else:
  640. set slot 4 of player's current inventory to a gold ingot named "&7Triple Coins Multiplier:&e %{_3}%" with lore "&7Click to activate triple coins multiplier for this game!"
  641. if "%{_4}%" is "<none>" or "0":
  642. set slot 6 of player's current inventory to a gold block named "&7Quadruple Coins Multiplier:&e 0"
  643. else:
  644. set slot 6 of player's current inventory to a gold block named "&7Quadruple Coins Multiplier:&e %{_4}%" with lore "&7Click to activate quadruple coins multiplier for this game!"
  645.  
  646. on inventory click:
  647. cancel the event
  648. inventory name of player's current inventory is "&7Multipliers"
  649. clicked item is not air
  650. set {_2} to value of sql var "multipliers::double::%player%" parsed as integer
  651. set {_3} to value of sql var "multipliers::triple::%player%" parsed as integer
  652. set {_4} to value of sql var "multipliers::quadruple::%player%" parsed as integer
  653. if clicked item is a gold nugget:
  654. if lore of clicked item does not contain "&7Click":
  655. send "&7You have no Double Coins Multiplier to activate"
  656. else:
  657. broadcast "&e%player%&7 has activated a Double Coins Multiplier"
  658. command "/playsound random.levelup @a"
  659. set {game::multiplier} to player
  660. set {game::multiplier::amount} to 2
  661. remove all gold ingot from inventory of all players
  662. set sql var "multipliers::double::%player%" to "%{_2} - 1%"
  663. send "&7You now have &e%{_2} - 1%&7 Double Coins Multiplier left!"
  664. loop all players:
  665. inventory name of loop-player's current inventory is "&7Multipliers"
  666. close loop-player's inventory
  667. else if clicked item is a gold ingot:
  668. if lore of clicked item does not contain "&7Click":
  669. send "&7You have no Triple Coins Multiplier to activate"
  670. else:
  671. broadcast "&e%player%&7 has activated a Triple Coins Multiplier"
  672. command "/playsound random.levelup @a"
  673. set {game::multiplier} to player
  674. set {game::multiplier::amount} to 3
  675. remove all gold ingot from inventory of all players
  676. set sql var "multipliers::triple::%player%" to "%{_3} - 1%"
  677. send "&7You now have &e%{_3} - 1%&7 Triple Coins Multiplier left!"
  678. loop all players:
  679. inventory name of loop-player's current inventory is "&7Multipliers"
  680. close loop-player's inventory
  681. else if clicked item is a gold block:
  682. if lore of clicked item does not contain "&7Click":
  683. send "&7You have no Quadruple Coins Multiplier to activate"
  684. else:
  685. broadcast "&e%player%&7 has activated a Quadruple Coins Multiplier"
  686. command "/playsound random.levelup @a"
  687. set {game::multiplier} to player
  688. set {game::multiplier::amount} to 4
  689. remove all gold ingot from inventory of all players
  690. set sql var "multipliers::quadruple::%player%" to "%{_4} - 1%"
  691. send "&7You now have &e%{_4} - 1%&7 Quadruple Coins Multiplier left!"
  692. loop all players:
  693. inventory name of loop-player's current inventory is "&7Multipliers"
  694. close loop-player's inventory
Advertisement
Add Comment
Please, Sign In to add comment