Paste #9885: Untitled Paste

Date: 2014/09/20 20:07:58 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


waitress:
  type: assignment
  actions:
    on click:
    - flag player restaurant:<npc>
    - give i@menu


menu:
  type: item
  material: m@book
  display name: menu 

restaurant:
  type: world
  events:
    on player right clicks with i@menu:
    - inventory open d:<player.flag[restaurant].as_npc.inventory>
    on player clicks in inventory:
    - if <c.inventory> == <player.flag[restaurant].as_npc.inventory> {
      - flag player order:->:<c.item>
      - determine passively cancelled
      - inventory update
      }
    on player closes inventory:
    - if <c.inventory> == <player.flag[restaurant].as_npc.inventory> {
      - take i@menu
      - foreach <player.flag[order].as_list> {
        - ~run %value%
        }
      }
beefstew:
  type: item
  material: mushroom_soup
  display name: "beef stew"

i@beefstew:
  type: task
  script:
  - announce "<red>hi there!!!"
  - wait 10s

i@mushroomstew:
  type: task
  script:
  - announce "<green>hi!!!"
  - wait 10s

mushroomstew:
  type: item
  material: mushroom_soup
  display name: "mushroom stew"