Date: 2015/05/31 06:33:19 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
DailyGuildQuest:
type: assignment
interact scripts:
- 10 DailyWGQuest
actions:
on assignment:
- announce "I have been assigned to npc: <npc.id>"
DailyWGQuest:
type: interact
steps:
1:
click trigger:
script:
- narrate format:npcchat "Welcome to the Warrior's Guild!"
- wait 1
- narrate format:npcchat "We take great pride in keeping the streets free from monsters."
- wait 1.2
- narrate format:npcchat "I invite you to join our ranks, and keep our townsfolk safe."
- wait 0.3
- narrate format:npcchat "Do you accept?"
- wait 0.1
- narrate format:npcchat "You can say, <green>Yes<white> or <green>No<white>."
chat trigger:
1:
trigger: /Yes/, I will join you.
script:
- narrate format:npcchat "Great! I offer daily assignments to the Guild members."
- wait 3
- narrate format:npcchat "Please come back when you'd like your first."
- zap step:return
- flag global WGMembers:->:<player>
2:
trigger: /No/, I will not join you.
script:
- narrate format:npcchat "We will make due without you..."
return:
click trigger:
script:
- random {
- narrate format:npcchat "Welcome back to the Warrior's Guild!"
- narrate format:npcchat "The Guild welcomes you back."
- narrate format:npcchat "Glad to see you are still alive."
}
- wait 1
- narrate format:npcchat "Are you ready for an assignment?"
- wait 1
- narrate "You can say <green>Yes<white> or <green>No"
chat trigger:
1:
trigger: /Yes/, I am.
script:
- random {
- zap step:zombiequest
- zap step:swordquest
}
2:
trigger: /No/, I am not.
script:
- narrate format:npcchat "Please return when you are..."
zombiequest:
script:
- random {
- narrate format:npcchat "Great to hear!"
- narrate format:npcchat "Wonderful!"
- narrate format:npcchat "The town will be so greatfull!"
}
- wait 1
- narrate format:npcchat "I need you to slay 50 zombies around town."
- flag player WGCount:0
- listen kill type:entity target:zombie qty:50 script:WGCheck
- wait 1
- narrate format:npcchat "Return to me when you have finished."
- zap step:waiting
swordquest:
script:
- random {
- narrate format:npcchat "Good to hear!"
- narrate format:npcchat "Awesome!"
- narrate format:npcchat "Our guild would welcome your help!"
}
- wait 1
- narrate format:npcchat "I need you to bring me 10 iron swords."
- wait 0.5
- narrate format:npcchat "These swords will be for the knights of the guild."
- wait 1
- narrate format:npcchat "I shall wait for you to bring me the swords."
- zap step:swordswait
swordswait:
click trigger:
script:
- if <player.inventory.contains[IRON_SWORD].qty[10]>{
- take IRON_SWORD qty:10
- narrate format:npcchat "Thank you for your help!"
- wait 0.24
- narrate format:npcchat "Here's your reward."
- wait 0.1
- narrate "<red>You have recieve <gold>$2500<red> from <npc.name>!"
- give money qty:2500
- flag player WGCooldown duration:2m
- zap step:cooldown
} else {
- narrate format:npcchat "You don't have enough swords!"
- wait 0.2
- narrate format:npcchat "Come back when you have enough swords."
}
waiting:
click trigger:
script:
- narrate "You've only killed <player.flag[WGCount].asint>/50 zombies."
- wait 1
- narrate format:npcchat "Return to the guild once you have finished!"
reward:
click trigger:
script:
- narrate format:npcchat "Well done <player.name>."
- wait 2
- narrate format:npcchat "Here is a reward for helping the us."
- wait 1
- narrate "<red>You receieved <gold>$5000<red> from <npc.name>!"
- give money qty:5000
- flag player WGCooldown duration:2m
- zap step:cooldown
cooldown:
click trigger:
script:
- narrate "<green>The guild has no more assignments for today."
- wait 2
- narrate "<green>Come back tomorrow and check again!"
WGCheck:
type: task
script:
- flag player WGCount:++
- narrate "**You've killed <player.flag[WGCount].asint>/50 zombies.**"
- if <player.flag[WGCount].asint> >= 50 run WGReward
else run WGContinue
WGContinue:
type: task
script:
- listen kill type:entity target:zombie qty:50 script:WGCheck
WGReward:
type: task
script:
- narrate "Return to the Warrior's Guild to claim your reward."
- zap script:DailyWGQuest step:reward
WGWorld:
type: world
events:
on time changes in <world.name>:
- if <global.flag[WGMembers]> == "null" queue clear
- foreach <global.flag[WGMembers].as_list> {
- if (!<%value%.as_player.flag[WGCooldown]> != "return") && (<s@DailyWGQuest.step[%value%]>) != "return" {
- zap script:DailyWGQuest step:return player:%value%
- if <%value%.as_player.is_online> {
- narrate player:%value% "<red>The Warrior's Guild needs your help."
- narrate player:%value% "<red>Return to them soon!"
}
}
}