hey guys,
im currently working on a skript where you can send spawners to a virtual moneyfarm, thats all you need to know.
I need help cause if I have for example 10 spawners in my virtual moneyfarm and I want to withdraw spawners to trade them with players theres a problem with rounding up and rounding up.
Example:
If I type the command /ams withdraw 1.5 then I get only 1 spawner and 1 spawner gets removed but in chat there stands "You got 2 spawners"
This is the skript:
im currently working on a skript where you can send spawners to a virtual moneyfarm, thats all you need to know.
I need help cause if I have for example 10 spawners in my virtual moneyfarm and I want to withdraw spawners to trade them with players theres a problem with rounding up and rounding up.
Example:
If I type the command /ams withdraw 1.5 then I get only 1 spawner and 1 spawner gets removed but in chat there stands "You got 2 spawners"
This is the skript:
JavaScript:
if arg 1 is "withdraw":
if arg 2 is greater than or equal to 1:
if {spawner.%player%} is more than 0:
{spawner.%player%} is greater than or equal to arg 2:
if arg 2 is a number:
remove arg-2 from {spawner.%player%}
add arg-2 of mob spawner to player's inventory
send "&6&lHydopia&c&lAMS &8» &7You &asuccessfully&7 withdrawed &e%arg-2%&b Spawner&7(&bs&7) from your &4AMS&7 into your &eInventory&8."
stop
else:
send "&6&lHydopia&c&lAMS &8» &7You can only withdraw &enatural numbers &7(&e1&7, &e2&7, &e3...&7) from your &4AMS&8."
stop
else:
send "&6&lHydopia&c&lAMS &8» &7You don't have &e%arg-2%&b Spawner&7(&bs&7) in your &4AMS&8."
stop
else:
send "&6&lHydopia&c&lAMS &8» &7You don't have &bSpawners &7in your &4AMS&8."
else:
send "&6&lHydopia&c&lAMS &8» &e%arg-2%&7 is not a valid Amount of&b Spawners&8."