1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Skript Issue - Cursor Slot Expressions

Discussion in 'Skript' started by GToTheG, Jun 14, 2018.

Tags:
Thread Status:
Not open for further replies.
  1. GToTheG

    GToTheG Member

    Joined:
    Jan 26, 2017
    Messages:
    35
    Likes Received:
    0
    Hello all.

    Following is a issue with skripts cursor slot expression:

    Code (Skript):
    1.  
    2. on inventory click:
    3.     if player's cursor slot is nether_star:
    4.         send "1"
    5.         if the lore of player's cursor slot contains coloured "&7whatever":
    6.             if clicked item is iron pickaxe:
    7.  
    It returns "cursor slot of olivervincent"

    If i did:

    Code (Skript):
    1. send "%clicked cursor%"
    It returns "nether_star".

    But the code does not registrer im clicking with a nether star in my inventory, it doesn send the "1".

    @LimeGlass
     
    #1 GToTheG, Jun 14, 2018
    Last edited: Jun 14, 2018
  2. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Code (Skript):
    1. on inventory click:
    2.     send "%clicked slot%" to player
    3.     if clicked item is nether_star:
    4.         send "1"
     
  3. GToTheG

    GToTheG Member

    Joined:
    Jan 26, 2017
    Messages:
    35
    Likes Received:
    0
    This is not what i'm trying to do with the skript.

    And this is a skript issue, that's why i posted it here.
     
  4. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Code (Skript):
    1. on inventory click:
    2.     send "You clicked on slot: %clicked slot%, %clicked item%" to player
    3.    
    4. on click:
    5.     send "You clicked on slot: %current hotbar slot of player%, %tool of player%" to player
    I have no clue what else you want.. Your issue is "But the code does not registrer im clicking with a nether star in my inventory, it doesn send the "1"." and i made code which registers it.. in your inventory and in your hand.. you can choose from there what you want..
    Or explain it more
     
  5. GToTheG

    GToTheG Member

    Joined:
    Jan 26, 2017
    Messages:
    35
    Likes Received:
    0

    I already have explained it for LimeGlass, he confirms it's a skript issue, and i should create a thread here about it.

    But to explain more about what the whole skript is about i was makeing. You are clicking with a item onto another item.

    Like:

    Code (Skript):
    1. on inventory click:
    2.     if player's cursor slot is nether_star:
    3.         send "1"
    4.         if the lore of player's cursor slot contains coloured "&7whatever":
    5.             if clicked item is iron pickaxe or iron tool or wooden tool or gold tool or diamond tool or stone tool or iron tool or leather armor or gold armor or iron armor or diamond armor:
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    if you do this it should work, or at least its working for me
    Code (Skript):
    1. on inventory click:
    2.     if clicked cursor is nether_star:
    3.         send "1"
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...