Paste #52813: FailTagsByUsingFlagsByCloseing

Date: 2019/02/26 13:28:34 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"TEST_GUI":
  type: inventory
  debug: false
  inventory: CHEST
  title: "<black><npc.name> Chest"
  size: 9
  slots:
  - "[i@air] [i@air] [i@air] [i@TESTITEM] [i@air] [i@air] [i@air] [i@air] [i@air]"


TESTITEM:
  type: item
  debug: false
  material: i@stone
  display name: lol
  lore:
  - <white><npc.has_flag[TestNPC]>
  - <white><npc[<player.flag[TESTLastClickedNPC]>].name>



"TESTNPCTalkEvent":
  type: world
  debug: false
  events:
    on player right clicks npc:
    - flag player TESTLastClickedNPC:<npc.id>
    - if <npc.has_flag[TestNPC]> == true {
      - inventory open d:in@TEST_GUI
      }

"TESTGUIClickEvent":
  type: world
  debug: false
  events:
    on player clicks in TEST_GUI:
    - if <context.item.scriptname> == TESTITEM {
      - inventory close d:in@TEST_GUI
      }