gem

Discussion in 'Skript' started by FrickMyLife, Jul 10, 2018.

  1. Hi, I big time need help Ive tried to do it it failed. I deleted it all please help me remake a gem script

    Discord Ninja#4457
     
  2. please provide more details
     
  3. I am trying to make a gem script where if they do /gems it will show them there gems and if you do /gems adminsend it will give them gems and if I do /gems send it will take away from mine and give them.
     
  4. Two

    Two

    Something like this?
    Code (Text):
    command gems [<text>] [<player>] [<integer>]:
        permission: gems
        trigger:
            if {gems::balanace::%uuid of player%} is not set:
                set {gems::balanace::%uuid of player%} to 0
            if arg-1 is not set:
                message "&aYou have %{gems::balanace::%uuid of player%}% gems"
                stop
            else:
                if "%arg-1%" is not "send" or "adminsend":
                    message "&cUsage: &e/gems (send/adminsend) (player) (amount)"
                    stop
                if arg-3 is not set:
                    message "&cUsage: &e/gems (send/adminsend) (player) (amount)"
                    stop
                if arg-1 is "send":
                    if arg-3 > {gems::balanace::%uuid of player%}:
                        message "&cYou don't have enough gems"
                        stop
                    set {_p} to arg-3 parsed as a player
                    subtract arg-3 from {gems::balanace::%uuid of player%}
                    add arg-3 to {gems::balanace::%{_p}'s uuid%}
                    message "&aYou sent %arg-3% gems to %arg-2%, your new balance is %{gems::balanace::%uuid of player%}%"
                    send "&a%player% sent you %arg-3% gems, your new balanace is %{gems::balanace::%{_p}'s uuid%}%" to {_p}
                    stop
                if arg-1 is "adminsend":
                    if player doesn't have permission "gems.admin":
                        message "&cYou do not have permission to do that"
                        stop
                    set {_p} to arg-3 parsed as a player
                    add arg-3 to {gems::balanace::%{_p}'s uuid%}
                    message "&aSuccessfully sent %arg-3% gems to %arg-2%"
                    send "&a%player% sent you %arg-3% gems, your new balanace is %{gems::balanace::%{_p}'s uuid%}%" to {_p}
     
  5. Yes is that custom?
     
  6. Two

    Two

    I'm not entirely sure what you mean, but that's a slightly edited version of a skript that I made months ago.