#Vanilla Skript Guis not doing anything when I click on items.

1 messages · Page 1 of 1 (latest)

heavy kestrel
#

So I've made GUIs before using skript [not skript-gui], it works when I'm detecting index of the event-slot
like:

    if event-inventory = (metadata tag "ATM" of player):
        cancel event
        if index of event-slot is 2:```

However the past 2 days I've been setting up a GUI slightly different with unique slots per player coming from a list, the GUI opens and looks right, however if I click on slots with an item in nothing happens, [shown below] 
-# *If I click empty slots it does detect it tho using an else: send "c"*

```on inventory click:
    if event-inventory = (metadata tag "FMWaystone" of player):
        if event-item's lore contains "&9Click me":
            send "a"
            set {_n} to line 2 of event-item's lore
            replace all "&9ID&1: &8" in {_n} with ""
            execute console command "/waystonetp %player% %{_n} parsed as integer%"```
### No Errors get sent, the skript reloads/loads perfectly fine. However Issue still exists

Does anyone know where the issue for the 2nd bit of code is?

-# MC Ver: 1.21.4
-# Skript Ver: 2.12.1

-# Addons: 
-# - ~~SkRayFall v1.9.28~~
-# - skript-placeholders v1.7.0
-# - SkBee v3.11.2
-# - PoaSk v4.13.12

-# Dependencies:
-# - Vault v1.7.3-b131
-# - WorldGuard v7.0.13+82fdc65
novel cave
#

does it send a?

formal geyser
#

Skrayfall...

keen frost
#

Delete skrayfall

#

Also i think event-slot not event-item

heavy kestrel
novel cave
#

what does skript think the lore is

heavy kestrel
# keen frost Delete skrayfall

I literally have no clue what I have it for, i've stuck it on every server ive made since 2018 so its merely out of habit lol

heavy kestrel
keen frost
#

Debug. Broadcast it

novel cave
#

broadcast the lore

heavy kestrel
#

Lemme launch vanilla 1sec

#

and just so u know i have

            send "d"
            cancel event
            stop```

at the end, clicking items in the gui does not send d
#
    if event-inventory = (metadata tag "FMWaystone" of player):
        broadcast event-item's lore```

*clicks on item*

*nothing appears in chat*
#

My confusion is mainly from the fact, if i click on an item in gui- nothing happens. But if i click on empty slot, then smt happens

novel cave
#

try clicked item

#

instead of event item

heavy kestrel
# novel cave try clicked item

is does not understand the conditions

if lore of clicked-item contains "&9Click me":
if clicked-item's lore contains "&9Click me":
if clicked item's lore contains "&9Click me":```
#

cant have it be a set lore, set name, set item-type or set slot because of how im generating the items in the gui

#

only the set phrase within the lore

#

Checked Skript docs, 'Clicked item' is added with SkLib which I don't have

novel cave
#

are you sure the lore has that exactly, no other colors or anything

heavy kestrel
#

lore "&9Owner&1: &8%{FMWaystone::%loop-value-1%.Owner}%", "&9ID&1: &8%loop-value-1%", "" and "&9Click me"

that last line is the bit im detecting

novel cave
#

well have you broadcasted the lore of the clicked item/slot

heavy kestrel
#

ii've just changed it to slot, no errors, i click on empty slots i get '0 air' i click items and no text is sent

#

making it lore, same issue. click on items i get nothing, click on empty slots i get a message [the gap that one was sent shows with no text, which for an empty slot is correct

#

So the issue of if i click on an item nothing happens persists

heavy kestrel
heavy kestrel
#

So I've got it so this sends when i click slots, it shows alla that info however

#

You can probably hear YT in the background, my apologies

#

Same issue in diff worlds

heavy kestrel
#

SkRayFall has been removed yet the problem persists

marble estuary
#

@frank scarab @frank scarab

#

@frank scarab

#

@frank scarab

heavy kestrel
#

Ive still had 0 luck on it

heavy kestrel
#

I made it so the slots are retextured nether stars so i can always detect for event-slot = netherstar,
There is still nothing.

Even with debug on, it just doesnt detect me clicking it

heavy kestrel
#

One thing I have noticed, If i click on any of the items it doesnt let me pick them up.

Why is this weird?

I havent got cancel event in my skript

Why the frick frack isnt Inventory Click event happening

heavy kestrel
#

I've removed the skript [saved elsewhere]

and only kept

    permission: op
    trigger:
        set {_n} to 1
        set {_p} to player
        set {_r} to size of {FMWaystone.learned::%{_p}'s uuid%::*}
        set {_r4} to rounded up ({_r} + {_n}) / 54
        set {_r3} to 0
        set metadata tag "FMWaystone" of {_p} to chest inventory with 6 rows named "&3FMWaystones &7[&9%{_n}%&7/&9%{_r4}%&7]"
        loop {FMWaystone.learned::%{_p}'s uuid%::*}:
            if {_r3} <= 44:
                set {_r2} to {_r} - {_r3} - (54*({_n} - 1)) + 9*({_n} - 1)
                set {_t} to item model of {FMWaystone::%{_r2}%.Icon}
                set {_b} to nether star with name {FMWaystone::%{_r2}%.Name} with lore "&9Owner&1: &8%{FMWaystone::%{_r2}%.Owner}%" and "&9ID&1: &8%{_r2}%"
                set item model of {_b} to {_t}
                set {_t} to custom model data of {FMWaystone::%{_r2}%.Icon}
                set custom model data of {_b} to {_t} 
                set slot {_r3} of metadata tag "FMWaystone" of {_p} to {_b}
                set {_r3} to {_r3} + 1
            if {_n}/{_r4} is not 1:
                set slot 53 of metadata tag "FMWaystone" of {_p} to barrier block with name "&4Next Page" with lore "&8Page %{_n} + 1%"
            else:
                set slot 53 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 46 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 47 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 48 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 49 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 50 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 51 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        set slot 52 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        if {_n} >= 2:
            set slot 45 of metadata tag "FMWaystone" of {_p} to barrier block with name "&4Previous Page" with lore "&8Page %{_n} - 1%"
        else:
            set slot 45 of metadata tag "FMWaystone" of {_p} to black stained glass pane named "&0"
        open (metadata tag "FMWaystone" of {_p}) to {_p}```

When i click on items it gets cancelled.
#

checked all other skripts, none are canceling it

#

:I

#

the issue must be with that?

#

to ttest if its my server or other skripts

IN THE SAME FILE

I added

    description: The best way of doing something.
    trigger:
        set metadata tag "vanillaGUI" of player to chest inventory with 3 rows named "&7Hello There"
        set slot 0 of metadata tag "vanillaGUI" of player to stone named "&6General Kenobi"
        open (metadata tag "vanillaGUI" of player) to player```

I can take items out of this GUI
#

It's 100% the looped part Both the looped and unlooped parts create te same bug

#

but it is unavoidable todo what i need