code_language.skript:
command /crate [<text>] [<text>]:
trigger:
if player's world is not "world":
message "&aYou must open crates from the hub!"
else:
if arg-1 is not set:
teleport player to location -19, 82, 56 in "world" parsed as world
message "&aClick a chest to purchase, or open crates!"
else:
if arg-1 is "buy":
message "Click here to buy crates on our store!"
else:
if arg-1 is "open":
if arg-2 is not set:
message "&aPlease use &6/crate open common &aor &6/crate open legendary"
else:
if arg-2 is "common":
wait 1 tick
set {crate.common.%player%} to value "Common" get of "plugins/crate/%player%.yml"
if {crate.common.%player%} parsed as integer > 0:
remove 1 from {crate.common.%player%}
set "Common" to "%{crate.common.%player%}%" in yaml file "plugins/crate/%player%.yml"
broadcast "%{crate.common.%player%}%"
set {chest.perm} to random element out of {common::reward::*}
else:
message "&cYou do not have a crate!"
Alright so nothing is subtracting. Also, set {crate.common.%player%} to {crate.common.%player%} - 1 just sets the value to -1, not the value -1. Very frusterated with this, haven't found a fix in over 2 hours. Using v8 fixes, nothing else lets my other skripts work properly. All of my other skripts allow values to be subtracted using "remove" as well as "set {var} to {var}-1. Any suggestins on how I can fix this?