#Annoying inventory click

1 messages · Page 1 of 1 (latest)

halcyon moss
#

Example:

  if name of event-inventory contains "Test":
    if event-slot = 1:
      cancel event```
That works... but also stops players from clicking on slot 1 of _their_ inventory, not just the GUI one. Any idea how to fix that? (Oh also, if they spam click they can still steal items. Any fix for that?)
tawdry skiff
#

spam clicking shouldn't steal items prob just a visual glitch

#

maybe change contains to is tho

wispy girder
#

you are checking the name, it should only work in that inventory.

wispy girder
#

and pull out the cancel event; that way you dont have to put it under all the slots

#
  cancel event
  #click code
else if index of event slot = 2:
  cancel event
  #other click code
else if index of event-slot = 124:
  cancel event
  #more click code

#versus

cancel event
if index of event slot = 1:
  #click code
else if index of event slot = 2:
  #other click code
else if index of event-slot = 124:
  #more click code```
halcyon moss
#
    if name of event-inventory contains "&aCrafting Table":
        loop 10 times:
            if event-slot = loop-value -1:
                if name of event-inventory contains "Crafting Table":
                    cancel event
        loop 6 times:
            if event-slot = loop-value +12:
                if name of event-inventory contains "Crafting Table":
                    cancel event
        if event-slot = 22:
            cancel event
        loop 4 times:
            if event-slot = 23 + loop-value:
                cancel event
        loop 14 times:
            if event-slot = 30 + loop-value:
                cancel event```
wispy girder
#

Why are you looping..

#

Just (integers between a and b) contains event-slot

halcyon moss
#

that will be so much easier

wispy girder
#

you can also use (integers between 0 and 10), (integers between 20 and 24), and (integers between 45 and 52) contains ....

#

that way you can cancel multiple sections at once