Problem on skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

KAVKAZIE

Active Member
Feb 27, 2017
146
0
16
Hey, I have a problem when I spam click on blocks i disabled the event its still opening them.
Using 1.16.5 version
Code:
on right click on cauldron or loom or barrel or daylight detector or cake or flower pot or enchanting table or furnace or repeater or any door or any trapdoor or lever or any minecart or any button or any bed or dispenser or dropper or note block or any fence gate or dragon egg or hopper or anvil or chest or trapped chest or beacon:
    if player's world is "world" or "PvP" or "Mining" or "Mine1" or "Mine2" or "Mine3" or "Mine4":
        if player's gamemode is creative:
            stop
        else:
            cancel event
[doublepost=1615821090,1615495053][/doublepost]up
 
just a minor improvement in your skript, instead of doing
Code:
if player's gamemode is creative:
            stop
        else:
            cancel event
you could do
Code:
 if player's gamemode isn't creative:
            cancel event
 
just a minor improvement in your skript, instead of doing
Code:
if player's gamemode is creative:
            stop
        else:
            cancel event
you could do
Code:
 if player's gamemode isn't creative:
            cancel event
now its works better but still when u click fast with the item on blocks its still gltiches
 
now its works better but still when u click fast with the item on blocks its still gltiches
okay, then just for testing purposes, on the first line, instead of checking for all those blocks, just check for 1 block and see if the issue still persists. My thinking is, that you are simply checking for way to many things in 1 event, but I could be wrong
 
okay, then just for testing purposes, on the first line, instead of checking for all those blocks, just check for 1 block and see if the issue still persists. My thinking is, that you are simply checking for way to many things in 1 event, but I could be wrong
can u send me an example code pleease ?
 
can u send me an example code pleease ?
Code:
on right click on furnace:
    if player's gamemode isn't creative:
        cancel event
this should cancel when clicking on a furnace, even when clicking very fast
 
Code:
on right click on furnace:
    if player's gamemode isn't creative:
        cancel event
this should cancel when clicking on a furnace, even when clicking very fast
I mean I changed the right click on blocks to another skript and its works good but i talked about right clicking items like snowballs fishing rod..
 
I mean I changed the right click on blocks to another skript and its works good but i talked about right clicking items like snowballs fishing rod..
could you then be very specific in what you would like the code to do?
 
this is what i was talking about
Code:
on right click with bow or fishing rod or snowball or egg or ender pearl or splash potion or lingering potion or trident or crossbow:
    if player's world is "world" or "Mining" or "Mine1" or "Mine2" or "Mine3" or "Mine4":
        if player's gamemode isn't creative:
            cancel event
 
this is what i was talking about
Code:
on right click with bow or fishing rod or snowball or egg or ender pearl or splash potion or lingering potion or trident or crossbow:
    if player's world is "world" or "Mining" or "Mine1" or "Mine2" or "Mine3" or "Mine4":
        if player's gamemode isn't creative:
            cancel event
Okay, this is a very simplified version of that skript, to see if you are checking for too many things. See if it cancels out every time you throw a snowball, even when doing it really fast.
Code:
on right click with a snowball:
    if player's gamemode isn't creative:
        cancel event
 
Okay, this is a very simplified version of that skript, to see if you are checking for too many things. See if it cancels out every time you throw a snowball, even when doing it really fast.
Code:
on right click with a snowball:
    if player's gamemode isn't creative:
        cancel event
still happen
 
this is what i was talking about
Code:
on right click with bow or fishing rod or snowball or egg or ender pearl or splash potion or lingering potion or trident or crossbow:
    if player's world is "world" or "Mining" or "Mine1" or "Mine2" or "Mine3" or "Mine4":
        if player's gamemode isn't creative:
            cancel event
From what I understood, do you want to make the event cancel when throwing, for example, a snowball?

In these case, then dont use on right click event to cancel them. Just do this

code_language.skript:
on shoot:
    projectile is an snowball or enderpearl
    shooter's gamemode isn't creative:
        cancel event
 
From what I understood, do you want to make the event cancel when throwing, for example, a snowball?

In these case, then dont use on right click event to cancel them. Just do this

code_language.skript:
on shoot:
    projectile is an snowball or enderpearl
    shooter's gamemode isn't creative:
        cancel event
works good on shoot event thanks.
 
Status
Not open for further replies.