Hello, I'm trying to create a skript, which will add certain items to the drop-table of mobs / blocks.
Version of Skript: 2.5-alpha4
Author: Bensku
Minecraft Version: 1.15.2
Spigot: 1.15.2
This first code is something which worked, but in my opinion it's a little complicated to add a new item.
If I'd be using this, I'd have to add every new item by creating a new command + a new variable.
What I tried to do is adding an argument to the command /saveitem
so I'd be able to create a list of items which would be added by holding the item in my hand and then typing in the custom command.
The code I've got right now isn't even worth showing, but I'll do it anyway:
It doesn't show any errors, but it's not working either.
I'm pretty much aware of why it's not working but I also don't know how to fix it.
It would be really nice, if someone who's a little bit more experienced in skripting than me could
help me with this issue.
Thanks
Also, sorry for bad grammar, english is not my first language.
Version of Skript: 2.5-alpha4
Author: Bensku
Minecraft Version: 1.15.2
Spigot: 1.15.2
This first code is something which worked, but in my opinion it's a little complicated to add a new item.
Code:
on mine:
if event-block is diamond block:
drop {variable}
#This is just an example for the dropping part.
command /saveitem:
trigger:
if player's name is "Example":
#Thats just to be sure the command can only be used by me/other people I trust (I know, I could use a
#custom permission.)
set {variable} to player's tool
#This is for saving any item so I'm able to use
#attributes without skStuff
If I'd be using this, I'd have to add every new item by creating a new command + a new variable.
What I tried to do is adding an argument to the command /saveitem
Code:
command /saveitem <text>:
The code I've got right now isn't even worth showing, but I'll do it anyway:
Code:
command /saveitem <text>:
trigger:
if player's name is "Example":
set {item} to arg-1
set {item} to player's tool
add {item} to {itemliste::*}
send "&6%arg-1% &bgespeichert" to player
wait 1 second
delete {item}
It doesn't show any errors, but it's not working either.
I'm pretty much aware of why it's not working but I also don't know how to fix it.
It would be really nice, if someone who's a little bit more experienced in skripting than me could
help me with this issue.
Thanks
Also, sorry for bad grammar, english is not my first language.
Last edited: