Date: 2020/06/18 01:56:48 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
#Acts as the start of the process
NPost_main_task:
type: assignment
interact scripts:
- Npost_interact
actions:
on assignment:
- trigger name:click state:true
on click:
- chat "Oh, hey <player.name>! Fred here with Nordic Post. How can I help you?"
#initialization and definitions
Npost_init:
type: task
script:
- define npcLocation:<location.town>
- define playerpartoftown:<player.has_town>
- define playertown:<player.town>
- define townstatus:<Town.is_open>
#interact scripts
Npost_interact:
type: interact
steps:
1:
# This determines what menu to displays
# Residents of the town gets Menu 2 automatically.
- if <[npcLocation]> == <[playertown]>:
- wait 3s
- zap 2
#then it checks if the town is open, even?
# If Town is closed, disables the join option for Non-Residents or Wanderers.
- else if <[townstatus]> == false:
- wait 5s
- zap 5
# Non-Residents of the town gets Menu 3 (allows to switch towns).
# Runs a if town is open or not.
- else if <[townstatus]> && <[npcLocation]> != <[playertown]>:
- wait 3s
- zap 3
# wanderers will fall into this condition
- else if <[playerpartoftown]> == false && <[townstatus]>:
- wait 3s
- zap 4
# any other options (does not belongs to any town or wonky) gets Menu 4. Sloppy cleanup.
- else
- wait 5s
- zap 5
2:
#current residents menu
events:
- inventory open d:in@Post_Inventory_Menu_CurrentTown
on player clicks in Post_Inventory_Menu_CurrentTown priority:100:
- determine cancelled
on player drags in Post_Inventory_Menu_CurrentTown priority:100:
- determine cancelled
on player clicks PIM_readmail in Post_Inventory_Menu_CurrentTown:
- ex as_op /mailme read
on player clicks PIM_sendmail in Post_Inventory_Menu_CurrentTown:
- ex as_op /mailme send
on player clicks PIM_leavetown in Post_Inventory_Menu_CurrentTown:
- inventory open d:in@PIM_ConfirmLeave
on player clicks PIM_exit in Post_Inventory_Menu_CurrentTown:
- inventory close
3:
#Non-Residents Menu
events:
- inventory open d:in@Post_Inventory_Menu_NotMemberTown
on player clicks in Post_Inventory_Menu priority:100:
- determine cancelled
on player drags in Post_Inventory_Menu priority:100:
- determine cancelled
on player clicks PIM_readmail in Post_Inventory_Menu:
- ex as_op /mailme read
on player clicks PIM_sendmail in Post_Inventory_Menu:
- ex as_op /mailme send
on player clicks PIM_switchtown in Post_Inventory_Menu:
- inventory open d:in@PIM_ConfirmSwitch
on player clicks PIM_exit in Post_Inventory_Menu:
- inventory close
4:
#Wanderers Menu
events:
- inventory open d:in@Post_Inventory_Menu_Wanderer
on player clicks in Post_Inventory_Menu priority:100:
- determine cancelled
on player drags in Post_Inventory_Menu priority:100:
- determine cancelled
on player clicks PIM_readmail in Post_Inventory_Menu:
- ex as_op /mailme read
on player clicks PIM_sendmail in Post_Inventory_Menu:
- ex as_op /mailme send
on player clicks PIM_leavetown in Post_Inventory_Menu:
- inventory open d:in@PIM_Confirm
on player clicks PIM_exit in Post_Inventory_Menu:
- inventory close
5:
#Closed Town Menu
events:
- inventory open d:in@Post_Inventory_Menu_ClosedTown
on player clicks in Post_Inventory_Menu priority:100:
- determine cancelled
on player drags in Post_Inventory_Menu priority:100:
- determine cancelled
on player clicks PIM_readmail in Post_Inventory_Menu:
- ex as_op /mailme read
on player clicks PIM_sendmail in Post_Inventory_Menu:
- ex as_op /mailme send
on player clicks PIM_exit in Post_Inventory_Menu:
- inventory close
# Menu Lists/Actions
Post_inventory_Menu_CurrentTown:
type: inventory
inventory: chest
title: Nordic Post Office Menu - Current Resident
Size: 27
slots:
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
- "[PIM_filler] [PIM_readmail] [PIM_filler] [PIM_sendmail] [PIM_filler] [PIM_leavetown] [PIM_filler] [PIM_exit] [PIM_filler]"
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
Post_Inventory_Menu_JoinableTown:
type: inventory
inventory: chest
title: Nordic Post Office Menu - Wanderer
Size: 27
slots:
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
- "[PIM_filler] [PIM_readmail] [PIM_filler] [PIM_sendmail] [PIM_filler] [PIM_jointown] [PIM_filler] [PIM_exit] [PIM_filler]"
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
Post_Inventory_Menu_NotMemberTown:
type: inventory
inventory: chest
title: Nordic Post Office Menu - Non-Resident
Size: 27
slots:
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
- "[PIM_filler] [PIM_readmail] [PIM_filler] [PIM_sendmail] [PIM_filler] [PIM_switchtown] [PIM_filler] [PIM_exit] [PIM_filler]"
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
Post_Inventory_Menu_ClosedTown:
type: inventory
inventory: chest
title: Nordic Post Office Menu - Town Closed to New Residents
Size: 27
slots:
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
- "[PIM_filler] [PIM_readmail] [PIM_filler] [PIM_sendmail] [PIM_filler] [PIM_denytown] [PIM_filler] [PIM_exit] [PIM_filler]"
- "[PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler] [PIM_filler]"
PIM_ConfirmScreen:
type: inventory
inventory: hopper
title: Do you Confirm Joining <[npcLocation]>?
size: 5
slots:
- "[PIM_filler][PIM_Confirm][PIM_filler][PIM_Deny][PIM_filler]"
PIM_Confirmleave:
type: inventory
inventory: hopper
title: Do you Confirm your Action?
size: 5
slots:
- "[PIM_filler][PIM_Confirm][PIM_filler][PIM_Deny][PIM_filler]"
PIM_ConfirmSwitch:
type: inventory
inventory: hopper
title: Do you Confirm you want to switch towns from <&l><[playerTown]> to <&l><[npcLocation]]>?
size: 5
slots:
- "[PIM_filler][PIM_switchtown][PIM_filler][PIM_Deny][PIM_filler]"
PIM_filler:
type: item
material: black_stained_glass
PIM_readmail:
type: item
material: written_book
display name: Read my Mail
PIM_sendmail:
type: item
material: book_and_quill
display name: Write an Mail Message
PIM_leavetown:
type: item
material: red_bed
display name: Leave this Town?
PIM_jointown:
type: item
material: green_bed
display name: Join this Town?
PIM_switchtown:
type: item
material: green_bed
display name: Change your Town Citizenship to this Town?
PIM_denytown:
type: item
material: barrier
display name: You are not permitted to join this town at this time!
PIM_exit:
type: item
material: barrier
display name: Exit this Menu
PIM_Confirm:
type: item
material: green_wool
display name: Yep, I confirm.
PIM_Deny:
type: item
material: red_wool
display: No, I changed my mind!
PIM_switchtown:
type: item
material: red_wool
display: Switch my town to this town!