Jump to content

Help me with this skript please


ninjea

Recommended Posts

Can someone tell me why this does not work

 

command /fortunemaxtest:
    permission: testshitplz
    trigger:
        set {_p} to player
        set {_uuid} to {_p}'s uuid
        set {_fortup} to grabNumberPlayerData({_p}, "fortup")
        set {_fortlvl} to grabNumberPlayerData({_p}, "fortlvl")
        set {_temp} to 0
        set {_var} to 50
        set {_cost} to 0
        set {_scost} to (({_fortup} + 1) * 500)
        set {_cost} to (({_fortup} + 10^{_var}) * 500)
        if {tokens::%{_uuid}%} < {_scost}:
            send "broke"
            stop
        else:
            loop {_var} times:
                while {tokens::%{_uuid}%} - {_cost} >= (({_fortup} + 10^{_var}) * 500):
                    add 10^{_var}*0.02 to {_fortup}
                    add 10^{_var} to {_temp}
                    add (({_fortlvl} + 10^{_var}) * 500) to {_cost}
                remove 1 from {_var}
            remove {_cost} from {tokens::%{_uuid}%}
            editPlayerData({_p}, "fortup", {_fortup})
            editPlayerData({_p}, "fortcost", 500 * grabNumberPlayerData({_p}, "fortup"))
            editPlayerData({_p}, "fortlvl", {_fortlvl}+{_temp})
            enchant1000({_p}, "fort")
            enchant100({_p}, "fort")
            enchant10({_p}, "fort")

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...