I am trying to Skript a /buy command so my players can easily access the shops, and I encountered an error.
What happens is that when players are in their inventory they are unable to move items around because of this skript. Does anyone know how to fix this?
What happens is that when players are in their inventory they are unable to move items around because of this skript. Does anyone know how to fix this?
Code:
command /buy:
permission: buy.buy
trigger:
set {buy} to chest inventory with 5 rows named "&3&lRanks"
set slot 0 of {buy} to white stained glass pane named " "
set slot 1 of {buy} to white stained glass pane named " "
set slot 2 of {buy} to white stained glass pane named " "
set slot 3 of {buy} to white stained glass pane named " "
set slot 4 of {buy} to white stained glass pane named " "
set slot 5 of {buy} to white stained glass pane named " "
set slot 6 of {buy} to white stained glass pane named " "
set slot 7 of {buy} to white stained glass pane named " "
set slot 8 of {buy} to white stained glass pane named " "
set slot 9 of {buy} to white stained glass pane named " "
set slot 10 of {buy} to lime concrete named "&a&lVIP Rank" with lore "&aClick for link in chat"
set slot 11 of {buy} to light blue concrete named "&b&lMVP Rank" with lore "&aClick for link in chat"
set slot 12 of {buy} to blue concrete named "&9&lTHOR Rank" with lore "&aClick for link in chat"
set slot 17 of {buy} to white stained glass pane named " "
set slot 18 of {buy} to white stained glass pane named " "
set slot 26 of {buy} to white stained glass pane named " "
set slot 27 of {buy} to white stained glass pane named " "
set slot 35 of {buy} to white stained glass pane named " "
set slot 36 of {buy} to white stained glass pane named " "
set slot 37 of {buy} to white stained glass pane named " "
set slot 38 of {buy} to white stained glass pane named " "
set slot 39 of {buy} to white stained glass pane named " "
set slot 40 of {buy} to white stained glass pane named " "
set slot 41 of {buy} to white stained glass pane named " "
set slot 42 of {buy} to white stained glass pane named " "
set slot 43 of {buy} to white stained glass pane named " "
set slot 44 of {buy} to white stained glass pane named " "
open {buy} to player
on inventory click:
if clicked slot in is 0:
cancel event
if clicked slot is 1:
cancel event
if clicked slot is 2:
cancel event
if clicked slot is 3:
cancel event
if clicked slot is 4:
cancel event
if clicked slot is 5:
cancel event
if clicked slot is 6:
cancel event
if clicked slot is 7:
cancel event
if clicked slot is 8:
cancel event
if clicked slot is 9:
cancel event
if clicked slot is 17:
cancel event
if clicked slot is 18:
cancel event
if clicked slot is 26:
cancel event
if clicked slot is 27:
cancel event
if clicked slot is 35:
cancel event
if clicked slot is 36:
cancel event
if clicked slot is 37:
cancel event
if clicked slot is 38:
cancel event
if clicked slot is 39:
cancel event
if clicked slot is 40:
cancel event
if clicked slot is 41:
cancel event
if clicked slot is 42:
cancel event
if clicked slot is 43:
cancel event
if clicked slot is 44:
cancel event