Help

  • 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 community!

    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.

ErkS

Member
Dec 24, 2017
40
0
6
How i can fix it? When player have this armour and hand and don't have lvl5 event will cancel but when player switch item on other slot and equip nothing happend
code_language.skript:
on armor equip:
    if level of player is less than 6:
        if name of tool of player is "&4&lPavucie nohavice":
            play "ENTITY_ARMORSTAND_BREAK" to player at volume 100
            send "&e&lHAP> &c&lNemas dostatocny XP LVL! &fPre pouzitie &e&lpotrebujes&f aspon &a&llvl 6&f!"
            cancel event
 
What do you mean by "when player switch item on other slot and equip"?
I loaded this on to my server and switching off and back onto the item does not enable it to be equipped if the level is less than 5.
 
aah I see. Oddly, it still cancels for me, but the armor just disappears. I got it to stop with a click event though:
code_language.skript:
on armor equip:
    if level of player is less than 6:
        if name of tool of player is "test":
            send "&e&lHAP> &c&lNemas dostatocny XP LVL! &fPre pouzitie &e&lpotrebujes&f aspon &a&llvl 6&f!"
            cancel event
       

on inventory click:
    if "%clicked slot%" = "36", "37", "38" or "39":
        if level of player is less than 6:
            if name of clicked cursor is "test":
                cancel event
**Edit: The variable wasn't necessary. just edited the cursor name condition!
 
Last edited:
code_language.skript:
on inventory click:
    if "%clicked slot%" = "9", "10", "11" or "12":
        if level of player is less than 6:
            if name of clicked cursor is "&4&lPavucie topanky":
                cancel event

4 errors can't understand event and more...
 
code_language.skript:
on inventory click:
    if "%clicked slot%" = "9", "10", "11" or "12":
        if level of player is less than 6:
            if name of clicked cursor is "&4&lPavucie topanky":
                cancel event

4 errors can't understand event and more...
That requires at least skellet.
 
I have skellet but still 4 errors
[doublepost=1516746157,1516746067][/doublepost]I have skript wildskript skellet tuske sklib skuniversali skquery umbaska
 
I have skellet but still 4 errors
[doublepost=1516746157,1516746067][/doublepost]I have skript wildskript skellet tuske sklib skuniversali skquery umbaska
The docs say Umbaska will conflict with Skellet's click events and expressions. You'll have to use Umbaska's expressions at least for the cursor item. There's likely more conflicts between the two.
841fddabd6.png
 
Can't understand event
if "%clicked slot%" = "9", "10", "11" or "12":
if name of clicked cursor is "&4&lPavucie topanky":
and empty configuration
 
Can't understand event
if "%clicked slot%" = "9", "10", "11" or "12":
if name of clicked cursor is "&4&lPavucie topanky":
and empty configuration
The only thing I can think of is a conflict with another addon you have. Potentially sklib as it also has a clicked slot expression.
The if statement shouldnt be an event, you have the on inventory click event first in the code right?
 
Yes i will remove sklib
[doublepost=1516747666,1516747493][/doublepost]I removed sklib and skuniversali but still 4 errors
 
Status
Not open for further replies.