Jump to content

Recommended Posts

Posted
			make gui 26 with sunflower named "&6&lStill have old coins?" with lore "&eClick here to trade them in. &a($40 each)":
				loop all items in player's inventory:
					if loop-item is sunflower named "&6&lCoin":
						remove 1 sunflower named "&6&lCoin" from player's inventory
						send "&bSold 1 &6&lCoin &bfor &a$40"
						add 40 to {money::%player's uuid%}
					else:
						send "test-output"

At "If loop-item is sunflower named "&6&lCoin":

if the player has multiple of sunflowers named "&6&lCoin" it doesn't count that, only if it's 1 coin or it's not stacked, does anybody know how to make it so its any amount in the stack?

A m o n g u s i n r e a l l i f e

Posted

You could try just checking the name of the item, like:

if loop-item is named "name":

    #do stuff

 

Hope this helps!

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

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