Jump to content
  • 0

Shop Skript Gui


wmwmwmwmmwmwwwmm

Question

3 answers to this question

Recommended Posts

  • 0

You could do

set {_d} to amount of diamonds in player's inventory
remove 5 diamonds from player's inventory 

The first line sets {_d} to how much diamonds a player has. And the 2nd is how to remove diamonds from a player.

Also next, time ask for skript help in the skript category. https://forums.minehut.com/forum/18-discussion/

  • Thanks 1

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

  • 0
29 minutes ago, _Tarna_ said:

You could do


set {_d} to amount of diamonds in player's inventory
remove 5 diamonds from player's inventory 

The first line sets {_d} to how much diamonds a player has. And the 2nd is how to remove diamonds from a player.

Also next, time ask for skript help in the skript category. https://forums.minehut.com/forum/18-discussion/

If i did this would it check see 4 diamonds then it would stop or would it still try to remove 5 and then give the potion

Link to comment
Share on other sites

  • 0
40 minutes ago, wmwmwmwmmwmwwwmm said:

If i did this would it check see 4 diamonds then it would stop or would it still try to remove 5 and then give the potion

The thing i gave were just some examples. You would do
 

set {_d} to amount of diamonds in player's inventory
if {_d} > 5:
	# stuff if player has more than 5 diamonds
	remove 5 diamonds from player's inventory
else:
	send "not enough diamonds"

 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

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