Date: 2019/08/31 19:03:28 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
Innkeeper:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
interact scripts:
- 10 innkeeper_interact
#INTERACTION OPTIONS#
innkeeper_interact:
type: interact
steps:
1:
click trigger:
script:
- chat "<yellow>What will ya have today?"
- narrate "<blue>Menu, Rooms, Gossip."
chat trigger:
1:
trigger: I'd like to hear what goes around now as /gossip/?
script:
- narrate wip
2:
trigger: I'd like to see your /menu/.
script:
- inventory open d:in@innkeeper_inventory_menu
3:
trigger: I'd like to rent a /room/.
script:
- inventory open d:in@inkeeper_inventory_rooms
#THE INVENTORY GUI FOR THE RENTAL ROOMS#
inkeeper_inventory_rooms:
type: inventory
title: Two Blocks Away - Rooms
size: 9
slots:
- "[i@roomkey1] [i@roomkey2] [i@roomkey3] [i@roomkey4] [] [] [] [] []"
#THE INVENETORY GUI FOR THE FOOD AND DRINKS#
innkeeper_inventory_menu:
type: inventory
title: Two Blocks Away - Inn Menu
size: 27
slots:
- "[i@zombie_mead] [i@mug_cider] [i@squirrel_milk] [] [] [i@pigman_sandwich] [i@squid_donut] [] []"
- "[] [] [] [] [] [] [] [] []"
- "[] [] [] [] [] [] [] [] []"
#THE ITEMS INSIDE THE FOOD N DRINKS INVENTORY#
zombie_mead:
type: item
display name: 'Zombie Mead'
material: player_head[skull_skin=c937a96b-cdbc-4fd1-8a19-e3fa9eadf313|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDE2OGI5ODA5OGEwYzRhMjllMjA0NjcwNDYzMDkxZGI2MDcwZTc3ZDg2NzY5ZDk4NWY2YmVmNDA3NWU1In19fQ==]
lore:
- A jigger of fermented zombie drool
- poured into a dirty mug.
- Perfectly drinkable.
- <blue>Bought for 10e.
mug_cider:
type: item
display name: 'Mug of Apple Cider'
material: player_head[skull_skin=1ca788e2-da35-4862-a693-9e4543f005b7|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmViZjUxYTNhNTJiNzQ3MmEyODVjNjU4Mjg0Njg4YmNiZTU3Y2Q5ZjZmYWE3YTNlNGMyNmE2MTA1MjU0In19fQ==]
lore:
- Apple cider contains freshly pressed apples.
- Nothing out of the ordinary.
- <blue>Bought for 15e.
squirrel_milk:
type: item
display name: 'Squirrel Milk'
material: player_head[skull_skin=28834415-af4e-49bd-83cf-110f3e4aa470|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDg0MzdmZWU3NDljYmQ2OGYzNDQzYmIwNmU0NTA1OGE2ODdjMGZjYTk2NDM2Y2FkYjUzOGNhZDU5YjUyMTZjNiJ9fX0=]
lore:
- Fresh squirrel milk shaken with a dollop of
- fermented spider eye jelly mixed in an old wooden barrel.
- It's a house specialty!
- <blue>Bought for 15e.
squid_donut:
type: item
display name: 'Squid Donut'
material: player_head[skull_skin=9dc33072-7cae-4627-9ef0-6f26b1518516|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODk4OWRjOTY4MWI2Y2Y5ZDNiNGE4ZTJjNTU0ZWExYmNlNjMyNjc5ZDMxOTZhNDU0MDgzNWFjOGQzYWQzMTIifX19]
lore:
- A layer of red squid ink topped on
- a creamy ball of milled coco beans.
- A delicious desert.. Yum!
- <blue>Bought for 20e.
pigman_sandwich:
type: item
display name: 'Pigman Sandwich'
material: player_head[skull_skin=8cb93ae6-3d74-4cee-99ca-6fff3f50222a|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTQ5ZDNkODg5Y2ZmNjU1YzYyMjgzNDE4NDU1MjA1YjAzYWU3N2ZmYjdlZTE4ZGQwM2FjMGE0ZmZiODk1NjE1YiJ9fX0=]
lore:
- Zombie Pigman flank, thinly sliced
- on freshly baked bread.
- <blue>Bought for 20e.
#THE ITEMS INSIDE THE RENTAL ROOMS INVENTORY#
roomkey1:
type: item
display name: 'Room key #1'
material: player_head[skull_skin=18a9931f-8983-424a-85b8-26895d3d4a8d|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2Q4NzZmODJkNTNjNmIxM2Q4OGViMjFiZTMyMTE5ZjFhYWI2MzFkZGY2ZjZhZTlkNmJjMzc0MmVkMWRlYSJ9fX0=]
lore:
- A key for the first room in the Inn.
- <blue>Bought for 40e.
roomkey2:
type: item
display name: 'Room key #2'
material: player_head[skull_skin=18a9931f-8983-424a-85b8-26895d3d4a8d|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2Q4NzZmODJkNTNjNmIxM2Q4OGViMjFiZTMyMTE5ZjFhYWI2MzFkZGY2ZjZhZTlkNmJjMzc0MmVkMWRlYSJ9fX0=]
lore:
- A key for the second room in the Inn.
- <blue>Bought for 40e.
roomkey3:
type: item
display name: 'Room key #3'
material: player_head[skull_skin=18a9931f-8983-424a-85b8-26895d3d4a8d|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2Q4NzZmODJkNTNjNmIxM2Q4OGViMjFiZTMyMTE5ZjFhYWI2MzFkZGY2ZjZhZTlkNmJjMzc0MmVkMWRlYSJ9fX0=]
lore:
- A key for the third room at the back of the Inn.
- <blue>Bought for 30e.
roomkey4:
type: item
display name: 'Room key #4'
material: player_head[skull_skin=18a9931f-8983-424a-85b8-26895d3d4a8d|eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2Q4NzZmODJkNTNjNmIxM2Q4OGViMjFiZTMyMTE5ZjFhYWI2MzFkZGY2ZjZhZTlkNmJjMzc0MmVkMWRlYSJ9fX0=]
lore:
- A key for the fourth room at the back of the Inn.
- <blue>Bought for 30e.
#THE HANDLERS TO KEEP THE INVENTORY LOCKED WHEN OPENED#
innkeeper_inventory_menu_handler:
type: world
events:
on player clicks in innkeeper_inventory_menu:
- determine passively cancelled
on player drags innkeeper_inventory_menu:
- determine passively cancelled
inkeeper_inventory_rooms_handler:
type: world
events:
on player clicks in inkeeper_inventory_rooms:
- determine passively cancelled
on player drags inkeeper_inventory_rooms:
- determine passively cancelled
#THE ACTIONS TO BUY THE KEYS FOR THE ROOMS#
roomkey1_handler:
type: world
events:
on player clicks roomkey1 in inkeeper_inventory_rooms:
- if <player.money> >= 40
- give i@roomkey1
- take money quantity:40
- if <player.money> < "40"
- narrate "<red>You don't have enough money."
roomkey2_handler:
type: world
events:
on player clicks roomkey2 in inkeeper_inventory_rooms:
- if <player.money> > "40" take <money> qty:40
- give i@roomkey2
- if <player.money> < "40" narrate "<red>You don't have enough money."
roomkey3_handler:
type: world
events:
on player clicks roomkey3 in inkeeper_inventory_rooms:
- if <player.money> > "30" take <money> qty:30
- give i@roomkey3
- if <player.money> < "30" narrate "<red>You don't have enough money."
roomkey4_handler:
type: world
events:
on player clicks roomkey4 in inkeeper_inventory_rooms:
- if <player.money> > "30" take <money> qty:30
- give i@roomkey4
- if <player.money> < "30" narrate "<red>You don't have enough money."
#THE ACTIONS TO BUY THE DRINKS AND FOOD#
zombie_mead_handler:
type: world
events:
on player clicks zombie_mead in inkeeper_inventory_menu:
- if <player.money> > "10" take <money> qty:10
- give i@zombie_mead
- if <player.money> < "10" narrate "<red>You don't have enough money."
mug_cider_handler:
type: world
events:
on player clicks mug_cider in inkeeper_inventory_menu:
- if <player.money> > "15" take <money> qty:15
- give i@mug_cider
- if <player.money> < "15" narrate "<red>You don't have enough money."
squirrel_milk_handler:
type: world
events:
on player clicks squirrel_milk in inkeeper_inventory_menu:
- if <player.money> > "15" take <money> qty:15
- give i@squirrel_milk
- if <player.money> < "15" narrate "<red>You don't have enough money."
squid_donut_handler:
type: world
events:
on player clicks squid_donut in inkeeper_inventory_menu:
- if <player.money> > "20" take <money> qty:20
- give i@squid_donut
- if <player.money> < "20" narrate "<red>You don't have enough money."
pigman_sandwich_handler:
type: world
events:
on player clicks pigman_sandwich in inkeeper_inventory_menu:
- if <player.money> > "20" take <money> qty:20
- give i@pigman_sandwich
- if <player.money> < "20" narrate "<red>You don't have enough money."