Date: 2015/09/23 09:29:58 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
KillZombies:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
interact scripts:
- 10 KillZombiesInteract
npcchat:
type: format
format: "<&b><npc.name> <&f>to you<&co> <&2><text>"
KillZombiesInteract:
type: interact
steps:
1:
click trigger:
script:
- if <player.has_flag[KillZombiesActive]> queue clear
- if <player.has_flag[engaged]> queue clear
- flag player engaged
- wait .5s
- narrate format:npcchat "<player.name>, I am glad you are."
- wait .5s
- narrate format:npcchat "Zombies are getting plentiful in the area and I need someone to help."
- wait .5s
- narrate format:npcchat "Will you kill at least <&f>5 Zombies <&2>for me to keep them in check?"
- wait .5s
- narrate "<&2>Type <&f>Yes <&2>or <&f>No."
- flag player engaged:!
chat trigger:
1:
trigger: /Yes/, I will aid you.
script:
- if <player.has_flag[KillZombiesActive]> queue clear
- if <player.has_flag[engaged]> queue clear
- flag player engaged
- wait .5s
- narrate format:npcchat "Thank the Aesir. Please hurry and return to me when you are done."
- narrate "[<gray><&o>Kill 5 Zombies and return to Maoki.]"
- flag player KillZombiesActive
- flag player KillZombieCount:0
- flag player engaged:!
2:
trigger: /No/, I cannot help at this time.
script:
- if <player.has_flag[KillZombiesActive]> queue clear
- 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:!
KillZombiesWorld:
type: world
events:
on player kills zombie:
- if !<player.has_flag[KillZombiesActive]> queue clear
- player flag KillZombieCount:++
- if <player.flag [KillZombieCount]> >= 5 {
- wait .5s
- narrate "<gray><&o>[You have killed 5 Zombies.]"
- wait .5s
- narrate "<gray><&o>[Return to Maoki.]"
- flag player KillZombiesActive:!
- flag player KillZombiesTurnin
- flag player engaged:!
}