SolvedUnstealable slots are stealable

Status
Not open for further replies.

math0898

Member
Skript Version: 2.5.3
Server Version: 1.16.5
Problem Code:
Code:
``````function fill(user:player, slots:number, filler:item = gray stained glass pane):
set name of {_filler} to " "
set {_i} to 0
while {_i} is less than {_slots}:
format slot {_i} of {_user} with {_filler} to be unstealable

command /questlog <text="none">:
aliases: /quests
permission: skript.rpg.questlog
trigger:
wait 0.1 seconds
if arg-1 is "none":
open chest with 3 rows named "Quest Log" to player
fill(player, 27)

set {_abyss faction} to an eye of ender named "&8[&2Abyss Faction&8]"
set the 1st line of lore of {_abyss faction} to "&7Information about standing and quests"
set the 2nd line of lore of {_abyss faction} to "&7completed for the Abyss faction."

set {_elemental faction} to blaze powder named "&8[&2Elemental Faction&8]"
set the 1st line of lore of {_elemental faction} to "&4Coming soon."

format slot 10 of player with {_abyss faction} to close then run [execute player command "/questlog abyss"]
set slot 12 of player's current inventory to {_elemental faction}

else if arg-1 is "abyss":
open chest with 3 rows named "Abyss Faction" to player
fill(player, 27)

set {_reputation} to a emerald named "&8[&dReputation&8]&7 %{rpg.%uuid of player%.abyss.reputation}%"
set {_go back} to a arrow named "&8<- &7Go Back"

set slot 22 of player's current inventory to {_reputation}
format slot 26 of player with {_go back} to close then run [execute player command "/questlog"]
else:
send "unkown param" to player``````
Problem Behavior: No errors but when opening a second UI from the first, either main -> Abyss Faction or Abyss Faction -> main the items are stealable despite using the same fill() function. The first opened section the items are correctly not stealable.
Troubleshooting: I've tried commenting out all lines except fill(player,27) under the abyss faction to the same result as well as adding a separate function to run through and lock all the items after fill() runs which resulted in the same behavior.
Docs?: There is a little information on format gui from SkUnity and SkriptHub but nothing specific on stealable which I believe my issue here is with.
Have you searched the forums?: A little bit. Most solutions involve switching off of SkQuery to Tusuke because 'GUI's are buggy in SkQuery' but I'm not sure if this will cause issues with existing code.
[doublepost=1621400076,1621399940][/doublepost]
Skript Version: 2.5.3
Server Version: 1.16.5
Problem Code:
Code:
``````function fill(user:player, slots:number, filler:item = gray stained glass pane):
set name of {_filler} to " "
set {_i} to 0
while {_i} is less than {_slots}:
format slot {_i} of {_user} with {_filler} to be unstealable

command /questlog <text="none">:
aliases: /quests
permission: skript.rpg.questlog
trigger:
wait 0.1 seconds
if arg-1 is "none":
open chest with 3 rows named "Quest Log" to player
fill(player, 27)

set {_abyss faction} to an eye of ender named "&8[&2Abyss Faction&8]"
set the 1st line of lore of {_abyss faction} to "&7Information about standing and quests"
set the 2nd line of lore of {_abyss faction} to "&7completed for the Abyss faction."

set {_elemental faction} to blaze powder named "&8[&2Elemental Faction&8]"
set the 1st line of lore of {_elemental faction} to "&4Coming soon."

format slot 10 of player with {_abyss faction} to close then run [execute player command "/questlog abyss"]
set slot 12 of player's current inventory to {_elemental faction}

else if arg-1 is "abyss":
open chest with 3 rows named "Abyss Faction" to player
fill(player, 27)

set {_reputation} to a emerald named "&8[&dReputation&8]&7 %{rpg.%uuid of player%.abyss.reputation}%"
set {_go back} to a arrow named "&8<- &7Go Back"

set slot 22 of player's current inventory to {_reputation}
format slot 26 of player with {_go back} to close then run [execute player command "/questlog"]
else:
send "unkown param" to player``````
Problem Behavior: No errors but when opening a second UI from the first, either main -> Abyss Faction or Abyss Faction -> main the items are stealable despite using the same fill() function. The first opened section the items are correctly not stealable. The links to other UI also don't work.