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.

Kill reward

Discussion in 'Requests' started by KAVKAZIE, Jun 12, 2019 at 8:03 AM.

  1. KAVKAZIE

    KAVKAZIE Well-Known Member

    Joined:
    Feb 27, 2017
    Messages:
    109
    Likes Received:
    0
    Hey, How i can add item to player's inventory and if its full it will drop on the ground thanks.
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    335
    Likes Received:
    11
    It is not tested, but something like that I would do it.
    Code (Skript):
    1.  
    2. on death:
    3.     if victim is a player:
    4.        if attacker is a player:
    5.             set {_reward.item} to DIAMOND BLOCK named "&a&ki&c&ki&b Magic Block &c&ki&a&ki&f"
    6.             set line 2 of lore of {_reward.item} to "&cText"
    7.             set line 3 of lore of {_reward.item} to "&4More text"
    8.             if attacker's inventory has enough space for 1 of {_reward.item}:
    9.                 add 1 of {_reward.item} to attacker's inventory
    10.             else:
    11.                 drop 1 of {_reward.item} to victim's location
    As I said before, it has not been tested so I do not guarantee it works, but it's worth trying.
     
Loading...