Sell All command

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

robot1007

Member
Feb 17, 2018
1
0
0
19
Ok I've made all of the currency related commands, bal, baltop, pay etc, but I still need a way for players to sell items they get.
ITEMS VALUES:
Coal - 1 coin
Iron Ingot 3 coins
Lapis lazuli - 6 coins
Redstone - 10 coins

Variables:
{coins::%player's uuid%}

I've tried a few setups but they all dont work...
Anyone have any suggestions on how to set up a command that sees if you have any of these items and then turns them into coins?
 
This is my very old "Prison skript", may this help you contiue.


code_language.skript:
set {_cobblestone} to number of cobblestone in player's inventory
set {_ironore} to number of iron ore in player's inventory
set {_stone} to number of stone in player's inventory
set {_glowpuder} to number of glowstone dust in player's inventory
set {_glowstone} to number of glowstone in player's inventory
set {_value1} to {@Cobblestone} * {_cobblestone}#!<---
set {_value2} to {@Stone} * {_stone}#!<---
set {_value3} to {@Ironore} * {_ironore}#!<---
set {_value4} to {@GlowstoneDust} * {_glowpuder}#!<---
set {_value5} to {@Glowstone} * {_glowpuder}#!<---
set {_value10} to {_value1} + {_value2} + {_value3} + {_value4}#!<---
remove all glowstone dust, stone, iron ore, glowstone and cobblestone from player's inventory
add {_value10} to {Money::%player%}
 
  • Like
Reactions: Comply and Hexivoid
Status
Not open for further replies.