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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Drag & drop enchantments ?

Discussion in 'Requests' started by CrimZ0N, Sep 21, 2017.

  1. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Category: Requests

    Suggested name: Drag & drop enchantments

    What I want:
    What I am looking for is a drag and drop mechanic done via skript, example, a book named "Smelt I" once placed on a diamond pickaxe to add a lore to the pickaxe "Smelt I", found this code here but it didn't work for me for whatever reason (I have both SkMorkaz and Skript (benskus fork)

    http://prntscr.com/gnr8jt
    Code (Text):
    1.  
    2. on mor.inventory click:
    3.     event-item is any pickaxe or shovel or axe
    4.     player's cursor slot is enchanted_book:
    5.         name of player's cursor slot is "&fSmelt I":
    6.             cancel the event
    7.             set lore of event-item to "%lore of event-item%||&fSmelt I"
    8.             wait 2 ticks
    9.             set cursor slot of player to air
    10.  

    I tried stealing the code (quite literally, I wanted to use that and basically just, expand, I guess) but after testing it it didn't work out so im now stuck here asking for advice, it's literally copy pasted so I couldn'tve possibly done something wrong (I think ???)

    Anyone willing enough to donate to me a different code that does the same function or no not really? I quite need it honestly, so help would be appreciated.


    SkMorkaz version: 0.21
    Skript version: 2.2-dev31c

    Ideas for commands: None

    Ideas for permissions: None

    When I'd like it by: Within 2 months at most (Tho since its the Skript community in question this issue will be resolved in the next few days/week at most)
     
  2. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    errors?
     
  3. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    I didn't get any errors, ingame nor in console, therefore I'm asking if somebody could make me a new code as a replacement, for free, since this one isn't working and I have no idea of how to do it on my own.
     
  4. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Do you also have the exact same book

    Colorcode is important

    Code (Skript):
    1. command /book:
    2.  trigger:
    3.   give player 1 enchanted_book named "&fSmelt I"
    4.  
     
  5. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    I mean, I am not the best when it comes down to skript but yes, I did make sure I had the exact same color code and everything else...
     
  6. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Well lets do some debugging then.

    try this code and give me the outputs in chat.

    Code (Skript):
    1. on mor.inventory click:
    2.     message "1"
    3.     event-item is any pickaxe or shovel or axe
    4.     message "2 %event-item%"
    5.     player's cursor slot is enchanted_book:
    6.         message "3 %player's cursor slot%"
    7.         name of player's cursor slot is "&fSmelt I":
    8.             message "4 %name of player's cursor slot%"
    9.             cancel the event
    10.             set lore of event-item to "%lore of event-item%||&fSmelt I"
    11.             wait 2 ticks
    12.             set cursor slot of player to air
     
  7. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    This is what I got once I reloaded the skript
    http://prntscr.com/gny53c
    This is what I got once I tried drag & dropping the book onto the axe or axe onto the book
    http://prntscr.com/gny6kj
    This is the code I'm using to spawn the item (I also tried using Essentials' command /i daxe 1 name:&fSmelt_I alongside the command)
    http://prntscr.com/gny764

    Welp, ideas? It's obviously not recognizing the name of the item...
     
  8. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    can you give me the output again

    Code (Skript):
    1. on mor.inventory click:
    2.     message "%player's cursor slot%"
     
  9. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    This is what I got after adding that
    upload_2017-9-22_9-32-27.png
     
  10. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    you need to click with the book with smelt 1 on it
     
  11. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Video FINALLY finished uploading.

    I am clicking it with the book, this is what happens exactly. Maybe im using wrong versions or smth ??
     
  12. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    can you retry with

    Code (Skript):
    1. on mor.inventory click:
    2.     message "%clicked cursor%"
     
  13. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Now I got this error
    upload_2017-9-22_10-17-34.png
     
  14. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    and ?

    Code (Skript):
    1. on mor.inventory click:
    2.     message "%cursor item of player%"
     
  15. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Same as before... doesn't work. At all. Got a different code/idea?
     
  16. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    with the use of an other addon
     
  17. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Example?
     
  18. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Skellett
     
  19. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    This is my code, I have since then improved certain areas of this pm me if still interested.
     

Share This Page

Loading...