Drag & drop enchantments ?

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

CrimZ0N

Member
Jan 28, 2017
56
3
8
24
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:
on mor.inventory click:
    event-item is any pickaxe or shovel or axe
    player's cursor slot is enchanted_book:
        name of player's cursor slot is "&fSmelt I":
            cancel the event
            set lore of event-item to "%lore of event-item%||&fSmelt I"
            wait 2 ticks
            set cursor slot of player to air

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)
 
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:
on mor.inventory click:
    event-item is any pickaxe or shovel or axe
    player's cursor slot is enchanted_book:
        name of player's cursor slot is "&fSmelt I":
            cancel the event
            set lore of event-item to "%lore of event-item%||&fSmelt I"
            wait 2 ticks
            set cursor slot of player to air

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)

errors?
 
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.

Do you also have the exact same book

Colorcode is important

code_language.skript:
command /book:
 trigger:
  give player 1 enchanted_book named "&fSmelt I"
 
Do you also have the exact same book

Colorcode is important

code_language.skript:
command /book:
 trigger:
  give player 1 enchanted_book named "&fSmelt I"

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

Well lets do some debugging then.

try this code and give me the outputs in chat.

code_language.skript:
on mor.inventory click:
    message "1"
    event-item is any pickaxe or shovel or axe
    message "2 %event-item%"
    player's cursor slot is enchanted_book:
        message "3 %player's cursor slot%"
        name of player's cursor slot is "&fSmelt I":
            message "4 %name of player's cursor slot%"
            cancel the event
            set lore of event-item to "%lore of event-item%||&fSmelt I"
            wait 2 ticks
            set cursor slot of player to air
 
Well lets do some debugging then.

try this code and give me the outputs in chat.

code_language.skript:
on mor.inventory click:
    message "1"
    event-item is any pickaxe or shovel or axe
    message "2 %event-item%"
    player's cursor slot is enchanted_book:
        message "3 %player's cursor slot%"
        name of player's cursor slot is "&fSmelt I":
            message "4 %name of player's cursor slot%"
            cancel the event
            set lore of event-item to "%lore of event-item%||&fSmelt I"
            wait 2 ticks
            set cursor slot of player to air

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

can you give me the output again

code_language.skript:
on mor.inventory click:
    message "%player's cursor slot%"
 
can you give me the output again

code_language.skript:
on mor.inventory click:
    message "%player's cursor slot%"

This is what I got after adding that
upload_2017-9-22_9-32-27.png
 
Video FINALLY finished uploading.
I am clicking it with the book, this is what happens exactly. Maybe im using wrong versions or smth ??
 
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:
on mor.inventory click:
    event-item is any pickaxe or shovel or axe
    player's cursor slot is enchanted_book:
        name of player's cursor slot is "&fSmelt I":
            cancel the event
            set lore of event-item to "%lore of event-item%||&fSmelt I"
            wait 2 ticks
            set cursor slot of player to air

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)
This is my code, I have since then improved certain areas of this pm me if still interested.