Info:
It gives me no errors when i reload the skript, the problem is i can send more keys than i have, and i can aslo send a key type that is'nt gold, iron, or diamond.
arg 1 is player
arg 2 is a number
arg 3 is a type (Iron,Gold,Diamond)
Variables:
{jern.pol.%player%}
{guld.pol.%player%}
{dia.pol.%player%}
Code
It gives me no errors when i reload the skript, the problem is i can send more keys than i have, and i can aslo send a key type that is'nt gold, iron, or diamond.
arg 1 is player
arg 2 is a number
arg 3 is a type (Iron,Gold,Diamond)
Variables:
{jern.pol.%player%}
{guld.pol.%player%}
{dia.pol.%player%}
Code
code_language.skript:
command /keypay [<offline player>] [<text>] [<text>]:
aliases: /kpay
trigger:
if arg 1 is set:
if arg 2 is set:
if arg 2 is greater than {%arg 3%.pol.%player%}:
send "&cFejl.. Du har ikke nok poletter, eller polet typen findes ikke!"
else:
if arg 3 is set:
add arg 2 to {%arg 3%.pol.%arg 1%}
remove arg 2 from {%arg 3%.pol.%player%}
send "&aSucess! Du har sendt %arg 2% %arg 3% poletter til %arg 1%" to player
send "&aDu har modtaget %arg 2% %arg 3% poletter fra %player%" to arg 1
else:
send "&cHusk hvilken slags key! &ee.x /kpay Hartvig 12 guld"
else:
send "&cHusk antal keys! &ee.x /kpay Hartvig 12 guld"
else:
send "&cHusk spillerens navn! &ee.x /kpay Hartvig 12 guld"