Jump to content

Shop Creator Skript Simplified


Swacco

Recommended Posts

options:
    prefix: YourServerNameHere



command /shop:
    trigger:
        open virtual chest inventory with 3 rows named "hi" to player
        shop(player, 10, 300, Grass Block, 4, "&aGrass Block")
	#shop(player, format slot, cost, item, how much you get, "name of item")  when you put the name of the item you need quotes 

function shop(p: player, i: integer, c: integer, it: itemtype, a: integer, m: string):
    format gui slot {_i} of {_p} with {_a} of {_it} named "%{_m}%" with lore "&a%{_c}%" to run:
        if {_p}'s balance is greater than {_c}:
            remove {_c} from {_p}'s balance
            give {_a} of {_it} to {_p}
            send action bar "&d@{prefix} &aPurchase Completed." to {_p}
        else:
            send action bar "&d@{prefix} &cPurchase Failed." to {_p}
# Made By Disassembled And RonskiYT <3
# If Needed For Further Questions Add Me On Discord Zaytrix#3763

If you still need help dm me or reply i will be active on here for a bit

Link to comment
Share on other sites

Instead of just having the lore as the Price, you could probably make the lore like "$%{_c}%" or maybe even "Price: %{_c}%". And you can just make it if {_p}'s balance >= {_c} instead of all that.

Discord - tarna256

In-game name - _Tarna_

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

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

[VIP] - 7/27/2020

Community 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

1 minute ago, _Tarna_ said:

Instead of just having the lore as the Price, you could probably make the lore like "$%{_c}%" or maybe even "Price: %{_c}%". And you can just make it if {_p}'s balance >= {_c} instead of all that.

Thanks i will try to do that into the future im just used to doing greater than! Thanks for the tip 😄

Link to comment
Share on other sites

2 minutes ago, _Tarna_ said:

Instead of just having the lore as the Price, you could probably make the lore like "$%{_c}%" or maybe even "Price: %{_c}%". And you can just make it if {_p}'s balance >= {_c} instead of all that.

I don't think anyone asked, the skript works fine 

✘ Some stuff about me ✘

I'm 13 and my pronouns are She/Her 🙂

I first joined Minehut @ December 11 2019.

Link to comment
Share on other sites

8 minutes ago, RonskiYT said:

I don't think anyone asked, the skript works fine 

I was just giving a suggestion. Can I not give suggestions. 

Discord - tarna256

In-game name - _Tarna_

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

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

[VIP] - 7/27/2020

Community 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

2 hours ago, RonskiYT said:

I don't think anyone asked, the skript works fine 

that's a bit rude..

They're just trying to help 🙂

Edited by farwl

Graphic Designer - Skript Developer - Professional Builder - Content Creator

Been on Minehut since January 2018. Throughout my time here I've mastered the skills you see above. I make free logos, banners, and server art for users on Minehut. I'm a proficient Skript developer. I'm also really good at building, you can see my portfolio by clicking here. Feel free to say hi if you see me somewhere 🙂

Amethyst Studios Discord

Link to comment
Share on other sites

  • 2 weeks later...
2 hours ago, 1vkk said:

What is the name for a piston?

piston

 

ps: if you want help, I'd suggest you create another thread rather than commenting on something completely irrelevant to your question 🙂

Edited by Migins

Support  July 29, 2020 → November 3, 2020

► Helper November 3, 2020 → February 22, 2021

► Moderator February 22, 2021 → May 17, 2021

 I might not always respond to forum dms, however I am always contactable on discord (mig#0069)

Screen Shot 2020-03-20 at 5.23.33 pm.png

Link to comment
Share on other sites

  • 1 year later...
  • 10 months later...

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