Solved How to return slot at "On item damage" event

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

Tinkot

Active Member
Feb 10, 2018
57
1
0
27
Hey, i can't figure out how to return the slot of the event-item with the "on item damage" event.
I am trying to multiply item damage on my server.

so i tried this and it works 100%. but i can't damage the item because i don't know how to get the slot the item is at. Anyone can help me out?
code_language.skript:
on item damage:
  broadcast "%item damage%"
  add item damage to data value of slot 4 of player
  add item damage to data value of slot 4 of player
  broadcast "durability %durability of event-item%"
  broadcast "max durability %max durability of event-item%"
 
true, i just found a working method. turns out you cant add something to data value directly. won't work with "add item damage to data value of event-item"


here the solution for everyone who wants to know. "item damage" is a number. you can use "add 100 to data value of {_i}" instead for if you want to run a simple test.
code_language.skript:
on item damage:
  set {_i} to event-item
  add item damage to data value of {_i}
 
Status
Not open for further replies.