Date: 2015/09/24 13:49:29 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
KillZombies:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
- trigger name:proximity state:true radius:4
interact scripts:
- 10 KillZombiesInteract
npcchat:
type: format
format: "<&b><npc.name> <&f>to you<&co> <&2><text>"
KillZombiesWorld:
type: world
events:
on player kills zombie:
- if !<player.has_flag[KillZombiesActive]> queue clear
- flag player KillZombieCount:++
- if <player.flag[KillZombieCount]> >= 5 {
- wait 1s
- narrate "<gray><italic>[You have killed 5 Zombies.]"
- wait 1s
- narrate "<gray><italic>[Return to Maoki.]"
- flag player KillZombiesActive:!
- flag player KillZombieCount:!
- flag player KillZombiesTurnin
}
KillZombiesInteract:
type: interact
steps:
1:
click trigger:
script:
- if <player.has_flag[engaged]> {
- queue clear
}
else {
- flag player engaged
- narrate format:npcchat "<player.name>, I am glad you are here."
- wait 3s
- narrate format:npcchat "Zombies are getting plentiful in the area and I need someone to help."
- wait 3s
- narrate format:npcchat "Will you kill at least <white>5 Zombies <dark_green>for me to help keep them in check?"
- wait 3s
- narrate "<dark_green>Type <white>Yes <dark_green>or <white>No."
- flag player engaged:!
- zap step:2
}
2:
chat trigger:
1:
trigger: /Yes/, I will aid you.
script:
- if <player.has_flag[engaged]> queue clear
- flag player engaged
- narrate format:npcchat "Thank the Aesir. Please hurry and return to me when you are done."
- wait 2s
- narrate "[<gray><&o>Kill 5 Zombies and return to Maoki.]"
- flag player KillZombieCount:0
- flag player KillZombiesActive
- flag player engaged:!
- zap step:3
2:
trigger: /No/, I cannot help at this time.
script:
- if <player.has_flag[engaged]> queue clear
- flag player engaged
- random {
- narrate format:npcchat "Well then...hopefully I can keep them at bay until you can help."
- narrate format:npcchat "I understand. At least keep watch in case they become too great in number."
- narrate format:npcchat "I am sorry to hear that. Please come back soon. We could really use your help."
}
- flag player engaged:!
- zap step:1
3:
click trigger:
script:
- if <player.has_flag[KillZombiesActive]> {
- flag player engaged
- random {
- narrate format:npcchat "Please, do not waste any time. The sooner those zombies are killed, the better off we will be."
- narrate format:npcchat "I hope the zombies are not too much trouble for you. They always seem to grow in number."
- narrate format:npcchat "I cannot thank you enough for helping. I will feel so much better knowing you have culled those things."
}
- flag player engaged:!
}
else if <player.has_flag[KillZombiesTurnin]> {
- flag player engaged
- narrate format:npcchat "It seems you have helped exterminate some of the zombies."
- wait 2s
- narrate format:npcchat "You are a true friend to have helped me. Please take this as a token of my thanks."
- wait 3s
- narrate "<gray><&o>[You have received 1 diamond from Maoki.]"
- give i@diamond
- wait 3s
- narrate format:npcchat "I hope that will suffice for now, <player.name>. I may soon again call for your aid."
- flag player KillZombiesTurnin:!
- flag player KillZombiesCooldown duration:24h
- flag player engaged:!
- zap step:4
}
4:
click trigger:
script:
- if <player.flag[KillZombiesCooldown]> == 0h {
- narrate format:npcchat "Ah, you have come back to help with more zombies have you?"
- narrate "<dark_green>Type <white>Yes <dark_green>or <white>No."
- zap step:5
}
else if <player.flag[KillZombiesCooldown]> > 0h {
- wait 1s
- narrate format:npcchat "Thankfully the zombies are not too great in number right now."
- wait 2s
- narrate format:npcchat "Come back in <player.flag[KillZombiesCooldown].expiration.formatted> and you can help again!"
}
5:
chat trigger:
1:
trigger: /Yes/, I want help again.
script:
- narrate format:npcchat "Very good then! I am always happy to have your help!"
- wait 1s
- narrate "[<gray><&o>Kill 5 Zombies and return to Maoki.]"
- flag player KillZombieCount:0
- flag player KillZombiesActive
- flag player engaged:!
- zap step:3