Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
/ EggClicker Public archive

Commit

Permalink
menu fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BuggyAl committed Nov 25, 2022
1 parent 0ecbf26 commit 1a0f397
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
11 changes: 2 additions & 9 deletions core/guis/gui.sk
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@ function loadGUI(p: player, id: text, rows: integer, display: text):
stop
set metadata tag {_id} of {_p} to chest inventory with {_rows} rows named {_display}

#open chest inventory with 4 rows named "&cLazy gurl." to player
function loadGUI(p: player, type: inventory type, rows: int, display: text):
set {_uuid} to uuid of {_p}
open {_type} inventory with {_rows} rows named {_display} to {_p}


function setGUISlot(p: player, slot: int, item: item):
set {_inventory} to current inventory of {_p}
set slot {_slot} of {_inventory} to {_item}
function setGUISlot(p: player, id: text, slot: int, item: item):
set slot {_slot} of metadata tag {_id} of {_p} to {_item}

function getGUIBorders(rows: integer) :: objects: # get the border slots in a GUI with a specified number of rows
loop integers between 0 and ({_rows} * 9 - 1):
Expand Down
5 changes: 1 addition & 4 deletions core/guis/menu.sk
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ function loadShopMenu(p: player):
setGUISlot({_p}, "shopMenu", 14, nether star named "&6&lThe Collector &c&l(LOCKED)" with lore "&7&oSpeak to The Collector to unlock!")
setGUISlot({_p}, "shopMenu", 16, emerald named "&b&lSupport the Server" with lore "&7&oPurchase ranks on our store!")
openGUI({_p}, "shopMenu")

function loadShopMenu(p: player):
openGUI({_p},)


on inventory click:
if event-inventory = (metadata tag "shopMenu" of player):
cancel event
Expand Down

0 comments on commit 1a0f397

Please sign in to comment.