Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function shop(kategori: text, page: number, a: number, p: player):
- if {_kategori} is "menu":
- create gui with virtual chest with 5 rows named "&bShop &8| &7Menu":
- stop
- create gui with virtual chest with 5 rows named "&bShop &8| &7%{_kategori}% &8(&bS. %{_page}%&8)":
- loop integers from 28 to 36:
- make gui loop-integer - 1 with stained glass pane
- if {_page} is greater than 1:
- make gui 37 - 1 with paper named "&7Forrige side":
- shop("%{_kategori}%", {_page} - 1, {_a}, player)
- make gui 45 - 1 with paper named "&7Næste side":
- shop("%{_kategori}%", {_page} + 1, {_a}, player)
- make gui 41 - 1 with {_a} of paper named "&7Antal&8: &b%{_a}%":
- if gui-click-type is left mouse button:
- if {_a} is not greater or equal to 64:
- shop("%{_kategori}%", 1, {_a} + 1, player)
- else:
- shop("%{_kategori}%", 1, 1, player)
- if gui-click-type is right mouse button:
- if {_a} is not less or equal to 1:
- shop("%{_kategori}%", 1, {_a} - 1, player)
- else:
- shop("%{_kategori}%", 1, 64, player)
- if {_kategori} is "blocks":
- if {_page} is 1:
- set {_item} to Cobblestone named "&b&lCobblestone"
- set {_itemname} to "Cobblestone"
- set line 1 of lore of {_item} to "&7Køb: &b$%{skyblock::buysystem::%{_itemname}%::køb} * {_a}% &7(Venstreklik)"
- set line 2 of lore of {_item} to "&7Sælg: &b$%{skyblock::buysystem::%{_itemname}%::sælg} * {_a}% &7(Højreklik)"
- make gui 1 - 1 with {_a} of {_item}:
- if gui-click-type is left mouse button:
- shopBuy({_itemname}, {_a}, {skyblock::buysystem::%{_itemname}%::køb}, {_p})
- if gui-click-type is right mouse button:
- shopSell({_itemname}, {_a}, {skyblock::buysystem::%{_itemname}%::sælg}, {_p})
- open last gui to {_p}
Advertisement
Add Comment
Please, Sign In to add comment