Aliases: double plant = 175 Options: version: 1.0 command /supereconomy [] [] [] []: aliases: /seconomy, /seco trigger: if arg 1 is not "bal" or "balance" or "baltop" or "withdraw" or "help" or "reload": send "&7You must use &a/seco &7for more help!" if arg 1 is not set: make player execute command "/seco help" if arg 1 is "help": player doesn't have permission "seco.help" or "seco.admin": send "&8&m----------------&r &6✎ &e&lSuperEconomy&r &6✐ &8&m----------------" send " &a/seco bal(ance) &8| &7Check your balance." player has permission "seco.baltop": send " &a/seco baltop &8| &7Check the balance top." player has permission "seco.balance.view.others": send " &a/seco bal view &8| &7Check player's balance." player has permission "seco.withdraw": send " &a/seco withdraw &8| &7Withdraw some cash from your balance." else if player has permission "seco.adminhelp" or "seco.admin": send "&8&m----------------&r &6✎ &e&lSuperEconomy&r &6✐ &8&m----------------" send " &a/seco bal(ance) &8| &7Check your balance." send " &a/seco baltop &8| &7Check the balance top." send " &a/seco bal view &8| &7Check player's balance." send " &a/seco bal add &8| &7Add coins to player balance." send " &a/seco bal remove &8| &7Remove coins from player balance." send " &a/seco bal set &8| &7Set coins to player balance." send " &a/seco bal reset &8| &7Reset coins of player balance to 0." send " &a/seco withdraw &8| &7Withdraw some cash from your balance." send " &a/seco reload &8| &7Reload SuperEconomy.sk file." if arg 1 is "bal" or "balance" or "baltop": if arg 2 is not set: if arg 1 is "bal" or "balance": send "&7You have &a%{seco.bal::%player%}%&7€ in your balance." if arg 1 is "baltop": player has permission "seco.baltop" or "seco.admin": loop {seco.bal::*}: add 1 to {_size} if {_low.to.high.list::%loop-value%} is not set: set {_low.to.high.list::%loop-value%} to loop-index else: set {_n} to 0 loop {_size} times: set {_n} to {_n}+1 if {_low.to.high.list::%loop-value-1%.%{_n}%} is not set: set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index stop loop wait 1 tick set {_n} to size of {_low.to.high.list::*} loop {_low.to.high.list::*}: set {_high.to.low.list::%{_n}%} to loop-value set {_n} to {_n}-1 wait 1 tick set {_total.balances} to 0 send " &8&m-----&r &6✎ &e&lTop 10 Balances&r &6✐ &8&m-----" send "" loop {_high.to.low.list::*}: add 1 to {_topnumber} set {_player} to "%loop-value%" parsed as offlineplayer send " &7%{_topnumber}%&7. &a%{_player}% &8➭ &7%{seco.bal::%loop-value%}%&7€" if {_topnumber} = 10: stop add 1 to {_total.balances} send "" send " &7There are a total of &a%{_total.balances}% &7registred acounts" else if player doesn't have permission "seco.baltop" or "seco.admin": send "&cYou don't have permission to do this!" if arg 2 is set: if arg 2 is "view": player has permission "seco.balance.view.others" or "seco.admin": if arg 3 is not set: send "&7You must use &a/seco bal view &7." if arg 3 is set: if arg 3 is a offline player: if {seco.bal::%arg 3%} is set: send "&a%arg 3% &7has &a%{seco.bal::%arg 3%}%&7€ in his balance." else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if player doesn't have permission "seco.balance.view.others" or "seco.admin": send "&cYou don't have permission to do this!" if arg 2 is "add": player has permission "seco.balance.add" or "seco.admin": if arg 3 is not set: send "&7You must use &a/seco bal add &7." if arg 3 is set: if arg 3 is a offline player: if arg 4 is not set: send "&7You must use &a/seco bal add &7." else if arg 4 is set: set {_text.%player%} to arg 4 parsed as integer if {_text.%player%} < 0: send "&7You can't add that amount of coins!" stop if {_text.%player%} = 0: send "&7You can't add that amount of coins!" stop else if {_text.%player%} > 0: if {seco.bal::%arg 3%} is set: add {_text.%player%} to {seco.bal::%arg 3%} send "&7You have added &a%{_text.%player%}%&7€ to &a%arg 3%&7." to player send "&a%player% &7has added &a%{_text.%player%}%&7€ to your account." to arg 3 else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if player doesn't have permission "seco.balance.add" or "seco.admin": send "&cYou don't have permission to do this!" if arg 2 is "remove": player has permission "seco.balance.remove" or "seco.admin": if arg 3 is not set: send "&7You must use &a/seco bal remove &7." if arg 3 is set: if arg 3 is a offline player: if arg 4 is not set: send "&7You must use &a/seco bal remove &7." else if arg 4 is set: set {_text.%player%} to arg 4 parsed as integer if {_text.%player%} = 0: send "&7You can't remove that amount of coins!" stop if {_text.%player%} < 0: send "&7You can't remove that amount of coins!" stop if {_text.%player%} > {seco.bal::%arg 3%}: send "&7You can't remove that amount of coins!" stop if {_text.%player%} < {seco.bal::%arg 3%}: if {seco.bal::%arg 3%} is set: remove {_text.%player%} from {seco.bal::%arg 3%} send "&7You have removed &a%{_text.%player%}%&7€ from &a%arg 3%&7." to player send "&a%player% &7has removed &a%{_text.%player%}%&7€ from your account." to arg 3 else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if {_text.%player%} = {seco.bal::%arg 3%}: if {seco.bal::%arg 3%} is set: remove {_text.%player%} from {seco.bal::%arg 3%} send "&7You have removed &a%{_text.%player%}%&7€ from &a%arg 3%&7." to player send "&a%player% &7has removed &a%{_text.%player%}%&7€ from your account." to arg 3 else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if player doesn't have permission "seco.balance.remove" or "seco.admin": send "&cYou don't have permission to do this!" if arg 2 is "set": player has permission "seco.balance.set" or "seco.admin": if arg 3 is not set: send "&7You must use &a/seco bal set &7." if arg 3 is set: if arg 3 is a offline player: if arg 4 is not set: send "&7You must use &a/seco bal set &7." else if arg 4 is set: set {_text.%player%} to arg 4 parsed as integer if {_text.%player%} < 0: send "&7You can't set that amount of coins!" stop if {_text.%player%} = 0: if {seco.bal::%arg 3%} is set: set {seco.bal::%arg 3%} to {_text.%player%} send "&7You have set &a%arg 3%&7's balance to &a%{_text.%player%}%&7€." to player send "&a%player% &7has set your balance to &a%{_text.%player%}%&7€." to arg 3 else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if {_text.%player%} > 0: if {seco.bal::%arg 3%} is set: set {seco.bal::%arg 3%} to {_text.%player%} send "&7You have set &a%arg 3%&7's balance to &a%{_text.%player%}%&7€." to player send "&a%player% &7has set your balance to &a%{_text.%player%}%&7€." to arg 3 else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if player doesn't have permission "seco.balance.set" or "seco.admin": send "&cYou don't have permission to do this!" if arg 2 is "reset": player has permission "seco.balance.reset" or "seco.admin": if arg 3 is not set: send "&7You must use &a/seco bal reset &7." if arg 3 is set: if arg 3 is a player: if {seco.bal::%arg 3%} is set: set {seco.bal::%arg 3%} to 0 send "&7You have reset the balance of &a%arg 3% &7to &a%{seco.bal::%arg 3%}%&7€." to player send "&a%player% &7has reset your balance to &a%{seco.bal::%arg 3%}%&7€." to arg 3 else if {seco.bal::%arg 3%} is not set: send "&7This player has never entered." else if player doesn't have permission "seco.balance.reset" or "seco.admin": send "&cYou don't have permission to do this!" if arg 1 is "withdraw": player has permission "seco.withdraw" or "seco.admin": if arg 2 is not set: send "&7You must use &a/seco withdraw &7." if arg 2 is set: set {_text.%player%} to arg 2 parsed as integer if {_text.%player%} = 0: send "&7You can't withdraw that amount of coins!" stop if {_text.%player%} < 0: send "&7You can't withdraw that amount of coins!" stop if {_text.%player%} > 0: if {seco.bal::%player%} < {_text.%player%}: send "&7You can't withdraw that amount of coins!" stop if {seco.bal::%player%} > {_text.%player%}: if player has enough space for 1 double plant: remove {_text.%player%} from {seco.bal::%player%} 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." send "&7You have withdrawed &a%{_text.%player%}%&7€ from your balance." stop else if player doesn't have enough space for 1 double plant: send "&7You don't have space in your inventory to withdraw!" stop if {seco.bal::%player%} = {_text.%player%}: if player has enough space for 1 double plant: remove {_text.%player%} from {seco.bal::%player%} 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." send "&7You have withdrawed &a%{_text.%player%}%&7€ from your balance." stop else if player doesn't have enough space for 1 double plant: send "&7You don't have space in your inventory to withdraw!" stop else if player doesn't have permission "seco.withdraw" or "seco.admin": send "&cYou don't have permission to do this!" if arg 1 is "reload": player has permission "seco.reload" or "seco.admin": make console execute command "/sk reload SuperEconomy.sk" send "&e&lSuperEconomy&r &7has been reloaded. (&ev{@version}&7)." else if player doesn't have permission "seco.reload" or "seco.admin": send "&cYou don't have permission to do this!" on death of player: if victim is a player: set {_text.%player%} to a random integer between 1 and 100 if {seco.bal::%player%} = 0: send "&7You haven't lost coins due to you don't have." to victim send "&7You can't steal € from &a%victim% &7because he's poor!" to attacker stop else if {seco.bal::%player%} < {_text.%player%}: set {seco.bal::%player%} to 0 send "&7Your account hadn't enough coins to pay, so now you have &a%{seco.bal::%player%}%&7€." to victim send "&7You have stolen all &a%victim%&7's€" to attacker stop else if {seco.bal::%player%} > {_text.%player%}: remove {_text.%player%} from {seco.bal::%player%} launch ball firework colored green and blue and red and purple and yellow at player timed 1 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 send "&7You have lost &a%{_text.%player%}%&7€" to victim stop on right click holding double plant: if lore of player's held item contains "phisical": player has permission "seco.claimcoins" or "seco.admin": set {_text.%player%} to name of held item parsed as integer add {_text.%player%} to {seco.bal::%player%} remove held item from player send "&7You have claimed &a%{_text.%player%}%&7€." stop else if player doesn't have permission "seco.claimcoins" or "seco.admin": stop on sign change: if line 1 of event-block is "[seco]": if line 2 of event-block is "balance": player has permission "seco.createsign.balance" or "seco.admin": set line 1 of event-block to "&8[&e&lSeconomy&8]" set line 2 of event-block to "&abalance" set line 3 of event-block to "" set line 4 of event-block to "" send "&7You have created a &abalance &7sign." stop else if line 2 of event-block is not "balance": player has permission "seco.createsign.balance" or "seco.admin": send "&7Invalid, second line must be: [&abalance&7]" else if player doesn't have permission "seco.createsign.balance" or "seco.admin": send "&cYou don't have permission to do this!" on right click on sign: if line 1 of event-block is "&8[&e&lSeconomy&8]": if line 2 of event-block is "&abalance": make player execute command "/seco bal" on left click on sign: if line 1 of event-block is "&8[&e&lSeconomy&8]": player has permission "seco.removesigns" or "seco.admin": stop else if player doesn't have permission "seco.removesigns" or "seco.admin": cancel event send "&cYou don't have permission to do this!" on anvil rename: if lore of event-item contains "phisical": player has permission "seco.renamecoins" or "seco.admin": stop player doesn't have permission "seco.renamecoins" or "seco.admin": cancel event close player's inventory if {renamecoins.%player%} = 1: kick player due to "&cYou are not allowed to do that!" set {renamecoins.%player%} to 5 else: remove 1 from {renamecoins.%player%} send "&7Rename coins will result on a kick! (&a%{renamecoins.%player%}%&7)." on join: if {seco.bal::%player%} is not set: set {seco.bal::%player%} to 0 else if {seco.bal::%player%} is set: stop