brutushduefufn

Scenarios and Manager

Nov 18th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 79.69 KB | None | 0 0
  1. options:
  2. P: &4&lMythic &6»
  3.  
  4. function roundedTimespan(timespan: timespan) :: string:
  5. loop split "%{_timespan}%" at " ":
  6. if loop-value parsed as a number is set:
  7. add "%round(loop-value parsed as a number)%" to {_return::*}
  8. else:
  9. add loop-value to {_return::*}
  10. return join {_return::*} with " "
  11.  
  12. on skript load:
  13. set {Scenarioslist::*} to "CutClean", "NoClean", "DoubleOres", "TripleOres", "Fireless", "Bowless", "Timebomb", "TeamInventory", "Superheroes", "HasteyBoys", "Timber", "Bats", "LootCrates", "Moles" ,"Webcage" ,"Rush" ,"Entropy" ,"InfiniteEnchanter", "GoneFishin", "NoFall", "FlowerPower", "LAFS", "Diamondless", "Chicken", "Eggs", "BloodDiamonds", "DoubleDates", "Slavemarket", "GigaDrill", "Stock-Up", "VeinMiner", "DoubleOrNothing", "Deathnote", "OppositesAttract", "SkyHigh", "Ender Dragon Rush", "Birds" and "Generous Admin"
  14. #CutClean
  15. set {Scenarios::CutClean::item} to iron ingot
  16. set {Scenarios::CutClean::lore} to "Ores and animal drops are automatically smelted"
  17. #NoClean
  18. set {Scenarios::NoClean::item} to paper
  19. set {Scenarios::NoClean::lore} to "For every kill you get a 30 second immunity, expires if you hit someone"
  20. #DoubleOres
  21. set {Scenarios::DoubleOres::item} to golden ingot
  22. set {Scenarios::DoubleOres::lore} to "Ores are doubled"
  23. #TripleOres
  24. set {Scenarios::TripleOres::item} to diamond
  25. set {Scenarios::TripleOres::lore} to "Ores are tripled"
  26. #Fireless
  27. set {Scenarios::Fireless::item} to flint and steel
  28. set {Scenarios::Fireless::lore} to "You cannot take fire damage"
  29. #Bowless
  30. set {Scenarios::Bowless::item} to bow
  31. set {Scenarios::Bowless::lore} to "Bows are uncraftable and unusable"
  32. #Timebomb
  33. set {Scenarios::Timebomb::item} to TNT
  34. set {Scenarios::Timebomb::lore} to "After killing a player, their loot will drop into a chest, 30 Seconds later the chest explodes"
  35. #TeamInventory
  36. set {Scenarios::TeamInventory::item} to ender chest
  37. set {Scenarios::TeamInventory::lore} to "You will have a team shared inventory with /ti"
  38. #Superheroes
  39. set {Scenarios::Superheroes::item} to Speed potion item
  40. set {Scenarios::Superheroes::lore} to "Each player will gain a special ability, the powers are, speed 1, strength 1, resistance 2, invisibility, 6 extra hearts, jump boost 4"
  41. #HasteyBoys
  42. set {Scenarios::HasteyBoys::item} to golden pickaxe
  43. set {Scenarios::HasteyBoys::lore} to "Everyone mines faster"
  44. #Timber
  45. set {Scenarios::Timber::item} to diamond axe
  46. set {Scenarios::Timber::lore} to "Breaking a log of a tree will cause the whole tree to fall down"
  47. #Bats
  48. set {Scenarios::Bats::item} to bat spawn egg
  49. set {Scenarios::Bats::lore} to "When a player kills a bat, there's a 95%% chance of dropping a Golden Apple, 5%% chance of killing the player."
  50. #LootCrates
  51. set {Scenarios::LootCrates::item} to chest
  52. set {Scenarios::LootCrates::lore} to "Every 10 minutes, players will be given a ""loot crate"" filled with goodies."
  53. #Moles
  54. set {Scenarios::Moles::item} to poppy
  55. set {Scenarios::Moles::lore} to "One person on each team is chosen to be the Mole, The Moles are one team and can communicate with each other, trying to take out the other players, The normal players try to find out who the mole is on their team and kill them."
  56. #Webcage
  57. set {Scenarios::Webcage::item} to cobweb
  58. set {Scenarios::Webcage::lore} to "A sphere of cobwebs spawns around a player's death location."
  59. #Rush
  60. set {Scenarios::Rush::item} to iron sword
  61. set {Scenarios::Rush::lore} to "Shorter game"
  62. #Entropy
  63. set {Scenarios::Entropy::item} to bottle o' enchanting
  64. set {Scenarios::Entropy::lore} to "Every 10 min 1XP level is ""drained"" from you, if you don't have any levels when the drain occurs, you die."
  65. #InfiniteEnchanter
  66. set {Scenarios::InfiniteEnchanter::item} to enchantment table
  67. set {Scenarios::InfiniteEnchanter::lore} to "All players start with 128 Bookshelves, Infinite XP Levels, 64 Anvils and 64 Enchantment Tables."
  68. #GoneFishin
  69. set {Scenarios::GoneFishin::item} to fishing rod
  70. set {Scenarios::GoneFishin::lore} to "Each player starts with an Unbreaking 250, Lure 3, Luck of the Sea 250 fishing rod, 20 anvils."
  71. #NoFall
  72. set {Scenarios::NoFall::item} to feather
  73. set {Scenarios::NoFall::lore} to "You cannot take fall damage"
  74. #FlowerPower
  75. set {Scenarios::FlowerPower::item} to dandelion
  76. set {Scenarios::FlowerPower::lore} to "When a player breaks any random flower, the flower will drop a random item"
  77. #LAFS
  78. set {Scenarios::LAFS::item} to eye of ender
  79. set {Scenarios::LAFS::lore} to "You are scattered as a solo and you have to find your teammate, the first solo you damage will be your teammate."
  80. #Diamondless
  81. set {Scenarios::Diamondless::item} to diamond
  82. set {Scenarios::Diamondless::lore} to "Diamonds do not drop, Gold has a 50%% chance of dropping, Players drop 4 gold and 1 diamond upon death"
  83. #Chicken
  84. set {Scenarios::Chicken::item} to enchanted golden apple
  85. set {Scenarios::Chicken::lore} to "Everyone starts on 1/2 heart with a notch apple."
  86. #Eggs
  87. set {Scenarios::Eggs::item} to egg
  88. set {Scenarios::Eggs::lore} to "When you throw an egg, a random mob will spawn where it lands, When you kill a chicken, there is a 5%% chance of it dropping an egg."
  89. #BloodDiamonds
  90. set {Scenarios::BloodDiamonds::item} to diamond
  91. set {Scenarios::BloodDiamonds::lore} to "When a diamond ore is mined, you will take half a heart of damage."
  92. #DoubleDates
  93. set {Scenarios::DoubleDates::item} to golden sword
  94. set {Scenarios::DoubleDates::lore} to "Players join with a chosen team and are combined randomly with another team."
  95. #Slavemarket
  96. set {Scenarios::Slavemarket::item} to lead
  97. set {Scenarios::Slavemarket::lore} to "Slave owners are chosen and they get 30 diamonds to bid on players as they choose, Any spare diamonds and given back to the owner in the actual game."
  98. #GigaDrill
  99. set {Scenarios::GigaDrill::item} to diamond pickaxe
  100. set {Scenarios::GigaDrill::lore} to "You spawn with haste 2 , when you craft a pickaxe it turns into , an efficiency 5 pickaxe"
  101. #Stock-Up
  102. set {Scenarios::Stock-Up::item} to spider eye
  103. set {Scenarios::Stock-Up::lore} to "Each time a player dies, every other player currently alive gains 1 empty heart, (no regeneration to heal that heart)"
  104. #VeinMiner
  105. set {Scenarios::VeinMiner::item} to diamond ore
  106. set {Scenarios::VeinMiner::lore} to "Mining a block while shifting break blocks of the same type in a chain reaction, dropping the blocks at the end."
  107. #DoubleOrNothing
  108. set {Scenarios::DoubleOrNothing::item} to coal item
  109. set {Scenarios::DoubleOrNothing::lore} to "On mine of iron, diamond, or gold ore you have, 50%% chance of 2 of the ore dropping or no ores dropping."
  110. #Deathnote
  111. set {Scenarios::Deathnote::item} to book
  112. set {Scenarios::Deathnote::lore} to "One player is chosen to be Kira and another is chosen to be L, Kira gets the Death Note that allows him to writes down the name of someone on his team, Once written down, the teammate has 40 seconds before they die, The Death Note has a 10 minute cool down, Similar to Moles, the Kira's can also communicate with each other, L has the power, that when Kira is hit, he will die, If L hits someone who is not Kira, L will die instead, If or when Kira dies, he does not drop the Death Note."
  113. #OppositesAttract
  114. set {Scenarios::OppositesAttract::item} to crafting table
  115. set {Scenarios::OppositesAttract::lore} to "To2 Gamemode. Teammates may not have the same items in their inventory at once."
  116. #SkyHigh
  117. set {Scenarios::SkyHigh::item} to white wool
  118. set {Scenarios::SkyHigh::lore} to "After pvp enabled, you will take damage every 30 seconds if you are below y:100"
  119. #Ender Dragon Rush
  120. set {Scenarios::Ender Dragon Rush::item} to dragon egg
  121. set {Scenarios::Ender Dragon Rush::lore} to "First person or team to kill the Ender Dragon wins, the end portal will be automatically lit, if it is still not lit after meetup"
  122. #Birds
  123. set {Scenarios::Birds::item} to feather
  124. set {Scenarios::Birds::lore} to "All players can fly!"
  125. #Generous Admin
  126. set {Scenarios::Generous Admin::item} to diamond
  127. set {Scenarios::Generous Admin::lore} to "Every so often, an admin spawns somewhere in the world, carrying random items on him. He announces his coordinates, so players can try to find and kill him, The Generous Admin may not fight back, but he can flee."
  128.  
  129. function scenarioStatus(s: text) :: text:
  130. if {Scenarios::%{_s}%} is true:
  131. return "&a%{_s}%"
  132. else:
  133. return "&c%{_s}%"
  134.  
  135. plural expression all scenarios:
  136. get:
  137. return "CutClean", "NoClean", "DoubleOres", "TripleOres", "Fireless", "Bowless", "Timebomb", "TeamInventory", "Superheroes", "HasteyBoys", "Timber", "Bats", "LootCrates", "Moles" ,"Webcage" ,"Rush" ,"Entropy" ,"InfiniteEnchanter", "GoneFishin", "NoFall", "FlowerPower", "LAFS", "Diamondless", "Chicken", "Eggs", "BloodDiamonds", "DoubleDates", "Slavemarket", "GigaDrill", "Stock-Up", "VeinMiner", "DoubleOrNothing", "Deathnote", "OppositesAttract", "SkyHigh", "Ender Dragon Rush", "Birds" and "Generous Admin"
  138.  
  139. plural expression activ(e|ated) scenarios:
  140. get:
  141. loop {Scenarios::*}:
  142. add loop-index to {_List::*}
  143. return {_List::*}
  144.  
  145. function DisableAllScenarios(s: text):
  146. loop {Scenarios::*}:
  147. delete {Scenarios::%loop-index%}
  148. broadcast "{@P} &cAll scenarios have been disabled"
  149.  
  150. function OnScenario(s: text):
  151. if {Scenarios::%{_s}%::item} is set:
  152. set {Scenarios::%{_s}%} to true
  153. broadcast "{@P} &c%{_s}% has been enabled"
  154. else:
  155. broadcast "{@P} &c%{_s}% is not a valid scenario"
  156.  
  157. function OffScenario(s: text):
  158. if {Scenarios::%{_s}%::item} is set:
  159. delete {Scenarios::%{_s}%}
  160. broadcast "{@P} &c%{_s}% has been disabled"
  161. else:
  162. broadcast "{@P} &c%{_s}% is not a valid scenario"
  163.  
  164. function ToggleScenario(s: text, p: player, slot: number):
  165. if {Scenarios::%{_s}%} is not set:
  166. set {Scenarios::%{_s}%} to true
  167. broadcast "{@P} &c%{_s}% has been enabled"
  168. else if {Scenarios::%{_s}%} is true:
  169. delete {Scenarios::%{_s}%}
  170. broadcast "{@P} &c%{_s}% has been disabled"
  171. format gui slot {_slot} of {_p} with {Scenarios::%{_s}%::item} named scenarioStatus("%{_s}%") to run function ToggleScenario("%{_s}%", {_p}, {_slot})
  172.  
  173. function ScenarioStaff(p: player, page: number = 1):
  174. if {_page} is 1:
  175. open virtual chest inventory with size 6 named "&6Scenarios Page 1&7- &cStaff" to {_P}
  176. format gui slot 1 of {_P} with slimeball named "&6&lEnabled Scenarios" with lore "&f%uncoloured activated scenarios%"
  177. format gui slot 2 of {_P} with redstone named "&6&lDisable all scenarios" to close then run function DisableAllScenarios("")
  178. format gui slot 8 of {_P} with book named "&6&lPage 2" to close then run function ScenarioStaff({_P}, 2)
  179. loop 9 times:
  180. format gui slot (loop-number + 8) of {_P} with white glass
  181. set {_i} to 17
  182. loop {Scenarioslist::*}:
  183. add 1 to {_i}
  184. {_i} <= 53
  185. set {_item} to {Scenarios::%loop-value%::item} named scenarioStatus("%loop-value%") with lore "&f%{Scenarios::%loop-value%::lore}%"
  186. format gui slot {_i} of {_P} with {_item} to run function ToggleScenario("%loop-value%", {_p}, {_i})
  187. if {_page} is 2:
  188. open virtual chest inventory with size 6 named "&6Scenarios Page 2&7- &cStaff" to {_P}
  189. format gui slot 0 of {_P} with book named "&6&lPage 1" to close then run function ScenarioStaff({_P}, 1)
  190. format gui slot 1 of {_P} with slimeball named "&6&lEnabled Scenarios" with lore "&f%uncoloured activated scenarios%"
  191. format gui slot 2 of {_P} with redstone named "&6&lDisable all scenarios" to close then run function DisableAllScenarios("")
  192. loop 9 times:
  193. format gui slot (loop-number + 8) of {_P} with white glass
  194. set {_i} to 17
  195. loop {Scenarioslist::*}:
  196. add 1 to {_i}
  197. {_i} > 53
  198. set {_item} to {Scenarios::%loop-value%::item} named scenarioStatus("%loop-value%") with lore "&f%{Scenarios::%loop-value%::lore}%"
  199. format gui slot ({_i} - 36) of {_P} with {_item} to run function ToggleScenario("%loop-value%", {_P}, ({_i} - 36))
  200.  
  201. effect open normal scenario gui [to] %players%:
  202. trigger:
  203. open virtual chest inventory with size 5 named "&6Scenarios" to expression-1
  204. set {_N} to 0
  205. loop {Scenarios::*}:
  206. set {_lore} to {Scenarios::%loop-index%::lore}
  207. replace all ", " with "||&f" in {_lore}
  208. format gui slot {_N} of expression-1 with {Scenarios::%loop-index%::item} named "&c&l%loop-index%" with lore "&f%{_lore}%" to do nothing
  209. add 1 to {_N}
  210.  
  211. command /scenarios [<text>] [<text>]:
  212. aliases: /scen, /scens, /scenario
  213. trigger:
  214. if arg-1 is set:
  215. if command sender is not CONSOLE:
  216. if player doesn't have permission "uhc.staff":
  217. stop
  218. if arg-1 is "Disableall":
  219. DisableAllScenarios("Gay")
  220. else:
  221. if {Scenarios::%arg-1%::item} is set:
  222. if arg-2 is "on":
  223. OnScenario("%arg-1%")
  224. if arg-2 is "off":
  225. OffScenario("%arg-1%")
  226. else:
  227. message "{@P} &c%arg-1% is not a valid scenario"
  228. if arg-1 is "list":
  229. if player has permission "uhc.staff":
  230. message "{@P} &cActivated scenarios: %{Scenarios::*}%" to command sender
  231. stop
  232. if arg-1 is not set:
  233. if player has permission "uhc.staff":
  234. ScenarioStaff(player)
  235. else:
  236. open normal scenario gui to player
  237.  
  238. function HelpOPMessage(p: player, m: text, type: text, code: text):
  239. loop all players:
  240. loop-player has permission "uhc.staff"
  241. {UHC::Spectators::%loop-player%} is true
  242. if {_type} is "JSON":
  243. json("%loop-player%", "&cHelpOP &6» &c%{_p}%&7: &c%{_m}% [%{_code}%]||ttp:&cReply to sender||sgt:/helpopreply %{_code}% ")
  244. play sound "note_bass" to loop-player with volume 1 and pitch 5
  245. else:
  246. send "&cHelpOP &6» &c%{_p}%&7: &c%{_m}%" to loop-player
  247. play sound "note_bass" to loop-player with volume 1 and pitch 5
  248.  
  249. function StaffMessage(m: text, type: text):
  250. loop all players:
  251. loop-player has permission "uhc.staff"
  252. {UHC::Spectators::%loop-player%} is true
  253. if {_type} is "JSON":
  254. set {_TP::*} to {_m} split at "CMD"
  255. json("%loop-player%", "&cStaff &6» &c%coloured {_TP::1}%||ttp:&cTeleport to player||cmd:%{_TP::2}%")
  256. else:
  257. send "&cStaff &6» &c%coloured {_m}%" to loop-player
  258. if {_type} is "JSON":
  259. set {_TP::*} to {_m} split at "CMD"
  260. send "&cStaff &6» &c%coloured {_TP::1}%" to CONSOLE
  261. else:
  262. send "&cStaff &6» &c%coloured {_m}%" to CONSOLE
  263.  
  264.  
  265. function Vanish(P: player, O: text):
  266. if {_P} is online:
  267. if {_O} is "On":
  268. hide {_P} from all players
  269. reveal all players to {_P}
  270. loop {Vanish::*}:
  271. reveal {_P} to ("%loop-index%" parsed as player)
  272. {_P}.spigot().setCollidesWithEntities(false)
  273. set {Vanish::%{_P}%} to true
  274. send "{@P} &cYou are now &ainvisible!" to {_P}
  275. if name of slot 6 of {_P}'s inventory contains "Vanish":
  276. set slot 6 of {_P}'s inventory to light green dye named "&a&oVanish"
  277. Scoreboard({_P})
  278. if {_O} is "Off":
  279. reveal {_P} to all players
  280. loop {Vanish::*}:
  281. hide ("%loop-index%" parsed as player) from {_P}
  282. {_P}.spigot().setCollidesWithEntities(true)
  283. delete {Vanish::%{_P}%}
  284. send "{@P} &cYou are &cno longer invisible!" to {_P}
  285. if name of slot 6 of {_P}'s inventory contains "Vanish":
  286. set slot 6 of {_P}'s inventory to gray dye named "&c&oVanish"
  287. Scoreboard({_P})
  288. if {_O} is "OffSilent":
  289. reveal {_P} to all players
  290. loop {Vanish::*}:
  291. hide ("%loop-index%" parsed as player) from {_P}
  292. {_P}.spigot().setCollidesWithEntities(true)
  293. delete {Vanish::%{_P}%}
  294. if {_O} is "Toggle":
  295. if {Vanish::%{_P}%} is true:
  296. Vanish({_P}, "Off")
  297. else:
  298. Vanish({_P}, "On")
  299.  
  300. command /vanish [<text>] [<text>]:
  301. aliases: /v
  302. permission: uhc.staff
  303. trigger:
  304. if arg-1 is not set:
  305. Vanish(player, "Toggle")
  306. else if arg-1 is "on":
  307. Vanish(player, "On")
  308. else if arg-1 is "off":
  309. Vanish(player, "Off")
  310. else if contains(all players, "%arg-1%" parsed as player):
  311. if arg-2 is set:
  312. if arg-2 is "On":
  313. send "{@P} &cYou toggled vanish &aon &cfor %arg-1%" to player
  314. Vanish("%arg-1%" parsed as player, "On")
  315. else if arg-2 is "Off":
  316. send "{@P} &cYou toggled vanish &coff &cfor %arg-1%" to player
  317. Vanish("%arg-1%" parsed as player, "Off")
  318. else:
  319. message "{@P} &c/vanish (player|on/off) [on/off]"
  320. else:
  321. Vanish("%arg-1%" parsed as player, "Toggle")
  322. if {Vanish::%arg-1%} is true:
  323. send "{@P} &cYou toggled vanish &aon &cfor %arg-1%" to player
  324. else:
  325. send "{@P} &cYou toggled vanish &coff &cfor %arg-1%" to player
  326. else:
  327. message "{@P} &c/vanish (player|on/off) [on/off]"
  328.  
  329. on vehicle enter:
  330. {Vanish::%passenger of event-entity%} is true
  331. cancel the event
  332.  
  333. on right click:
  334. {Vanish::%player%} is true
  335. cancel the event
  336.  
  337. on inventory click:
  338. {Vanish::%player%} is true
  339. cancel the event
  340.  
  341. on break:
  342. {Vanish::%player%} is true
  343. cancel the event
  344.  
  345. on target:
  346. {Vanish::%target of entity%} is true
  347. cancel the event
  348.  
  349. on pressure plate:
  350. {Vanish::%event-player%} is true
  351. cancel the event
  352.  
  353. on tripwire:
  354. {Vanish::%event-player%} is true
  355. cancel the event
  356.  
  357. on damage:
  358. {Vanish::%attacker%} is true
  359. cancel the event
  360.  
  361. on damage:
  362. {Vanish::%victim%} is true
  363. cancel the event
  364.  
  365. on pickup:
  366. {Vanish::%player%} is true
  367. cancel the event
  368.  
  369. on drop:
  370. {Vanish::%player%} is true
  371. cancel the event
  372.  
  373. on join:
  374. wait 5 ticks
  375. if {Vanish::%player%} is not set:
  376. loop all players:
  377. if {Vanish::%loop-player%} is true:
  378. hide loop-player from player
  379. else:
  380. reveal loop-player to player
  381. else:
  382. loop all players:
  383. if {Vanish::%loop-player%} is not set:
  384. hide player from loop-player
  385.  
  386. function ClearAllEffects(P: player):
  387. clear {_P}'s inventory
  388. clear {_P}'s enderchest
  389. extinguish {_P}
  390. set {_P}'s gamemode to survival
  391. set {_P}'s walking speed to 0.2
  392. set {_P}'s max health to 10
  393. set {_P}'s health to 10
  394. set {_P}'s food to 10
  395. set {_P}'s level to 0
  396. execute console command "/effect %{_P}% clear"
  397. if {UHC::Spectators::%{_P}%} is not set:
  398. {Vanish::%{_P}%} is true
  399. Vanish({_P}, "OffSilent")
  400.  
  401. function SpecMode(P: player, O: text):
  402. if {_P} is online:
  403. if {_O} is "On":
  404. message "{@P} &cYou are now spec :D" to {_P}
  405. StaffMessage("%{_P}% became a spec", "Normal")
  406. set {UHC::Spectators::%{_P}%} to true
  407. Scoreboard({_P})
  408. Vanish({_P}, "On")
  409. clear {_P}'s inventory
  410. set slot 1 of {_P}'s inventory to compass named "&6&oPassthrough blocks"
  411. set slot 2 of {_P}'s inventory to iron sword named "&6&oTeleport to 0,0"
  412. set slot 3 of {_P}'s inventory to book named "&6&oView Inventory"
  413. set slot 4 of {_P}'s inventory to ender pearl named "&6&oTeleport"
  414. set slot 5 of {_P}'s inventory to end portal frame named "&6&oRandom Teleport"
  415. if {Vanish::%{_P}%} is true:
  416. set slot 6 of {_P}'s inventory to light green dye named "&a&oVanish"
  417. else:
  418. set slot 6 of {_P}'s inventory to gray dye named "&c&oVanish"
  419. set {_P}'s gamemode to creative
  420. updateNametagfor({_P})
  421. loop all players:
  422. updateSpectators(loop-player)
  423. updatePlayers(loop-player)
  424. while {UHC::Spectators::%{_P}%} is true:
  425. wait 5 ticks
  426. updateTPS({_p})
  427. else if {_O} is "Off":
  428. message "{@P} &cYou are now player :D" to {_P}
  429. StaffMessage("%{_P}% became a player", "Normal")
  430. delete {UHC::Spectators::%{_P}%}
  431. Scoreboard({_P})
  432. Vanish({_P}, "Off")
  433. set {_P}'s gamemode to survival
  434. clear {_P}'s inventory
  435. updateNametagfor({_P})
  436. loop all players:
  437. updateSpectators(loop-player)
  438. updatePlayers(loop-player)
  439. else:
  440. if {UHC::Spectators::%{_P}%} is true:
  441. message "{@P} &cYou are now player :D" to {_P}
  442. StaffMessage("%{_P}% became a player", "Normal")
  443. delete {UHC::Spectators::%{_P}%}
  444. Scoreboard({_P})
  445. Vanish({_P}, "Off")
  446. set {_P}'s gamemode to survival
  447. clear {_P}'s inventory
  448. updateNametagfor({_P})
  449. loop all players:
  450. updateSpectators(loop-player)
  451. updatePlayers(loop-player)
  452. else:
  453. message "{@P} &cYou are now spec :D" to {_P}
  454. StaffMessage("%{_P}% became a spec", "Normal")
  455. set {UHC::Spectators::%{_P}%} to true
  456. Scoreboard({_P})
  457. Vanish({_P}, "On")
  458. clear {_P}'s inventory
  459. set slot 1 of {_P}'s inventory to compass named "&6&oPassthrough blocks"
  460. set slot 2 of {_P}'s inventory to iron sword named "&6&oTeleport to 0,0"
  461. set slot 3 of {_P}'s inventory to book named "&6&oView Inventory"
  462. set slot 4 of {_P}'s inventory to ender pearl named "&6&oTeleport"
  463. set slot 5 of {_P}'s inventory to end portal frame named "&6&oRandom Teleport"
  464. if {Vanish::%{_P}%} is true:
  465. set slot 6 of {_P}'s inventory to light green dye named "&a&oVanish"
  466. else:
  467. set slot 6 of {_P}'s inventory to gray dye named "&c&oVanish"
  468. set {_P}'s gamemode to creative
  469. updateNametagfor({_P})
  470. loop all players:
  471. updateSpectators(loop-player)
  472. updatePlayers(loop-player)
  473. while {UHC::Spectators::%{_P}%} is true:
  474. wait 5 ticks
  475. updateTPS({_p})
  476.  
  477. function TeamNumber(p: number) :: number:
  478. set {_TM} to 1
  479. while {Teams::%{_TM}%} is set:
  480. add 1 to {_TM}
  481. return {_TM}
  482.  
  483. function fortuneEffect(p: player, b: block, i: item):
  484. if {_p}'s tool is enchanted with fortune 1:
  485. chance of 33%
  486. drop 1 of {_i} at {_b}
  487. else if {_p}'s tool is enchanted with fortune 2:
  488. if chance of 25%:
  489. drop 1 of {_i} at {_b}
  490. if chance of 25%:
  491. drop 1 of {_i} at {_b}
  492. else if {_p}'s tool is enchanted with fortune 3:
  493. if chance of 20%:
  494. drop 1 of {_i} at {_b}
  495. if chance of 20%:
  496. drop 1 of {_i} at {_b}
  497. if chance of 20%:
  498. drop 1 of {_i} at {_b}
  499.  
  500. #CutClean,Diamondless,DoubleOres,TripleOres
  501. function ironDrop(p: player, b: block, xp: boolean):
  502. if {_xp} is true:
  503. spawn 1 xp at {_b}
  504. if {Scenarios::DoubleOrNothing} is true:
  505. chance of 50%
  506. drop 2 iron ingot at {_b}
  507. else if {Scenarios::DoubleOres} is true:
  508. drop 2 iron ingot at {_b}
  509. else if {Scenarios::TripleOres} is true:
  510. drop 3 iron ingot at {_b}
  511. else:
  512. drop 1 iron ingot at {_b}
  513. fortuneEffect({_p}, {_b}, iron ingot)
  514.  
  515. function goldDrop(p: player, b: block, xp: boolean):
  516. if {_xp} is true:
  517. spawn 2 xp at {_b}
  518. if {Scenarios::DoubleOrNothing} is true:
  519. chance of 50%
  520. drop 2 gold ingot at {_b}
  521. else if {Scenarios::DoubleOres} is true:
  522. drop 2 gold ingot at {_b}
  523. else if {Scenarios::TripleOres} is true:
  524. drop 3 gold ingot at {_b}
  525. else:
  526. drop 1 gold ingot at {_b}
  527. fortuneEffect({_p}, {_b}, gold ingot)
  528.  
  529. function diamondDrop(p: player, b: block, xp: boolean):
  530. if {_xp} is true:
  531. set {_i} to random integer between 3 and 7
  532. spawn {_i} of xp at {_b}
  533. if {Scenarios::Diamondless} is true:
  534. stop
  535. if {Scenarios::DoubleOrNothing} is true:
  536. chance of 50%
  537. drop 2 diamond at {_b}
  538. else if {Scenarios::DoubleOres} is true:
  539. drop 2 diamond at {_b}
  540. else if {Scenarios::TripleOres} is true:
  541. drop 3 diamond at {_b}
  542. else:
  543. drop 1 diamond at {_b}
  544. fortuneEffect({_p}, {_b}, diamond)
  545.  
  546. #Birds
  547. function BirdsEffect(p: player):
  548. {Scenarios::Birds} is true
  549. set flight mode of {_p} to true
  550.  
  551. function BirdsStart(s: text):
  552. {Scenarios::Birds} is true
  553. loop {UHC::AlivePlayers::*}:
  554. set {_P} to loop-index parsed as player
  555. set flight mode of {_P} to true
  556. broadcast "{@P} &cPlayers can fly now due to birds"
  557.  
  558. on join:
  559. {Scenarios::Birds} is true
  560. {UHC::AlivePlayers::%player%} is true
  561. set player's flight mode to true
  562.  
  563. #Ender Dragon Rush
  564. function EnderDragonRushStart(s: text):
  565. {Scenarios::Ender Dragon Rush} is true
  566. set {_loc} to location(0, 256, 0, world("UHC"))
  567. while {_true} is not set:
  568. remove 1 from y-coordinate of {_loc}
  569. if y-coordinate of {_loc} <= 0:
  570. stop loop
  571. if block at {_loc} is not air or grass:
  572. stop loop
  573. add 1 to y-coordinate of {_loc}
  574. set {UHC::EndPortal} to {_loc}
  575. loop north, south, west, east:
  576. if loop-value is north:
  577. set {_loc2} to block 2 meter north of {_loc}
  578. if loop-value is south:
  579. set {_loc2} to block 2 meter south of {_loc}
  580. if loop-value is east:
  581. set {_loc2} to block 2 meter east of {_loc}
  582. if loop-value is west:
  583. set {_loc2} to block 2 meter west of {_loc}
  584. set block at {_loc2} to end portal frame
  585. if loop-value is north or south:
  586. set block 1 meter east of {_loc2} to end portal frame
  587. set block 1 meter west of {_loc2} to end portal frame
  588. if loop-value is east or west:
  589. set block 1 meter north of {_loc2} to end portal frame
  590. set block 1 meter south of {_loc2} to end portal frame
  591. broadcast "{@P} &cAn empty portal to the end has been made at 0,%y-coordinate of {_loc}%,0!"
  592.  
  593. function EnderDragonRushPortalCreate(s: text):
  594. {Scenarios::Ender Dragon Rush} is true
  595. {UHC::EndPortal::lit} is not set
  596. set block at {UHC::EndPortal} to end portal
  597. set block 1 meter north of {UHC::EndPortal} to end portal
  598. set block 1 meter east of block 1 meter north of {UHC::EndPortal} to end portal
  599. set block 1 meter west of block 1 meter north of {UHC::EndPortal} to end portal
  600. set block 1 meter south of {UHC::EndPortal} to end portal
  601. set block 1 meter east of block 1 meter south of {UHC::EndPortal} to end portal
  602. set block 1 meter west of block 1 meter south of {UHC::EndPortal} to end portal
  603. set block 1 meter east of {UHC::EndPortal} to end portal
  604. set block 1 meter west of {UHC::EndPortal} to end portal
  605. broadcast "{@P} &cThe end portal at 0,0 has been lit! (automatically since nobody lit it, come on people its been 50 minutes)"
  606.  
  607. on right click with eye of ender:
  608. {Scenarios::Ender Dragon Rush} is true
  609. {UHC::EndPortal::lit} is not set
  610. clicked block is end portal frame:0
  611. loop blocks in radius 3 of {UHC::EndPortal}:
  612. type of loop-block is type of clicked block
  613. add 1 to {UHC::EndPortal::count}
  614. if {UHC::EndPortal::count} >= 3:
  615. set {UHC::EndPortal::lit} to true
  616. set block at {UHC::EndPortal} to end portal
  617. set block 1 meter north of {UHC::EndPortal} to end portal
  618. set block 1 meter east of block 1 meter north of {UHC::EndPortal} to end portal
  619. set block 1 meter west of block 1 meter north of {UHC::EndPortal} to end portal
  620. set block 1 meter south of {UHC::EndPortal} to end portal
  621. set block 1 meter east of block 1 meter south of {UHC::EndPortal} to end portal
  622. set block 1 meter west of block 1 meter south of {UHC::EndPortal} to end portal
  623. set block 1 meter east of {UHC::EndPortal} to end portal
  624. set block 1 meter west of {UHC::EndPortal} to end portal
  625. broadcast "{@P} &cThe end portal at 0,0 has been lit!"
  626. stop loop
  627.  
  628. on death of ender dragon:
  629. {Scenarios::Ender Dragon Rush} is true
  630. broadcast "{@P} &cThe EnderDragon has been slain by %attacker% woooh!"
  631.  
  632. #SkyHigh
  633. function SkyHighStart(s: text):
  634. {Scenarios::SkyHigh} is true
  635. broadcast "{@P} &cSkyHigh has started you will start taking damage if you are under y100"
  636. while {UHC::Status} is true:
  637. wait 30 seconds
  638. {Scenarios::SkyHigh} is true
  639. loop {UHC::AlivePlayers::*}:
  640. set {_P} to loop-index parsed as player
  641. {_P}'s y-coordinate <= 100
  642. damage loop-index parsed as player by 0.5 hearts
  643. send "{@P} &cYou are under y100!" to {_P}
  644.  
  645. function SkyHighItems(p: player):
  646. {Scenarios::SkyHigh} is true
  647. give 4 snow block to {_p}
  648. give 2 pumpkin to {_p}
  649. give 2 string to {_p}
  650. give 16 feather to {_p}
  651. give 64 clay block to {_p}
  652. give 64 clay block to {_p}
  653. give 1 diamond shovel to {_p}
  654.  
  655. command /Skyhighitems <player>:
  656. aliases: /shitems
  657. trigger:
  658. player has permission "uhc.staff"
  659. if {Scenarios::SkyHigh} is true:
  660. SkyHighItems(arg-1)
  661. message "{@P} &cGave %arg-1% SkyHigh Items"
  662. else:
  663. message "{@P} &cSkyHigh is disabled"
  664.  
  665. function SkyHighItemStart(s: text):
  666. {Scenarios::SkyHigh} is true
  667. broadcast "{@P} &cSky High items has been given"
  668. loop {UHC::AlivePlayers::*}:
  669. set {_P} to loop-index parsed as player
  670. if {_P} is online:
  671. SkyHighItems({_P})
  672. else:
  673. set {UHC::SkyHighItems::%{_P}%} to true
  674.  
  675. on join:
  676. {Scenarios::SkyHigh} is true
  677. if {UHC::SkyHighItems::%player%} is true:
  678. SkyHighItems(player)
  679. delete {UHC::SkyHighItems::%player%}
  680.  
  681. #OppositesAttract
  682. on inventory click:
  683. {UHC::Status} is true
  684. {Scenarios::OppositesAttract} is true
  685. if "%event.getAction()%" contains "place":
  686. event.getClickedInventory() != player's inventory
  687. stop
  688. else if "%event.getAction()%" contains "move to other inventory":
  689. event.getClickedInventory() == player's inventory
  690. stop
  691. else:
  692. stop
  693. loop {Team.%{Teams.InTeam::%player%}%::*}:
  694. set {_P} to ("%loop-value%" parsed as offline player)
  695. {_P} != player
  696. if {_P} is online:
  697. loop all items in {_P}'s inventory:
  698. if "%event.getAction()%" contains "move to other inventory":
  699. type of loop-item is type of clicked item
  700. cancel the event
  701. send "{@P} &c%loop-value-1% &calready has &c%type of clicked item%" to player
  702. else:
  703. type of loop-item is type of clicked cursor
  704. cancel the event
  705. send "{@P} &c%loop-value-1% &calready has &c%type of clicked cursor%" to player
  706. set {_N} to 35
  707. loop 4 times:
  708. add 1 to {_N}
  709. if "%event.getAction()%" contains "move to other inventory":
  710. type of slot {_N} of {_P} is type of clicked item
  711. cancel the event
  712. send "{@P} &c%loop-value-1% &calready has &c%type of clicked item%" to player
  713. else:
  714. type of slot {_N} of {_P} is type of clicked cursor
  715. cancel the event
  716. send "{@P} &c%loop-value-1% &calready has &c%type of clicked cursor%" to player
  717. else:
  718. loop {UHC::OppositesAttractInventory::%loop-value%::*}:
  719. if "%event.getAction()%" contains "move to other inventory":
  720. loop-value-2 == clicked item
  721. cancel the event
  722. send "{@P} &c%loop-value-1% &calready has &c%event.getCursor()%" to player
  723. else:
  724. loop-value-2 == clicked cursor
  725. cancel the event
  726. send "{@P} &c%loop-value-1% &calready has &c%event.getCursor()%" to player
  727.  
  728. on craft:
  729. {UHC::Status} is true
  730. {Scenarios::OppositesAttract} is true
  731. loop {Team.%{Teams.InTeam::%player%}%::*}:
  732. set {_P} to ("%loop-value%" parsed as offline player)
  733. {_P} != player
  734. if {_P} is online:
  735. loop all items in {_P}'s inventory:
  736. type of loop-item is event-item
  737. cancel the event
  738. send "{@P} &c%loop-value-1% &calready has &c%type of event-item%" to player
  739. set {_N} to 35
  740. loop 4 times:
  741. add 1 to {_N}
  742. type of slot {_N} of {_P} is event-item
  743. cancel the event
  744. send "{@P} &c%loop-value-1% &calready has &c%type of event-item%" to player
  745. else:
  746. loop {UHC::OppositesAttractInventory::%loop-value%::*}:
  747. loop-value-2 == event-item
  748. cancel the event
  749. send "{@P} &c%loop-value-1% &calready has &c%type of event-item%" to player
  750.  
  751. on pickup:
  752. {UHC::Status} is true
  753. {Scenarios::OppositesAttract} is true
  754. loop {Team.%{Teams.InTeam::%player%}%::*}:
  755. set {_P} to ("%loop-value%" parsed as offline player)
  756. {_P} != player
  757. if {_P} is online:
  758. loop all items in {_P}'s inventory:
  759. type of loop-item is type of event-item
  760. cancel the event
  761. if {UHC::OppositesAttractDelay::%player%} is not set:
  762. set {UHC::OppositesAttractDelay::%player%} to now
  763. send "{@P} &cFailed pickup cause &c%loop-value-1% &calready has &c%type of event-item%" to player
  764. else:
  765. difference between {UHC::OppositesAttractDelay::%player%} and now is more than 2 seconds
  766. set {UHC::OppositesAttractDelay::%player%} to now
  767. send "{@P} &cFailed pickup cause &c%loop-value-1% &calready has &c%type of event-item%" to player
  768. set {_N} to 35
  769. loop 4 times:
  770. add 1 to {_N}
  771. type of slot {_N} of {_P} is type of event-item
  772. cancel the event
  773. if {UHC::OppositesAttractDelay::%player%} is not set:
  774. set {UHC::OppositesAttractDelay::%player%} to now
  775. send "{@P} &cFailed pickup cause &c%loop-value-1% &calready has &c%type of event-item%" to player
  776. else:
  777. difference between {UHC::OppositesAttractDelay::%player%} and now is more than 2 seconds
  778. set {UHC::OppositesAttractDelay::%player%} to now
  779. send "{@P} &cFailed pickup cause &c%loop-value-1% &calready has &c%type of event-item%" to player
  780. else:
  781. loop {UHC::OppositesAttractInventory::%loop-value%::*}:
  782. loop-value-2 == type of event-item
  783. cancel event
  784. if {UHC::OppositesAttractDelay::%player%} is not set:
  785. set {UHC::OppositesAttractDelay::%player%} to now
  786. send "{@P} &cFailed pickup cause &c%loop-value-1% &calready has &c%type of event-item%" to player
  787. else:
  788. difference between {UHC::OppositesAttractDelay::%player%} and now is more than 2 seconds
  789. set {UHC::OppositesAttractDelay::%player%} to now
  790. send "{@P} &cFailed pickup cause &c%loop-value-1% &calready has &c%type of event-item%" to player
  791.  
  792. on quit:
  793. {UHC::Status} is true
  794. {Scenarios::OppositesAttract} is true
  795. {UHC::AlivePlayers::%player%} is true
  796. delete {UHC::OppositesAttractInventory::%player%::*}
  797. loop all items in player's inventory:
  798. add type of loop-item to {UHC::OppositesAttractInventory::%player%::*}
  799. loop player's helmet, player's chestplate, player's leggings and player's boots:
  800. add type of loop-value to {UHC::OppositesAttractInventory::%player%::*}
  801.  
  802. #Deathnote
  803. function SetKiraL(s: text):
  804. {Scenarios::Deathnote} is true
  805. loop {Teams::*}:
  806. set {_List::*} to {Team.%loop-index%::*}
  807. set {_Loop} to true
  808. while {_Loop} is true:
  809. set {_Kira} to a random element out of {_List::*}
  810. set {_Kira} to "%{_Kira}%" parsed as player
  811. remove {_Kira} from {_List::*}
  812. if {_Kira} is online:
  813. set {UHC::Kira::%{_Kira}%} to true
  814. message "{@P} &cYou are Kira, betray your team. Use /kirahelp" to {_Kira}
  815. set {_Loop} to false
  816. if {_List::*} is not set:
  817. set {_Loop} to false
  818. wait 1 tick
  819. set {_Loop} to true
  820. while {_Loop} is true:
  821. set {_L} to a random element out of {_List::*}
  822. set {_L} to "%{_L}%" parsed as player
  823. remove {_L} from {_List::*}
  824. if {_L} is online:
  825. set {UHC::L::%{_L}%} to true
  826. message "{@P} &cYou are L, find kira and protect the innocent. Use /Lhelp" to {_L}
  827. set {_Loop} to false
  828. if {_List::*} is not set:
  829. set {_Loop} to false
  830. wait 1 tick
  831. broadcast "{@P} &cKira's and L's have been set!"
  832. execute console command "/playsoundall note.pling"
  833.  
  834. on damage:
  835. {Scenarios::Deathnote} is true
  836. {Teams.InTeam::%victim%} == {Teams.InTeam::%attacker%}
  837. if {UHC::L::%attacker%} is true:
  838. if {UHC::Kira::%victim%} is true:
  839. set {UHC::DeathByL::%victim%} to true
  840. kill victim
  841. message "{@P} &cYou succesfully killed Kira!" to attacker
  842. else:
  843. set {UHC::LFail::%attacker%} to true
  844. kill attacker
  845.  
  846. on death:
  847. {Scenarios::Deathnote} is true
  848. if {UHC::Kira::%victim%} is true:
  849. delete {UHC::Kira::%victim%}
  850. if {UHC::L::%victim%} is true:
  851. delete {UHC::L::%victim%}
  852.  
  853. command /lhelp:
  854. usage: /lhelp
  855. trigger:
  856. if {Scenarios::Deathnote} is not set:
  857. message "{@P} &cDeathnote is currently disabled"
  858. stop
  859. message "{@P} &cL needs to find Kira and kill him by damaging kira"
  860. message "{@P} &cIf L attacks someone who is not Kira, L will die."
  861.  
  862. command /kirahelp:
  863. usage: /kirahelp
  864. trigger:
  865. if {Scenarios::Deathnote} is not set:
  866. message "{@P} &cDeathnote is currently disabled"
  867. stop
  868. message "{@P} &cUse the command /kcc or /kirachat to speak to your fellow kira"
  869. message "{@P} &cUse the command /kcl or /kiraloc to tell your fellow kira where you are"
  870. message "{@P} &cUse the command /kcp or /kiralist to find out who your fellow kira are"
  871. message "{@P} &cUse the command /deathnote <player> to kill someone in your team"
  872.  
  873. command /deathnote <player>:
  874. usage: /deathnote <teammate>
  875. trigger:
  876. if {Scenarios::Deathnote} is not set:
  877. message "{@P} &cDeathnote is currently disabled"
  878. stop
  879. set {_waited} to difference between {UHC::DeathnoteCooldown::%player%} and now
  880. if {_waited} is less than 10 minutes:
  881. message "{@P} &cDeathnote is on cooldown, you can use it again in %{_waited}%"
  882. else if {UHC::Kira::%player%} is true:
  883. if {UHC::AlivePlayers::%arg-1%} is not set:
  884. message "{@P} &c%arg-1% is not an alive player"
  885. else if {Teams.InTeam::%player%} == {Teams.InTeam::%arg-1%}:
  886. set {UHC::DeathnoteCooldown::%player%} to now
  887. message "{@P} &c%arg-1% will die in 40 seconds"
  888. wait 40 seconds
  889. set {UHC::DeathbyKira::%arg-1%} to true
  890. kill arg-1
  891. else:
  892. message "{@P} &cYou can only kill someone in your team."
  893. else:
  894. message "{@P} &cYou are not kira!"
  895.  
  896. command /kcc <text>:
  897. aliases: /kirachat
  898. usage: /kcc <message>
  899. trigger:
  900. if {Scenarios::Deathnote} is not set:
  901. message "{@P} &cDeathnote is currently disabled"
  902. stop
  903. if {UHC::Kira::%player%} is true:
  904. loop all players:
  905. {UHC::Kira::%loop-player%} is true
  906. message "&cKira &6» &e%command sender%&7: &f%arg-1%" to the loop-value
  907. else:
  908. message "{@P} &cYou are not kira!"
  909.  
  910. command /kcl:
  911. aliases: /kiraloc
  912. usage: /kcl - broadcast location to other kiras
  913. trigger:
  914. if {Scenarios::Deathnote} is not set:
  915. message "{@P} &cDeathnote is currently disabled"
  916. stop
  917. if {UHC::Deathnote::%player%} is true:
  918. loop all players:
  919. {UHC::Kira::%loop-player%} is true
  920. message "&cKira &6» &9%command sender%'s coords&7: &f%player's location%" to the loop-value
  921. else:
  922. message "{@P} &cYou are not kira!"
  923.  
  924. command /kcp:
  925. aliases: /kiralist
  926. usage: /kcp - list kira's players alive
  927. trigger:
  928. if {Scenarios::Deathnote} is not set:
  929. message "{@P} &cDeathnote is currently disabled"
  930. stop
  931. if {UHC::Kira::%player%} is true:
  932. loop all players:
  933. {UHC::Kira::%loop-player%} is true
  934. add loop-player to {_list::*}
  935. message "{@P} &cAll Kira's&7: &c%{_list::*}%"
  936. else:
  937. message "{@P} &cYou are not kira!"
  938.  
  939. #VeinMiner
  940. on mine of coal ore:
  941. {UHC::AlivePlayers::%player%} is true
  942. {Scenarios::VeinMiner} is true
  943. player is sneaking
  944. loop blocks in radius 2 around event-block:
  945. loop-block is coal ore
  946. set loop-block to air
  947. damage player's tool by 1
  948. drop 1 coal at loop-block
  949. add 1 to {_xp}
  950. spawn 1 xp at event-block
  951. add ({_xp}-1) to player's xp
  952.  
  953. on mine of nether quartz ore:
  954. {UHC::AlivePlayers::%player%} is true
  955. {Scenarios::VeinMiner} is true
  956. player is sneaking
  957. loop blocks in radius 2 around event-block:
  958. loop-block is nether quartz ore
  959. set loop-block to air
  960. damage player's tool by 1
  961. drop 1 nether quartz at loop-block
  962. add 1 to {_xp}
  963. spawn 1 xp at event-block
  964. add ({_xp}-1) to player's xp
  965.  
  966. on mine of iron ore:
  967. {UHC::AlivePlayers::%player%} is true
  968. {Scenarios::VeinMiner} is true
  969. player is sneaking
  970. loop blocks in radius 2 around event-block:
  971. loop-block is iron ore
  972. set loop-block to air
  973. damage player's tool by 1
  974. add 1 to {_xp}
  975. ironDrop(player, loop-block, false)
  976. spawn 1 xp at event-block
  977. add ({_xp}-1) to player's xp
  978.  
  979. on mine of gold ore:
  980. {UHC::AlivePlayers::%player%} is true
  981. {Scenarios::VeinMiner} is true
  982. player is sneaking
  983. loop blocks in radius 2 around event-block:
  984. loop-block is gold ore
  985. set loop-block to air
  986. damage player's tool by 1
  987. add 1 to {_xp}
  988. goldDrop(player, loop-block, false)
  989. spawn 1 xp at event-block
  990. add ({_xp}-1) to player's xp
  991.  
  992. on mine of diamond ore:
  993. {UHC::AlivePlayers::%player%} is true
  994. {Scenarios::VeinMiner} is true
  995. player is sneaking
  996. loop blocks in radius 2 around event-block:
  997. loop-block is diamond ore
  998. set loop-block to air
  999. damage player's tool by 1
  1000. add 1 to {_xp}
  1001. diamondDrop(player, loop-block, false)
  1002. spawn 1 xp at event-block
  1003. add ({_xp}-1) to player's xp
  1004.  
  1005. on mine of lapis lazuli ore:
  1006. {UHC::AlivePlayers::%player%} is true
  1007. {Scenarios::VeinMiner} is true
  1008. player is sneaking
  1009. loop blocks in radius 2 around event-block:
  1010. loop-block is lapis lazuli ore
  1011. set loop-block to air
  1012. damage player's tool by 1
  1013. add 1 to {_xp}
  1014. drop 6 of lapis lazuli at loop-block
  1015. spawn 1 xp at event-block
  1016. add ({_xp}-1) to player's xp
  1017.  
  1018. on mine of redstone ore:
  1019. {UHC::AlivePlayers::%player%} is true
  1020. {Scenarios::VeinMiner} is true
  1021. player is sneaking
  1022. loop blocks in radius 2 around event-block:
  1023. loop-block is redstone ore
  1024. set loop-block to air
  1025. damage player's tool by 1
  1026. add 1 to {_xp}
  1027. drop 4 of redstone at loop-block
  1028. spawn 1 xp at event-block
  1029. add ({_xp}-1) to player's xp
  1030.  
  1031. on mine of emerald ore:
  1032. {UHC::AlivePlayers::%player%} is true
  1033. {Scenarios::VeinMiner} is true
  1034. player is sneaking
  1035. loop blocks in radius 2 around event-block:
  1036. loop-block is equal to emerald ore
  1037. set loop-block to air
  1038. damage player's tool by 1
  1039. add 1 to {_xp}
  1040. drop 1 of emerald at loop-block
  1041. spawn 1 xp at event-block
  1042. add ({_xp}-1) to player's xp
  1043.  
  1044. #Stock-Up
  1045. on death:
  1046. {UHC::Status} is true
  1047. {Scenarios::Stock-Up} is true
  1048. {UHC::AlivePlayers::%victim%} is true
  1049. add 1 to {UHC::Stock-Up}
  1050. loop {UHC::AlivePlayers::*}:
  1051. set {_P} to loop-index parsed as player
  1052. if {_P} is online:
  1053. set {_P}'s max health to ({UHC::Stock-Up} + 10)
  1054. else:
  1055. set {UHC::Stock-Up::%loop-index%} to true
  1056.  
  1057. on join:
  1058. {UHC::Status} is true
  1059. {Scenarios::Stock-Up} is true
  1060. {UHC::AlivePlayers::%player%} is true
  1061. {UHC::Stock-Up::%player%} is true
  1062. set player's max health to ({UHC::Stock-Up} + 10)
  1063. message "{@P} &cYou got your hearts from fallen players while you were offline"
  1064.  
  1065. #GigaDrill
  1066. function GigaDrillStart(s: text):
  1067. {UHC::Status} is true
  1068. {Scenarios::GigaDrill} is true
  1069. loop {UHC::AlivePlayers::*}:
  1070. set {_P} to loop-index parsed as player
  1071. apply potion of Haste of tier 2 to {_P} for 1 day
  1072.  
  1073. function GigaDrillEffect(p: player):
  1074. {UHC::Status} is true
  1075. {Scenarios::GigaDrill} is true
  1076. apply potion of Haste of tier 2 to {_p} for 1 day
  1077.  
  1078. on inventory close:
  1079. {UHC::Status} is true
  1080. {Scenarios::GigaDrill} is true
  1081. loop all items in the inventory of player:
  1082. loop-item is pickaxe
  1083. loop-item is not a diamond pickaxe of efficiency 5
  1084. set loop-item to diamond pickaxe of efficiency 5
  1085.  
  1086. on drinking of milk:
  1087. if {Scenarios::GigaDrill} is true:
  1088. cancel the event
  1089. remove 1 milk bucket from player's inventory
  1090. message "{@P} &cScenario is currently GigaDrill"
  1091.  
  1092. #DoubleDates
  1093. function DoubleDatesStart(s: text):
  1094. {UHC::Status} is true
  1095. {Scenarios::DoubleDates} is true
  1096. set {_list::*} to {Teams::*}
  1097. loop {_list::*}:
  1098. set {_team1} to a random element out of {_list::*}
  1099. remove {_team1} from {_list::*}
  1100. set {_team2} to a random element out of {_list::*}
  1101. remove {_team2} from {_list::*}
  1102. set {_team1} to {_team1} parsed as integer
  1103. set {_team2} to {_team2} parsed as integer
  1104. if {_team2} is not set:
  1105. loop {Team.%{_team1}%::*}:
  1106. message "{@P} &cYou dont have a double date since ur lonely(not enough teams)" to loop-value-2
  1107. stop
  1108. loop {Team.%{_team1}%::*}:
  1109. add loop-value-2 to {_players::*}
  1110. loop {Team.%{_team2}%::*}:
  1111. add loop-value-2 to {_players::*}
  1112. loop {_players::*}:
  1113. leaveTeam(loop-value-2)
  1114. deleteTeam({_team1})
  1115. deleteTeam({_team2})
  1116. set {_TM} to TeamNumber(1)
  1117. createTeam({_TM})
  1118. loop {_players::*}:
  1119. joinTeam(loop-value-2, {_TM})
  1120. message "{@P} &cYour double dates are &c%{_players::*}% no roleplay in chat plz" to loop-value-2
  1121. delete {_players::*}
  1122.  
  1123. #Slavemarket
  1124. function SlavemarketDiamonds(s: text):
  1125. loop {UHC::SlaveMarket::DiamondsReturn::*}:
  1126. set {_P} to loop-index parsed as player
  1127. if {_P} is online:
  1128. give {_P} {UHC::SlaveMarket::DiamondsReturn::%loop-index%} of diamonds
  1129. delete {UHC::SlaveMarket::DiamondsReturn::%loop-index%}
  1130.  
  1131. on join:
  1132. {UHC::SlaveMarket::DiamondsReturn::%player%} is set
  1133. give player {UHC::SlaveMarket::DiamondsReturn::%player%} of diamonds
  1134. delete {UHC::SlaveMarket::DiamondsReturn::%player%}
  1135.  
  1136. command /slavemarket [<text>] [<text>] [<text>]:
  1137. trigger:
  1138. {Scenarios::Slavemarket} is true
  1139. if arg-1 is "startbid":
  1140. player has permission "uhc.staff"
  1141. loop all players:
  1142. {UHC::Spectators::%loop-player%} is not set
  1143. {UHC::SlaveMarket::Owners::%loop-player%} is not set
  1144. add loop-player to {_slaves::*}
  1145. broadcast "{@P} &cStarting slaves bidding"
  1146. wait 2 seconds
  1147. loop {_slaves::*}:
  1148. delete {UHC::SlaveMarket::CurrentBid::*}
  1149. set {UHC::SlaveMarket::CurrentBid} to loop-value
  1150. broadcast "{@P} &4Current slave being bidded - &c%loop-value%"
  1151. execute console command "/warp slavebid %loop-value%"
  1152. set {UHC::SlaveMarket::CurrentBidTimer} to 7
  1153. while {UHC::SlaveMarket::CurrentBidTimer} > 0:
  1154. if {UHC::SlaveMarket::CurrentBidTimer} is 3:
  1155. broadcast "{@P} &cBid ending in 3 seconds"
  1156. else if {UHC::SlaveMarket::CurrentBidTimer} is 2:
  1157. broadcast "{@P} &cBid ending in 2 seconds"
  1158. else if {UHC::SlaveMarket::CurrentBidTimer} is 1:
  1159. broadcast "{@P} &cBid ending in 1 second"
  1160. wait 1 second
  1161. remove 1 from {UHC::SlaveMarket::CurrentBidTimer}
  1162. set {UHC::SlaveMarket::CurrentBid::me} to 0
  1163. loop {UHC::SlaveMarket::CurrentBid::*}:
  1164. add loop-index-2 to {_indexes::*}
  1165. set {_sortedIndexes::*} to sortHighestToLowest({_indexes::*}, {UHC::SlaveMarket::CurrentBid::*})
  1166. set {_N} to 0
  1167. loop {_sortedIndexes::*}:
  1168. {_N} < 1
  1169. if "%loop-value-2%" is "me":
  1170. broadcast "{@P} &7Nobody bidded for %loop-value-1%, giving him a random team"
  1171. set {_TM} to a random element out of {UHC::SlaveMarket::Owners::*}
  1172. joinTeam(loop-value-1, ("%{_TM}%" parsed as integer))
  1173. else:
  1174. broadcast "{@P} &aThe slave %loop-value-1% has been sold to %loop-value-2% with %{UHC::SlaveMarket::CurrentBid::%loop-value-2%}% diamonds"
  1175. delete {UHC::SlaveMarket::CurrentBidMax}
  1176. remove {UHC::SlaveMarket::CurrentBid::%loop-value-2%} of diamond from ("%loop-value-2%" parsed as player)'s inventory
  1177. joinTeam(loop-value-1, {UHC::SlaveMarket::Owners::%loop-value-2%})
  1178. execute console command "/warp slaveowner%{UHC::SlaveMarket::Owners::%loop-value-2%}% %loop-value-1%"
  1179. add 1 to {_N}
  1180. delete {_N}
  1181. delete {_indexes::*}
  1182. delete {_sortedIndexes::*}
  1183. delete {UHC::SlaveMarket::CurrentBid::*}
  1184. delete {UHC::SlaveMarket::CurrentBid}
  1185. broadcast "{@P} &cBidding has finished, leftover diamonds saved and will be re-given"
  1186. loop {UHC::SlaveMarket::Owners::*}:
  1187. set {_P} to loop-index parsed as player
  1188. set {UHC::SlaveMarket::DiamondsReturn::%loop-index%} to amount of diamonds in {_P}'s inventory
  1189. clear {_P}'s inventory
  1190. if arg-1 is "owner":
  1191. player has permission "uhc.staff"
  1192. {UHC::SlaveMarket::Owners::%arg-2%} is not set
  1193. set {_p} to arg-2 parsed as player
  1194. {_p} is online
  1195. set {_TM} to TeamNumber(1)
  1196. broadcast "{@P} %arg-2% has became a slave owner ##%{_TM}%"
  1197. give {_p} 30 diamonds
  1198. loop 5 times:
  1199. send "{@P} &cUse ""/slavemarket bid amount"" to Bid!" to {_p}
  1200. send "{@P} yes the spam is necessary" to {_p}
  1201. play sound "note_bass" to {_p} with volume 1 and pitch 5
  1202. set {UHC::SlaveMarket::Owners::%arg-2%} to {_TM}
  1203. createTeam({_TM})
  1204. joinTeam({_p}, {_TM})
  1205. execute console command "/warp slaveowner%{_TM}% %arg-2%"
  1206. if arg-1 is "bid":
  1207. {UHC::SlaveMarket::Owners::%player%} is set
  1208. {UHC::SlaveMarket::CurrentBid} is set
  1209. set {_amount} to arg-2 parsed as integer
  1210. if {_amount} is not set:
  1211. message "{@P} &cThat is not a valid amount"
  1212. stop
  1213. if {_amount} < 1:
  1214. message "{@P} &cYou cannot bid under atleast 1 diamond"
  1215. stop
  1216. if {_amount} <= {UHC::SlaveMarket::CurrentBidMax}:
  1217. message "{@P} &cCurrent bid is %{UHC::SlaveMarket::CurrentBidMax}% diamonds you must bid higher"
  1218. stop
  1219. if amount of diamond in player's inventory is less than {_amount}:
  1220. message "{@P} &cYou dont have enough diamonds"
  1221. stop
  1222. set {UHC::SlaveMarket::CurrentBid::%player%} to {_amount}
  1223. if {UHC::SlaveMarket::CurrentBidTimer} <= 3:
  1224. broadcast "{@P} &eBid Timer extended for 4 seconds"
  1225. add 4 to {UHC::SlaveMarket::CurrentBidTimer}
  1226. set {UHC::SlaveMarket::CurrentBidMax} to {_amount}
  1227. broadcast "{@P} &b%player% has bidded %{UHC::SlaveMarket::CurrentBid::%player%}% diamonds for %{UHC::SlaveMarket::CurrentBid}%"
  1228.  
  1229. on drop:
  1230. {Scenarios::Slavemarket} is true
  1231. {UHC::Status} is not set
  1232. {UHC::SlaveMarket::Owners::%player%} is set
  1233. player's tool is diamond
  1234. cancel the event
  1235.  
  1236. #BloodDiamonds
  1237. on mine of a diamond ore:
  1238. {UHC::Status} is true
  1239. {Scenarios::BloodDiamonds} is true
  1240. damage the player by 0.5
  1241.  
  1242. #Eggs
  1243. on projectile hit:
  1244. {UHC::Status} is true
  1245. {Scenarios::Eggs} is true
  1246. event-projectile's world is not world("Spawn")
  1247. "%projectile.getType()%" is "EGG"
  1248. if {UHC::Eggs::*} is not set:
  1249. set {UHC::Eggs::*} to sheep, cow, chicken, zombie, giant, wither, mooshroom, skeleton, horse, donkey, mule, enderdragon, zombie pigman, wither skeleton, baby zombie, wolf, enderman, creeper, pig, silverfish, squid, ocelot, villager, witch, bat, magma cube, blaze, spider, slime and cave spider
  1250. set {_mob} to a random element out of {UHC::Eggs::*}
  1251. spawn {_mob} at event-location
  1252.  
  1253. on death of chicken:
  1254. {UHC::Status} is true
  1255. {Scenarios::Eggs} is true
  1256. chance of 5%
  1257. drop 1 egg at victim
  1258.  
  1259. #Chicken
  1260. function ChickenEffect(p: player):
  1261. {UHC::Status} is true
  1262. {Scenarios::Chicken} is true
  1263. set {_p}'s health to 0.5
  1264. give {_p} 1 golden apple:1
  1265.  
  1266. function ChickenStart(s: text):
  1267. {UHC::Status} is true
  1268. {Scenarios::Chicken} is true
  1269. loop {UHC::AlivePlayers::*}:
  1270. set {_p} to loop-index parsed as offline player
  1271. if {_p} is online:
  1272. set {_p}'s health to 0.5
  1273. give {_p} 1 golden apple:1
  1274. else:
  1275. set {UHC::Chicken::%{_p}%} to true
  1276. broadcast "{@P} &cChicken scenario has been started"
  1277.  
  1278. on join:
  1279. {UHC::Status} is true
  1280. {Scenarios::Chicken} is true
  1281. {UHC::Chicken::%player%} is true
  1282. set player's health to 0.5
  1283. give player 1 golden apple:1
  1284. delete {UHC::Chicken::%player%}
  1285.  
  1286. #Diamondless (Some code is in CutClean's code)
  1287. on death of a player:
  1288. {UHC::Status} is true
  1289. {Scenarios::Diamondless} is true
  1290. {UHC::AlivePlayers::%player%} is true
  1291. drop 1 diamond at victim
  1292. drop 4 gold ingots at victim
  1293.  
  1294. #LAFS
  1295. on rightclick on player:
  1296. {UHC::Status} is true
  1297. {Scenarios::LAFS} is true
  1298. {UHC::AlivePlayers::%player%} is true
  1299. {UHC::AlivePlayers::%player's target%} is true
  1300. {Teams.InTeam::%player's target%} is not set
  1301. {Teams.InTeam::%player%} is not set
  1302. set {_TM} to TeamNumber(1)
  1303. createTeam({_TM})
  1304. joinTeam(player's target, {_TM})
  1305. joinTeam(player, {_TM})
  1306. send "{@P} &cYou are now teamed with %player% [LAFS]" to player's target
  1307. send "{@P} &cYou are now teamed with %player's target% [LAFS]" to player
  1308.  
  1309. on damage:
  1310. {UHC::Status} is true
  1311. {Scenarios::LAFS} is true
  1312. attacker != victim
  1313. {UHC::AlivePlayers::%attacker%} is true
  1314. {UHC::AlivePlayers::%victim%} is true
  1315. {Teams.InTeam::%attacker%} is not set
  1316. {Teams.InTeam::%victim%} is not set
  1317. cancel the event
  1318. set {_TM} to TeamNumber(1)
  1319. createTeam({_TM})
  1320. joinTeam(victim, {_TM})
  1321. joinTeam(attacker, {_TM})
  1322. send "{@P} &cYou are now teamed with %victim% [LAFS]" to attacker
  1323. send "{@P} &cYou are now teamed with %attacker% [LAFS]" to victim
  1324.  
  1325. #FlowerPower
  1326. on item spawning of all flowers:
  1327. {UHC::Status} is true
  1328. {Scenarios::FlowerPower} is true
  1329. cancel the event
  1330. set {_list::*} to all items
  1331. remove golden apple:1, end portal, portal and bedrock from {_list::*}
  1332. set {_item} to a random item out of {_list::*}
  1333. drop (random number between 1 and {_item}'s max stacksize) of {_item}
  1334.  
  1335. #NoFall
  1336. on damage:
  1337. {Scenarios::NoFall} is true
  1338. {UHC::Status} is true
  1339. {UHC::AlivePlayers::%victim%} is true
  1340. damage cause is fall
  1341. cancel the event
  1342.  
  1343. #GoneFishin
  1344. function GoneFishinItems(P: player):
  1345. {Scenarios::GoneFishin} is true
  1346. give {_P} 1 fishing rod of unbreaking 250 and luck of the sea 250 and lure 3
  1347. give {_P} 20 anvils
  1348. set {_P}'s level to 2000
  1349.  
  1350. function GoneFishinStart(s: text):
  1351. {Scenarios::GoneFishin} is true
  1352. broadcast "{@P} &cGoneFishin items has been given"
  1353. loop {UHC::AlivePlayers::*}:
  1354. set {_P} to loop-index parsed as player
  1355. if {_P} is online:
  1356. GoneFishinItems({_P})
  1357. else:
  1358. set {UHC::GoneFishin::%{_P}%} to true
  1359.  
  1360. on join:
  1361. {UHC::Status} is true
  1362. {Scenarios::GoneFishin} is true
  1363. {UHC::GoneFishin::%player%} is true
  1364. GoneFishinItems(player)
  1365. delete {UHC::GoneFishin::%player%}
  1366.  
  1367. on craft of enchantment table:
  1368. {UHC::Status} is true
  1369. {Scenarios::GoneFishin} is true
  1370. cancel event
  1371.  
  1372. #InfiniteEnchanter
  1373. function InfiniteEnchanterItems(P: player):
  1374. {Scenarios::InfiniteEnchanter} is true
  1375. give {_P} 64 anvil
  1376. give {_P} 128 bookshelves
  1377. give {_P} 64 enchantment table
  1378. set {_P}'s level to 69
  1379.  
  1380. command /IEitems <player>:
  1381. aliases: /InfiniteEnchanteritems
  1382. trigger:
  1383. player has permission "uhc.staff"
  1384. if {Scenarios::InfiniteEnchanter} is true:
  1385. InfiniteEnchanterItems(arg-1)
  1386. message "{@P} &cGave %arg-1% IE Items"
  1387. else:
  1388. message "{@P} &cInfiniteEnchanter is disabled"
  1389.  
  1390. function InfiniteEnchanterStart(s: text):
  1391. {Scenarios::InfiniteEnchanter} is true
  1392. broadcast "{@P} &cInfinite Enchanter items has been given"
  1393. loop {UHC::AlivePlayers::*}:
  1394. set {_P} to loop-index parsed as player
  1395. if {_P} is online:
  1396. give {_P} 64 anvil
  1397. give {_P} 128 bookshelves
  1398. give {_P} 64 enchantment table
  1399. set {_P}'s level to 69
  1400. else:
  1401. set {UHC::InfiniteEnchanter::%{_P}%} to true
  1402.  
  1403. on "org.bukkit.event.player.PlayerLevelChangeEvent":
  1404. {Scenarios::InfiniteEnchanter} is true
  1405. {UHC::Status} is true
  1406. {UHC::AlivePlayers::%event.getPlayer()%} is true
  1407. set event.getPlayer()'s level to 69
  1408.  
  1409. on join:
  1410. {UHC::Status} is true
  1411. {Scenarios::InfiniteEnchanter} is true
  1412. {UHC::InfiniteEnchanter::%{_P}%} is true
  1413. InfiniteEnchanterItems({_P})
  1414. delete {UHC::InfiniteEnchanter::%{_P}%}
  1415.  
  1416. #Entropy
  1417. function EntropyStart(s: text):
  1418. {UHC::Status} is true
  1419. {Scenarios::Entropy} is true
  1420. broadcast "{@P} &cEntropy has started"
  1421. loop all players:
  1422. add 2 to loop-player's level
  1423. while {Scenarios::Entropy} is true:
  1424. broadcast "{@P} &cNext XP Drain in the next 10 minutes"
  1425. wait 10 minutes
  1426. loop {UHC::AlivePlayers::*}:
  1427. set {_P} to loop-index parsed as player
  1428. if {_P}'s level > 0:
  1429. remove 1 from {_P}'s level
  1430. send "{@P} &cYou survived the drain (-1 Level)!" to {_P}
  1431. else:
  1432. set {UHC::Entropy::%{_P}%} to true
  1433. kill {_P}
  1434.  
  1435. #Webcage
  1436. on death of player:
  1437. {UHC::Status} is true
  1438. {UHC::AlivePlayers::%victim%} is true
  1439. {Scenarios::Webcage} is true
  1440. loop blocks in radius 10 around victim's location:
  1441. round(distance between victim's location and loop-block) == 4
  1442. loop-block is air
  1443. set loop-block to cobweb
  1444.  
  1445. #Moles
  1446. plural expression all moles:
  1447. get:
  1448. loop all players:
  1449. {UHC::Moles::%loop-player%} is true
  1450. {UHC::Spectators::%loop-player%} is not set
  1451. add loop-player to {_List::*}
  1452. return {_List::*}
  1453.  
  1454. function SetMoles(s: text):
  1455. {Scenarios::Moles} is true
  1456. loop {Teams::*}:
  1457. if {UHC::MolesSize} is set:
  1458. loop {UHC::MolesSize} times:
  1459. set {_List::*} to {Team.%loop-index%::*}
  1460. set {_Loop} to true
  1461. while {_Loop} is true:
  1462. set {_Mole} to a random element out of {_List::*}
  1463. set {_Mole} to "%{_Mole}%" parsed as player
  1464. remove {_Mole} from {_List::*}
  1465. set {_team} to {Teams.InTeam::%{_Mole}%}
  1466. if {_Mole} is online:
  1467. set {UHC::Moles::%{_Mole}%} to true
  1468. message "{@P} &cYou are the mole! Betray your team, use kits with /molekit, use /molehelp for commands!" to {_Mole}
  1469. set {_Loop} to false
  1470. if {_List::*} is not set:
  1471. set {_Loop} to false
  1472. wait 1 tick
  1473. else:
  1474. set {_List::*} to {Team.%loop-index%::*}
  1475. set {_Loop} to true
  1476. while {_Loop} is true:
  1477. set {_Mole} to a random element out of {_List::*}
  1478. set {_Mole} to "%{_Mole}%" parsed as player
  1479. remove {_Mole} from {_List::*}
  1480. set {_team} to {Teams.InTeam::%{_Mole}%}
  1481. if {UHC::MolesTeamCheck::%{_team}%} is true:
  1482. set {_Loop} to false
  1483. else if {_Mole} is online:
  1484. set {UHC::Moles::%{_Mole}%} to true
  1485. set {UHC::MolesTeamCheck::%{_team}%} to true
  1486. message "{@P} &cYou are the mole! Betray your team, use kits with /molekit, use /molehelp for commands!" to {_Mole}
  1487. set {_Loop} to false
  1488. if {_List::*} is not set:
  1489. set {_Loop} to false
  1490. wait 1 tick
  1491. broadcast "{@P} &7Moles have been set!"
  1492. execute console command "/playsoundall note.pling"
  1493.  
  1494. on death:
  1495. {Scenarios::Moles} is true
  1496. {UHC::Moles::%victim%} is true
  1497. delete {UHC::Moles::%victim%}
  1498.  
  1499. command /molehelp:
  1500. usage: /molehelp
  1501. trigger:
  1502. if {Scenarios::Moles} is not set:
  1503. message "{@P} &cMoles is currently disabled"
  1504. stop
  1505. message "{@P} &cUse the command /mcc or /molechat to speak to your fellow moles"
  1506. message "{@P} &cUse the command /mcl or /moleloc to tell your fellow moles where you are"
  1507. message "{@P} &cUse the command /mcp or /molelist to find out who your fellow moles are"
  1508. message "{@P} &cUse the command /molekits to use kits"
  1509.  
  1510. command /mcc <text>:
  1511. aliases: /molechat
  1512. usage: /mcc <message>
  1513. trigger:
  1514. if {Scenarios::Moles} is not set:
  1515. message "{@P} &cMoles is currently disabled"
  1516. stop
  1517. if {UHC::Moles::%player%} is true:
  1518. loop all moles:
  1519. message "&cMoles &6» &e%command sender%&7: &f%arg-1%" to the loop-value
  1520. else:
  1521. message "{@P} &cYou're not a mole!"
  1522.  
  1523. command /mcl:
  1524. aliases: /moleloc
  1525. usage: /mcl - broadcast location to other moles
  1526. trigger:
  1527. if {Scenarios::Moles} is not set:
  1528. message "{@P} &cMoles is currently disabled"
  1529. stop
  1530. if {UHC::Moles::%player%} is true:
  1531. loop all moles:
  1532. message "&cMoles &6» &9%command sender%'s coords&7: &f%player's location%" to the loop-value
  1533. else:
  1534. message "{@P} &cYou're not a mole!"
  1535.  
  1536. command /mcp:
  1537. aliases: /molelist
  1538. usage: /mcp - list mole players alive
  1539. trigger:
  1540. if {Scenarios::Moles} is not set:
  1541. message "{@P} &cMoles is currently disabled"
  1542. stop
  1543. if {UHC::Moles::%player%} is true:
  1544. message "{@P} &cAll Moles&7: &c%all moles%"
  1545. else:
  1546. message "{@P} &cYou're not a mole!"
  1547.  
  1548. command /selfmole:
  1549. trigger:
  1550. player has permission "uhc.staff"
  1551. if {Scenarios::Moles} is true:
  1552. set {UHC::Moles::%player%} to true
  1553. message "{@P} &cYou are now a mole ABUSE AND UR FUCKED"
  1554. else:
  1555. message "{@P} &cMoles is currently disabled"
  1556.  
  1557. command /moleset <integer>:
  1558. trigger:
  1559. player has permission "uhc.staff"
  1560. broadcast "{@P} &cMole size has been set to %arg-1% mole(s) per team"
  1561. set {UHC::MolesSize} to arg-1
  1562.  
  1563. command /molekit:
  1564. aliases: /molekits
  1565. trigger:
  1566. if {Scenarios::Moles} is not set:
  1567. message "{@P} &cMoles is currently disabled"
  1568. stop
  1569. if {UHC::Moles::%player%} is true:
  1570. if {UHC::MolesKit::%player%} is true:
  1571. message "{@P} &cYou already received a kit"
  1572. stop
  1573. open virtual chest inventory with size 3 named "&4Mole Kits" to player
  1574. format gui slot 0 of player with red glass pane to do nothing
  1575. loop 26 times:
  1576. loop-number != 9,10,11,12,13,14,15,16 and 17
  1577. format gui slot loop-number of player with red glass pane to do nothing
  1578. format gui slot 9 of player with cobweb named "&eThe Troll »" with lore "&716 Cobwebs||&75 TNT||&71 Flint And Steel" to close:
  1579. if player has enough space for 16 cobwebs, 5 tnt and 1 flint and steel:
  1580. set {UHC::MolesKit::%player%} to true
  1581. give player 16 cobweb
  1582. give player 5 TNT
  1583. give player 1 flint and steel
  1584. message "{@P} &aYou have received your Troll Kit!"
  1585. else:
  1586. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1587. format gui slot 10 of player with potion of:8226 named "&eThe Potter »" with lore "&71 Speed 2 Potion||&71 Splash Potion Of Weakness||&71 Splash Potion Of Harming 2" to close:
  1588. if player has enough space for potion:8226, potion:16424 and potion:16428:
  1589. set {UHC::MolesKit::%player%} to true
  1590. give player potion of:8226
  1591. give player potion of:16424
  1592. give player potion of:16428
  1593. message "{@P} &aYou have received your Potter Kit!"
  1594. else:
  1595. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1596. format gui slot 11 of player with diamond sword named "&eThe Fighter »" with lore "&71 Diamond Sword||&71 Golden Apple||&71 Fishing Rod" to close:
  1597. if player has enough space for diamond sword, golden apple and fishing rod:
  1598. set {UHC::MolesKit::%player%} to true
  1599. give player a diamond sword
  1600. give player a golden apple:0
  1601. give player a fishing rod
  1602. message "{@P} &aYou have received your Fighter Kit!"
  1603. else:
  1604. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1605. format gui slot 12 of player with tnt named "&eThe Trapper »" with lore "&716 TNT||&72 Of Each Piston||&71 Flint and Steel" to close:
  1606. if player has enough space for 16 tnt, 2 piston, 2 sticky piston and flint and steel:
  1607. set {UHC::MolesKit::%player%} to true
  1608. give player 16 tnt
  1609. give player 2 sticky pistons
  1610. give player 2 pistons
  1611. give player 1 flint and steel
  1612. message "{@P} &aYou have received your Trapper Kit!"
  1613. else:
  1614. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1615. format gui slot 13 of player with spawn egg:61 named "&eThe Pyro »" with lore "&75 Blaze Spawn Eggs||&71 Fire Resistance Potion||&73 TNT" to close:
  1616. if player has enough space for spawn egg:61, potion of:8227 and 3 tnt:
  1617. set {UHC::MolesKit::%player%} to true
  1618. give player 5 spawn egg:61
  1619. give player potion of:8227
  1620. give player 3 tnt
  1621. message "{@P} &aYou have received your Pyro Kit!"
  1622. else:
  1623. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1624. set {_item} to diamond chestplate
  1625. set durability of {_item} to 523
  1626. format gui slot 14 of player with {_item} named "&eThe Tank »" with lore "&7A set of diamond armour with 5 durability on each piece" to close:
  1627. if player has enough space for diamond helmet, diamond chestplate, diamond leggings and diamond boots:
  1628. set {UHC::MolesKit::%player%} to true
  1629. loop 4 times:
  1630. if loop-number is 1:
  1631. set {_item} to diamond helmet
  1632. set durability of {_item} to 358
  1633. else if loop-number is 2:
  1634. set {_item} to diamond chestplate
  1635. set durability of {_item} to 523
  1636. else if loop-number is 3:
  1637. set {_item} to diamond leggings
  1638. set durability of {_item} to 490
  1639. else if loop-number is 4:
  1640. set {_item} to diamond boots
  1641. set durability of {_item} to 424
  1642. give player {_item}
  1643. message "{@P} &aYou have received your Tank Kit!"
  1644. else:
  1645. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1646. format gui slot 15 of player with enchantment table named "&eThe Enchanter »" with lore "&71 Enchanting Table||&764 Experience Bottles||&764 Lapis" to close:
  1647. if player has enough space for 1 enchantment table, 64 experience bottle and 64 lapis:
  1648. set {UHC::MolesKit::%player%} to true
  1649. give player 1 enchantment table
  1650. give player 64 experience bottle
  1651. give player 64 lapis
  1652. message "{@P} &aYou have received your Enchanter Kit!"
  1653. else:
  1654. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1655. format gui slot 16 of player with golden apple:0 named "&eThe Healer »" with lore "&72 Golden Apples||&71 Healing Potion||&71 Splash Healing Potion" to close:
  1656. if player has enough space for 2 golden apple, potion of:8261 and potion of:16453:
  1657. set {UHC::MolesKit::%player%} to true
  1658. give player 2 golden apple
  1659. give player potion of:8261
  1660. give player potion of:16453
  1661. message "{@P} &aYou have received your Healer Kit!"
  1662. else:
  1663. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1664. format gui slot 17 of player with bow named "&eThe Archer »" with lore "&71 Bow||&764 Arrows||&71 Fishing Rod" to close:
  1665. if player has enough space for bow, 64 arrows and 1 fishing rod:
  1666. set {UHC::MolesKit::%player%} to true
  1667. give player 1 bow
  1668. give player 64 arrows
  1669. give player 1 fishing rod
  1670. message "{@P} &aYou have received your Archer Kit!"
  1671. else:
  1672. message "{@P} &cYour inventory is full and cannot contain the mole items"
  1673. else:
  1674. message "{@P} &cYou're not a mole!"
  1675.  
  1676. #LootCrates
  1677. function LootCratesStart(s: text):
  1678. while {Scenarios::LootCrates} is true:
  1679. broadcast "{@P} &cLootcrates have been given out"
  1680. loop {UHC::AlivePlayers::*}:
  1681. set {_P} to loop-index parsed as player
  1682. if {_P} is online:
  1683. if {_P} doesn't have space for 1 chest:
  1684. drop a chest named "&eLootCrate" at {_P}'s location
  1685. send "{@P} &cYour inventory was full the lootcrate was dropped at the ground" to {_P}
  1686. else:
  1687. give {_P} a chest named "&eLootCrate"
  1688. else:
  1689. add 1 to {UHC::LootCrates::%{_P}%}
  1690. wait 10 minutes
  1691.  
  1692. on join:
  1693. {UHC::LootCrates::%player%} is set
  1694. message "{@P} &cYour %{UHC::LootCrates::%player%}% lootcrates while you were logged out has been given"
  1695. loop {UHC::LootCrates::%player%} times:
  1696. if player doesn't have space for 1 chest:
  1697. drop a chest named "&eLootCrate" at player's location
  1698. message "{@P} &cYour inventory was full the lootcrate was dropped at the ground"
  1699. else:
  1700. give player a chest named "&eLootCrate"
  1701. delete {UHC::LootCrates::%player%}
  1702.  
  1703. on right click with chest:
  1704. {Scenarios::LootCrates} is true
  1705. player's tool is chest named "&eLootCrate"
  1706. cancel the event
  1707. remove 1 chest named "&eLootCrate" from the player's inventory
  1708. if chance of 5%:
  1709. set {_item} to a random element out of diamond or enchantment table or diamond sword or diamond helmet or diamond boots
  1710. else if chance of 30%:
  1711. set {_item} to a random element out of 5 gold ingot or 10 iron ingot or 32 arrow or bow or fishing rod or 3 books
  1712. else if chance of 50%:
  1713. set {_item} to a random element out of 10 xp bottle or 1 golden apple:0 or 16 snowball
  1714. else:
  1715. set {_item} to a random element out of 8 steak or a cake or diamond shovel or 3 cobweb or 16 lapis
  1716. if player has space for {_item}:
  1717. give {_item} to player
  1718. message "{@P} &cYou received %{_item}% from the lootcrate!"
  1719. play sound "note_pling" to player with volume 1 and pitch 5
  1720. else:
  1721. drop {_item} at the player
  1722. message "{@P} &cYou received %{_item}% from the lootcrate but it has been dropped on the ground"
  1723. play sound "note_pling" to player with volume 1 and pitch 5
  1724.  
  1725.  
  1726. #BATSSS
  1727. on death of a bat:
  1728. {Scenarios::Bats} is true
  1729. attacker is a player
  1730. drop 1 golden apple at location of victim
  1731. chance of 5%:
  1732. set {UHC::Bats::%attacker%} to true
  1733. kill the attacker
  1734.  
  1735.  
  1736. #HASTEYBOYS
  1737. on inventory close:
  1738. if {Scenarios::HasteyBoys} is true:
  1739. loop all items in the inventory of player:
  1740. if loop-item is shovel or pickaxe or axe:
  1741. if loop-item is not enchanted with efficiency 3:
  1742. enchant loop-item with efficiency 3
  1743. enchant loop-item with unbreaking 3
  1744.  
  1745. #SUPERHEROES
  1746. function SuperHeroesStart(s: text):
  1747. if {Scenarios::Superheroes} is true:
  1748. loop {UHC::AlivePlayers::*}:
  1749. set {_P} to loop-index parsed as player
  1750. if {UHC::Superheroes::%{_P}%} is not set:
  1751. set {_N} to random integer between 1 and 5
  1752. if {_N} is 1:
  1753. set {UHC::Superheroes::%{_P}%} to 1
  1754. apply potion of strength of tier 1 to {_P} for 1 day
  1755. message "{@P} &cYour power is Strength 1!" to {_P}
  1756. if {_N} is 2:
  1757. set {UHC::Superheroes::%{_P}%} to 2
  1758. apply potion of Health Boost of tier 3 to {_P} for 1 day
  1759. message "{@P} &cYour power is Health boost 3! (6 Extra Hearts)" to {_P}
  1760. if {_N} is 3:
  1761. set {UHC::Superheroes::%{_P}%} to 3
  1762. apply potion of Jump Boost of tier 4 to {_P} for 1 day
  1763. message "{@P} &cYour power is Jump Boost 4!" to {_P}
  1764. if {_N} is 4:
  1765. set {UHC::Superheroes::%{_P}%} to 4
  1766. apply potion of Speed of tier 1 to {_P} for 1 day
  1767. message "{@P} &cYour power is Speed 1!" to {_P}
  1768. if {_N} is 5:
  1769. set {UHC::Superheroes::%{_P}%} to 5
  1770. apply potion of Damage Resistance of tier 1 to {_P} for 1 day
  1771. apply potion of Fire Resistance of tier 1 to {_P} for 1 day
  1772. message "{@P} &cYour power is Resistance!" to {_P}
  1773. if {_N} is 6:
  1774. set {UHC::Superheroes::%{_P}%} to 6
  1775. apply potion of invisibility of tier 1 to {_P} for 1 day
  1776. message "{@P} &cYour power is Invisibility! (nametags are hidden)" to {_P}
  1777.  
  1778. function SuperHeroesEffect(P: player):
  1779. {Scenarios::Superheroes} is true
  1780. if {UHC::Superheroes::%{_P}%} is not set:
  1781. set {_N} to random integer between 1 and 6
  1782. if {_N} is 1:
  1783. set {UHC::Superheroes::%{_P}%} to 1
  1784. apply potion of strength of tier 1 to {_P} for 1 day
  1785. message "{@P} &cYour power is Strength 1!" to {_P}
  1786. if {_N} is 2:
  1787. set {UHC::Superheroes::%{_P}%} to 2
  1788. apply potion of Health Boost of tier 3 to {_P} for 1 day
  1789. message "{@P} &cYour power is Health boost 3! (6 Extra Hearts)" to {_P}
  1790. if {_N} is 3:
  1791. set {UHC::Superheroes::%{_P}%} to 3
  1792. apply potion of Jump Boost of tier 4 to {_P} for 1 day
  1793. message "{@P} &cYour power is Jump Boost 4!" to {_P}
  1794. if {_N} is 4:
  1795. set {UHC::Superheroes::%{_P}%} to 4
  1796. apply potion of Speed of tier 1 to {_P} for 1 day
  1797. message "{@P} &cYour power is Speed 1!" to {_P}
  1798. if {_N} is 5:
  1799. set {UHC::Superheroes::%{_P}%} to 5
  1800. apply potion of Damage Resistance of tier 1 to {_P} for 1 day
  1801. apply potion of Fire Resistance of tier 1 to {_P} for 1 day
  1802. message "{@P} &cYour power is Resistance!" to {_P}
  1803. if {_N} is 6:
  1804. set {UHC::Superheroes::%{_P}%} to 6
  1805. apply potion of invisibility of tier 1 to {_P} for 1 day
  1806. message "{@P} &cYour power is Invisibility! (nametags are hidden)" to {_P}
  1807. else:
  1808. if {UHC::Superheroes::%{_P}%} is 1:
  1809. apply potion of strength of tier 1 to {_P} for 1 day
  1810. if {UHC::Superheroes::%{_P}%} is 2:
  1811. {_P} doesn't have health boost
  1812. apply potion of Health Boost of tier 3 to {_P} for 1 day
  1813. if {UHC::Superheroes::%{_P}%} is 3:
  1814. apply potion of Jump Boost of tier 4 to {_P} for 1 day
  1815. if {UHC::Superheroes::%{_P}%} is 4:
  1816. apply potion of Speed of tier 1 to {_P} for 1 day
  1817. if {UHC::Superheroes::%{_P}%} is 5:
  1818. apply potion of Damage Resistance of tier 1 to {_P} for 1 day
  1819. apply potion of Fire Resistance of tier 1 to {_P} for 1 day
  1820. if {UHC::Superheroes::%{_P}%} is 6:
  1821. apply potion of invisibility of tier 1 to {_P} for 1 day
  1822.  
  1823. command /superheroes <player>:
  1824. permission: uhc.staff
  1825. trigger:
  1826. {Scenarios::Superheroes} is true
  1827. SuperHeroesEffect(arg-1)
  1828.  
  1829. on join:
  1830. {UHC::Status} is true
  1831. {UHC::AlivePlayers::%player%} is true
  1832. {Scenarios::Superheroes} is true
  1833. SuperHeroesEffect(player)
  1834.  
  1835. on drinking of milk:
  1836. if {Scenarios::Superheroes} is true:
  1837. cancel the event
  1838. remove 1 milk bucket from player's inventory
  1839. message "{@P} &cScenario is currently superheroes"
  1840.  
  1841. on damage:
  1842. {Scenarios::Superheroes} is true
  1843. damage cause is fall
  1844. if {UHC::Superheroes::%victim%} is 3:
  1845. cancel the event
  1846.  
  1847. #TEAMINV
  1848. command /teaminv:
  1849. aliases: /ti, /teaminventory
  1850. trigger:
  1851. if {Scenarios::TeamInventory} is true:
  1852. if {UHC::Status} is true:
  1853. {UHC::AlivePlayers::%player%} is true
  1854. if {Teams.InTeam::%player%} is not set:
  1855. open the player's ender chest to the player
  1856. stop
  1857. else:
  1858. if {UHC::teaminv::%{Teams.InTeam::%player%}%} is not set:
  1859. open the player's ender chest to the player
  1860. set {UHC::teaminv::%{Teams.InTeam::%player%}%} to "%command sender%" parsed as offline player
  1861. stop
  1862. else:
  1863. open {UHC::teaminv::%{Teams.InTeam::%player%}%}'s ender chest to the player
  1864. else:
  1865. message "{@P} &cUHC Hasn't start yet"
  1866. else:
  1867. message "{@P} &cTeamInv is currently disabled"
  1868.  
  1869. on death of player:
  1870. {UHC::Status} is true
  1871. if {Scenarios::TeamInventory} is true:
  1872. if {Teams.InTeam::%victim%} is not set:
  1873. set {_ender} to the victim's ender chest
  1874. set {_deathloc} to the block above the victim
  1875. set the block at {_deathloc} to a chest
  1876. set the inventory of the block at {_deathloc} to {_ender}
  1877. stop
  1878. else:
  1879. if size of {Team.%{Teams.InTeam::%victim%}%::*} <= 1:
  1880. set {_ender} to {UHC::teaminv::%{Teams.InTeam::%victim%}%}'s ender chest
  1881. set {_deathloc} to the block above the victim
  1882. set the block at {_deathloc} to a chest
  1883. set the inventory of the block at {_deathloc} to {_ender}
  1884.  
  1885. #TIMEBOMB SHIT
  1886. import:
  1887. org.bukkit.Bukkit
  1888. com.gmail.filoghost.holographicdisplays.api.HologramsAPI
  1889.  
  1890. on death of player:
  1891. {UHC::Status} is true
  1892. {UHC::AlivePlayers::%victim%} is true
  1893. if {Scenarios::Timebomb} is true:
  1894. set {UHC::Timebomb::%victim%} to true
  1895. set {_templocation::%victim%} to the block at the victim
  1896. set {UHC::Timebomb::%victim%::block1} to the block at the victim
  1897. set {UHC::Timebomb::%victim%::block2} to the block 1 meter north of {_templocation::%victim%}
  1898. set block 1 meter north of {_templocation::%victim%} to Chest
  1899. set block at {_templocation::%victim%} to Chest
  1900. if {Config::Golden Heads} is true:
  1901. add 1 golden apple:0 named "&5Golden Head" with lore "The head of a fallen foe||Strengthens the warrior spirit" to the inventory of the block at {_templocation::%victim%}
  1902. else:
  1903. add 1 golden apple:0 to the inventory of the block at {_templocation::%victim%}
  1904. add victim's inventory to the block at {_templocation::%victim%}
  1905. add the victim's helmet slot to the inventory of the block at {_templocation::%victim%}
  1906. add the victim's chestplate slot to the inventory of the block at {_templocation::%victim%}
  1907. add the victim's leggings slot to the inventory of the block at {_templocation::%victim%}
  1908. add the victim's boots slot to the inventory of the block at {_templocation::%victim%}
  1909. clear drops
  1910. set {_holo.%victim%} to HologramsAPI.createHologram(Bukkit.getPluginManager().getPlugin("Skript"), location of block above {_templocation::%victim%})
  1911. set {_time.%victim%} to 30
  1912. set {_line.%victim%} to {_holo.%victim%}.appendTextLine("&c%{_time.%victim%}% s")
  1913. loop 30 times:
  1914. {_line.%victim%}.setText("&c%{_time.%victim%}% s")
  1915. remove 1 from {_time.%victim%}
  1916. wait 1 second
  1917. {_holo.%victim%}.delete()
  1918. if {UHC::Timebomb::%victim%::cancel} is true:
  1919. delete {UHC::Timebomb::%victim%::cancel}
  1920. else:
  1921. delete {UHC::Timebomb::%victim%}
  1922. set block at {_templocation::%victim%} to air
  1923. set block 1 meter north of {_templocation::%victim%} to air
  1924. wait 1 tick
  1925. create an explosion of force 12 at {_templocation::%victim%}
  1926. else:
  1927. set {_loc} to victim's location
  1928. set {_loc2} to the block above the victim
  1929. set {UHC::Skull::%victim%::block1} to block above the victim
  1930. set {UHC::Skull::%victim%::block2} to {_loc}
  1931. set block at {_loc} to nether brick fence
  1932. set block at {_loc2} to floor head
  1933. add "{SkullType:3,ExtraType:""%victim%""}" to nbt of block at {_loc2}
  1934.  
  1935. #BOWLESS SHIT
  1936. on shoot:
  1937. if shooter is a player:
  1938. if shooter's world is "UHC":
  1939. if {Scenarios::Bowless} is true:
  1940. if projectile is arrow:
  1941. cancel event
  1942. remove bow from shooter
  1943. message "{@P} &cScenario is currently bowless" to shooter
  1944.  
  1945. on craft of bow:
  1946. if {Scenarios::Bowless} is true:
  1947. cancel the event
  1948. message "{@P} &cScenario is currently bowless"
  1949.  
  1950. #FIRELESS STUFF
  1951. on damage:
  1952. if victim's world is "UHC":
  1953. if {Scenarios::Fireless} is true:
  1954. if victim is a player:
  1955. damage is caused by burning or lava or fire
  1956. cancel event
  1957.  
  1958. #NOCLEAN STUFF
  1959. on death:
  1960. {Scenarios::NoClean} is true
  1961. {UHC::Status} is true
  1962. victim and attacker is a player
  1963. {UHC::AlivePlayers::%attacker%} and {UHC::AlivePlayers::%victim%} is true
  1964. set {UHC::NoClean::%attacker%} to true
  1965. message "{@P} &cYou are currently immune for 30 seconds unless you hit someone" to attacker
  1966. set {UHC::NoClean::%attacker%::Timer} to 30
  1967. Scoreboard(attacker)
  1968. loop 30 times:
  1969. wait 1 second
  1970. remove 1 from {UHC::NoClean::%attacker%::Timer}
  1971. updateImmunity(attacker)
  1972. if {UHC::NoClean::%attacker%} is not set:
  1973. stop
  1974. else:
  1975. delete {UHC::NoClean::%attacker%}
  1976. message "{@P} &cYour immunity has expired" to attacker
  1977. Scoreboard(attacker)
  1978.  
  1979. on damage:
  1980. {Scenarios::NoClean} is true
  1981. {UHC::Status} is true
  1982. victim and attacker is a player
  1983. {UHC::AlivePlayers::%attacker%} and {UHC::AlivePlayers::%victim%} is true
  1984. if damage cause is projectile:
  1985. "%projectile.getType()%" is "FISHING_HOOK"
  1986. stop
  1987. if {UHC::NoClean::%attacker%} is true:
  1988. delete {UHC::NoClean::%attacker%}
  1989. message "{@P} &cYour immunity has expired" to attacker
  1990. Scoreboard(attacker)
  1991. if {UHC::NoClean::%victim%} is true:
  1992. cancel event
  1993. message "{@P} &cTarget is currently immune" to attacker
  1994.  
  1995. #CUTCLEAN AND DO,TO STUFF
  1996. on mine of iron ore:
  1997. {UHC::AlivePlayers::%player%} is true
  1998. {Scenarios::CutClean} is true
  1999. cancel event
  2000. set event-block to air
  2001. damage player's tool by 1
  2002. ironDrop(player, event-block, true)
  2003.  
  2004. on mine of gold ore:
  2005. {UHC::AlivePlayers::%player%} is true
  2006. {Scenarios::CutClean} is true
  2007. cancel event
  2008. set event-block to air
  2009. damage player's tool by 1
  2010. goldDrop(player, event-block, true)
  2011.  
  2012. on mine of diamond ore:
  2013. {UHC::AlivePlayers::%player%} is true
  2014. cancel the event
  2015. set event-block to air
  2016. damage player's tool by 1
  2017. diamondDrop(player, event-block, true)
  2018.  
  2019. on mine of gravel:
  2020. {UHC::AlivePlayers::%player%} is true
  2021. cancel the event
  2022. set event-block to air
  2023. if player's tool is shovel:
  2024. damage player's tool by 1
  2025. drop 1 flint at event-block
  2026.  
  2027. on death of a pig:
  2028. drop 1 xp at the pig
  2029. clear drops
  2030. if {Scenarios::CutClean} is true:
  2031. if {Scenarios::DoubleOres} is true:
  2032. drop 2 cooked porkchop at the pig
  2033. stop
  2034. if {Scenarios::TripleOres} is true:
  2035. drop 3 cooked porkchop at the pig
  2036. stop
  2037. else:
  2038. drop 1 cooked porkchop at the pig
  2039. stop
  2040. if {Scenarios::CutClean} is not set:
  2041. if {Scenarios::DoubleOres} is true:
  2042. drop 2 raw porkchop at the pig
  2043. stop
  2044. if {Scenarios::TripleOres} is true:
  2045. drop 3 raw porkchop at the pig
  2046. stop
  2047. else:
  2048. drop 1 raw porkchop at the pig
  2049. stop
  2050.  
  2051. on death of a cow:
  2052. drop 1 xp at the cow
  2053. clear drops
  2054. if {Scenarios::CutClean} is true:
  2055. if {Scenarios::DoubleOres} is true:
  2056. drop 2 steak at the cow
  2057. drop 2 leather at the cow
  2058. stop
  2059. if {Scenarios::TripleOres} is true:
  2060. drop 3 steak at the cow
  2061. drop 3 leather at the cow
  2062. stop
  2063. else:
  2064. drop 1 steak at the cow
  2065. drop 1 leather at the cow
  2066. stop
  2067. if {Scenarios::CutClean} is not set:
  2068. if {Scenarios::DoubleOres} is true:
  2069. drop 2 raw beef at the cow
  2070. drop 2 leather at the cow
  2071. stop
  2072. if {Scenarios::TripleOres} is true:
  2073. drop 3 raw beef at the cow
  2074. drop 3 leather at the cow
  2075. stop
  2076. else:
  2077. drop 1 raw beef at the cow
  2078. drop 1 leather at the cow
  2079. stop
  2080.  
  2081. on death of a sheep:
  2082. drop 1 white wool at the sheep
  2083. drop 1 xp at the sheep
  2084. clear drops
  2085. if {Scenarios::CutClean} is true:
  2086. if {Scenarios::DoubleOres} is true:
  2087. drop 2 cooked beef at the sheep
  2088. stop
  2089. if {Scenarios::TripleOres} is true:
  2090. drop 3 cooked beef at the sheep
  2091. stop
  2092. else:
  2093. drop 1 cooked beef at the sheep
  2094. stop
  2095. if {Scenarios::CutClean} is not set:
  2096. if {Scenarios::DoubleOres} is true:
  2097. drop 2 raw beef at the sheep
  2098. stop
  2099. if {Scenarios::TripleOres} is true:
  2100. drop 3 raw beef at the sheep
  2101. stop
  2102. else:
  2103. drop 1 raw beef at the sheep
  2104. stop
  2105.  
  2106. on death of a chicken:
  2107. drop 1 xp at the chicken
  2108. clear drops
  2109. if {Scenarios::CutClean} is true:
  2110. if {Scenarios::DoubleOres} is true:
  2111. drop 2 cooked chicken at the chicken
  2112. drop 2 feathers at the chicken
  2113. stop
  2114. if {Scenarios::TripleOres} is true:
  2115. drop 3 cooked chicken at the chicken
  2116. drop 3 feathers at the chicken
  2117. stop
  2118. else:
  2119. drop 1 cooked chicken at the chicken
  2120. drop 1 feathers at the chicken
  2121. stop
  2122. if {Scenarios::CutClean} is not set:
  2123. if {Scenarios::DoubleOres} is true:
  2124. drop 2 raw chicken at the chicken
  2125. drop 2 feathers at the chicken
  2126. stop
  2127. if {Scenarios::TripleOres} is true:
  2128. drop 3 raw chicken at the chicken
  2129. drop 3 feathers at the chicken
  2130. stop
  2131. else:
  2132. drop 1 raw chicken at the chicken
  2133. drop 1 feathers at the chicken
  2134. stop
  2135.  
  2136. on death of a spider:
  2137. if {Scenarios::DoubleOres} is true:
  2138. drop 2 string at the spider
  2139. stop
  2140. if {Scenarios::TripleOres} is true:
  2141. drop 3 string at the spider
  2142. stop
  2143. else:
  2144. drop 1 string at the spider
  2145. stop
  2146. drop 1 xp at the spider
  2147.  
  2148. #TIMBER
  2149. on break:
  2150. {UHC::AlivePlayers::%player%} is true
  2151. if {Scenarios::Timber} is true:
  2152. event-block is oak wood or birch wood or spruce wood or jungle wood or acacia wood or dark oak wood
  2153. loop blocks upwards:
  2154. if loop-block is oak wood or birch wood or spruce wood or jungle wood or acacia wood or dark oak wood:
  2155. drop the loop-block-1 at event-block
  2156. set the loop-block to air
  2157. loop blocks in radius 2 around loop-block:
  2158. if loop-block-2 is oak wood or birch wood or spruce wood or jungle wood or acacia wood or dark oak wood:
  2159. drop the loop-block-2 at event-block
  2160. set the loop-block-2 to air
  2161. loop blocks below:
  2162. if loop-block is oak wood or birch wood or spruce wood or jungle wood or acacia wood or dark oak wood:
  2163. drop the loop-block-1 at event-block
  2164. set the loop-block to air
  2165. loop blocks in radius 2 around loop-block:
  2166. if loop-block-2 is oak wood or birch wood or spruce wood or jungle wood or acacia wood or dark oak wood:
  2167. drop the loop-block-2 at event-block
  2168. set the loop-block-2 to air
Add Comment
Please, Sign In to add comment