Date: 2015/09/29 04:56:34 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
test:
type: assignment
actions:
on assignment:
- trigger name: click state:true
- trigger name: chat state:true
interact scripts:
- 1 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.has_flag[npc_engaged]> queue clear
- flag player npc_engaged
- if <player.flag[quest_kill_cow_count> == 5{
- narrate format:cchat "Thank you so much."
- flag player npc_engaged:!
- flag player quest_kill_cow_count:!
- queue clear
}
- narrate format:cchat "Hello there! can you help me?!"
- wait 5t
- narrate format:cchat "If so, you can kill 5 cows for me."
- wait 5t
- narrate format:cchat "Will you help me?!"
- wait 5t
- narrate "[<&>Type <&b><&o>Yes<&f> or <&b><&o>No<&7>]"
- flag player npc_engaged:!
chat trigger:
1:
chat trigger: /Yes/ I accept the quest.
script:
- if <player.has_flag[quest_kill_cow> queue clear
- flag player npc_engaged
- wait 5t
- narrate "[Kill 5 Cows!]"
- flag player quest_kill_cow
- flag player quest_kill_cow_count:0
- flag player npc_engaged:!
2:
trigger: /No/, sorry i'm kinda busy.
script:
- if <player.has_flag[quest_kill_cow]> queue clear
- random
{
- narrate format:cchat "Oh okay then, come back when you're not busy."
- narrate format:cchat "Well sorry for the trouble."
- narrate format:cchat "<npc.name> is now sad"
}
quest_kill_cow:
type: world
events:
on player killss cow:
- if !<player.has_flag[quest_kill_cow]> queue clear
- flag player quest_kill_cow_count:++
- if <player.flag[quest_kill_cow_count> == 5{
- narrate "[Return to the npc]"
- flag player quest_kill_cow:!
}