Can Someone Fix My Shop?

  • 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 community!

    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.

Waifer

Member
Aug 31, 2019
1
0
0
command /shop:
trigger:
open virtual chest inventory with size 5 named "Shop" to player
format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 36, 37, 38, 39, 41, 42, 43, and 44 of player with black stained glass pane named " "
format gui slot 40 of player with red stained glass pane named "&cExit" to run:
close player's inventory

format gui slot 19 of player with iron chestplate named "&7Armor" to run:
close player's inventory
open virtual chest inventory with size 5 named "Shop" to player
format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 36, 37, 38, 39, 41, 42, 43, and 44 of player with black stained glass pane named " "
format gui slot 40 of player with red stained glass pane named "&cBack" to run:
close player's inventory
make player execute "/shop"
format gui slot 9 of player with leather helmet named "&7Leather Helmet" with lore "&7Price: 500" to run:
buy(leather tunic, 1, 500, player)
function buy(i: item, a: integer, price: number, p: player):
set {_uuid} to {_p}'s uuid
give {_p} {_a} of {_i}
remove {_price} from {Rblocks::%player's uuid%}
else:
close {_p}'s inventory
send "&cYou don’t have enough to buy this, silly!"


Don't mind the indents
 
Don't mind the indents
How do you expect someone to fix your code, if you don't bother to put it in a code block?
Without proper formatting/indents theres really no way for someone to know what exactly is going on here and what is wrong with it.

Also, if you want someone to FIX your code, state your issues. We aren't mind readers.
 
Status
Not open for further replies.