Date: 2014/09/20 20:07:58 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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"