Jump to content

Can anybody give me a /shop skript for my farming server? i REALLY need it to complete my server.


Entity_Duck

Recommended Posts

function shop(plr: player, p: number, amt: number, i: item):
  set {_x} to {_plr}'s uuid
  if {balance::%{_x}%} > {_p}:
    remove {_p} from {balance::%{_x}%}
    give {_plr} of {_amt} of {_i}
    play sound "entity.experience_orb.pickup" to {_plr}
    send "&cPurchase complete" to {_plr}
  else:
    send "&cInsufficient funds." to {_plr}

command /shop [<text>]:
  trigger:
    if arg-1 is not set:
      open virtual chest inventory named "Shop" to player
      format slot (all integers between 0 and 26) of player with gray stained glass pane named " " to do nothing
      format slot 11 of player with gray grass block named "Blocks shop" to make player run command [/shop block]
    if arg-1 is "blocks":
      open virtual chest inventory named "Block shop" to player
      format slot (all integers between 0 and 26) of player with gray stained glass pane named " " to do nothing
      format slot 11 of player with grass block named "Buy 16 grass blocks" with lore "Cost: 50$" to run function shop(player, 50, 16, grass block)

that uses skelett, skyrayfall, skript and i think query but should give you an a general idea of what you should do, it's not complete but you can add new items yourself.

(also couldn't test it so uh yeah)

Edited by tuberkens
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...