if entity's name is "Test":
set {Testgui} to a new chest inventory with 3 rows named "&7test"
set slot intergers from 0 to 26 of {Testgui} to grey stained glass pane with name " "
set slot 11 of {Testgui} to wooden axe with name "&6Tools"
set slot 13 of {Testgui} to Leather Chestplate with name "&6Armor"
set slot 12 of {Testgui} to oak log with name "&6Compressor"
open {Testgui} to player
on inventory click:
if name of event-inventory is "&6tools":
if event-slot if 11:```
#Npc shop
1 messages · Page 1 of 1 (latest)
- if you're going to define the GUI each time, might as well make it a local variable
- you define
{Testgui}'s nameas"&7test", but check for"&6tools" - the
event-slotis the item within the slot, not it's position. that is theindex of event-slot. you should use:
event-slot = 1 of wooden axe named ...index of event-slot = 11
can you says that like if you were talking to a big idiot
cuz idk most of these skript terms
- change
{Testgui}to{_Testgui}
- this makes it a local variable, that way it doesn't take up storage space when you're not using it (https://x8ight.gitbook.io/syntask/storage/variables)
- the name you set the gui up with, and the name you check for
on inventory click:are different. - if you click on the wooden axe in slot 11,
event-slotwill not be equal to11, but the wooden axe.
yup
its saying i ahve an error
if entity's name is "Test":
set {_Testgui} to a new chest inventory with 3 rows named "&7test"
set slot intergers from 0 to 26 of {_Testgui} to grey stained glass pane with name " "
set slot 11 of {_Testgui} to wooden axe with name "&6Tools"
set slot 13 of {_Testgui} to Leather Chestplate with name "&6Armor"
set slot 12 of {_Testgui} to oak log with name "&6Compressor"
open {_Testgui} to player
on inventory click:
if name of event-inventory is "&6tools":
if event-slot is 11:```
line 4
cant understant the effect/Condition
intergers?
so i keep it ?
read it closely
they both spelled the same tho
mhmm
broadcast "event registered"
if condition:
broadcast "if statement passed"```
oh
after your event, i want you to broadcast.
after your if statement, i want you to broadcast
so we can see if those sections of code are being run
okay
if entity's name is "test":
set {_Testgui} to a new chest inventory with 3 rows named "&7test"
set slot integers from 0 to 26 of {_Testgui} to grey stained glass pane with name " "
set slot 11 of {_Testgui} to wooden axe with name "&6Tools"
set slot 13 of {_Testgui} to Leather Chestplate with name "&6Armor"
set slot 12 of {_Testgui} to oak log with name "&6Compressor"
open {_Testgui} to player
on event:
broadcast "event registered"```
nothing is sent in chat
the skript is not working it seems like
no
broadcast after your right-click on entity event
and after your if entity's name = "test"...
on event:
broadcast "event registered"
if entity's name is "test":
set {_Testgui} to a new chest inventory with 3 rows named "&7test"
set slot integers from 0 to 26 of {_Testgui} to grey stained glass pane with name " "
set slot 11 of {_Testgui} to wooden axe with name "&6Tools"
set slot 13 of {_Testgui} to Leather Chestplate with name "&6Armor"
set slot 12 of {_Testgui} to oak log with name "&6Compressor"
open {_Testgui} to player```
...
I KNOW I SUCK
broadcast "right-clicked on entity"
if entity's name is "test":
broadcast "name is test"```
oohh
it dont work