Solved If player has x or more of item...

  • 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.
Jan 19, 2020
2
1
3
24
I'm attempting to make a shop where the currency is gold ingots. I've attempted to put a leather helmet named "&8Weak Leather Helmet" into the system, but it didn't work. Here's the code:

command /combatshop:
trigger:
if player is in world "Invasion":
open chest inventory with 5 rows named "&6&lCombat Shop" to player
format slot 9 of player with leather cap named "&8Weak Leather Helmet" to close then run:
if player has more than or equal to 50 gold ingots:
take 50 gold ingots from player
give 1 leather helmet named "&8Weak Leather Helmet" to player

My Skript version I believe is 2.4. I'm not sure because I'm using Minehut.
The errors on reload are:
can't understand this condition: 'format slot 9 of player with leather helmet named "&8Weak Leather Helmet" to run' (sk.sk, line 166: format slot 9 of player with leather helmet named "&8Weak Leather Helmet" to run:')

I have all of the addons minehut allows you to have and I don't know their versions :/
 
Code:
format gui slot 9 of player with leather cap named "&8Weak Leather Helmet" to run:
 
Status
Not open for further replies.