Date: 2019/02/06 16:24:10 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# ████████████████████████████████████████████████████
# ██ New Formats
# ██
# ██▓▓▒▒░░
# [ These will be removed and placed into a Universal file later, to be used globally through multiple quests later on as quests grow ]
cgf:
type: format
debug: false
format: <&c><npc.name.to_titlecase> Chef Geoph <&co> <&r><&o><text>
# ████████████████████████████████████████████████████
# ██ Procedures
# ██
# ██▓▓▒▒░░
# ███ [ NPC_NAME Assignment ] ███
# ███ [ Assign "NPC_NAME" to the npc you would like to use ] ███
ChefGeoph:
type: assignment
debug: false
actions:
on assignment:
- trigger name:click state:true
on click:
- if !<player.has_flag[NpcEngaged]>:
- inject locally NPC_init
# ████████████████████████████████████████████████████
# ██ Custom script paths to be injected/run
# ██ (These do not need changed)
# ██
# ██▓▓▒▒░░
opt_loop:
- define sig <util.random.uuid>
- flag player sig:<def[sig]>
- foreach <script.yaml_key[<def[1]>]>:
- define value <def[value].split[/].limit[2]>
- narrate "<proc[option].context[<def[value].get[2]>|<def[value].get[1]>|<npc>|<def[sig]>]>"
# ████████████████████████████████████████████████████
# ██ Initiation Scripts
# ██
# ██▓▓▒▒░░
# ███ [ First time a player talks to npc ] ███
NPC_init:
- narrate format:cgf "<script.yaml_key[d1]>"
- wait 1s
- run locally opt_loop def:o1 instantly
# ████████████████████████████████████████████████████
# ██ Custom script paths to be injected/run
# ██
# ██▓▓▒▒░░
# ███ [ Option 1 ] ███
# ███ [ Response 1 ] ███
geoph_green_sauce:
- narrate format:cgf "<script.yaml_key[d2]>"
- wait 2s
- narrate format:cgf "<script.yaml_key[d3]>"
- wait 2s
- run locally opt_loop def:o2 instantly
# ███ [ Option 1 ] ███
# ███ [ Response 2 ] ███
geoph_suck_it_up:
- narrate format:cgf "<script.yaml_key[d4]>"
- wait 2s
- narrate format:cgf "<script.yaml_key[d5]>"
# ███ [ Option 2 ] ███
# ███ [ Response 1 ] ███
geoph_get_potatos:
# Wait until the player has retrieved some potatos
- narrate format:cgf "<script.yaml_key[d6]>"
# Give player an emerald
# ███ [ Option 2 ] ███
# ███ [ Response 2 ] ███
geoph_no_get_potatos:
- narrate format:cgf "<script.yaml_key[d7]>"
# ████████████████████████████████████████████████████
# ██ Option Scripts
# ██
# ██▓▓▒▒░░
# ███ [ Option 01 | NPC_NAME: "" ] ███
o1:
- "geoph_green_sauce/<&a>I think that tomato sauce is green..."
- "geoph_suck_it_up/<&a>Here, let me try it... *holding back tears* it tastes fine to me"
# ███ [ Option 02 | NPC_NAME: "" ] ███
o2:
- "geoph_get_potatos/<&a>Alright, I'll go find some potatos"
- "geoph_no_get_potatos/<&a>I don't think tomato sauce needs potatos, I'll pass."
# ████████████████████████████████████████████████████
# ██ Dialog
# ██
# ██▓▓▒▒░░
# ███ [ Chef Geoph dialogue ] ███
d1: "AH! I can't seem to get this tomato sauce right! What am I doing wrong? Here, can you help me?"
d2: "What? The sauce isn't green, is it? oh..."
d3: "You wouldn't mind going and fetching some potatos, would you?"
d4: "Wow! I've never heard anyone say that about my cooking before! Thanks!"
d5: "Here's some gold nuggets, you just made my day!"
d6: "Thanks for getting those potatos! Here's an emerald."
d7: "Fine! I didn't want your help anyways..."