Date: 2015/07/31 22:38:49 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
BookGiveAssignment:
type: assignment
actions:
on assignment:
- trigger name:proximity state:true radius:5 cooldown:10
- flag <npc> Sales:0
interact scripts:
- 10 BookGive
BookGive:
type: interact
steps:
1:
proximity trigger:
entry:
script:
- pause navigation 45s
- ~look <npc> <player.location>
- chat "Hey, <player.name>! Would you like to buy the latest edition of the Salenia Herald?"
- wait 1
- narrate "Salenia Herald - Edition VII - Published 8/1/2015"
- ^narrate "Would you like to purchase a copy for $2? [Yes/No]"
exit:
script:
- resume navigation
chat trigger:
1:
trigger: /Yes/, I would love a copy!
script:
- chat "Great! Here you go!"
- wait 1
- if <player.money> < 2 {
- chat "Oh no, you don't have enough money! Come back later when you've acquired enough."
- wait 3
- resume navigation
- zap step:1
}
- narrate "You hand <npc.name> $2 in exchange for a copy."
- ^take money qty:2
- ^scribe give script:Book
- wait 3
- chat "See you later!"
- wait 3
- resume navigation
- zap step:1
2:
trigger: /No/, I am not interested at the moment.
script:
- chat "That's okay! If you change your mind, just look for me!"
- wait 3
- resume navigation
- zap step:1
3:
trigger: /SALES/
script:
- chat "We've sold <npc.flag[Sales]> copies this week!"
Book:
type: book
title: "Herald VII"
author: "AuburnAttack21"
text:
- insert text here