Advertisement
Guest User

Untitled

a guest
May 26th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.39 KB | None | 0 0
  1. Aliases:
  2. double plant = 175
  3. Options:
  4. version: 1.1-B
  5. command /supereconomy [<text>] [<text>] [<offlineplayer>] [<text>]:
  6. aliases: /seconomy, /seco
  7. trigger:
  8. if arg 1 is not "bal" or "balance" or "baltop" or "withdraw" or "help" or "reload":
  9. send "&7You must use &a/seco &7for more help!"
  10. if arg 1 is not set:
  11. make player execute command "/seco help"
  12. if arg 1 is "help":
  13. player doesn't have permission "seco.help" or "seco.admin":
  14. send "&8&m----------------&r &6✎ &e&lSuperEconomy&r &6✐ &8&m----------------"
  15. send " &a/seco bal(ance) &8| &7Check your balance."
  16. player has permission "seco.baltop":
  17. send " &a/seco baltop &8| &7Check the balance top."
  18. player has permission "seco.balance.view.others":
  19. send " &a/seco bal view <player> &8| &7Check player's balance."
  20. player has permission "seco.withdraw":
  21. send " &a/seco withdraw <quantity> &8| &7Withdraw some cash from your balance."
  22. else if player has permission "seco.adminhelp" or "seco.admin":
  23. send "&8&m----------------&r &6✎ &e&lSuperEconomy&r &6✐ &8&m----------------"
  24. send " &a/seco bal(ance) &8| &7Check your balance."
  25. send " &a/seco baltop &8| &7Check the balance top."
  26. send " &a/seco bal view <player> &8| &7Check player's balance."
  27. send " &a/seco bal add <player> <quantity> &8| &7Add coins to player balance."
  28. send " &a/seco bal remove <player> <quantity> &8| &7Remove coins from player balance."
  29. send " &a/seco bal set <player> <quantity> &8| &7Set coins to player balance."
  30. send " &a/seco bal reset <player> &8| &7Reset coins of player balance to 0."
  31. send " &a/seco withdraw <quantity> &8| &7Withdraw some cash from your balance."
  32. send " &a/seco reload &8| &7Reload SuperEconomy.sk file."
  33. if arg 1 is "bal" or "balance" or "baltop":
  34. if arg 2 is not set:
  35. if arg 1 is "bal" or "balance":
  36. send "&7You have &a%{seco.bal::%player%}%&7€ in your balance."
  37. if arg 1 is "baltop":
  38. player has permission "seco.baltop" or "seco.admin":
  39. loop {seco.bal::*}:
  40. add 1 to {_size}
  41. if {_low.to.high.list::%loop-value%} is not set:
  42. set {_low.to.high.list::%loop-value%} to loop-index
  43. else:
  44. set {_n} to 0
  45. loop {_size} times:
  46. set {_n} to {_n}+1
  47. if {_low.to.high.list::%loop-value-1%.%{_n}%} is not set:
  48. set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  49. stop loop
  50. wait 1 tick
  51. set {_n} to size of {_low.to.high.list::*}
  52. loop {_low.to.high.list::*}:
  53. set {_high.to.low.list::%{_n}%} to loop-value
  54. set {_n} to {_n}-1
  55. wait 1 tick
  56. set {_total.balances} to 0
  57. send " &8&m-----&r &6✎ &e&lTop 10 Balances&r &6✐ &8&m-----"
  58. send ""
  59. loop {_high.to.low.list::*}:
  60. add 1 to {_topnumber}
  61. set {_player} to "%loop-value%" parsed as offlineplayer
  62. send " &7%{_topnumber}%&7. &a%{_player}% &8➭ &7%{seco.bal::%loop-value%}%&7€"
  63. if {_topnumber} = 10:
  64. stop
  65. add 1 to {_total.balances}
  66. send ""
  67. send " &7There are a total of &a%{_total.balances}% &7registred acounts"
  68. else if player doesn't have permission "seco.baltop" or "seco.admin":
  69. send "&cYou don't have permission to do this!"
  70. if arg 2 is set:
  71. if arg 2 is "view":
  72. player has permission "seco.balance.view.others" or "seco.admin":
  73. if arg 3 is not set:
  74. send "&7You must use &a/seco bal view <player>&7."
  75. if arg 3 is set:
  76. if arg 3 is a offline player:
  77. if {seco.bal::%arg 3%} is set:
  78. send "&a%arg 3% &7has &a%{seco.bal::%arg 3%}%&7€ in his balance."
  79. else if {seco.bal::%arg 3%} is not set:
  80. send "&7This player has never entered."
  81. else if player doesn't have permission "seco.balance.view.others" or "seco.admin":
  82. send "&cYou don't have permission to do this!"
  83. if arg 2 is "add":
  84. player has permission "seco.balance.add" or "seco.admin":
  85. if arg 3 is not set:
  86. send "&7You must use &a/seco bal add <player> <quantity>&7."
  87. if arg 3 is set:
  88. if arg 3 is a offline player:
  89. if arg 4 is not set:
  90. send "&7You must use &a/seco bal add <player> <quantity>&7."
  91. else if arg 4 is set:
  92. set {_text.%player%} to arg 4 parsed as integer
  93. if {_text.%player%} < 0:
  94. send "&7You can't add that amount of coins!"
  95. stop
  96. if {_text.%player%} = 0:
  97. send "&7You can't add that amount of coins!"
  98. stop
  99. else if {_text.%player%} > 0:
  100. if {seco.bal::%arg 3%} is set:
  101. add {_text.%player%} to {seco.bal::%arg 3%}
  102. send "&7You have added &a%{_text.%player%}%&7€ to &a%arg 3%&7." to player
  103. send "&a%player% &7has added &a%{_text.%player%}%&7€ to your account." to arg 3
  104. else if {seco.bal::%arg 3%} is not set:
  105. send "&7This player has never entered."
  106. else if player doesn't have permission "seco.balance.add" or "seco.admin":
  107. send "&cYou don't have permission to do this!"
  108. if arg 2 is "remove":
  109. player has permission "seco.balance.remove" or "seco.admin":
  110. if arg 3 is not set:
  111. send "&7You must use &a/seco bal remove <player> <quantity>&7."
  112. if arg 3 is set:
  113. if arg 3 is a offline player:
  114. if arg 4 is not set:
  115. send "&7You must use &a/seco bal remove <player> <quantity>&7."
  116. else if arg 4 is set:
  117. set {_text.%player%} to arg 4 parsed as integer
  118. if {_text.%player%} = 0:
  119. send "&7You can't remove that amount of coins!"
  120. stop
  121. if {_text.%player%} < 0:
  122. send "&7You can't remove that amount of coins!"
  123. stop
  124. if {_text.%player%} > {seco.bal::%arg 3%}:
  125. send "&7You can't remove that amount of coins!"
  126. stop
  127. if {_text.%player%} < {seco.bal::%arg 3%}:
  128. if {seco.bal::%arg 3%} is set:
  129. remove {_text.%player%} from {seco.bal::%arg 3%}
  130. send "&7You have removed &a%{_text.%player%}%&7€ from &a%arg 3%&7." to player
  131. send "&a%player% &7has removed &a%{_text.%player%}%&7€ from your account." to arg 3
  132. else if {seco.bal::%arg 3%} is not set:
  133. send "&7This player has never entered."
  134. else if {_text.%player%} = {seco.bal::%arg 3%}:
  135. if {seco.bal::%arg 3%} is set:
  136. remove {_text.%player%} from {seco.bal::%arg 3%}
  137. send "&7You have removed &a%{_text.%player%}%&7€ from &a%arg 3%&7." to player
  138. send "&a%player% &7has removed &a%{_text.%player%}%&7€ from your account." to arg 3
  139. else if {seco.bal::%arg 3%} is not set:
  140. send "&7This player has never entered."
  141. else if player doesn't have permission "seco.balance.remove" or "seco.admin":
  142. send "&cYou don't have permission to do this!"
  143. if arg 2 is "set":
  144. player has permission "seco.balance.set" or "seco.admin":
  145. if arg 3 is not set:
  146. send "&7You must use &a/seco bal set <player> <quantity>&7."
  147. if arg 3 is set:
  148. if arg 3 is a offline player:
  149. if arg 4 is not set:
  150. send "&7You must use &a/seco bal set <player> <quantity>&7."
  151. else if arg 4 is set:
  152. set {_text.%player%} to arg 4 parsed as integer
  153. if {_text.%player%} < 0:
  154. send "&7You can't set that amount of coins!"
  155. stop
  156. if {_text.%player%} = 0:
  157. if {seco.bal::%arg 3%} is set:
  158. set {seco.bal::%arg 3%} to {_text.%player%}
  159. send "&7You have set &a%arg 3%&7's balance to &a%{_text.%player%}%&7€." to player
  160. send "&a%player% &7has set your balance to &a%{_text.%player%}%&7€." to arg 3
  161. else if {seco.bal::%arg 3%} is not set:
  162. send "&7This player has never entered."
  163. else if {_text.%player%} > 0:
  164. if {seco.bal::%arg 3%} is set:
  165. set {seco.bal::%arg 3%} to {_text.%player%}
  166. send "&7You have set &a%arg 3%&7's balance to &a%{_text.%player%}%&7€." to player
  167. send "&a%player% &7has set your balance to &a%{_text.%player%}%&7€." to arg 3
  168. else if {seco.bal::%arg 3%} is not set:
  169. send "&7This player has never entered."
  170. else if player doesn't have permission "seco.balance.set" or "seco.admin":
  171. send "&cYou don't have permission to do this!"
  172. if arg 2 is "reset":
  173. player has permission "seco.balance.reset" or "seco.admin":
  174. if arg 3 is not set:
  175. send "&7You must use &a/seco bal reset <player>&7."
  176. if arg 3 is set:
  177. if arg 3 is a player:
  178. if {seco.bal::%arg 3%} is set:
  179. set {seco.bal::%arg 3%} to 0
  180. send "&7You have reset the balance of &a%arg 3% &7to &a%{seco.bal::%arg 3%}%&7€." to player
  181. send "&a%player% &7has reset your balance to &a%{seco.bal::%arg 3%}%&7€." to arg 3
  182. else if {seco.bal::%arg 3%} is not set:
  183. send "&7This player has never entered."
  184. else if player doesn't have permission "seco.balance.reset" or "seco.admin":
  185. send "&cYou don't have permission to do this!"
  186. if arg 1 is "withdraw":
  187. player has permission "seco.withdraw" or "seco.admin":
  188. if arg 2 is not set:
  189. send "&7You must use &a/seco withdraw <quantity>&7."
  190. if arg 2 is set:
  191. set {_text.%player%} to arg 2 parsed as integer
  192. if {_text.%player%} = 0:
  193. send "&7You can't withdraw that amount of coins!"
  194. stop
  195. if {_text.%player%} < 0:
  196. send "&7You can't withdraw that amount of coins!"
  197. stop
  198. if {_text.%player%} > 0:
  199. if {seco.bal::%player%} < {_text.%player%}:
  200. send "&7You can't withdraw that amount of coins!"
  201. stop
  202. if {seco.bal::%player%} > {_text.%player%}:
  203. if player has enough space for 1 double plant:
  204. remove {_text.%player%} from {seco.bal::%player%}
  205. give player 1 double plant named "%{_text.%player%}%" with lore "||&7This is a phisical coin withdrawed by &a%player%&7.||&7You can claim this &a%{_text.%player%}% &7coin(s), rightclicking this item."
  206. send "&7You have withdrawed &a%{_text.%player%}%&7€ from your balance."
  207. stop
  208. else if player doesn't have enough space for 1 double plant:
  209. send "&7You don't have space in your inventory to withdraw!"
  210. stop
  211. if {seco.bal::%player%} = {_text.%player%}:
  212. if player has enough space for 1 double plant:
  213. remove {_text.%player%} from {seco.bal::%player%}
  214. give player 1 double plant named "%{_text.%player%}%" with lore "||&7This is a phisical coin withdrawed by &a%player%&7.||&7You can claim this &a%{_text.%player%}% &7coin(s), rightclicking this item."
  215. send "&7You have withdrawed &a%{_text.%player%}%&7€ from your balance."
  216. stop
  217. else if player doesn't have enough space for 1 double plant:
  218. send "&7You don't have space in your inventory to withdraw!"
  219. stop
  220. else if player doesn't have permission "seco.withdraw" or "seco.admin":
  221. send "&cYou don't have permission to do this!"
  222. if arg 1 is "reload":
  223. player has permission "seco.reload" or "seco.admin":
  224. make console execute command "/sk reload SuperEconomy.sk"
  225. send "&e&lSuperEconomy&r &7has been reloaded. (&ev{@version}&7)."
  226. else if player doesn't have permission "seco.reload" or "seco.admin":
  227. send "&cYou don't have permission to do this!"
  228. on death of player:
  229. if victim is a player:
  230. set {_text.%player%} to a random integer between 1 and 100
  231. if {seco.bal::%player%} = 0:
  232. send "&7You haven't lost coins due to you don't have." to victim
  233. send "&7You can't steal € from &a%victim% &7because he's poor!" to attacker
  234. stop
  235. else if {seco.bal::%player%} < {_text.%player%}:
  236. set {seco.bal::%player%} to 0
  237. send "&7Your account hadn't enough coins to pay, so now you have &a%{seco.bal::%player%}%&7€." to victim
  238. send "&7You have stolen all &a%victim%&7's€" to attacker
  239. stop
  240. else if {seco.bal::%player%} > {_text.%player%}:
  241. remove {_text.%player%} from {seco.bal::%player%}
  242. launch ball firework colored green and blue and red and purple and yellow at player timed 1
  243. drop double plant named "%{_text.%player%}%" with lore "||&7This phisical coin has apeared by the death of &a%player%&7.||&7You can claim this &a%{_text.%player%}% &7coin(s), rightclicking this item." at location of player
  244. send "&7You have lost &a%{_text.%player%}%&7€" to victim
  245. stop
  246. on right click holding double plant:
  247. if lore of player's held item contains "phisical":
  248. player has permission "seco.claimcoins" or "seco.admin":
  249. set {_text.%player%} to name of held item parsed as integer
  250. add {_text.%player%} to {seco.bal::%player%}
  251. remove held item from player
  252. send "&7You have claimed &a%{_text.%player%}%&7€."
  253. stop
  254. else if player doesn't have permission "seco.claimcoins" or "seco.admin":
  255. stop
  256. on sign change:
  257. if line 1 of event-block is "[seco]":
  258. player has permission "seco.signs" or "seco.admin":
  259. if line 2 of event-block is not "balance" or "baltop":
  260. send "&7Invalid, second line must be: [&abalance&7, &abaltop&7]"
  261. if line 2 of event-block is "balance":
  262. set line 1 of event-block to "&8[&e&lSeconomy&8]"
  263. set line 2 of event-block to "&abalance"
  264. set line 3 of event-block to ""
  265. set line 4 of event-block to ""
  266. send "&7You have created a &abalance &7sign."
  267. stop
  268. if line 2 of event-block is "baltop":
  269. if line 3 of event-block is "1", "2", "3", "4", "5", "6", "7", "8", "9" or "10":
  270. set {_num} to line 3 of event-block
  271. wait 1 tick
  272. set line 1 of event-block to "&0##%{_num}%"
  273. set line 2 of event-block to "&a%{_player}%"
  274. set line 3 of event-block to "&0%{_balance}%&0&l€"
  275. set line 4 of event-block to ""
  276. send "&7You have created a &abalance top &7sign."
  277. stop
  278. else if line 3 of event-block is not "1", "2", "3", "4", "5", "6", "7", "8", "9" or "10":
  279. cancel event
  280. send "&7You need to specify a top number between &a1 &7and &a10&7."
  281. stop
  282. else if player doesn't have permission "seco.signs" or "seco.admin":
  283. send "&cYou don't have permission to do this!"
  284. on right click on sign:
  285. if line 1 of event-block is "&8[&e&lSeconomy&8]":
  286. if line 2 of event-block is "&abalance":
  287. make player execute command "/seco bal"
  288. on left click on sign:
  289. if line 1 of event-block is "&8[&e&lSeconomy&8]":
  290. player has permission "seco.removesigns" or "seco.admin":
  291. stop
  292. else if player doesn't have permission "seco.removesigns" or "seco.admin":
  293. cancel event
  294. send "&cYou don't have permission to do this!"
  295. on anvil rename:
  296. if lore of event-item contains "phisical":
  297. player has permission "seco.renamecoins" or "seco.admin":
  298. stop
  299. player doesn't have permission "seco.renamecoins" or "seco.admin":
  300. cancel event
  301. close player's inventory
  302. if {renamecoins.%player%} = 1:
  303. kick player due to "&cYou are not allowed to do that!"
  304. set {renamecoins.%player%} to 5
  305. else:
  306. remove 1 from {renamecoins.%player%}
  307. send "&7Rename coins will result on a kick! (&a%{renamecoins.%player%}%&7)."
  308. on join:
  309. if {seco.bal::%player%} is not set:
  310. set {seco.bal::%player%} to 0
  311. on quit:
  312. if {seco.bal::%player%} is 0:
  313. delete {seco.bal::%player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement