Date: 2015/07/25 14:10:12 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
myassignment:
type: assignment
actions:
on assignment:
- trigger name:click state:true
- trigger name:chat state:true
interact scripts:
- 10 npc_killquest_interact
cchat:
type: format
format: "<&b><npc.name> <&f>to you<&co> <&2><text>"
npc_killquest_interact:
type: interact
steps:
1:
click trigger:
script:
- if <player.flag[npc_engaged]> queue clear
- if <player.flag[kill_zombie_quest_cooldown]> {
- narrate "You can repeat this quest in <player.flag[kill_zombie_quest_cooldown].expiration.formatted>"
- queue clear
}
- flag player npc_engaged
- if <player.flag[kill_zombie_quest_count]> == 6 {
- narrate format:cchat "Great work! Heres your prize!"
- give i@diamond
- flag player kill_zombie_quest_count:!
- flag player kill_zombie_quest_cooldown duration:1t
- disengage
- flag player npc_engaged:!
- queue clear
}
- engage
- narrate format:cchat "Hello there. Would you care for a special prire?"
- wait 5t
- narrate format:cchat "If so, you can kill 5 zombies for me."
- wait 5t
- narrate format:cchat "Will you accept this request?"
- wait 5t
- narrate "[<&o>Type <&b>Yes<&f><&o> or <&b>No<&7>]"
- disengage
- flag player npc_engaged:!
chat trigger:
1:
trigger: /Yes/ I accept the quest
script:
- if <player.flag[kill_zombie_quest_cooldown]> {
- queue clear
}
- if <player.has_flag[kill_zombie_quest]> queue clear
- engage
- narrate "Ok great!" format:cchat
- wait 5t
- narrate "[Kill 5 zombies!]"
- flag player kill_zombie_quest
- flag player kill_zombie_quest_count:0
- disengage
2:
trigger: /No/ I don't
script:
- if <player.has_flag[kill_zombie_quest]> queue clear
- random {
- narrate format:cchat "Okay screw off!"
- narrate format:cchat "Okay then."
- narrate format:cchat "Screw you then!"
}
killquest_zombie_world:
type: world
events:
on player kills zombie:
- if !<player.has_flag[kill_zombie_quest]>
- flag player kill_zombie_quest_count:++
- if <player.flag[kill_zombie_quest_count]>: == 5 {
- narrate "[Return to the NPC]"
- flag player kill_zombie_quest:!
}