Give item on death

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

    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!

lordmanu

Member
Apr 25, 2022
21
1
3
hello. i am trying to make this plugin, that on the death of a player will give his killer certain items. the skript will not present errors, but still it does not work.
PLEASE NOTE: My server is in 1.8.9 and some events are not compatible.


on death:
if attacker is player:
if victim is player:
set {_randomlapis} to a random integer between 1 and 40
if {_randomlapis} <= 18:
give attacker 15 of bottle of enchanting
send "&aCongratulazioni. Hai killato %victim% e hai ottenuto 2 Lapis Lazuli!" to attacker
else if {_randomlapis} <= 32:
give attacker 4 of lapis lazuli
send "&aCongratulazioni. Hai killato %victim% e hai ottenuto 10 Bottle enchanting!" to attacker
else if {_randomlapis} <= 35:
give attacker 10 of bottle of enchanting
send "&aCongratulazioni. Hai killato %victim% e hai ottenuto 10 Bottle enchanting!" to attacker
else if {_randomlapis} <= 40:
give attacker 1 of lapis lazuli
send "&aCongratulazioni. Hai killato %victim% e hai ottenuto 10 Bottle enchanting!" to attacker