#Sellwand with Uses | Skript

1 messages · Page 1 of 1 (latest)

sudden seal
#

I'm looking to add Uses to my sellwands, but I'm unsure on how to actually add them, could I get some help?
Right now argument 3 does nothing in the sellwandgive command, so that'd be great help too.

    permission: op
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                give arg-1 1 of blaze rod named "<##C5FB42>&lSELLWAND &7[<##C5FB42>%arg-2%x&7]" with lore "&8Sellwand", "", "<##0C9039>│ <##C5FB42>Description", "<##0C9039>│ &fSell items in a chest.", "", "<##0C9039>│ <##C5FB42>Statistics", "<##0C9039>│ &fMultiplier: <##C5FB42>%arg-2%x", "<##0C9039>│ &fUses: <##C5FB42>%arg-2%x", "", "&7&oRight-Click on a chest to use."
            else:
                give arg-1 1 of blaze rod named "<##C5FB42>&lSELLWAND &7[<##C5FB42>1x&7]" with lore "&8Sellwand", "", "<##0C9039>│ <##C5FB42>Description", "<##0C9039>│ &fSell items in a chest.", "", "<##0C9039>│ <##C5FB42>Statistics", "<##0C9039>│ &fMultiplier: <##C5FB42>1x", "", "&7&oRight-Click on a chest to use."
        else:
            send "{@prefix} &f/sellwandgive [player] [multiplier] [uses] ."           

on rightclick on chest or hopper with blaze rod:
    if player's tool is blaze rod named "<##C5FB42>&lSELLWAND &7[<##C5FB42>1x&7]":
        set {_name} to uncolored name of player's tool
        replace all "(", ")", "SELLWAND", " " and "x" with "" in {_name}
        set {_multiplier} to 1
        sellItems(player, inventory of clicked block, {_multiplier}+0)
        cancel event```
blissful thistle
#

just make the args mandatory, then you don't need to check if they are set.

#

also, make a variable for the wand and then give players that variable

#
  set {wand} to 1 of stick named "Wand"
  set line 1 of {wand}'s lore to "Magic!"

command givewand:
  trigger:
    give player 1 of {wand}```
sudden seal
#

@blissful thistle another issue is that i dont know nbts/metadata tags, so I can't really make it tell me when the uses are going down

slow adder
#

option 1: use the name/lore
option 2: use nbt (all you need for this kind of thing is this https://skripthub.net/docs/?id=4070 )

#

here's are example of how to use it for this:
set int tag "uses" of nbt of player's tool to 100
if (tag "uses" of nbt of player's tool) <= 0
remove 1 from int tag "uses" of nbt of player's tool

blissful thistle
sudden seal
#

i ended up not using uses, this is the skript i made at the time.. absolute embarrasment but at least it shows my progress