Date: 2017/02/05 14:46:35 UTC-08: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
"Killing the skeletons":
type: interact
steps:
1:
proximity trigger:
entry:
script:
# On player entering proximity range, run a script (located further down).
- run "skeletonkiller Check Requirements"
click trigger:
script:
# On clicking, run a slightly different script to check requirements before starting quest.
- run "skeletonkiller Quest Requirement"
2:
chat trigger:
'Start Questline':
Trigger: /Yes/, I will help you
script:
# If the player answer 'yes', this will set the quest flag to started and also start 'listening' for the player
# killing skeletons and once the player killed the number of skeletons specified at the top of the script, it will run
# the 'skeletonkiller Quest Completed' script.
- engage
- flag <player> skeletonkiller:Started "duration:<npc.constant[Quest Reset Timeout]>"
- listen kill "id:skeletonkiller Listener" type:entity qty:<npc.constant[skeletonsQty]> target:skeleton "script:skeletonkiller Quest Completed"
- chat "<yellow>Great! come back to me once you've killed <red><npc.constant[skeletonsQty]><yellow> skeletons."
- narrate "<red> Exterminate skeletons - Quest Started"
- disengage
'Deny Questline':
Trigger: /No/
script:
# If the player says 'no', then display one of the following 3 messages and put them back at Step 1 for 'Killing
# the skeletons' script.
- random {
- chat "<yellow>Don't worry, one will probably blow you up soon anyways... They're quite active at night..."
- chat "<yellow>That's a damn shame. Come back when you change your mind."
- chat "<yellow>Coulda used your help stranger; brother lost a leg to the damn varmits." }
- zap step:1
proximity trigger:
exit:
script:
# If they exit the proximity trigger for the NPC, put them back at Step 1 so they get presented with the
# relevant options when they come back later.
- zap step:1
click trigger:
script:
# This is simply to present the options again if the player accidentally clicks the NPC, rather than type a response.
- run "skeletonkiller Quest Requirement"