SilentShiro

Untitled

Mar 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.11 KB | None | 0 0
  1. # -+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-
  2. # Lotterey.sk made by
  3. # Minhii
  4. # -+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-
  5.  
  6. options:
  7. kosten: 100
  8. Prefix: &8[&cLotterey&8] &7
  9. #Variable für Gems/Geld
  10. geld: {gems.%player%}
  11. #Variable für Tickets
  12. ticketp: {ticket.%player%}
  13. ticketarg: {ticket.%arg-2%}
  14. perm: lotterie.use
  15. gems: {gems.%player%}
  16. online: {hour.%loop-player%}
  17.  
  18. command /lotterey [<text>] [<offline player>] [<integer>]:
  19. trigger:
  20. if player has permissions "{@perm}":
  21. if arg-1 is "add":
  22. if arg-2 is set:
  23. if arg-3 is bigger than or equal to 1:
  24. add arg-3 to {@ticketarg}
  25. send "{@Prefix}Du hast dem Spieler &c%arg-2% %arg-3% &7Ticket/s gegeben!"
  26. if arg-2 is online:
  27. send "{@Prefix}&c%player% &7gave you &c%arg-3% &7Tickets" to arg-2
  28. else:
  29. send "{@Prefix}You have to specify a positive number"
  30. else:
  31. send "{@Prefix}You have to specify a player"
  32. else if arg-1 is "remove":
  33. if arg-2 is set:
  34. if arg-3 is bigger than or equal to 1:
  35. set {_checkminus} to {@ticketarg} - arg-3
  36. if {_checkminus} is smaller than 0:
  37. send "{@Prefix}The Player hasn't so much Tickets. He currently has &c%{@ticketarg}% &7Tickets!"
  38. else:
  39. remove arg-3 from {@ticketarg}
  40. send "{@Prefix}You tooked &c%arg-3% &7Tickets from &c%arg-2%"
  41. if arg-2 is online:
  42. send "{@Prefix}&c%player% &7tooked &c%arg-3% &7Tickets from you" to arg-2
  43. else:
  44. send "{@Prefix}You have to specify a positive number"
  45. else:
  46. send "{@Prefix}You have to specify a player"
  47. else if arg-1 is "setblock":
  48. set block at location of player to enchantment table
  49. send "{@Prefix}You setted the Lotterey Block"
  50. else:
  51. send "&8&m&l=============={@Prefix}&8&m&l=============="
  52. send ""
  53. send "&7/lotterey &cadd/remove &7[Player] [Amount]"
  54. send "&7/lotterey &csetblock &8| &7Sets the Lottery-block"
  55. send ""
  56. send "&8&m&l=============={@Prefix}&8&m&l=============="
  57. else:
  58. send "&fUnknown command. Type ""/help"" for help."
  59.  
  60. command /lotto [<text>] [<integer>]:
  61. trigger:
  62. if arg-1 is "on":
  63. if {@ticketp} is bigger than or equal to 1:
  64. remove 1 from {@ticketp}
  65. open chest with 3 rows named "&dUse Lottereyticket" to player
  66. wait 5 ticks
  67. set {inlott.%player%} to true
  68. format slot 0 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 0"]
  69. format slot 1 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 1"]
  70. format slot 2 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 2"]
  71. format slot 3 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 3"]
  72. format slot 4 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 4"]
  73. format slot 5 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 5"]
  74. format slot 6 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 6"]
  75. format slot 7 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 7"]
  76. format slot 8 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 8"]
  77. format slot 9 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 9"]
  78. format slot 10 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 10"]
  79. format slot 11 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 11"]
  80. format slot 12 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 12"]
  81. format slot 13 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 13"]
  82. format slot 14 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 14"]
  83. format slot 15 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 15"]
  84. format slot 16 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 16"]
  85. format slot 17 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 17"]
  86. format slot 18 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 18"]
  87. format slot 19 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 19"]
  88. format slot 20 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 20"]
  89. format slot 21 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 21"]
  90. format slot 22 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 22"]
  91. format slot 23 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 23"]
  92. format slot 24 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 24"]
  93. format slot 25 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 25"]
  94. format slot 26 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 26"]
  95. else:
  96. send "{@Prefix}You haven't enough Tickets!"
  97. else if arg-1 is "buy":
  98. if {@geld} is bigger than or equal to {@kosten}:
  99. remove {@kosten} from {@geld}
  100. send "{@Prefix}You bought a Ticket"
  101. add 1 to {@ticketp}
  102. else:
  103. send "{@Prefix}You havent enough Gems"
  104. else if arg-1 is "click":
  105. if arg-2 is set:
  106. if {inlott.%player%} is true:
  107. chance of 80 %:
  108. set {_win} to random integer between 10 and 60
  109. else:
  110. set {_win} to random integer between 100 and 350
  111.  
  112. if {_win} is bigger than or equal to 130:
  113. format slot arg-2 of player with shiny emerald block named "&a&l%{_win}% Gems" to be unstealable
  114. else:
  115. format slot arg-2 of player with shiny emerald named "&a&l%{_win}% Gems" to be unstealable
  116. if {winsave.%player%::*} is not set:
  117. set {winsave.%player%::*} to {_win}
  118. else:
  119. add {_win} to {winsave.%player%::*}
  120. add {_win} to {@geld}
  121. loop {winsave.%player%::*}:
  122. add 1 to {_checkclick}
  123. if {_checkclick} is bigger than or equal to 5:
  124. wait 5 ticks
  125. open chest with 2 rows named "&5Gems you won" to player
  126. wait 10 ticks
  127. set {inlott.%player%} to true
  128. set {_winsave} to 2
  129. loop {winsave.%player%::*}:
  130. if {_winsave} is smaller than 7:
  131. if {inlott.%player%} is true:
  132. if loop-value is bigger than or equal to 350:
  133. format slot {_winsave} of player with shiny emerald block named "&a&l%loop-value% Gems" to be unstealable
  134. else:
  135. format slot {_winsave} of player with shiny emerald named "&a&l%loop-value% Gems" to be unstealable
  136. add 1 to {_winsave}
  137. if {inlott.%player%} is true:
  138. wait 5 ticks
  139. format slot 0 of player with gray stained glass pane named "&5" to be unstealable
  140. wait a tick
  141. if {inlott.%player%} is true:
  142. format slot 1 of player with gray stained glass pane named "&5" to be unstealable
  143. wait a tick
  144. if {inlott.%player%} is true:
  145. format slot 7 of player with gray stained glass pane named "&5" to be unstealable
  146. wait a tick
  147. if {inlott.%player%} is true:
  148. format slot 8 of player with gray stained glass pane named "&5" to be unstealable
  149. wait a tick
  150. if {inlott.%player%} is true:
  151. format slot 9 of player with gray stained glass pane named "&5" to be unstealable
  152. wait a tick
  153. if {inlott.%player%} is true:
  154. format slot 10 of player with gray stained glass pane named "&5" to be unstealable
  155. wait a tick
  156. if {inlott.%player%} is true:
  157. format slot 12 of player with gray stained glass pane named "&5" to be unstealable
  158. wait a tick
  159. if {inlott.%player%} is true:
  160. format slot 11 of player with book named "&aUse Lotteryticket" with lore "&cYou have %{@ticketp}% Tickets" to run [make player execute "lotto on"]
  161. wait a tick
  162. if {inlott.%player%} is true:
  163. format slot 14 of player with gray stained glass pane named "&5" to be unstealable
  164. wait a tick
  165. if {inlott.%player%} is true:
  166. format slot 13 of player with gray stained glass pane named "&5" to be unstealable
  167. wait a tick
  168. if {inlott.%player%} is true:
  169. format slot 16 of player with gray stained glass pane named "&5" to be unstealable
  170. wait a tick
  171. if {inlott.%player%} is true:
  172. format slot 17 of player with gray stained glass pane named "&5" to be unstealable
  173. wait a tick
  174. if {inlott.%player%} is true:
  175. loop {winsave.%player%::*}:
  176. add loop-value to {_gewinngesamt}
  177. wait a tick
  178. if {inlott.%player%} is true:
  179. format slot 15 of player with shiny hopper named "&c&lOverall Won:" with lore "&6&l%{_gewinngesamt}%" to be unstealable
  180. wait 5 ticks
  181. wait a tick
  182. delete {inlott.%player%}
  183. delete {winsave.%player%::*}
  184. else:
  185. send "&fUnknown command. Type ""/help"" for help."
  186. else:
  187. send "&fUnknown command. Type ""/help"" for help."
  188. else:
  189. send "&fUnknown command. Type ""/help"" for help."
  190.  
  191. on rightclick on enchantment table:
  192. cancel event
  193. if {@ticketp} is smaller than 0:
  194. set {@ticketp} to 0
  195. wait 5 ticks
  196. open chest with 1 row named "&cLotterey" to player
  197. wait a tick
  198. format slot 0 of player with gray stained glass pane named "&5" to be unstealable
  199. format slot 1 of player with gray stained glass pane named "&5" to be unstealable
  200. format slot 2 of player with book named "&aUse Lottereyticket" with lore "&cYou have %{@ticketp}% Tickets" to run [make player execute "lotto on"]
  201. format slot 3 of player with gray stained glass pane named "&5" to be unstealable
  202. format slot 4 of player with emerald named "&aYour Gems:" with lore "&c%{@gems}%" to be unstealable
  203. format slot 5 of player with gray stained glass pane named "&5" to be unstealable
  204. format slot 6 of player with shiny paper named "&cBuy a Lottereyticekt" with lore "&7Cost:&a {@kosten} &f&lGems" to run [make player execute "lotto buy"]
  205. format slot 7 of player with gray stained glass pane named "&5" to be unstealable
  206. format slot 8 of player with gray stained glass pane named "&5" to be unstealable
  207.  
  208. on load:
  209. wait 20 ticks
  210. broadcast "{@Prefix}The Lotterey was loaded by a &cStaff Member"
  211.  
  212. on inventory close:
  213. if {inlott.%player%} is true:
  214. if {winsave.%player%::*} is not set:
  215. send "{@Prefix}You have abort the Lotterey. You got the Lottereyticket back"
  216. delete {winsave.%player%::*}
  217. add 1 to {@ticketp}
  218. delete {inlott.%player%}
  219. if {inlott.%player%} is true:
  220. delete {inlott.%player%}
  221. loop {winsave.%player%::*}:
  222. add 1 to {_checkclick}
  223. if {_checkclick} is smaller than 5:
  224. send "{@Prefix}You have abort the Lotterey. You got the Lottereyticket back"
  225. delete {winsave.%player%::*}
  226. add 1 to {@ticketp}
  227. delete {inlott.%player%}
  228.  
  229. on inventory click:
  230. if inventory name of player's current inventory is "&cLotterie" or "&dUse Lottereyticket" or "&5Get Gems":
  231. cancel event
  232.  
  233. on quit:
  234. if {inlott.%player%} is true:
  235. delete {inlott.%player%}
  236.  
  237. on join:
  238. if {inlott.%player%} is true:
  239. delete {inlott.%player%}
  240.  
  241. on first join:
  242. set {gems.%player%} to 0
  243.  
  244. command /gems [<text>] [<player>] [<number>]:
  245. aliases: /money
  246. trigger:
  247. if arg 1 is not set:
  248. if player has permission "gems.admin":
  249. message "&8-[ &a&l Gems &8]-"
  250. message "&6/gems see <Player> &7- Shows the Gems of someone"
  251. message "&6/gems give <Player> &7- Give a Player Gems"
  252. message "&6/gems reset <Player> &7- Sets the Gems of the Player back to 0"
  253. message "&6/gems take <Player> &7- Take Gems from a Player"
  254. message "&6/gems see &7- Shows your Gems"
  255. message "&6/gems pay <Player> &7- Pay someone Gems"
  256. stop
  257. if arg 1 is "see":
  258. if player has permission "gems.player":
  259. if player arg is not set:
  260. message "&8[&a&lGems&8] &cYou have to specify a Player"
  261. if player arg is set:
  262. message "&aGems&8: &c%{gems.%arg-2%}% &6(%arg 2%)"
  263. stop
  264. if arg 1 is "pay":
  265. if player has permission "gems.player":
  266. if arg 2 is set:
  267. if number arg is set:
  268. if {gems.%player%} is less than number arg:
  269. message "&8[&a&lGems&8] &cYou haven't so much Gems"
  270. if {gems.%player%} is more than number arg:
  271. remove number arg from {gems.%player%}
  272. add number arg to {gems.%arg-2%}
  273. message "&8[&a&lGems&8] &cYou paid %player arg% %number arg% &aGems" to player
  274. message "&8[&a&lGems&8] &eYou recieved %number arg% from %player%"
  275. if arg 1 is "give":
  276. if player has permission "gems.admin":
  277. add number arg to {gems.%arg-2%}
  278. message "&8[&a&lGems&8] &cYou gave %player arg% %number arg% &aGems"
  279. if arg 1 is "reset":
  280. if player has permission "gems.admin":
  281. if player arg is set:
  282. set {gems.%arg-2%} to 0
  283. message "&8[&a&lGems&8] &cYou resetted the Gems of %player arg%"
  284. if arg 1 is "take":
  285. if player has permission "gems.admin":
  286. if arg 2 is set:
  287. if number arg is set:
  288. if {gems.%arg-2%} is less than number arg:
  289. message "&8[&a&lGems&8] &c%arg 2% hasn't so much Gems"
  290. stop
  291. else:
  292. remove number arg from {gems.%arg-2%}
  293. message "&8[&a&lGems&8] &cYou tooked &e%arg 3% &cGems from &e%arg 2%"
  294.  
  295. every 5 seconds:
  296. loop all players:
  297. wipe loop-player's sidebar
  298. if loop-player has permission "scoreboard.player":
  299. set name of sidebar of loop-player to "&e&lPIXEL-RPG"
  300. set score "" in sidebar of loop-player to 10
  301. set score "&fRank: &7Standard" in sidebar of loop-player to 9
  302. set score "&fLocation: &aOverworld" in sidebar of loop-player to 7
  303. set score "" in sidebar of loop-player to 6
  304. set score "&fServer: &bPixel-RPG" in sidebar of loop-player to 5
  305. set score "&fOnline: &a%number of players%" in sidebar of loop-player to 4
  306. set score "" in sidebar of loop-player to 3
  307. set score "&bvisit our Realm Store" in sidebar of loop-player to 2
  308. set score "&b/store, /buy, /realm" in sidebar of loop-player to 1
  309. if loop-player has permission "scoreboard.Paladin":
  310. set name of sidebar of loop-player to "&e&lPIXEL-RPG"
  311. set score "" in sidebar of loop-player to 10
  312. set score "&fRank: &dPaladin" in sidebar of loop-player to 9
  313. set score "&fLocation: &aOverworld" in sidebar of loop-player to 7
  314. set score "" in sidebar of loop-player to 6
  315. set score "&fServer: &bPixel-RPG" in sidebar of loop-player to 5
  316. set score "&fOnline: &a%number of players%" in sidebar of loop-player to 4
  317. set score "" in sidebar of loop-player to 3
  318. set score "&bvisit our Realm Store" in sidebar of loop-player to 2
  319. set score "&b/store, /buy, /realm" in sidebar of loop-player to 1
  320. if loop-player has permission "scoreboard.staff":
  321. set name of sidebar of loop-player to "&e&lPIXEL-RPG"
  322. set score "" in sidebar of loop-player to 10
  323. set score "&fRank: &cStaff" in sidebar of loop-player to 9
  324. set score "&fLocation: &aOverworld" in sidebar of loop-player to 7
  325. set score "" in sidebar of loop-player to 6
  326. set score "&fServer: &bPixel-RPG" in sidebar of loop-player to 5
  327. set score "&fOnline: &a%number of players%" in sidebar of loop-player to 4
  328. set score "" in sidebar of loop-player to 3
  329. set score "&bvisit our Realm Store" in sidebar of loop-player to 2
  330. set score "&b/store, /buy, /realm" in sidebar of loop-player to 1
Advertisement
Add Comment
Please, Sign In to add comment