#Specific commands when clicking specific looped item in gui?

1 messages · Page 1 of 1 (latest)

urban coyote
#

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

#

The pet spawning is always the last looped value from the petsejet list

#

And i cant figure out how to fix it

mental briar
#

to close then run [...] is eitehr tuske or skquery syntax, both of which are very old, useless, and buggy addons