On rightclick with item

  • 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.

Jimsk

Member
Mar 13, 2020
21
1
3
23
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!"
 
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
 
I think that cocoa beans' item ID is actually "dye" or "ink sac". Try with both of them and it should work.
 
I think that cocoa beans' item ID is actually "dye" or "ink sac". Try with both of them and it should work.
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
mAlLAxc.png
 
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
mAlLAxc.png
hmm, i have vault and essentials, but someone told me /eco give works? can you try that for me
 
hmm, i have vault and essentials, but someone told me /eco give works? can you try that for me
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
 
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)
 
Last edited:
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)
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)
 
Problem is, i use a free server hosting (cos im poor) to use it, and it is the only version i can get...
 
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:
 
The problem is the event. It's not working anymore.

code_language.skript:
on rightclick:
    tool = cocoa bean:
        name of tool = ""...
 
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!"
Try
Code:
 on right click:
  if target block is cocoa beans:
    if player is holding a cocoa bean named "&cPoop":
      add 1 to player's balance
      send "&2Added 1$ to your balance!" to player
And if that doesn't work try replacing cocoa bean(s) with dye:3
 
Status
Not open for further replies.