FlupMC

Untitled

Apr 4th, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. function shop(kategori: text, page: number, a: number, p: player):
  2. if {_kategori} is "menu":
  3. create gui with virtual chest with 5 rows named "&bShop &8| &7Menu":
  4.  
  5.  
  6.  
  7. stop
  8. create gui with virtual chest with 5 rows named "&bShop &8| &7%{_kategori}% &8(&bS. %{_page}%&8)":
  9. loop integers from 28 to 36:
  10. make gui loop-integer - 1 with stained glass pane
  11.  
  12. if {_page} is greater than 1:
  13. make gui 37 - 1 with paper named "&7Forrige side":
  14. shop("%{_kategori}%", {_page} - 1, {_a}, player)
  15. make gui 45 - 1 with paper named "&7Næste side":
  16. shop("%{_kategori}%", {_page} + 1, {_a}, player)
  17. make gui 41 - 1 with {_a} of paper named "&7Antal&8: &b%{_a}%":
  18. if gui-click-type is left mouse button:
  19. if {_a} is not greater or equal to 64:
  20. shop("%{_kategori}%", 1, {_a} + 1, player)
  21. else:
  22. shop("%{_kategori}%", 1, 1, player)
  23. if gui-click-type is right mouse button:
  24. if {_a} is not less or equal to 1:
  25. shop("%{_kategori}%", 1, {_a} - 1, player)
  26. else:
  27. shop("%{_kategori}%", 1, 64, player)
  28. if {_kategori} is "blocks":
  29. if {_page} is 1:
  30. set {_item} to Cobblestone named "&b&lCobblestone"
  31. set {_itemname} to "Cobblestone"
  32. set line 1 of lore of {_item} to "&7Køb: &b$%{skyblock::buysystem::%{_itemname}%::køb} * {_a}% &7(Venstreklik)"
  33. set line 2 of lore of {_item} to "&7Sælg: &b$%{skyblock::buysystem::%{_itemname}%::sælg} * {_a}% &7(Højreklik)"
  34. make gui 1 - 1 with {_a} of {_item}:
  35. if gui-click-type is left mouse button:
  36. shopBuy({_itemname}, {_a}, {skyblock::buysystem::%{_itemname}%::køb}, {_p})
  37. if gui-click-type is right mouse button:
  38. shopSell({_itemname}, {_a}, {skyblock::buysystem::%{_itemname}%::sælg}, {_p})
  39.  
  40.  
  41.  
  42. open last gui to {_p}
Advertisement
Add Comment
Please, Sign In to add comment