Discord Thread Sell gui Help me

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
options:
p: "&8&8SELL »" # Prefix
diamond: 30 # 1 diamond sell price

command /selldiamond:
permission: sell.perms
permission message: "&cNon hai il permesso di utilizzare questo comando."
trigger:
open chest inventory with 6 rows named "Sell" to player
wait 1 tick

on inventory open:
if event-inventory is chest inventory with 6 rows named "Sell":
set {_itemcount} to amount of diamond in event-inventory
wait 1 tick
set {totalPrice} to {@diamond} * {itemcount}
set {_pbalance} to player's balance
add {totalPrice} to {pbalance}
send "&7Hai venduto &6%{itemcount}% &7diamanti. &a%{totalPrice}%$ aggiunti al tuo saldo." to player

Posted by: itami_x from the skUnity Discord.
 
code_language.skript:
options:
    p: "&8&8SELL »" # Prefix
    diamond: 30 # 1 diamond sell price

command /selldiamond:
    permission: sell.perms
    permission message: "&cNon hai il permesso di utilizzare questo comando."
    trigger:
        open chest inventory with 6 rows named "Sell" to player
        wait 1 tick

on inventory open:
    if event-inventory is chest inventory with 6 rows named "Sell":
        set {_itemcount} to amount of diamond in event-inventory
        wait 1 tick
        set {_totalPrice} to {@diamond} * {_itemcount}
        set {_pbalance} to player's balance
        add {_totalPrice} to {_pbalance}
        send "&7Hai venduto &6%{_itemcount}% &7diamanti. &a%{_totalPrice}%$ aggiunti al tuo saldo." to player

Posted by: snapran from the skUnity Discord.
 
Status
Not open for further replies.