#Economy Skript

1 messages · Page 1 of 1 (latest)

steel steppe
#

I'm having a problem with this skript. The only tested part is the /pay command. The error is the "Can't compare {money::%uuid of player%} is with an integer"

#Stops the <none>
on join:
    if {money::%uuid of player%} is not set:
        set {money::%uuid of player%} to 0

#PLAYER CMDS
#Individual's balances
command /money <offline player>:
    aliases: /bal, /balance
    usage: &c&lERROR &8→ &f/money <player>
    trigger:
        if arg-1 is not set:
            send "<#00f986>&lMONEY &8→ You have <#00f986>{money::%uuid of player%} Money."
        else if arg-1 is set:
            send "<#00f986>&lMONEY &8→ %arg-1% has <#00f986>{money::%uuid of arg-1%} Money."

#Top 10 players wit most money
command /moneytop:
    aliases: /baltop, /balancetop
    trigger:

#Withdraw money
command /withdraw <integer>:
    trigger:
        if {money::%uuid of player%} is >= arg-1:
            remove arg-2 from {money::%uuid of player%}
            give player 1 paper named "<#00f986>%arg-1% ᴍᴏɴᴇʏ" with lore "&8ᴄᴀꜱʜ%nl%&f%nl%&c&l| &cɪɴꜰᴏʀᴍᴀᴛɪᴏɴ:%nl%&c&l| &fᴡᴏʀᴛʜ: <#00f986>%arg-1%%nl%&c&l| &fꜱᴇʟʟᴡᴀɴᴅ ᴄᴏᴍᴘᴀᴛᴀʙʟᴇ: &c:x:%nl% %nl%&7ʀɪɢʜᴛ-ᴄʟɪᴄᴋ ᴛᴏ ʀᴇᴅᴇᴇᴍ"
            send "<#00f986>&lMONEY &8→ &fYou made a banknote worth %arg-1%."
        else if {money::%uuid of player%} is < arg-1:
            send "<#00f986>&lMONEY &8→&cYou don't have enough money!"

#Give people your money
command /pay <offline player> <integer>:
    usage: &c&lERROR &8→ &f/pay <player> <ammount>
    trigger:
        if {money::%uuid of player%} is >= arg-2:
            remove arg-2 from {money::%uuid of player%}
            add arg-2 to {money::%uuid of arg-1%}
            send "<#00f986>&lMONEY &8→ &fSent <#00f986>%arg-2% &fto &c%arg-1%."
        else if {money::%uuid of player%} is < arg-2:
            send "<#00f986>&lMONEY &8→&cYou don't have enough money!"

#STAFF CMDS```
echo fractal
#

no "is"

#
#Stops the <none>
on join:
    if {money::%uuid of player%} is not set:
        set {money::%uuid of player%} to 0

#PLAYER CMDS
#Individual's balances
command /money <offline player>:
    aliases: /bal, /balance
    usage: &c&lERROR &8→ &f/money <player>
    trigger:
        if arg-1 is not set:
            send "<#00f986>&lMONEY &8→ You have <#00f986>{money::%uuid of player%} Money."
        else if arg-1 is set:
            send "<#00f986>&lMONEY &8→ %arg-1% has <#00f986>{money::%uuid of arg-1%} Money."

#Top 10 players wit most money
command /moneytop:
    aliases: /baltop, /balancetop
    trigger:

#Withdraw money
command /withdraw <integer>:
    trigger:
        if {money::%uuid of player%} >= arg-1:
            remove arg-2 from {money::%uuid of player%}
            give player 1 paper named "<#00f986>%arg-1% ᴍᴏɴᴇʏ" with lore "&8ᴄᴀꜱʜ%nl%&f%nl%&c&l| &cɪɴꜰᴏʀᴍᴀᴛɪᴏɴ:%nl%&c&l| &fᴡᴏʀᴛʜ: <#00f986>%arg-1%%nl%&c&l| &fꜱᴇʟʟᴡᴀɴᴅ ᴄᴏᴍᴘᴀᴛᴀʙʟᴇ: &c:x:%nl% %nl%&7ʀɪɢʜᴛ-ᴄʟɪᴄᴋ ᴛᴏ ʀᴇᴅᴇᴇᴍ"
            send "<#00f986>&lMONEY &8→ &fYou made a banknote worth %arg-1%."
        else if {money::%uuid of player%} < arg-1:
            send "<#00f986>&lMONEY &8→&cYou don't have enough money!"

#Give people your money
command /pay <offline player> <integer>:
    usage: &c&lERROR &8→ &f/pay <player> <ammount>
    trigger:
        if {money::%uuid of player%} >= arg-2:
            remove arg-2 from {money::%uuid of player%}
            add arg-2 to {money::%uuid of arg-1%}
            send "<#00f986>&lMONEY &8→ &fSent <#00f986>%arg-2% &fto &c%arg-1%."
        else if {money::%uuid of player%} < arg-2:
            send "<#00f986>&lMONEY &8→&cYou don't have enough money!"

#STAFF CMDS
#

If you want the user to use /money without entering the player ID, directly return the user's money

#

ahh

#

usage: &c&lERROR &8→ &f/money <player> should be deleted

#

and command /money <offline player>: change to command /money [<offline player>]:

#

and if you want to use a variable in a string, add %%

#

like send "<#00f986>&lMONEY &8→ You have <#00f986>%{money::%uuid of player%}% Money."

echo fractal
#

I've finished the baltop for you.

steel steppe
#

Tysm! I didnt think anyone would provide so much help!

echo fractal
#

suggest you look at it if you encounter difficulties.

#

||

command /moneytop:
    aliases: /baltop, /balancetop
    trigger:
        set {_money::top10_player::*} to sorted indices of {money::*} in descending order
        send "<#00f986>&lMONEY &8→Here is Top 10 players with most money"
        loop 10 times:
            set {_rank} to loop-value
            set {_player} to offlineplayer({_money::top10_player::%loop-value%})
            set {_money} to {money::%uuid of {_player}%}
            send "%{_rank}%. %{_player}% : %{_money}%" to player

||