Click Event on an item with another 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.

AlfaLe0

Member
Mar 2, 2018
25
0
0
34
how to write the code for when you click on a item with an other item? like put a book on a sword and the enchant it... please help
 
I think is not what I asked...

In the player inventory you click an item and that you can move it... you move it on an other slot where there is an other item... like a sword... when you click on this sword with a book the sword become enchanted... how to do it? Please
I'm not sure if that possible but I know there are add-ons with effect to open and anvil
Or you can try something different I'm going to make a example
 
Ok... thanks
I'm not sure if that possible but I know there are add-ons with effect to open and anvil
Or you can try something different I'm going to make a example

Blaze powder click on a sword (wood, ston, iron or diamond)
The sword become enchanted with Fire Aspect... the blaze Powder disappear

Thanks
[doublepost=1522427750,1522427654][/doublepost]
I'm not sure if that possible but I know there are add-ons with effect to open and anvil
Or you can try something different I'm going to make a example
The thing that I asked is probably can be done with the Cursor click thinks
 
I'm not sure if that possible but I know there are add-ons with effect to open and anvil
Or you can try something different I'm going to make a example
code_language.skript:
on rightclick:
    if player is holding a book of sharpness 1:
        remove event-item
        add 1 to {book::sharpness1%player%}
        send "right click on a sword"
    else if player is holding any sword:
        if {book::sharpness1%player%} is more than or equal to 1:
            subtract 1 from {book::sharpness1%player%}
        remove 1 event-item from the player
        give a event-item to the player of sharpness 1
[doublepost=1522428100,1522428015][/doublepost]
code_language.skript:
on rightclick:
    if player is holding a book of sharpness 1:
        remove event-item
        add 1 to {book::sharpness1%player%}
        send "right click on a sword"
    else if player is holding any sword:
        if {book::sharpness1%player%} is more than or equal to 1:
            subtract 1 from {book::sharpness1%player%}
        remove 1 event-item from the player
        give a event-item to the player of sharpness 1
Is not test and is just and idea because I'm not Shure how to do it exactly like you said this is how I can help

I hope it's helps you
 
  • Like
Reactions: AlfaLe0
code_language.skript:
on rightclick:
    if player is holding a book of sharpness 1:
        remove event-item
        add 1 to {book::sharpness1%player%}
        send "right click on a sword"
    else if player is holding any sword:
        if {book::sharpness1%player%} is more than or equal to 1:
            subtract 1 from {book::sharpness1%player%}
        remove 1 event-item from the player
        give a event-item to the player of sharpness 1
[doublepost=1522428100,1522428015][/doublepost]
Is not test and is just and idea because I'm not Shure how to do it exactly like you said this is how I can help

I hope it's helps you
Yes thanks... if some other know the way that I have said before Thanks
 
Status
Not open for further replies.