Date: 2014/05/25 12:30:53 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
# Municipal Secretary promotes newbs to Citizen. Potential for existing Citizens
# to get other tasks/quests.
'MunicipalSecretary':
type: assignment
default constants:
npctype: "MunicipalSecretary"
interact scripts:
- 10 Citizenship
actions:
on assignment:
- run s@MunicipalSecretaryInit instantly
on spawn:
- run s@MunicipalSecretaryInit instantly
on despawn:
- queue <npc.id>_fidgetQueue stop
on exit proximity:
- run s@Fidget id:<npc.id>_fidgetQueue
- zap s@Citizenship step:GetVisa
on enter proximity:
- queue <npc.id>_fidgetQueue stop
- walk <player.location> radius:2
- if !<player.has_permission[group.citizen]> {
- chat "You<&sq>re new. Click on me to become a Citizen."
}
else {
- chat "How ya doin there <player.name>."
}
on unavailable:
- narrate 'You tap <npc.name> on the shoulder.'
'MunicipalSecretaryInit':
type: task
script:
- ^trigger name:chat state:true radius:6
- ^trigger name:click state:true radius:5
- ^trigger name:proximity state:true radius:5
- ^trigger name:damage state:false
- ^lookclose true range:4 realistic
- run s@Fidget id:<npc.id>_fidgetQueue
'CitizenshipDialogue':
type: task
script:
- chat "Well alright then. You<&sq>re going to have to get a job. No freeloading!"
- chat "Let me get your papers in order."
- wait 2s
- animate <npc> animation:wolf_shake
- chat "Ugh... I<&sq>m itchy..."
- wait 1s
- chat "Alright, here we go..."
- execute as_server "perm player <player.name> setgroup citizen"
- execute as_server "perm player <player.name> settemp -t 1 jobs.join.citizen"
- execute as_player "jobs join citizen"
- execute as_server "perm player <player.name> settemp -t 1 jobs.command.leave"
- execute as_player "jobs leave tourist"
- execute as_player "checkarmor <player.name>"
- flag player Plots_LimitGroup:citizen
- chat "Alright, you<&sq>re now a Citizen. Let<&sq>s tell everyone."
- announce "<player.name> is now a Citizen!"
- wait 2s
- chat "Eh... I suppose you<&sq>d like to be able to chat too..."
- run s@SetMemberChatChan
- wait 2s
- chat "Ok. That<&sq>s it. You<&sq>re all set. Now get out of here before I turn you into a potato!"
- wait 2s
- chat "Oh, and don<&sq>t forget to get a job you bum!"
'Citizenship':
type: interact
steps:
'GetVisa*':
click trigger:
script:
- if <player.has_permission[group.tourist]> {
- chat "So you want to become a Citizen, eh <player.name>?"
- narrate "<&6>Hint<&co> <&7>yes <&8>/ <&7>no"
}
else {
- chat "I have no side work for you <player.name>"
}
chat trigger:
'Yes':
trigger: /Yes/, I<&sq>ll do that
script:
- engage now
- if <player.has_permission[group.tourist]> {
- run s@CitizenshipDialogue
}
- disengage
'No':
trigger: /No/, I don<&sq>t want to do that
script:
- engage now
- if <player.has_permission[group.tourist]> {
- chat "I ought to turn you into a potato right now..."
- chat "Wasting my time like this..."
}
- disengage