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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove item with specific lore

Discussion in 'Skript' started by MrVlamis, Apr 27, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. MrVlamis

    MrVlamis Member

    Joined:
    Apr 27, 2022
    Messages:
    10
    Likes Received:
    0
    Hey, I have a question, how can I implement this?

    how is it possible that certain items are deleted after death? e.g. an item with the lore "can get lose" is deleted after death as well as items without lore and items with the lore "can keep" cannot be lost.
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Please search the forum before asking a question
     
  3. MrVlamis

    MrVlamis Member

    Joined:
    Apr 27, 2022
    Messages:
    10
    Likes Received:
    0
    i dont have found
     
  4. Practice

    Practice Member

    Joined:
    Apr 23, 2022
    Messages:
    37
    Likes Received:
    1
    On death, check if the drops contain the items you want the player to keep and remove them, then give them back once the player respawns.
     
  5. Hasloslabe

    Hasloslabe New Member

    Joined:
    Apr 27, 2022
    Messages:
    5
    Likes Received:
    0
    on death:
    cancel event:
    loop player's inventory:
    if lore of loop-value is "can lose":
    remove loop-value from player's inventory
    kill player
    --- Double Post Merged, Apr 27, 2022, Original Post Date: Apr 27, 2022 ---
    with all spaces required
     
  6. Practice

    Practice Member

    Joined:
    Apr 23, 2022
    Messages:
    37
    Likes Received:
    1
    Code (Text):
    1. on death:
    2.     add drops where [input's lore is "not lost on death"] to {drops::%player%::*} #adds items with lore "not lost on death" to the list
    3.     remove {drops::%player%::*} from drops #removes the items from the drops
    4.    
    5. on respawn:
    6.     if {drops::%player%::*} is set: #checks if the player had items with lore "not lost on death"
    7.         add {drops::%player%::*} to player #gives the items
    8.         delete {drops::%player%::*} #deletes the list of items
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...