Remove "variable" from inventory

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

4IDp8

Member
Dec 15, 2020
12
0
1
26
Code:
command /smelter [<text>] [<text>]:
    permission: restrictPlacing.command
    description: Automaticly smelts items from your inventory
    usage: /smelter <arguments>
    executable by: players
    aliases: /autosmelter, /as
    trigger:
        if arg 1 is "whitelist":
            if arg 2 is "add":
                if player is not holding air:
                    set {%player%.%tool%.whitelisted} to 1
                    send "&7[&6&lAutoSmelter&7] &fWhitelisted held item!"
            else if arg 2 is "remove":
                set {%player%.%tool%.active} to 0 of player's tool
                send "&7[&6&lAutoSmelter&7] &fRemoved the held item from whitelist!"
        else if arg 1 is "toggle":
            if arg 2 is "on":
                if player has a furnace named "&6&lAutoSmelter":
                    set {%player%.smelter.active} to 1
                    send "&7[&6&lAutoSmelter&7] &fThe smelter is now enabled!"
            else if arg 2 is "off":
                set {%player%.smelter.active} to 0
                send "&7[&6&lAutoSmelter&7] &fThe smelter is now disabled!"
            else:
            send "&7[&6&lAutoSmelter&7] &fPleace specify on/off"

on join:
if player has a furnace named "&6&lAutoSmelter":
set {%player%.smelter.active} to 1
else:
set {%player%.smelter.active} to 0

every 10 seconds:
set {_slot} to random integer from 0 to 26
if {%player%.smelter.active} is 1:
    if slot {_slot} of player's current inventory
I am creating a autosmelter script, that smelts one of the whitelisted items in inventory per 10 seconds
I just cant figure it out, here is my script NOW:
[doublepost=1608412959,1608393013][/doublepost]@ShaneBee pls help
[doublepost=1608482309][/doublepost]*Bump*
 
What doesnt work? you need to specify what doesnt work and what the error is please!! :33
 
I just cant figure out how to remove items that is part of a variable, at a specific slot in inventory
 
My wierd way to randomize what item to remove, do you know a better way to do it?
 
you could just smelt whats in the hot bar since thats the only way I know to how remove it "randomly"
I forgot the specific way of doing it but it was smth like
Code:
every 10 seconds:
set {smth} to a random integer between 1 and 9:
{Smth} 1:
remove item from slot one of player's inventory

you get the idea,
ill come back to you if I remember what it was
 
Status
Not open for further replies.