Solved Sell Skript

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

Feb 26, 2019
29
0
1
23
Category: Selling

Suggested name: Sell

Spigot/Skript Version: 1.12.2 Spigot / 2.2-dev36

What I want: A sell skript that will sell Coal Ore for 5$ and Iron Ore for 10$ I want that when you sell you get 1 sell message wich says how many items you sold for how many $ I want to use a variable for this and that one is {balance::%player's uuid%} I've made a skript wich is basically what i want but i can't let it work:
https://hastebin.com/jijicopaqo.py

Ideas for commands: /Sell

Ideas for permissions: Everyone has acces

When I'd like it by: This week

[doublepost=1555409540,1555318451][/doublepost]Someone helped me in discord! Solved
 
Just to make sure if others need that heres something I wrote:
code_language.skript:
command sell:
    trigger:
        set {_} to amount of iron ore in player' inventory
        add {_}*10 to {balance::%player's uuid%}
        send "You've sold %{_}% Iron ore for ({_]*10)$"
 
Last edited:
Just to make sure if others need that heres something I wrote:
code_language.skript:
command sell:
    trigger:
        set {_} to amount of iron ore in player' inventory
        add {_}*10 to {balance::%player's uuid%}
        send "You've sold %{_}% Iron ore for ({_]*10)$"
it would probably be a good idea to remove the iron ore from the inventory after, so it would go like this:
Code:
command /sell:
  trigger:
    set {_iron} to amount of iron ore in player's inventory
    add {_iron}*10 to {balance::%player's uuid%}
    send "You've sold %{_}% Iron ore for ({_]*10)$"
    remove {_iron} iron ore from player's inventory