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 with item

Discussion in 'Skript' started by Jimsk, Mar 22, 2020.

Thread Status:
Not open for further replies.
  1. Jimsk

    Jimsk Member

    Joined:
    Mar 13, 2020
    Messages:
    21
    Likes Received:
    1
    I've been trying to make it so that when you right click on a cocoa bean it adds $1 to your balance, but it doesnt seem to work, could someone help?

    on rightclick with cocoa beans:
    if name of tool of player is "&cPoop":
    add 1 to player's balance
    send "&2Added 1 to your balance!"
     
  2. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Do you have an economy plugin? You'll need one. What errors is it giving you? Make sure you provide as much information as possible when posting
     
  3. Nikola

    Nikola Member

    Joined:
    Jul 10, 2019
    Messages:
    38
    Likes Received:
    1
    I think that cocoa beans' item ID is actually "dye" or "ink sac". Try with both of them and it should work.
     
  4. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    No the cocoa beans aren't the issue, that alias for the item works fine. But you do need an economy plugin and vault for the money expression to work. His code works just fine for me
    [​IMG]
     
  5. Jimsk

    Jimsk Member

    Joined:
    Mar 13, 2020
    Messages:
    21
    Likes Received:
    1
    hmm, i have vault and essentials, but someone told me /eco give works? can you try that for me
     
  6. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Yeah it'll work if you have it execute the command, but again, what errors are you getting? With vault and essentials and your exact code it works for me so whether its working for me doesn't help you. so it has to be something else and the errors it gives you will help point in the right direction. probably something plugin or version related
     
  7. Jimsk

    Jimsk Member

    Joined:
    Mar 13, 2020
    Messages:
    21
    Likes Received:
    1
    it could be skript version, i believe mine is version 2.4.1 (my vault version is 1.7.2 and my essentials version is 2.17.1.62 if that is necessary)
     
    #7 Jimsk, Mar 23, 2020
    Last edited: Mar 23, 2020
  8. Nikola

    Nikola Member

    Joined:
    Jul 10, 2019
    Messages:
    38
    Likes Received:
    1
    I use the same version, and it doesn't work for me. Try using other version (do not downgrade it too much because it's unstable)
     
  9. Jimsk

    Jimsk Member

    Joined:
    Mar 13, 2020
    Messages:
    21
    Likes Received:
    1
    Problem is, i use a free server hosting (cos im poor) to use it, and it is the only version i can get...
     
  10. Nikola

    Nikola Member

    Joined:
    Jul 10, 2019
    Messages:
    38
    Likes Received:
    1
    I recommend you not to use MineHut or something that doesn't allow you direct access to your files. The difference between that "hosting" and hosting which allows you to upload files is BIG. If you can't get anything better, work on localhost server (Download NGROK if you want to allow others to join) and thats it. Then you'll be able to change your Skript version and get better at scripting! :emoji_slight_smile:
     
  11. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    The problem is the event. It's not working anymore.

    Code (Skript):
    1.  
    2. on rightclick:
    3.     tool = cocoa bean:
    4.         name of tool = ""...
     
  12. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    5
    Try
    Code (Text):
    1.  on right click:
    2.   if target block is cocoa beans:
    3.     if player is holding a cocoa bean named "&cPoop":
    4.       add 1 to player's balance
    5.       send "&2Added 1$ to your balance!" to player
    And if that doesn't work try replacing cocoa bean(s) with dye:3
     
Thread Status:
Not open for further replies.

Share This Page

Loading...