Deleting non named items

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

AverageGamer590

New Member
Jun 27, 2021
6
0
1
Australia
  1. Script Version: 2.5.3MH and using skRayFall v1.9.25
  2. Script Author: me
  3. Minecraft Version: 1.16.5
  4. Full Code:
    on break:
    if player has oak plank named "&6Oak AutoCompressor":
    if player has 64 of oak log:
    give player shiny oak log
    remove 64 of oak log from player's inventory
I'm trying to only remove regular oak logs that aren't shiny and don't have a name so it doesn't remove the anything else
 
Last edited:
Code:
loop player's inventory:
    if name of loop-item is "Oak Log":
        remove 64 of loop-item from player's inventory

if that doesn't work for some reason, try this:

Code:
set {_count} to 0
loop player's inventory:
    if name of loop-item is "Oak Log":
        if {_count} is less than 65:
            remove loop-item from player's inventory
            set {_count} to {_count} + 1
 
Status
Not open for further replies.