1 |
event_inherited(); |
2 |
if (interact) |
3 |
can_talk = true; |
4 |
if (can_talk == true) |
5 |
{ |
6 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
7 |
is_talking = 1; |
8 |
with (msg) |
9 |
{ |
10 |
dialogue_is_minishop = true; |
11 |
portrait = false; |
12 |
sndfnt = 99; |
13 |
if (other.npc_flag == 0) |
14 |
{ |
15 |
message[0] = "* Hello, traveler!"; |
16 |
message[1] = "* Would you be interested in# having your fortune told?"; |
17 |
message[2] = "* Only 5G per fortune!"; |
18 |
message[3] = "* Now, you may be thinking that# price is a little low."; |
19 |
message[4] = "* What quality fortune from an# experienced fortune teller# costs 5G?"; |
20 |
message[5] = "* Well, your suspicions would be# correct!"; |
21 |
message[6] = "* See, I'm a fortune teller in# training, so I'm selling tiny# fortunes!"; |
22 |
message[7] = "* Practice, you see."; |
23 |
message[8] = "* So, can I interest you in a# bite-sized fortune?"; |
24 |
ch_msg = 8; |
25 |
} |
26 |
else if (other.npc_flag <= 5) |
27 |
{ |
28 |
message[0] = "* Tiny fortunes, still only 5G!"; |
29 |
message[1] = "* Would you like one?"; |
30 |
ch_msg = 1; |
31 |
} |
32 |
else if (other.npc_flag == 6) |
33 |
{ |
34 |
message[0] = "* Oh, I am sorry but I cannot# give anymore fortunes now."; |
35 |
message[1] = "* As part of my training, I can# only see the future four times# a day."; |
36 |
message[2] = "* You may come back tomorrow!"; |
37 |
other.can_talk = false; |
38 |
other.npc_flag++; |
39 |
} |
40 |
else if (other.npc_flag == 7) |
41 |
{ |
42 |
message[0] = "* Is it tomorrow already?"; |
43 |
message[1] = "* I am never sure."; |
44 |
message[2] = "* It is hard to tell when you# cannot see the sun go down."; |
45 |
message[3] = "* I do not think it is tomorrow# yet, so I will assume it is not."; |
46 |
other.can_talk = false; |
47 |
} |
48 |
ch[1] = "Sure"; |
49 |
ch[2] = "Nope"; |
50 |
if (outcome == 1) |
51 |
{ |
52 |
if (global.player_gold >= 5) |
53 |
{ |
54 |
message[message_current + 1] = "* Let us see what the world has# in store for you..."; |
55 |
global.cutscene = true; |
56 |
global.player_gold -= 5; |
57 |
if (other.npc_flag == 0) |
58 |
other.npc_flag++; |
59 |
other.fortune_ready = true; |
60 |
other.npc_flag++; |
61 |
audio_sound_gain(obj_oasis_indoors_dynamic_music.dynamic_mus, 0, 300); |
62 |
} |
63 |
else |
64 |
{ |
65 |
message[message_current + 1] = "* (Not enough G)"; |
66 |
} |
67 |
other.can_talk = false; |
68 |
} |
69 |
if (outcome == 2) |
70 |
{ |
71 |
message[message_current + 1] = "* If you change your mind, I'll# be here."; |
72 |
message[message_current + 2] = "* Otherwise, I may never get# better."; |
73 |
other.can_talk = false; |
74 |
if (other.npc_flag == 0) |
75 |
other.npc_flag += 1; |
76 |
} |
77 |
} |
78 |
} |
79 |
if (fortune_ready == true && !global.dialogue_open) |
80 |
{ |
81 |
alarm[0] = 45;gml_Object_obj_foreteller_npc_Alarm_0.gmlsprite_index = spr_fortune_teller_open;
audio_play_sound(snd_mirrorbreak, 1, 0);
var screenshake = instance_create(0, 0, obj_screenshake);
screenshake.timer = 15;
screenshake.intensity = 1;
alarm[1] = 75; |
82 |
fortune_ready = false; |
83 |
} |
84 |
if (fortune == true) |
85 |
{ |
86 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
87 |
is_talking = true; |
88 |
switch (npc_flag) |
89 |
{ |
90 |
case 2: |
91 |
with (msg) |
92 |
{ |
93 |
message[0] = "* Hmmmm-Oh dear!"; |
94 |
message[1] = "* The future seems to indicate# you're in for a tumble!"; |
95 |
message[2] = "* Oh nonono, it looks like a big# one too!"; |
96 |
message[3] = "* It will happen very soon!"; |
97 |
message[4] = "* Hang on..."; |
98 |
message[5] = "* Oh... tumbleWEED."; |
99 |
message[6] = "* I guess I got a little excited# and missed that second part."; |
100 |
message[7] = "* Sorry for the scare, looks like# everything is fine after all."; |
101 |
} |
102 |
break; |
103 |
case 3: |
104 |
with (msg) |
105 |
{ |
106 |
var cur_hour = current_hour; |
107 |
var cur_minute = current_minute + 2; |
108 |
if (cur_minute >= 60) |
109 |
{ |
110 |
cur_minute = cur_minute - 60; |
111 |
cur_hour += 1; |
112 |
} |
113 |
message[0] = "* Hmmmm... ah yes, here we go!"; |
114 |
message[1] = "* A very specific reading too,# these are rare!"; |
115 |
message[2] = "* In approximately two minutes..."; |
116 |
message[3] = "* It will be " + string(cur_hour) + ":" + string(cur_minute) + "!"; |
117 |
message[4] = "* Well, I hope that knowledge is# helpful!"; |
118 |
} |
119 |
break; |
120 |
case 4: |
121 |
with (msg) |
122 |
{ |
123 |
message[0] = "* Hmmmm-Gah!"; |
124 |
message[1] = "* I have never seen a fortune# this dark before!"; |
125 |
message[2] = "* I-I, are you sure you want to# hear it?"; |
126 |
message[3] = "* Wha-what am I saying? You have# a right to hear it!"; |
127 |
message[4] = "* Umm... hold on let me steel# myself first."; |
128 |
message[5] = "* Okay."; |
129 |
message[6] = "* I see death in your future."; |
130 |
message[7] = "* Uh-but do not worry too much!# There is no time given and,# well, everyone dies eventually!"; |
131 |
message[8] = "* Maybe I am seeing a hundred# years from now-or two-hundred!# That is even better!"; |
132 |
} |
133 |
break; |
134 |
case 5: |
135 |
with (msg) |
136 |
{ |
137 |
message[0] = "* Hmmm... Oh! I got something!"; |
138 |
message[1] = "* Oh goodie, it is you!"; |
139 |
message[2] = "* I see you and-oh this is# exciting-you are walking!"; |
140 |
message[3] = "* Walking past a big, clear water# cooler in..."; |
141 |
message[4] = "* Oh wait, hold on. You don't# wear stripes do you?"; |
142 |
message[5] = "* That doesn't look like you at# all."; |
143 |
message[6] = "* Sorry, no charge on that one,# cause it wasn't about you."; |
144 |
} |
145 |
global.player_gold += 5; |
146 |
npc_flag++; |
147 |
break; |
148 |
} |
149 |
if (!global.dialogue_open) |
150 |
{ |
151 |
audio_sound_gain(obj_oasis_indoors_dynamic_music.dynamic_mus, 1, 300); |
152 |
sprite_index = spr_fortune_teller; |
153 |
global.cutscene = false; |
154 |
fortune = false; |
155 |
} |
156 |
} |
157 |
depth = y; |