Hi there, I'm making a pet skript, but I'm having a hard time with spawning the pets from the gui.
loop {petsejet::%player%::*}:
set {_petNBT} to loop-value
format slot {_i} of player with player head with nbt {_petNBT} to close then run [execute player command "/petspawn %{_petNBT}%"]
add 1 to {_i}
command /petspawn [<text>]:
trigger:
if arg-1 is set:
set {_petNBT} to arg-1
spawn armor stand at player with nbt "{Invisible:1,Small:1,NoGravity:1}"
set {_pet} to last spawned armor stand
set helmet of {_pet} to player head with nbt {_petNBT}
add {_pet} to {pets::%player's uuid%::*}
else:
send "&cIngen pet data fundet!"
Skript 2.6.4 in Minecraft 1.8