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.

On rightclick broken

Discussion in 'Skript' started by Selvati, Aug 28, 2017.

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

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    Hello, forget the format, I need multiple ways to write the event "on rightclick". This simple vanilla skript event is broken for me, I need to be able to test for the items name and lore, the following way does not work, please leave suggestions, or alternate methods below. "On rightclick: | if player is holding enchanted book named "Name" with lore "Lore":" does not work
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    I don't forget the format. Like, cmonBruh.

    Also, how is it broken ? Does it error ? Does it throw an internal error ? Does it just do nothing ? You guys are fucking stupid to think that helpers can read minds just because they're helpers. You know, if you used the help format, I probably would have come up with a fix, but no, it's too hard for you....
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Sytst>3cms Then don't reply wasting people's time nagging and being hostile.

    @Selvati When you test for items in any event it's better to separate the condition testings for it. Such as:
    Code (Skript):
    1. on right click with book:
    2.     if player's tool is enchanted:
    3.         if name of player's tool is "Name":
    4.             if lore of player's tool is "Lore":
    5.                 #do your magic
    And if the rightclick event is broken for you, it must be something with the condition testing. Try debugging it by adding some broadcasts in to make sure everything broadcasts:
    Code (Skript):
    1. on right click with book:
    2.     broadcast "Testing 1"
    3.     if player's tool is enchanted:
    4.         broadcast "Testing 2"
    5.         if name of player's tool is "Name":
    6.             broadcast "Testing 3"
    7.             if lore of player's tool is "Lore":
    8.                 broadcast "Testing 4"
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Well, you aren't wrong at all but you went too far away calling people "fucking stupid", I get that it's pretty annoying when someone requests help without giving the proper information but being hostile will not make any difference.

    Now, regarding the OP's issue, pretty sure @LimeGlass is correct, if it "doesn't work" it may be due to a condition not being met, I also don't recommend using the is holding condition as I never got it to work properly, but that's just me.
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    I wasn't talking to the guy in particular, but yeah, I just let out what I felt, and as you know, I don't go in for half measures.
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    I said "forget format" because this does not really Require any information, except what i said, my previous posts stressed that all my addons were acting wack and vanilla skript was broken. For everyone else that was polite and actually replied to help out, I did try to do broadcasts, they didn't work so I am going to give LimeGlass's basic skript post a try, by downloading his recommended skript for 1.8 and see if that will fix it. Btw no console errors on load of skripts, just doesn't work because of skript.
    --- Double Post Merged, Aug 28, 2017, Original Post Date: Aug 28, 2017 ---
    Did everything recommended and even downloaded the recommended 1.8 versions from Lime's Skript tutorial, still nothing.... no errors, just actually none of my skripts load now :emoji_frowning:
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Does any other events work?
    If you disable all plugins except Skript and its addons, does "on rightclick:" still not work?
    If you disable everything except Skript, does "on rightclick:" still not work?
    If the last two questions does not trigger the event, then I have absolutely no idea what's causing it to not work...
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Send your console log or pm me it and did you try mirre's Skript edit. That's the good one.
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    I will upload my console log tomorrow and yes i tried both, i forget which one, but one completely broke my server lol.
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    The name stuff is not working with books, but you can check the "name" of the book using title instead of name:
    Code (Skript):
    1. function frbook(pfr: player):
    2.     loop items in {_pfr}'s inventory:
    3.         if loop-item is written book:
    4.             if title of loop-item is "{@title}":
    5.                 remove loop-item from {_pfr}'s inventory
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    So instead of using this complicated shtuff you wrote, I could just replace name in my files with title? I'll give it a try soo, thanks everyone for your help! .-.
    --- Double Post Merged, Aug 30, 2017, Original Post Date: Aug 30, 2017 ---
    If you could write this into my needed format that would be great, I tried changing things, still doesn't work, ( on right click of 403/enchanted book, test for name and lore, do stuff )
    --- Double Post Merged, Aug 30, 2017 ---
    https://pastebin.com/fVk1UxyH
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    This is working for me:

    Code (Skript):
    1. on right click with enchanted book:
    2.     if name of event-item is "TITLE":
    3.         message "%lore of event-item%"
    4.         message "%name of event-item%"
    5. command /enchbook:
    6.     trigger:
    7.         add 1 enchanted book named "TITLE" with lore "hallo" to player's inventory
     
    Selvati likes this.
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Ok thank you, I'm not home at the moment, but if this doesn't work I will accept defeat and rewrite all of my skript with some supported addons. Will try later, thanks! ❤️
    --- Double Post Merged, Aug 31, 2017, Original Post Date: Aug 30, 2017 ---
    This does not work for me
    --- Double Post Merged, Aug 31, 2017 ---
    I changed skript version, and now your code works, did the exact same thing in my code, won't work... kms
    --- Double Post Merged, Aug 31, 2017 ---
    I found out that apparently my file had too many lines, and skript was lazy and broke? So I split my code into multiple files and parts were broken... skript and addons still in some cases don't want to understand simple events.
    --- Double Post Merged, Aug 31, 2017 ---
    I would really appreciate it if someone would just link skquery, skript, sharpsk, and umbaska that all have no conflicts. Tanks
     
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Doubt there is any stable Umbaska versions. Hell, you'd be lucky if you found one that doesn't break anything. But, you probably won't so you're probably out of luck for Umbaska.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...