Paste #5826: Cathar Steward

Date: 2014/06/27 12:30:32 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461


# +----------------------------------
# |   Cathar Steward
# +----------------------------------

Cathar_Steward:
    type: assignment
    interact scripts:
    - 10 Cathar_Steward_Script
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:true

Cathar_Steward_Script:
    type: interact
    steps:
        1:
            proximity Trigger:
                entry:
                    Script:
                      - if <player.in_group[Cathar]> {
                        - if <player.in_group[Alchemist]> || <player.in_group[Blacksmith]> || <player.in_group[Cook]> || <player.in_group[Enchanter]> || <player.in_group[Engineer]> || <player.in_group[Farmer]> || <player.in_group[Guard]> || <player.in_group[Hunter]> || <player.in_group[Lumberjack]> || <player.in_group[Miner]> || <player.in_group[Shipwright]> || <player.in_group[Leader]> {
                          - zap step:GotProfession
                          } else {
                          - narrate "<green>[Steward] -> You<&co> <yellow>You must be the rookie Aris Mentioned."
                          - wait 1
                          - narrate "<green>[Steward] -> You<&co> <yellow>I'm the steward of Cathar"
                          - wait 1
                          - narrate "<green>[Steward] -> You<&co> <yellow>If you want to be a part of our city. You best make yourself useful"
                          - wait 2
                          - narrate "<green>[Steward] -> You<&co> <yellow>What's your profession?"
                          - wait 2
                          - execute as_server "sudo <player.name> menu open Job_Menu"
                          - zap step:ChooseProfession
                          }
                        }
            Click Trigger:
                Script:
                      - if !<player.in_group[Cathar]> {
                        - narrate "<green>[Steward] -> You<&co> <yellow>Are you interested in joining our city Outsider?"
                        - zap step:ChooseNewCity
                        }
        ChooseProfession:
            chat Trigger:
                1:
                    Trigger: "/regex:.*Alchemist.|.*alchemist.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Alchemist"
                      - narrate "<green>[Steward] -> You<&co> <yellow>An Alchemist? There's always room for another Apothecary here in Cathar."
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                2:
                    Trigger: "/regex:.*Blacksmith.|.*blacksmith.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Blacksmith"
                      - narrate "<green>[Steward] -> You<&co> <yellow>Ahh a blacksmith, I should've guessed"
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                3:
                    Trigger: "/regex:.*Cook.|.*cook.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Cook"
                      - narrate "<green>[Steward] -> You<&co> <yellow>A cook? that's a fine way to make a coin in this town"
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                4:
                    Trigger: "/regex:.*Enchanter.|.*enchanter.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Enchanter"
                      - narrate "<green>[Steward] -> You<&co> <yellow>an Enchanter? that's a rare sight in these regions. I wish you luck!"
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                5:
                    Trigger: "/regex:.*Engineer.|.*engineer.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Engineer"
                      - narrate "<green>[Steward] -> You<&co> <yellow>ahh an Engineer, there's always a need for locks and keys."
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                6:
                    Trigger: "/regex:.*Farmer.|.*farmer.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Farmer"
                      - narrate "<green>[Steward] -> You<&co> <yellow>A farmer? now that's an honorary job."
                      - wait 2
                      - narrate "<green>[Steward] -> You<&co> <yellow>You will find fields to do your work south of the wall."
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                7:
                    Trigger: "/regex:.*Guard.|.*guard.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Guard"
                      - narrate "<green>[Steward] -> You<&co> <yellow>a Guard? an honorary Job If I've ever heard one."
                      - if <player.flag[portal]> == 'true' {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                8:
                    Trigger: "/regex:.*Hunter.|.*hunter.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Hunter"
                      - narrate "<green>[Steward] -> You<&co> <yellow>a Hunter, an honest profession. Supply the cooks and city with meat,"
                      - wait 1
                      - narrate "<green>[Steward] -> You<&co> <yellow> and you'll be well paid for your services to Cathar."
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                9:
                    Trigger: "/regex:.+/"
                    Script:
                      - narrate "<green>[Steward] -> You<&co> <yellow>I'm sorry. I haven't heard of that before."
                      - wait 2
                      - narrate "<green>[Steward] -> You<&co> <yellow>Please choose your profession."
                      - wait 2
                      - execute as_server "sudo <player.name> menu open Job_Menu"
                10:
                    Trigger: "/regex:.*Lumberjack.|.*lumberjack.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Lumberjack"
                      - narrate "<green>[Steward] -> You<&co> <yellow>ahh a Lumberjack. I should've known, You'll find the lumberfarms south of wall."
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                11:
                    Trigger: "/regex:.*Miner.|.*miner.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Miner"
                      - narrate "<green>[Steward] -> You<&co> <yellow>ahh a Miner, there's always a need for metals and coal."
                      - wait 1
                      - narrate "You'll find the mine of Cathar in the South-west corner of the inner city."
                      - if <player.flag[portal]> {
                        - run portal_steward
                        }
                      - zap step:GotProfession
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
            Click Trigger:
                Script:
                  - narrate "<green>[Steward] -> You<&co> <yellow>Please choose your profession."
                  - wait 2
                  - execute as_server "sudo <player.name> menu open Job_Menu"
        ChooseNewCity:
            chat Trigger:
                1:
                    Trigger: "/regex:.*Yes.*|.*yes.*|.*Yeah.*|.*yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*alright.*/"
                    Script:
                      - if <player.in_group[Lindorthell]> == "true"{
                        - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Lindorthell to join Cathar and the nation Ducaria?"
                        - narrate "<red>Joining a new city will reset your reputation points with Lindorthell and make you a traitor!"
                        - zap step:NewCity
                        }
                      - if <player.in_group[Roskgrod]> == "true"{
                        - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Roskgrod to join Cathar and the nation Ducaria?"
                        - narrate "<red>Joining a new city will reset your reputation points with Roskgrod and make you a traitor!"
                        - zap step:NewCity
                        }
                      - if <player.in_group[Orgoroth]> == "true"{
                        - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Orgoroth to join Cathar and the nation Ducaria?"
                        - narrate "<red>Joining a new city will reset your reputation points with Orgoroth and make you a traitor!"
                        - zap step:NewCity
                        }
                      - if <player.in_group[Rhovan]> == "true"{
                        - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Rhovan to join Cathar and the nation Ducaria?"
                        - narrate "<red>Joining a new city will reset your reputation points with Rhovan and make you a traitor!"
                        - zap step:NewCity
                        }
                2:
                    Trigger: "/regex:.+/"
                    Script:
                      - narrate "<green>[Steward] -> You<&co> <yellow>Very well outsider"
                      - zap step:1
            Click Trigger:
                Script:
                  - narrate "<green>[Thegn] -> You<&co> <yellow>Are you interested in joining our city Outsider?"
        NewCity:
            chat Trigger:
                1:
                    Trigger: "/regex:.*Yes.*|.*yes.*|.*Yeah.*|.*yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*alright.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> Lindorthell"
                      - execute as_server "manudelsub <player.name> Roskgrod"
                      - execute as_server "manudelsub <player.name> Orgoroth"
                      - execute as_server "manudelsub <player.name> Rhovan"
                      - execute as_server "manuaddsub <player.name> Cathar"
                      - execute as_server "sudo <player.name> town leave"
                      - execute as_server "townyadmin town Cathar add <player.name>"
                      - wait 1
                      - execute as_server "sudo <player.name> accept"
                      - narrate "Welcome to Cathar capital of Ducaria!"
                      - wait 1
                      - zap step:1
                2:
                    Trigger: "/regex:.+/"
                    Script:
                      - narrate "<green>[Steward] -> You<&co> <yellow>Very well outsider. If you ever change your mind come see me."
                      - zap step:1
            Click Trigger:
                Script:
                  - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Rhovan to join Cathar and the nation Ducaria?"
                  - if <player.in_group[Lindorthell]> == "true"{
                    - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Lindorthell to join Cathar and the nation Ducaria?"
                    - narrate "<red>Joining a new city will reset your reputation points with Lindorthell and make you a traitor!"
                    - zap step:NewCity
                    }
                  - if <player.in_group[Roskgrod]> == "true"{
                    - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Roskgrod to join Cathar and the nation Ducaria?"
                    - narrate "<red>Joining a new city will reset your reputation points with Roskgrod and make you a traitor!"
                    - zap step:NewCity
                    }
                  - if <player.in_group[Orgoroth]> == "true"{
                    - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Orgoroth to join Cathar and the nation Ducaria?"
                    - narrate "<red>Joining a new city will reset your reputation points with Orgoroth and make you a traitor!"
                    - zap step:NewCity
                    }
                  - if <player.in_group[Rhovan]> == "true"{
                    - narrate "<green>[Steward] -> You<&co> <red>Are you sure you want to leave Rhovan to join Cathar and the nation Ducaria?"
                    - narrate "<red>Joining a new city will reset your reputation points with Rhovan and make you a traitor!"
                    - zap step:NewCity
                    }
        GotProfession:
            proximity Trigger:
                entry:
                    Script:
                      - if <player.in_group[SecondProfession]> {
                        - if !<player.flag[GotSecondProfession]> {
                          - if <player.in_group[GenderMale]> {
                            - narrate "<green>[Steward] -> You<&co> <yellow>You look like a man with many skills"
                            - wait 1
                            - narrate "<green>[Steward] -> You<&co> <yellow>What is your second profession?"
                            - execute as_server "sudo <player.name> menu open Job_Menu"
                            - zap step:SecondProfession
                            }
                          - if <player.in_group[GenderFemale]> {
                            - narrate "<green>[Steward] -> You<&co> <yellow>You look like a misses with many skills"
                            - wait 1
                            - narrate "<green>[Steward] -> You<&co> <yellow>What is your second profession?"
                            - execute as_server "sudo <player.name> menu open Job_Menu"
                            - zap step:SecondProfession
                            }
                          }
                        }
            Click Trigger:
                Script:
                  - if <player.in_group[SecondProfession]> {
                    - if !<player.flag[GotSecondProfession]> {
                      - if <player.in_group[GenderMale]> {
                        - narrate "<green>[Steward] -> You<&co> <yellow>You look like a man with many skills"
                        - wait 1
                        - narrate "<green>[Steward] -> You<&co> <yellow>What is your second profession?"
                        - execute as_server "sudo <player.name> menu open Job_Menu"
                        - zap step:SecondProfession
                        }
                      - if <player.in_group[GenderFemale]> == "true"{
                        - narrate "<green>[Steward] -> You<&co> <yellow>You look like a misses with many skills"
                        - wait 1
                        - narrate "<green>[Steward] -> You<&co> <yellow>What is your second profession?"
                        - execute as_server "sudo <player.name> menu open Job_Menu"
                        - zap step:SecondProfession
                        }
                      }
                    }
                  - if !<player.flag[ProfessionChange]> {
                    - narrate "<green>[Steward] -> You<&co> <yellow>Do you want to change your profession?"
                    - narrate "<red>You can only change your profession once per character, choose carefully!"
                    - zap step:ChangeProfession
                    }
        ChangeProfession:
            chat Trigger:
                1:
                    Trigger: "/regex:.*Yes.*|.*yes.*|.*Yeah.*|.*yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*alright.*/"
                    Script:
                      - narrate "<green>[Steward] -> You<&co> <yellow>Very well, what would be a profession that suites your skills?"
                      - wait 1
                      - execute as_server "sudo <player.name> menu open Job_Menu"
                      - execute as_server "manudelsub <player.name> Miner"
                      - execute as_server "manudelsub <player.name> Lumberjack"
                      - execute as_server "manudelsub <player.name> Farmer"
                      - execute as_server "manudelsub <player.name> Hunter"
                      - execute as_server "manudelsub <player.name> Engineer"
                      - execute as_server "manudelsub <player.name> Cook"
                      - execute as_server "manudelsub <player.name> Alchemist"
                      - execute as_server "manudelsub <player.name> Enchanter"
                      - execute as_server "manudelsub <player.name> Blacksmith"
                      - flag player "ProfessionChange"
                      - flag player "GotSecondProfession":!
                      - zap step:ChooseProfession
                2:
                    Trigger: "/regex:.+/"
                    Script:
                      - narrate "<green>[Steward] -> You<&co> <yellow>Very well outsider. If you ever change your mind come see me."
                      - zap step:GotProfession
            Click Trigger:
                Script:
                  - narrate "<green>[Steward] -> You<&co> <yellow>Do you want to change your profession?"
                  - narrate "<red>You can only change your profession once per character, choose carefully!"
        SecondProfession:
            chat Trigger:
                1:
                    Trigger: "/regex:.*Alchemist.|.*alchemist.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Alchemist"
                      - narrate "<green>[Steward] -> You<&co> <yellow>An Alchemist? There's always room for another Apothecary here in Cathar."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                2:
                    Trigger: "/regex:.*Blacksmith.|.*blacksmith.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Blacksmith"
                      - narrate "<green>[Steward] -> You<&co> <yellow>Ahh a blacksmith, I should've guessed"
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                3:
                    Trigger: "/regex:.*Cook.|.*cook.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Cook"
                      - narrate "<green>[Steward] -> You<&co> <yellow>A cook? that's a fine way to make a coin in this town"
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                4:
                    Trigger: "/regex:.*Enchanter.|.*enchanter.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Enchanter"
                      - narrate "<green>[Steward] -> You<&co> <yellow>an Enchanter? that's a rare sight in these regions. I wish you luck!"
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                5:
                    Trigger: "/regex:.*Engineer.|.*engineer.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Engineer"
                      - narrate "<green>[Steward] -> You<&co> <yellow>ahh an Engineer, there's always a need for locks and keys."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                6:
                    Trigger: "/regex:.*Farmer.|.*farmer.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Farmer"
                      - narrate "<green>[Steward] -> You<&co> <yellow>A farmer? now that's an honorary job."
                      - wait 2
                      - narrate "<green>[Steward] -> You<&co> <yellow>You will find fields to do your work south of the wall."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                7:
                    Trigger: "/regex:.*Guard.|.*guard.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Guard"
                      - narrate "<green>[Steward] -> You<&co> <yellow>a Guard? an honorary Job If I've ever heard one."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                8:
                    Trigger: "/regex:.*Hunter.|.*hunter.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Hunter"
                      - narrate "<green>[Steward] -> You<&co> <yellow>a Hunter, an honest profession. Supply the cooks and city with meat,"
                      - wait 1
                      - narrate "<green>[Steward] -> You<&co> <yellow> and you'll be well paid for your services to Cathar."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                9:
                    Trigger: "/regex:.+/"
                    Script:
                      - narrate "<green>[Steward] -> You<&co> <yellow>I'm sorry. I haven't heard of that before."
                      - wait 2
                      - narrate "<green>[Steward] -> You<&co> <yellow>Please choose your profession."
                      - wait 2
                      - execute as_server "sudo <player.name> menu open Job_Menu"
                10:
                    Trigger: "/regex:.*Lumberjack.|.*lumberjack.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Lumberjack"
                      - narrate "<green>[Steward] -> You<&co> <yellow>ahh a Lumberjack. I should've known, You'll find the lumberfarms south of wall."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
                11:
                    Trigger: "/regex:.*Miner.|.*miner.*/"
                    Script:
                      - execute as_server "manudelsub <player.name> No-Character"
                      - execute as_server "manuaddsub <player.name> Miner"
                      - narrate "<green>[Steward] -> You<&co> <yellow>ahh a Miner, there's always a need for metals and coal."
                      - wait 1
                      - narrate "You'll find the mine of Cathar in the South-west corner of the inner city."
                      - zap step:GotProfession
                      - flag player "GotSecondProfession"
                      - wait 1
                      - execute as_server "manuaddsub <player.name> No-Character"
            Click Trigger:
                Script:
                  - narrate "<green>[Steward] -> You<&co> <yellow>Please choose your second profession."
                  - wait 2
                  - execute as_server "sudo <player.name> menu open Job_Menu"