Solved On Right Click - Not working

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

JackyBoy

Member
Feb 4, 2017
104
1
18
Hey, there are no errors when I do this but it's not working when I right click on the item can someone please help me. Thanks.
code_language.skript:
on rightclick:
    if "%player's tool%" is "melon_seed":
        make console execute command "replaceitem entity %player% slot.weapon.mainhand pumpkin_seeds 1 0"
 
more info pls... Common
[doublepost=1516377644,1516377493][/doublepost]Tested and work for em
code_language.skript:
on rightclick:
    broadcast "%player's tool%"
    if player's tool is melon_seeds:
        broadcast "true"
        make console execute command "replaceitem entity %player% slot.weapon.mainhand pumpkin_seeds 1 0"
 
more info pls... Common
[doublepost=1516377644,1516377493][/doublepost]Tested and work for em
code_language.skript:
on rightclick:
    broadcast "%player's tool%"
    if player's tool is melon_seeds:
        broadcast "true"
        make console execute command "replaceitem entity %player% slot.weapon.mainhand pumpkin_seeds 1 0"
Alright, thanks it works. I was typing the wrong name in for it.
 
Yeah, This is why you should debugs evertime before posting next time :emoji_wink:
I was not sure how to debug. but I will do it from now on, also the melon seeds are still called pumpkin seeds when I click on it now, is there a way to fix that?
 
Its working fine for me

code_language.skript:
on rightclick:
    broadcast "%player's tool%"
    if player's tool is melon_seeds:
        broadcast "true"
    else:
        broadcast "its some difference seeds!"

upload_2018-1-19_17-15-7.png


Which version its your skript? (/ver skript) and server version?
 
more info pls... Common
[doublepost=1516377644,1516377493][/doublepost]Tested and work for em
code_language.skript:
on rightclick:
    broadcast "%player's tool%"
    if player's tool is melon_seeds:
        broadcast "true"
        make console execute command "replaceitem entity %player% slot.weapon.mainhand pumpkin_seeds 1 0"
Yeah, it works like that for me as well but when I add the replaceitem command it does not replace the melon back to pumpkin
 
Yeah, it works like that for me as well but when I add the replaceitem command it does not replace the melon back to pumpkin
Then use Skript version

code_language.skript:
on rightclick:
    broadcast "%player's tool%"
    if player's tool is melon_seeds:
        broadcast "true"
        set player's tool to pumpkin_seeds
    else:
        broadcast "its some difference seeds!"
 
Then use Skript version

code_language.skript:
on rightclick:
    broadcast "%player's tool%"
    if player's tool is melon_seeds:
        broadcast "true"
        set player's tool to pumpkin_seeds
    else:
        broadcast "its some difference seeds!"
Thanks but it still does not work, it will only work changing 1 of them and then thats it
 
code_language.skript:
set player's tool to (amount of player's tool) pumpkin_seeds
I am using this but it does not work
code_language.skript:
on rightclick:
    if player's tool is melon seeds:
        set player's tool to pumpkin_seeds
    else:
        broadcast "its some difference seeds!"

on rightclick:
    if player's tool is pumpkin seeds:
        set player's tool to melon_seeds
    else:
        broadcast "its some difference seeds!"
 
ohhh... then i understand wrong, you don't have to create a new events. You can below else

code_language.skript:
on rightclick:
    if player's tool is melon_seeds:
    
    else if player's tool is pumpkin_seeds:
    
    else if ....
 
ohhh... then i understand wrong, you don't have to create a new events. You can below else

code_language.skript:
on rightclick:
    if player's tool is melon_seeds:
   
    else if player's tool is pumpkin_seeds:
   
    else if ....
Alright, thanks so much for this. It seems to be working now. Thank you :emoji_slight_smile:
 
Status
Not open for further replies.