FlupMC

Untitled

Aug 5th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.69 KB | None | 0 0
  1. options:
  2. prefix: &8[&4Casino&8]
  3.  
  4. on load:
  5. set {jackpot.low} to false
  6. set {jackpot.low.timer} to 60
  7. set {jackpot.low.bet} to 0
  8. set {jackpot.low.antal} to 0
  9. loop {jackpot.low.puljen::*}:
  10. delete {jackpot.%loop-value%.low.chance}
  11. delete {jackpot.%uuid of loop-value%.low.bet}
  12. delete {jackpot.low.puljen::*}
  13. loop all players:
  14. delete {jackpot.%loop-player%.low.chance}
  15. delete {jackpot.%uuid of loop-player%.low.bet}
  16. set {jackpot.high} to false
  17. set {jackpot.high.timer} to 60
  18. set {jackpot.high.bet} to 0
  19. set {jackpot.high.antal} to 0
  20. loop {jackpot.high.puljen::*}:
  21. delete {jackpot.%loop-value%.high.chance}
  22. delete {jackpot.%uuid of loop-value%.high.bet}
  23. delete {jackpot.high.puljen::*}
  24. loop all players:
  25. delete {jackpot.%loop-player%.high.chance}
  26. delete {jackpot.%uuid of loop-player%.high.bet}
  27.  
  28. on quit:
  29. if {jackpot.%uuid of player%.low.bet} is set:
  30. remove player from {jackpot.low.puljen::*}
  31. if {jackpot.%uuid of player%.high.bet} is set:
  32. remove player from {jackpot.high.puljen::*}
  33.  
  34. on join:
  35. if {jackpot.%uuid of player%.low.bet} is set:
  36. add player to {jackpot.low.puljen::*}
  37. if {jackpot.%uuid of player%.high.bet} is set:
  38. add player to {jackpot.high.puljen::*}
  39.  
  40. command /jackpot [<text>]:
  41. trigger:
  42. if arg-1 is not set:
  43. open chest with 5 rows named "&8Casino-Menu" to player
  44. wait 1 tick
  45. if inventory name of player's current inventory is "&8Casino-Menu":
  46. format slot 10 of player with 1 green stained glass pane named "&r" to be unstealable
  47. format slot 11 of player with 1 green stained glass pane named "&r" to be unstealable
  48. format slot 12 of player with 1 green stained glass pane named "&r" to be unstealable
  49. format slot 13 of player with 1 green stained glass pane named "&r" to be unstealable
  50. format slot 14 of player with 1 green stained glass pane named "&r" to be unstealable
  51. format slot 15 of player with 1 green stained glass pane named "&r" to be unstealable
  52. format slot 16 of player with 1 green stained glass pane named "&r" to be unstealable
  53. format slot 20 of player with 1 green stained glass pane named "&r" to be unstealable
  54. format slot 24 of player with 1 green stained glass pane named "&r" to be unstealable
  55. format slot 28 of player with 1 green stained glass pane named "&r" to be unstealable
  56. format slot 29 of player with 1 green stained glass pane named "&r" to be unstealable
  57. format slot 30 of player with 1 green stained glass pane named "&r" to be unstealable
  58. format slot 31 of player with 1 green stained glass pane named "&r" to be unstealable
  59. format slot 32 of player with 1 green stained glass pane named "&r" to be unstealable
  60. format slot 33 of player with 1 green stained glass pane named "&r" to be unstealable
  61. format slot 34 of player with 1 green stained glass pane named "&r" to be unstealable
  62. format slot 21 of player with 1 ender chest named "&2Gamemode: &bLow Jackpot" with lore "||&aBeskrivelse:|| &7Klik her for at blive || &7sendt til vores low|| &7jackpot menu||&r||" to run [execute player command "jackpot low"]
  63. format slot 22 of player with 1 green stained glass pane named "&r" to be unstealable
  64. format slot 23 of player with 1 ender chest named "&2Gamemode: &cHigh Jackpot" with lore "||&aBeskrivelse:|| &7Klik her for at blive || &7sendt til vores high|| &7jackpot menu||&r||" to run [execute player command "jackpot high"]
  65. loop numbers between 0 and 44:
  66. set {_slot} to loop-value
  67. if slot {_slot} of player's current inventory is air:
  68. format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
  69. if arg-1 is "lowlist":
  70. loop {jackpot.low.puljen::*}:
  71. send "%loop-value%" to player
  72. send "------------"
  73. send "%{jackpot.low.antal}%" to player
  74. if arg-1 is "low":
  75. if {jackpot.low} is false:
  76. open chest with 6 rows named "&8Casino: Low Jackpot" to player
  77. wait 3 ticks
  78. format slot 36 of player with 1 black stained glass named "&r" to be unstealable
  79. format slot 44 of player with 1 black stained glass named "&r" to be unstealable
  80. loop numbers between 0 and 8:
  81. set {_slot} to loop-value
  82. if slot {_slot} of player's current inventory is air:
  83. format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
  84. loop numbers between 45 and 53:
  85. set {_slot} to loop-value
  86. if slot {_slot} of player's current inventory is air:
  87. format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
  88. set {_heads.jackpot} to 9
  89. loop {jackpot.low.puljen::*}:
  90. format slot {_heads.jackpot} of player with skull of loop-value named "&a%loop-value%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value%.low.bet}%||&7Chance &8» &7%{jackpot.%loop-value%.low.chance}%%%||&8&m " to be unstealable
  91. add 1 to {_heads.jackpot}
  92. set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
  93. set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
  94. set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
  95. set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
  96. set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
  97. set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
  98. set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
  99. if arg-1 is "high":
  100. if {jackpot.high} is false:
  101. open chest with 6 rows named "&8Casino: High Jackpot" to player
  102. wait 3 ticks
  103. format slot 36 of player with 1 black stained glass named "&r" to be unstealable
  104. format slot 44 of player with 1 black stained glass named "&r" to be unstealable
  105. loop numbers between 0 and 8:
  106. set {_slot} to loop-value
  107. if slot {_slot} of player's current inventory is air:
  108. format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
  109. loop numbers between 45 and 53:
  110. set {_slot} to loop-value
  111. if slot {_slot} of player's current inventory is air:
  112. format slot {_slot} of player with 1 black stained glass named "&r" to be unstealable
  113. set {_heads.jackpot} to 9
  114. loop {jackpot.high.puljen::*}:
  115. format slot {_heads.jackpot} of player with skull of loop-value named "&a%loop-value%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value%.high.bet}%||&7Chance &8» &7%{jackpot.%loop-value%.high.chance}%%%||&8&m " to be unstealable
  116. add 1 to {_heads.jackpot}
  117. set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
  118. set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
  119. set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
  120. set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
  121. set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
  122. set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
  123. set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
  124.  
  125. on inventory click:
  126. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  127. if {jackpot.low} is false:
  128. cancel event
  129. if clicked slot is 37:
  130. if clicked item is paper:
  131. execute console command "jackpotbet low %player% 1000"
  132. set clicked item to air
  133. wait 10 ticks
  134. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  135. set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
  136. if clicked slot is 38:
  137. if clicked item is paper:
  138. execute console command "jackpotbet low %player% 5000"
  139. set clicked item to air
  140. wait 10 ticks
  141. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  142. set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
  143. if clicked slot is 39:
  144. if clicked item is paper:
  145. execute console command "jackpotbet low %player% 20000"
  146. set clicked item to air
  147. wait 10 ticks
  148. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  149. set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
  150. if clicked slot is 40:
  151. if clicked item is paper:
  152. execute console command "jackpotbet low %player% 50000"
  153. set clicked item to air
  154. wait 10 ticks
  155. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  156. set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
  157. if clicked slot is 41:
  158. if clicked item is paper:
  159. execute console command "jackpotbet low %player% 100000"
  160. set clicked item to air
  161. wait 10 ticks
  162. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  163. set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
  164. if clicked slot is 42:
  165. if clicked item is paper:
  166. execute console command "jackpotbet low %player% 500000"
  167. set clicked item to air
  168. wait 10 ticks
  169. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  170. set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
  171. if clicked slot is 43:
  172. if clicked item is paper:
  173. execute console command "jackpotbet low %player% 1000000"
  174. set clicked item to air
  175. wait 10 ticks
  176. if inventory name of player's current inventory is "&8Casino: Low Jackpot":
  177. set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
  178. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  179. if {jackpot.high} is false:
  180. cancel event
  181. if clicked slot is 37:
  182. if clicked item is paper:
  183. execute console command "jackpotbet high %player% 1000"
  184. set clicked item to air
  185. wait 10 ticks
  186. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  187. set slot 37 of player's current inventory to 1 paper named "&a$1.000" with lore " &7Klik her, for at tilføje til puljen"
  188. if clicked slot is 38:
  189. if clicked item is paper:
  190. execute console command "jackpotbet high %player% 5000"
  191. set clicked item to air
  192. wait 10 ticks
  193. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  194. set slot 38 of player's current inventory to 1 paper named "&a$5.000" with lore " &7Klik her, for at tilføje til puljen"
  195. if clicked slot is 39:
  196. if clicked item is paper:
  197. execute console command "jackpotbet high %player% 20000"
  198. set clicked item to air
  199. wait 10 ticks
  200. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  201. set slot 39 of player's current inventory to 1 paper named "&a$20.000" with lore " &7Klik her, for at tilføje til puljen"
  202. if clicked slot is 40:
  203. if clicked item is paper:
  204. execute console command "jackpotbet high %player% 50000"
  205. set clicked item to air
  206. wait 10 ticks
  207. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  208. set slot 40 of player's current inventory to 1 paper named "&a$50.000" with lore " &7Klik her, for at tilføje til puljen"
  209. if clicked slot is 41:
  210. if clicked item is paper:
  211. execute console command "jackpotbet high %player% 100000"
  212. set clicked item to air
  213. wait 10 ticks
  214. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  215. set slot 41 of player's current inventory to 1 paper named "&a$100.000" with lore " &7Klik her, for at tilføje til puljen"
  216. if clicked slot is 42:
  217. if clicked item is paper:
  218. execute console command "jackpotbet high %player% 500000"
  219. set clicked item to air
  220. wait 10 ticks
  221. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  222. set slot 42 of player's current inventory to 1 paper named "&a$500.000" with lore " &7Klik her, for at tilføje til puljen"
  223. if clicked slot is 43:
  224. if clicked item is paper:
  225. execute console command "jackpotbet high %player% 1000000"
  226. set clicked item to air
  227. wait 10 ticks
  228. if inventory name of player's current inventory is "&8Casino: High Jackpot":
  229. set slot 43 of player's current inventory to 1 paper named "&a$1.000.000" with lore " &7Klik her, for at tilføje til puljen"
  230.  
  231. command /jackpotbet [<text>] [<player>] [<integer>]:
  232. permission: console.command
  233. trigger:
  234. if {jackpot.%arg-1%.antal} is less than 27:
  235. if arg-2's balance is less than arg-3:
  236. send "{@prefix} &cDu har ikke penge nok!" to arg-2
  237. stop
  238. else:
  239. if arg-1 is "low":
  240. if {jackpot.%uuid of arg-2%.%arg-1%.bet} + arg-3 is greater than 2000001:
  241. send "{@prefix} &cDu kan max. satse &4$2000000&c!" to arg-2
  242. stop
  243. else:
  244. subtract arg-3 from arg-2's balance
  245. if {jackpot.%uuid of arg-2%.%arg-1%.bet} is not set:
  246. add arg-2 to {jackpot.%arg-1%.puljen::*}
  247. add 1 to {jackpot.%arg-1%.antal}
  248. else:
  249. remove arg-2 from {jackpot.%arg-1%.puljen::*}
  250. add arg-2 to {jackpot.%arg-1%.puljen::*}
  251. add arg-3 to {jackpot.%uuid of arg-2%.%arg-1%.bet}
  252. add arg-3 to {jackpot.%arg-1%.bet}
  253. loop all players:
  254. if inventory name of loop-player's current inventory is "&8Casino: %arg-1% Jackpot":
  255. set {_heads.jackpot} to 9
  256. loop {jackpot.%arg-1%.puljen::*}:
  257. set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%uuid of loop-value-2%.%arg-1%.bet} / {jackpot.%arg-1%.bet}
  258. set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%loop-value-2%.%arg-1%.chance} * 100
  259. format slot {_heads.jackpot} of loop-player with skull of loop-value-2 named "&a%loop-value-2%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value-2%.%arg-1%.bet}%||&7Chance &8» &7%{jackpot.%loop-value-2%.%arg-1%.chance}%%%||&8&m " to be unstealable
  260. add 1 to {_heads.jackpot}
  261. if arg-1 is "high":
  262. if {jackpot.%uuid of arg-2%.%arg-1%.bet} + arg-3 is greater than 2000001:
  263. send "{@prefix} &cDu kan max. satse &4$2000000&c!" to arg-2
  264. stop
  265. subtract arg-3 from arg-2's balance
  266. if {jackpot.%uuid of arg-2%.%arg-1%.bet} is not set:
  267. add arg-2 to {jackpot.%arg-1%.puljen::*}
  268. add 1 to {jackpot.%arg-1%.antal}
  269. else:
  270. remove arg-2 from {jackpot.%arg-1%.puljen::*}
  271. add arg-2 to {jackpot.%arg-1%.puljen::*}
  272. add arg-3 to {jackpot.%uuid of arg-2%.%arg-1%.bet}
  273. add arg-3 to {jackpot.%arg-1%.bet}
  274. loop all players:
  275. if inventory name of loop-player's current inventory is "&8Casino: %arg-1% Jackpot":
  276. set {_heads.jackpot} to 9
  277. loop {jackpot.%arg-1%.puljen::*}:
  278. set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%uuid of loop-value-2%.%arg-1%.bet} / {jackpot.%arg-1%.bet}
  279. set {jackpot.%loop-value-2%.%arg-1%.chance} to {jackpot.%loop-value-2%.%arg-1%.chance} * 100
  280. format slot {_heads.jackpot} of loop-player with skull of loop-value-2 named "&a%loop-value-2%" with lore "&8&m ||&7Bet &8» &7$%{jackpot.%uuid of loop-value-2%.%arg-1%.bet}%||&7Chance &8» &7%{jackpot.%loop-value-2%.%arg-1%.chance}%%%||&8&m " to be unstealable
  281. add 1 to {_heads.jackpot}
  282. else:
  283. send "{@prefix} &aDer er ikke plads til flere! &8(&a%{jackpot.%arg-1%.antal}%&7/&a27&8)"
  284.  
  285. every 1 second:
  286. if {jackpot.low} is false:
  287. if {jackpot.low.antal} is greater than 1:
  288. if {jackpot.low.timer} is greater than 0:
  289. subtract 1 from {jackpot.low.timer}
  290. loop all players:
  291. if inventory name of loop-player's current inventory is "&8Casino: Low Jackpot":
  292. format slot 49 of loop-player with 1 160:4 named "&a%{jackpot.low.timer}% sekunder" to be unstealable
  293. if {jackpot.low.timer} is less than 1:
  294. set {jackpot.low} to true
  295. else:
  296. loop all players:
  297. if inventory name of loop-player's current inventory is "&8Casino: Low Jackpot":
  298. format slot 49 of loop-player with 1 160:5 named "&aIkke nok spillere" to be unstealable
  299. loop {jackpot.low.puljen::*}:
  300. set {jackpot.%loop-value%.low.chance} to {jackpot.%uuid of loop-value%.low.bet} / {jackpot.low.bet}
  301. set {jackpot.%loop-value%.low.chance} to {jackpot.%loop-value%.low.chance} * 100
  302.  
  303. if {jackpot.high} is false:
  304. if {jackpot.high.antal} is greater than 1:
  305. if {jackpot.high.timer} is greater than 0:
  306. subtract 1 from {jackpot.high.timer}
  307. loop all players:
  308. if inventory name of loop-player's current inventory is "&8Casino: High Jackpot":
  309. format slot 49 of loop-player with 1 160:4 named "&a%{jackpot.high.timer}% sekunder" to be unstealable
  310. if {jackpot.high.timer} is less than 1:
  311. set {jackpot.high} to true
  312. else:
  313. loop all players:
  314. if inventory name of loop-player's current inventory is "&8Casino: High Jackpot":
  315. format slot 49 of loop-player with 1 160:5 named "&aIkke nok spillere" to be unstealable
  316. loop {jackpot.high.puljen::*}:
  317. set {jackpot.%loop-value%.high.chance} to {jackpot.%uuid of loop-value%.high.bet} / {jackpot.high.bet}
  318. set {jackpot.%loop-value%.high.chance} to {jackpot.%loop-value%.high.chance} * 100
  319.  
  320. if {jackpot.low} is true:
  321. delete {jackpot.low}
  322. loop {jackpot.low.puljen::*}:
  323. chance of {jackpot.%loop-value-1%.low.chance}%:
  324. set {jackpot.low.vinder} to loop-value
  325. wait 1 second
  326. make console execute command "/eco give %{jackpot.low.vinder}% %{jackpot.low.bet}%"
  327. broadcast "{@prefix} &a%{jackpot.low.vinder}% &7vandt Low Jackpot på &a$%{jackpot.low.bet}% &7med &a%{jackpot.%{jackpot.low.vinder}%.low.chance}%%% Chance&7."
  328. set {jackpot.low} to false
  329. set {jackpot.low.timer} to 60
  330. set {jackpot.low.bet} to 0
  331. set {jackpot.low.antal} to 0
  332. delete {jackpot.low.vinder}
  333. loop {jackpot.low.puljen::*}:
  334. delete {jackpot.%loop-value-2%.low.chance}
  335. delete {jackpot.%uuid of loop-value-2%.low.bet}
  336. delete {jackpot.low.puljen::*}
  337. stop
  338.  
  339. if {jackpot.high} is true:
  340. delete {jackpot.high}
  341. loop {jackpot.high.puljen::*}:
  342. chance of {jackpot.%loop-value-1%.high.chance}%:
  343. set {jackpot.high.vinder} to loop-value
  344. wait 1 second
  345. make console execute command "/eco give %{jackpot.high.vinder}% %{jackpot.high.bet}%"
  346. broadcast "{@prefix} &a%{jackpot.high.vinder}% &7vandt High Jackpot på &a$%{jackpot.high.bet}% &7med &a%{jackpot.%{jackpot.high.vinder}%.high.chance}%%% Chance&7."
  347. set {jackpot.high} to false
  348. set {jackpot.high.timer} to 60
  349. set {jackpot.high.bet} to 0
  350. set {jackpot.high.antal} to 0
  351. delete {jackpot.high.vinder}
  352. loop {jackpot.high.puljen::*}:
  353. delete {jackpot.%loop-value-2%.high.chance}
  354. delete {jackpot.%uuid of loop-value-2%.high.bet}
  355. delete {jackpot.high.puljen::*}
  356. stop
Advertisement
Add Comment
Please, Sign In to add comment