Jump to content

sell wand skript

Recommended Posts

loops items in chest, adds them to inv and sells them stack by stack. the reason i have done like this is so it works with any eco plugin just change the "/sell all" to fit whatever plugin you are using


on load:
    set {-cache::1xsellwand} to unbreakable blaze rod named "&6&l1x Sell Wand"
on command:
    if command is "staffwand":
        enchant {-cache::1xsellwand} with "unbreaking 1" parsed as enchantment type
        give player {-cache::1xsellwand}
on right click:
    if event-block is chest:
        if tool of player is {-cache::1xsellwand}:
            cancel event
            set {_chest} to event-block
            loop all items in inventory of {_chest}:
                give loop-item to player
                remove loop-item from inventory of {_chest}
                execute player command "/sell all" #---change this line to fit your specific eco plugin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...