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

    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.

SwiftSwordMC

Member
Aug 9, 2020
1
0
1
Hey everyone, so I'm fairly new to skript and there's many things I have no idea about but basically I'm trying to make an npc that on right click, opens a chest gui that contains 2 items: 1 cauldron labeled "Small Personal Vault" and gold horse armor labeled "Upgrade Vault". If you click the "Small Personal Vault", it will open another chest gui with 2 rows that is essentially supposed to be your own personal (small) enderchest but without actually using an ender chest.

The issue I'm having is: if I put something in there, it disappears after I close and re-open that gui.
(by the way I'll link all the screenshots as attachments)

I asked a skript help discord server and someone suggested me to make a "storage system that stores items in a list variable that is linked to a player". such as:
Code:
{storage::%player%::*}

Now, as I said, I'm fairly new to skript. I have NO idea what I'm doing in that regard. This is the code I made without the list variables:

Code:
command /guiuisofsdfisdf:
#no permission needed
  trigger:
    open virtual chest inventory with size 4 named "&7Vaults and Storage" to player
    format gui slot 11 of player with cauldron named "&aSmall Personal Vault" with lore "&7Stores up to 1 row of items." and "&eClick &7to access you vault" to run:
      execute player command "dshfgfs"
    format gui slot 15 of player with gold horse armor named "&6Upgrade Vault" with lore "" and "&eClick &7to upgrade" to run:
      execute player command "sdjhflsdkfha"
    format gui slot 31 of player with barrier named "&fClose" with lore "" and "&eClick &7to close" to close
command /dshfgfs:
  trigger:
    open virtual chest inventory with size 2 named "&7Small Personal Vault" to player
    format gui slot 9 of player with gray stained glass pane to do nothing
    format gui slot 10 of player with gray stained glass pane to do nothing
    format gui slot 11 of player with gray stained glass pane to do nothing
    format gui slot 12 of player with gray stained glass pane to do nothing
    format gui slot 14 of player with gray stained glass pane to do nothing
    format gui slot 15 of player with gray stained glass pane to do nothing
    format gui slot 16 of player with gray stained glass pane to do nothing
    format gui slot 17 of player with gray stained glass pane to do nothing
    format gui slot 13 of player with barrier named "&fClose" with lore "" and "&eClick &7to close" to close
command /sdjhflsdkfha:
  trigger:
    open virtual chest inventory with size 4 named "&7Confirmation" to player
    format gui slot 13 of player with lime stained glass pane named "&fAre you sure?" with lore "" and "&7Please &eclick &7to &aconfirm!" to run:
      execute player command "fhsdjkhflga"
    format gui slot 31 of player with barrier named "&fClose" with lore "" and "&eClick &7to close" to close
#when you right click the npc
on right click on an entity:
  if name of entity is "&fStorage Man":
    execute player command "/guiuisofsdfisdf"

Could someone please try to guide me through this or tell me an easier way to do this?
I'll be sleeping for a while since it's 6 am right now where I live but when I wake up I'll see any replies that come up.
Thanks very much.
 

Attachments

  • 2020-08-09_05.42.44.png
    2020-08-09_05.42.44.png
    560.4 KB · Views: 218
  • 2020-08-09_05.42.50.png
    2020-08-09_05.42.50.png
    562.8 KB · Views: 207
  • 2020-08-09_05.42.30.png
    2020-08-09_05.42.30.png
    804.4 KB · Views: 212
Status
Not open for further replies.