Jump to content

Open Club  ·  232 members

Skript

Help Me Fix My Gen Skript


shaksham
 Share

Recommended Posts

  1. options:
  2. bluetored: 10000000
  3. purpletoblue: 5000000
  4. greentopurple: 2500000
  5. yellowtogreen: 2000000
  6. lbtoyellow: 1500000
  7. whitetolb: 1000000
  8. emeraldtowhite: 750000
  9. diamondtoemerald: 500000
  10. goldtodiamond: 400000
  11. irontogold: 300000
  12. coaltoiron: 250000
  13. melontocoal: 100000
  14. pumpkintomelon: 50000
  15. haytopumpkin: 10000
  16.  
  17. command /genget <text> [<player>]:
  18. permission: gen.give
  19. permission message: &cNo permission!
  20. trigger:
  21. if arg-2 is set:
  22. set {_p} to arg-2
  23. else:
  24. set {_p} to player
  25. if arg-1 is "white":
  26. give {_p} 1 white glazed terracotta named "&6&lWhite Gen" with lore "&7(Place To Use)"
  27. if arg-1 is "lightblue":
  28. give {_p} 1 light blue glazed terracotta named "&6&lLight Blue Gen" with lore "&7(Place To Use)"
  29. if arg-1 is "yellow":
  30. give {_p} 1 yellow glazed terracotta named "&6&lYellow Gen" with lore "&7(Place To Use)"
  31. if arg-1 is "green":
  32. give {_p} 1 lime glazed terracotta named "&6&lGreen Gen" with lore "&7(Place To Use)"
  33. if arg-1 is "purple":
  34. give {_p} 1 purple glazed terracotta named "&6&lPurple Gen" with lore "&7(Place To Use)"
  35. if arg-1 is "blue":
  36. give {_p} 1 blue glazed terracotta named "&6&lBlue Gen" with lore "&7(Place To Use)"
  37. if arg-1 is "red":
  38. give {_p} 1 red glazed terracotta named "&6&lRed Gen" with lore "&7(Place To Use)"
  39. if arg-1 is "emerald":
  40. give {_p} 1 emerald block named "&6&lEmerald Gen" with lore "&7(Place To Use)"
  41. if arg-1 is "diamond":
  42. give {_p} 1 diamond block named "&6&lDiamond Gen" with lore "&7(Place To Use)"
  43. if arg-1 is "gold":
  44. give {_p} 1 gold block named "&6&lGold Gen" with lore "&7(Place To Use)"
  45. if arg-1 is "iron":
  46. give {_p} 1 iron block named "&6&lIron Gen" with lore "&7(Place To Use)"
  47. if arg-1 is "coal":
  48. give {_p} 1 coal block named "&6&lCoal Gen" with lore "&7(Place To Use)"
  49. if arg-1 is "melon":
  50. give {_p} 1 melon named "&6&lMelon Gen" with lore "&7(Place To Use)"
  51. if arg-1 is "pumpkin":
  52. give {_p} 1 pumpkin named "&6&lPumpkin Gen" with lore "&7(Place To Use)"
  53. if arg-1 is "wheat":
  54. give {_p} 1 hay block named "&6&lWheat Gen" with lore "&7(Place To Use)"
  55.  
  56. on place of emerald block or diamond block or gold block or iron block or coal block or melon or pumpkin or hay block or white glazed terracotta or light blue glazed terracotta or yellow glazed terracotta or lime glazed terracotta or purple glazed terracotta or blue glazed terracotta or red glazed terracotta:
  57. set {_p} to player
  58. set {_u} to player's uuid
  59. if {gc::%{_u}%} >= {gencap::%{_u}%}:
  60. cancel event
  61. send "&f" to {_p}
  62. send "&a&lGenerator &7» &aYou have reached the max generator limit" to {_p}
  63. send "&aTo upgrade this purchase a rank at &a/buy" to {_p}
  64. send "&f" to {_p}
  65. stop
  66. wait 2 ticks
  67. if event-block is a hay block:
  68. add location of event-block to {gens::%{_u}%::wheat::*}
  69. add 1 to {gc::%{_u}%}
  70. if event-block is a emerald block:
  71. add location of event-block to {gens::%{_u}%::emerald::*}
  72. add 1 to {gc::%{_u}%}
  73. if event-block is a diamond block:
  74. add location of event-block to {gens::%{_u}%::diamond::*}
  75. add 1 to {gc::%{_u}%}
  76. if event-block is a gold block:
  77. add location of event-block to {gens::%{_u}%::gold::*}
  78. add 1 to {gc::%{_u}%}
  79. if event-block is a iron block:
  80. add location of event-block to {gens::%{_u}%::iron::*}
  81. add 1 to {gc::%{_u}%}
  82. if event-block is a coal block:
  83. add location of event-block to {gens::%{_u}%::coal::*}
  84. add 1 to {gc::%{_u}%}
  85. if event-block is a melon:
  86. add location of event-block to {gens::%{_u}%::melon::*}
  87. add 1 to {gc::%{_u}%}
  88. if event-block is a pumpkin:
  89. add location of event-block to {gens::%{_u}%::pumpkin::*}
  90. add 1 to {gc::%{_u}%}
  91. if event-block is a white glazed terracotta:
  92. add location of event-block to {gens::%{_u}%::white::*}
  93. add 1 to {gc::%{_u}%}
  94. if event-block is a light blue glazed terracotta:
  95. add location of event-block to {gens::%{_u}%::lb::*}
  96. add 1 to {gc::%{_u}%}
  97. if event-block is a yellow glazed terracotta:
  98. add location of event-block to {gens::%{_u}%::yellow::*}
  99. add 1 to {gc::%{_u}%}
  100. if event-block is a lime glazed terracotta:
  101. add location of event-block to {gens::%{_u}%::lime::*}
  102. add 1 to {gc::%{_u}%}
  103. if event-block is a purple glazed terracotta:
  104. add location of event-block to {gens::%{_u}%::purple::*}
  105. add 1 to {gc::%{_u}%}
  106. if event-block is a blue glazed terracotta:
  107. add location of event-block to {gens::%{_u}%::blue::*}
  108. add 1 to {gc::%{_u}%}
  109. if event-block is a red glazed terracotta:
  110. add location of event-block to {gens::%{_u}%::red::*}
  111. add 1 to {gc::%{_u}%}
  112.  
  113.  
  114. on left click on emerald block or diamond block or gold block or iron block or coal block or pumpkin or hay block or melon or white glazed terracotta or light blue glazed terracotta or yellow glazed terracotta or lime glazed terracotta or purple glazed terracotta or blue glazed terracotta or red glazed terracotta:
  115. if player is not sneaking:
  116. if event-block is emerald block:
  117. if {gens::%player's uuid%::emerald::*} contains location of event-block:
  118. play sound "entity.item.pickup" with volume 3 to the player
  119. remove 1 from {gc::%player's uuid%}
  120. remove location of event-block from {gens::%player's uuid%::emerald::*}
  121. set event-block to air
  122. give player 1 emerald block named "&6&lEmerald Gen" with lore "&7(Place To Use)"
  123. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  124. else if event-block is diamond block:
  125. if {gens::%player's uuid%::diamond::*} contains location of event-block:
  126. play sound "entity.item.pickup" with volume 3 to the player
  127. remove 1 from {gc::%player's uuid%}
  128. remove location of event-block from {gens::%player's uuid%::diamond::*}
  129. set event-block to air
  130. give player 1 diamond block named "&6&lDiamond Gen" with lore "&7(Place To Use)"
  131. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  132. else if event-block is gold block:
  133. if {gens::%player's uuid%::gold::*} contains location of event-block:
  134. play sound "entity.item.pickup" with volume 3 to the player
  135. remove 1 from {gc::%player's uuid%}
  136. remove location of event-block from {gens::%player's uuid%::gold::*}
  137. set event-block to air
  138. give player 1 gold block named "&6&lGold Gen" with lore "&7(Place To Use)"
  139. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  140. else if event-block is iron block:
  141. if {gens::%player's uuid%::iron::*} contains location of event-block:
  142. play sound "entity.item.pickup" with volume 3 to the player
  143. remove 1 from {gc::%player's uuid%}
  144. remove location of event-block from {gens::%player's uuid%::iron::*}
  145. set event-block to air
  146. give player 1 iron block named "&6&lIron Gen" with lore "&7(Place To Use)"
  147. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  148. else if event-block is coal block:
  149. if {gens::%player's uuid%::coal::*} contains location of event-block:
  150. play sound "entity.item.pickup" with volume 3 to the player
  151. remove 1 from {gc::%player's uuid%}
  152. remove location of event-block from {gens::%player's uuid%::coal::*}
  153. set event-block to air
  154. give player 1 coal block named "&6&lCoal Gen" with lore "&7(Place To Use)"
  155. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  156. else if event-block is pumpkin:
  157. if {gens::%player's uuid%::pumpkin::*} contains location of event-block:
  158. play sound "entity.item.pickup" with volume 3 to the player
  159. remove 1 from {gc::%player's uuid%}
  160. remove location of event-block from {gens::%player's uuid%::pumpkin::*}
  161. set event-block to air
  162. give player 1 pumpkin named "&6&lPumpkin Gen" with lore "&7(Place To Use)"
  163. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  164. else if event-block is hay block:
  165. if {gens::%player's uuid%::wheat::*} contains location of event-block:
  166. play sound "entity.item.pickup" with volume 3 to the player
  167. remove 1 from {gc::%player's uuid%}
  168. remove location of event-block from {gens::%player's uuid%::wheat::*}
  169. set event-block to air
  170. give player 1 hay block named "&6&lWheat Gen" with lore "&7(Place To Use)"
  171. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  172. else if event-block is melon:
  173. if {gens::%player's uuid%::melon::*} contains location of event-block:
  174. play sound "entity.item.pickup" with volume 3 to the player
  175. remove 1 from {gc::%player's uuid%}
  176. remove location of event-block from {gens::%player's uuid%::melon::*}
  177. set event-block to air
  178. give player 1 melon named "&6&lMelon Gen" with lore "&7(Place To Use)"
  179. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  180. else if event-block is white glazed terracotta:
  181. if {gens::%player's uuid%::white::*} contains location of event-block:
  182. play sound "entity.item.pickup" with volume 3 to the player
  183. remove 1 from {gc::%player's uuid%}
  184. remove location of event-block from {gens::%player's uuid%::white::*}
  185. set event-block to air
  186. give player 1 white glazed terracotta named "&6&lWhite Gen" with lore "&7(Place To Use)"
  187. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  188. else if event-block is light blue glazed terracotta:
  189. if {gens::%player's uuid%::lb::*} contains location of event-block:
  190. play sound "entity.item.pickup" with volume 3 to the player
  191. remove 1 from {gc::%player's uuid%}
  192. remove location of event-block from {gens::%player's uuid%::lb::*}
  193. set event-block to air
  194. give player 1 light blue glazed terracotta named "&6&lLight Blue Gen" with lore "&7(Place To Use)"
  195. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  196. else if event-block is yellow glazed terracotta:
  197. if {gens::%player's uuid%::yellow::*} contains location of event-block:
  198. play sound "entity.item.pickup" with volume 3 to the player
  199. remove 1 from {gc::%player's uuid%}
  200. remove location of event-block from {gens::%player's uuid%::yellow::*}
  201. set event-block to air
  202. give player 1 yellow glazed terracotta named "&6&lYellow Gen" with lore "&7(Place To Use)"
  203. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  204. else if event-block is lime glazed terracotta:
  205. if {gens::%player's uuid%::lime::*} contains location of event-block:
  206. play sound "entity.item.pickup" with volume 3 to the player
  207. remove 1 from {gc::%player's uuid%}
  208. remove location of event-block from {gens::%player's uuid%::lime::*}
  209. set event-block to air
  210. give player 1 lime glazed terracotta named "&6&lGreen Gen" with lore "&7(Place To Use)"
  211. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  212. else if event-block is purple glazed terracotta:
  213. if {gens::%player's uuid%::purple::*} contains location of event-block:
  214. play sound "entity.item.pickup" with volume 3 to the player
  215. remove 1 from {gc::%player's uuid%}
  216. remove location of event-block from {gens::%player's uuid%::purple::*}
  217. set event-block to air
  218. give player 1 purple glazed terracotta named "&6&lPurple Gen" with lore "&7(Place To Use)"
  219. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  220. else if event-block is blue glazed terracotta:
  221. if {gens::%player's uuid%::blue::*} contains location of event-block:
  222. play sound "entity.item.pickup" with volume 3 to the player
  223. remove 1 from {gc::%player's uuid%}
  224. remove location of event-block from {gens::%player's uuid%::blue::*}
  225. set event-block to air
  226. give player 1 blue glazed terracotta named "&6&lBlue Gen" with lore "&7(Place To Use)"
  227. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  228. else if event-block is red glazed terracotta:
  229. if {gens::%player's uuid%::red::*} contains location of event-block:
  230. play sound "entity.item.pickup" with volume 3 to the player
  231. remove 1 from {gc::%player's uuid%}
  232. remove location of event-block from {gens::%player's uuid%::red::*}
  233. set event-block to air
  234. give player 1 red glazed terracotta named "&6&lRed Gen" with lore "&7(Place To Use)"
  235. send action bar "&a&lGenerator &7» &aYou collected your Gen!" to player
  236. else:
  237. cancel event
  238. play sound "entity.villager.no" with volume 3 to the player
  239. send "&6&lGenerator &7» &eThis is not your generator!"
  240.  
  241. on break of emerald block or diamond block or gold block or iron block or coal block or pumpkin or hay block or melon or white glazed terracotta or light blue glazed terracotta or yellow glazed terracotta or lime glazed terracotta or purple glazed terracotta or blue glazed terracotta or red glazed terracotta:
  242. cancel event
  243.  
  244. command /globalbooster [<offline player>]:
  245. permission: "*"
  246. permission message: &cNo permission!
  247. trigger:
  248. set {_p} to arg-1
  249. give {_p} 1 of nether star named "&6&lGlobal Booster" with lore "&e&o(Right-Click to Activate a Global Booster)"
  250. send "&eYou have been granted a &6&lGlobal Booster! &e&o(Right-Click to Activate a Global Booster)" to arg-1
  251.  
  252. on rightclick holding a nether star:
  253. if name of player's held item is "&6&lGlobal Booster":
  254. if {globalbooster} is false:
  255. remove held item from player's inventory
  256. set {globalbooster} to true
  257. broadcast ""
  258. broadcast "&6&lGlobal Booster &ehas been activated for 1 hour by &e%player%!"
  259. broadcast " &e&o(Drop Amount for Gens 2x)"
  260. broadcast ""
  261. set {globaltime} to 60
  262. remove bossbar "globaloff"
  263. create bossbar title "&6&lGlobal Booster: &e%{globaltime}% &eMinutes" and id "global" for all players with progress 100 with colors yellow
  264. wait 1 hour
  265. broadcast ""
  266. broadcast "&6&lGlobal Booster &ehas expired, buy another one on &7/buy!"
  267. broadcast ""
  268. set {globalbooster} to false
  269. remove bossbar "global"
  270. else:
  271. send "&ePlease wait, there is currently a &6Global Booster &egoing on at this time!"
  272.  
  273. command /globalboosteroff:
  274. permission: "*"
  275. permission message: &cNo permission!
  276. trigger:
  277. set {globalbooster} to false
  278. broadcast ""
  279. broadcast "&6&lGlobal Booster &ehas been disabled by &7%player%!"
  280. broadcast ""
  281.  
  282. on load:
  283. if {globalbooster} is not set:
  284. set {globalbooster} to false
  285.  
  286. every minute:
  287. if {globalbooster} is false:
  288. remove bossbar "global"
  289. create bossbar title "&6&lCheck out our server store &e&l/buy" and id "globaloff" for all players with progress 100 with colors yellow
  290. else if {globalbooster} is true:
  291. remove bossbar "global"
  292. remove 1 from {globaltime}
  293. create bossbar title "&6&lGlobal Booster: &e%{globaltime}%&e Minutes" and id "global" for all players with progress 100 with colors yellow
  294.  
  295.  
  296. on join:
  297. if {gencap::%player's uuid%} is not set:
  298. set {gencap::%player's uuid%} to 25
  299. if {gc::%player's uuid%} is not set:
  300. set {gc::%player's uuid%} to 0
  301. if {globalbooster} is false:
  302. remove bossbar "global"
  303. create bossbar title "&e&lStore &8• &e&n/buy" and id "globaloff" for all players with progress 100 with colors yellow
  304. else if {globalbooster} is true:
  305. remove bossbar "global"
  306. remove 1 from {globaltime}
  307. create bossbar title "&6&lGlobal Booster: &e%{globaltime}% &eMinutes" and id "global" for all players with progress 100 with colors yellow
  308.  
  309. command /resetgen [<offline player>]:
  310. permission: op
  311. trigger:
  312. if arg-1 is set:
  313. set {_u} to arg-1's uuid
  314. send "&3&lAll gens for &b&l%arg-1% &3&lwere reset! &7(A relog for this player is recommended)" to player
  315. else:
  316. set {_u} to player's uuid
  317. send "&3&lAll gens for &b&l%player% &3&lwere reset! &7(A relog for this player is recommended)" to player
  318. loop {gens::%{_u}%::*}:
  319. loop {gens::%{_u}%::%loop-value%::*}:
  320. set block at location of loop-value-2 to air
  321. delete {gens::%{_u}%::%loop-value-1%::%loop-value-2%}
  322. delete {gens::%{_u}%::*}
  323. set {gc::%{_u}%} to 0
  324.  
  325.  
  326.  
  327. on left click on emerald block or diamond block or gold block or iron block or coal block or pumpkin or hay block or melon or white glazed terracotta or light blue glazed terracotta or yellow glazed terracotta or lime glazed terracotta or purple glazed terracotta or blue glazed terracotta or red glazed terracotta:
  328. if player is sneaking:
  329. set {_loc} to location of event-block
  330. if {gens::%player's uuid%::red::*} contains {_loc}:
  331. send action bar "&b&lGenerator &B» &fThis generator is already maxed out!" to player
  332. else if {gens::%player's uuid%::diamond::*} contains {_loc}:
  333. set {_price} to {@diamondtoemerald}
  334. if player's balance < {_price}:
  335. if player's held item is air:
  336. play sound "entity.villager.no" with volume 3 to player
  337. send action bar "&6&lGenerator &7» &eYou need &7$%{_price}% &eto upgrade!" to player
  338. stop
  339. else:
  340. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  341. stop
  342. remove {_price} from balance of player
  343. remove {_loc} from {gens::%player's uuid%::diamond::*}
  344. remove 1 from {gc::%player's uuid%}
  345. make console execute command "genget emerald %player%"
  346. set event-block to air
  347. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  348.  
  349. else if {gens::%player's uuid%::gold::*} contains {_loc}:
  350. set {_price} to {@goldtodiamond}
  351. if player's balance < {_price}:
  352. if player's held item is air:
  353. play sound "entity.villager.no" with volume 3 to player
  354. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  355. stop
  356. else:
  357. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  358. stop
  359. remove {_price} from balance of player
  360. remove {_loc} from {gens::%player's uuid%::gold::*}
  361. remove 1 from {gc::%player's uuid%}
  362. make console execute command "genget diamond %player%"
  363. set event-block to air
  364. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  365.  
  366. else if {gens::%player's uuid%::iron::*} contains {_loc}:
  367. set {_price} to {@irontogold}
  368. if player's balance < {_price}:
  369. if player's held item is air:
  370. play sound "entity.villager.no" with volume 3 to player
  371. send action bar "&6&lGenerator &7» &eYou need &7$%{_price}% &eto upgrade!" to player
  372. stop
  373. else:
  374. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  375. stop
  376. remove {_price} from balance of player
  377. remove {_loc} from {gens::%player's uuid%::iron::*}
  378. remove 1 from {gc::%player's uuid%}
  379. make console execute command "genget gold %player%"
  380. set event-block to air
  381. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  382.  
  383. else if {gens::%player's uuid%::coal::*} contains {_loc}:
  384. set {_price} to {@coaltoiron}
  385. if player's balance < {_price}:
  386. if player's held item is air:
  387. play sound "entity.villager.no" with volume 3 to player
  388. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  389. stop
  390. else:
  391. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  392. stop
  393. remove {_price} from balance of player
  394. remove {_loc} from {gens::%player's uuid%::coal::*}
  395. remove 1 from {gc::%player's uuid%}
  396. make console execute command "genget iron %player%"
  397. set event-block to air
  398. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  399.  
  400. else if {gens::%player's uuid%::melon::*} contains {_loc}:
  401. set {_price} to {@melontocoal}
  402. if player's balance < {_price}:
  403. if player's held item is air:
  404. play sound "entity.villager.no" with volume 3 to player
  405. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  406. stop
  407. else:
  408. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  409. stop
  410. remove {_price} from balance of player
  411. remove {_loc} from {gens::%player's uuid%::melon::*}
  412. remove 1 from {gc::%player's uuid%}
  413. make console execute command "genget coal %player%"
  414. set event-block to air
  415. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  416.  
  417. else if {gens::%player's uuid%::pumpkin::*} contains {_loc}:
  418. set {_price} to {@pumpkintomelon}
  419. if player's balance < {_price}:
  420. if player's held item is air:
  421. play sound "entity.villager.no" with volume 3 to player
  422. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  423. stop
  424. else:
  425. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  426. stop
  427. remove {_price} from balance of player
  428. remove {_loc} from {gens::%player's uuid%::pumpkin::*}
  429. remove 1 from {gc::%player's uuid%}
  430. make console execute command "genget melon %player%"
  431. set event-block to air
  432. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  433.  
  434. else if {gens::%player's uuid%::wheat::*} contains {_loc}:
  435. set {_price} to {@haytopumpkin}
  436. if player's balance < {_price}:
  437. if player's held item is air:
  438. play sound "entity.villager.no" with volume 3 to player
  439. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  440. stop
  441. else:
  442. send action bar "&a&lGeneratoar &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  443. stop
  444. remove {_price} from balance of player
  445. remove {_loc} from {gens::%player's uuid%::wheat::*}
  446. remove 1 from {gc::%player's uuid%}
  447. make console execute command "genget pumpkin %player%"
  448. set event-block to air
  449. send action bar "&a&lGenerator &7» &eYou ranked up your gen!" to player
  450. else if {gens::%player's uuid%::emerald::*} contains {_loc}:
  451. set {_price} to {@emeraldtowhite}
  452. if player's balance < {_price}:
  453. if player's held item is air:
  454. play sound "entity.villager.no" with volume 3 to player
  455. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  456. stop
  457. else:
  458. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  459. stop
  460. remove {_price} from balance of player
  461. remove {_loc} from {gens::%player's uuid%::emerald::*}
  462. remove 1 from {gc::%player's uuid%}
  463. make console execute command "genget white %player%"
  464. set event-block to air
  465. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  466.  
  467. else if {gens::%player's uuid%::white::*} contains {_loc}:
  468. set {_price} to {@whitetolb}
  469. if player's balance < {_price}:
  470. if player's held item is air:
  471. play sound "entity.villager.no" with volume 3 to player
  472. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  473. stop
  474. else:
  475. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  476. stop
  477. remove {_price} from balance of player
  478. remove {_loc} from {gens::%player's uuid%::white::*}
  479. remove 1 from {gc::%player's uuid%}
  480. make console execute command "genget lightblue %player%"
  481. set event-block to air
  482. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  483.  
  484. else if {gens::%player's uuid%::lb::*} contains {_loc}:
  485. set {_price} to {@lbtoyellow}
  486. if player's balance < {_price}:
  487. if player's held item is air:
  488. play sound "entity.villager.no" with volume 3 to player
  489. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  490. stop
  491. else:
  492. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  493. stop
  494. remove {_price} from balance of player
  495. remove {_loc} from {gens::%player's uuid%::lb::*}
  496. remove 1 from {gc::%player's uuid%}
  497. make console execute command "genget yellow %player%"
  498. set event-block to air
  499. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  500.  
  501. else if {gens::%player's uuid%::yellow::*} contains {_loc}:
  502. set {_price} to {@yellowtogreen}
  503. if player's balance < {_price}:
  504. if player's held item is air:
  505. play sound "entity.villager.no" with volume 3 to player
  506. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  507. stop
  508. else:
  509. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  510. stop
  511. remove {_price} from balance of player
  512. remove {_loc} from {gens::%player's uuid%::yellow::*}
  513. remove 1 from {gc::%player's uuid%}
  514. make console execute command "genget green %player%"
  515. set event-block to air
  516. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  517.  
  518. else if {gens::%player's uuid%::lime::*} contains {_loc}:
  519. set {_price} to {@greentopurple}
  520. if player's balance < {_price}:
  521. if player's held item is air:
  522. play sound "entity.villager.no" with volume 3 to player
  523. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  524. stop
  525. else:
  526. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  527. stop
  528. remove {_price} from balance of player
  529. remove {_loc} from {gens::%player's uuid%::lime::*}
  530. remove 1 from {gc::%player's uuid%}
  531. make console execute command "genget purple %player%"
  532. set event-block to air
  533. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  534.  
  535. else if {gens::%player's uuid%::purple::*} contains {_loc}:
  536. set {_price} to {@purpletoblue}
  537. if player's balance < {_price}:
  538. if player's held item is air:
  539. play sound "entity.villager.no" with volume 3 to player
  540. send action bar "&a&lGenerator &7» &aYou need &7$%{_price}% &eto upgrade!" to player
  541. stop
  542. else:
  543. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  544. stop
  545. remove {_price} from balance of player
  546. remove {_loc} from {gens::%player's uuid%::purple::*}
  547. remove 1 from {gc::%player's uuid%}
  548. make console execute command "genget blue %player%"
  549. set event-block to air
  550. send action bar "&a&lGenerator &7» &aYou ranked up your gen!" to player
  551.  
  552. else if {gens::%player's uuid%::blue::*} contains {_loc}:
  553. set {_price} to {@bluetored}
  554. if player's balance < {_price}:
  555. if player's held item is air:
  556. play sound "entity.villager.no" with volume 3 to player
  557. send action bar "&6&lGenerator &7» &eYou need &7$%{_price}% &eto upgrade!" to player
  558. stop
  559. else:
  560. send action bar "&a&lGenerator &7» &aYou need to hold nothing in your hand to upgrade your gen!" to player
  561. stop
  562. remove {_price} from balance of player
  563. remove {_loc} from {gens::%player's uuid%::blue::*}
  564. remove 1 from {gc::%player's uuid%}
  565. make console execute command "genget red %player%"
  566. set event-block to air
  567. send action bar "&6&lGenerator &7» &aYou ranked up your gen!" to player
  568.  
  569. else:
  570. cancel event
  571. send "&aThis is not your generator!"
  572.  
  573. every 5 seconds:
  574. loop all players:
  575. if {globalbooster} is false:
  576. drop 1 emerald above {gens::%loop-player's uuid%::emerald::*}
  577. drop 1 diamond above {gens::%loop-player's uuid%::diamond::*}
  578. drop 1 gold ingot above {gens::%loop-player's uuid%::gold::*}
  579. drop 1 iron ingot above {gens::%loop-player's uuid%::iron::*}
  580. drop 1 coal above {gens::%loop-player's uuid%::coal::*}
  581. drop 1 melon slice above {gens::%loop-player's uuid%::melon::*}
  582. drop 1 pumpkin pie above {gens::%loop-player's uuid%::pumpkin::*}
  583. drop 1 wheat above {gens::%loop-player's uuid%::wheat::*}
  584. drop 1 light gray dye above {gens::%loop-player's uuid%::white::*}
  585. drop 1 light blue dye above {gens::%loop-player's uuid%::lb::*}
  586. drop 1 yellow dye above {gens::%loop-player's uuid%::yellow::*}
  587. drop 1 lime dye above {gens::%loop-player's uuid%::lime::*}
  588. drop 1 purple dye above {gens::%loop-player's uuid%::purple::*}
  589. drop 1 blue dye above {gens::%loop-player's uuid%::blue::*}
  590. drop 1 red dye above {gens::%loop-player's uuid%::red::*}
  591. if {globalbooster} is true:
  592. drop 2 emerald above {gens::%loop-player's uuid%::emerald::*}
  593. drop 2 diamond above {gens::%loop-player's uuid%::diamond::*}
  594. drop 2 gold ingot above {gens::%loop-player's uuid%::gold::*}
  595. drop 2 iron ingot above {gens::%loop-player's uuid%::iron::*}
  596. drop 2 coal above {gens::%loop-player's uuid%::coal::*}
  597. drop 2 melon slice above {gens::%loop-player's uuid%::melon::*}
  598. drop 2 pumpkin pie above {gens::%loop-player's uuid%::pumpkin::*}
  599. drop 2 wheat above {gens::%loop-player's uuid%::wheat::*}
  600. drop 2 light gray dye above {gens::%loop-player's uuid%::white::*}
  601. drop 2 light blue dye above {gens::%loop-player's uuid%::lb::*}
  602. drop 2 yellow dye above {gens::%loop-player's uuid%::yellow::*}
  603. drop 2 lime dye above {gens::%loop-player's uuid%::lime::*}
  604. drop 2 purple dye above {gens::%loop-player's uuid%::purple::*}
  605. drop 2 blue dye above {gens::%loop-player's uuid%::blue::*}
  606. drop 2 red dye above {gens::%loop-player's uuid%::red::*}
  607.  
  608. command /sell:
  609. trigger:
  610. set {_multi} to 1 + {purchased_multi}
  611. set {_e} to number of all emerald in player's inventory
  612. set {_d} to number of all diamond in player's inventory
  613. set {_g} to number of all gold ingot in player's inventory
  614. set {_i} to number of all iron ingot in player's inventory
  615. set {_c} to number of all coal in player's inventory
  616. set {_m} to number of all melon slice in player's inventory
  617. set {_p} to number of all pumpkin pie in player's inventory
  618. set {_w} to number of all wheat in player's inventory
  619. set {_d1} to number of all light gray dye in player's inventory
  620. set {_d2} to number of all light blue dye in player's inventory
  621. set {_d3} to number of all yellow dye in player's inventory
  622. set {_d4} to number of all lime dye in player's inventory
  623. set {_d5} to number of all purple dye in player's inventory
  624. set {_d6} to number of all blue dye in player's inventory
  625. set {_d7} to number of all red dye in player's inventory
  626. remove all emerald, diamond, gold ingot, iron ingot, coal, melon slice, pumpkin pie, light gray dye, light blue dye, yellow dye, lime dye, purple dye, blue dye, red dye and wheat from player's inventory
  627. set {_9} to {_d1} * 225 * {_multi}
  628. set {_10} to {_d2} * 250 * {_multi}
  629. set {_11} to {_d3} * 275 * {_multi}
  630. set {_12} to {_d4} * 300 * {_multi}
  631. set {_13} to {_d5} * 325 * {_multi}
  632. set {_14} to {_d6} * 350 * {_multi}
  633. set {_15} to {_d7} * 375 * {_multi}
  634. set {_1} to {_e} * 200 * {_multi}
  635. set {_2} to {_d} * 175 * {_multi}
  636. set {_3} to {_g} * 150 * {_multi}
  637. set {_4} to {_i} * 125 * {_multi}
  638. set {_5} to {_c} * 100 * {_multi}
  639. set {_6} to {_m} * 75 * {_multi}
  640. set {_7} to {_p} * 50 * {_multi}
  641. set {_8} to {_w} * 25 * {_multi}
  642. play sound "block.note_block.chime" with volume 5 to player
  643. set {_total} to {_1} + {_2} + {_3} + {_4} + {_5} + {_6} + {_7} + {_8} + {_9} + {_10} + {_11} + {_12} + {_13} + {_14} + {_15}
  644. if {%player's uuid%.selltitle} is true:
  645. send title "&a&LSELL ALL" with subtitle "&aYou sold all items for &7$%{_total}% &7(/selltitle to toggle this message)" to player for 3 seconds
  646. add {_total} to player's balance
  647.  
  648.  
  649.  
  650. command /selltitle <text>:
  651. trigger:
  652. if arg-1 is set:
  653. if arg-1 is "on":
  654. set {%player's uuid%.selltitle} to true
  655. send "&a&lGenPlots &8- &7The sell title is now &aon"
  656. else if arg-1 is "off":
  657. set {%player's uuid%.selltitle} to false
  658. send "&a&lGenPlots &8- &7The sell title is now &coff"
  659. else:
  660. send "&a&lGenPlots &8- &7TIncorrect arguments. &a/selltitle (on/off)"
  661. else if arg-1 is not set:
  662. if {%player's uuid%.selltitle} is true:
  663. set {%player's uuid%.selltitle} to false
  664. send "&a&lGenPlots &8- &7The sell title is now &coff"
  665. else if {%player's uuid%.selltitle} is false:
  666. set {%player's uuid%.selltitle} to true
  667. send "&a&lGenPlots &8- &7The sell title is now &aon"
  668.  
  669. command /resetallgens:
  670. permission: op
  671. trigger:
  672. if executor is not console:
  673. send "&cFor safety reasons this command can only be executed through console!" to player
  674. stop
  675. loop {gens::*}:
  676. loop {gens::%loop-value-1%::*}:
  677. loop {gens::%loop-value-1%::%loop-value-2%::*}:
  678. set block at location of loop-value-3 to air
  679. delete {gens::%loop-value-1%::%loop-value-2%::%loop-value-3%}
  680. delete {gens::%loop-value%::*}
  681. delete {gens::*}
  682. delete {gc::*}
  683. delete {gencap::*}
  684. broadcast "&c&lEverything was reset!"
  685. kick all players due to "&cRelog due to generator reset!"
  686.  
  687.  
  688. Command /setgenslots [<player>] [<integer>]:
  689. permission: *
  690. permission message: &cNo!
  691. trigger:
  692. if arg-1 is not set:
  693. send "&aGenPlots &8- &7You need to specify a player." to player
  694. else:
  695. if arg-2 is not set:
  696. send "&aGenPlots &8- &7You need to specify a number" to player
  697. else:
  698. set {gencap::%arg-1's uuid%} to arg-2
  699. send "&aGenerator &7| Your gen cap has been set to &6%arg-2%&7!" to arg-1
  700. send "&aGenerator &7| You set &7%arg-1%&7's &7gen cap to &6%arg-2%&7!" to player
Link to comment
Share on other sites

 Share



×
×
  • Create New...