|
1
|
function scr_loadscr_load
function scr_load()
{
snd_free_all();
filechoicebk = 0;
if (variable_global_exists("filechoice"))
filechoicebk = global.filechoice;
scr_gamestart();
global.filechoice = filechoicebk;
file = "filech1_" + string(global.filechoice);
myfileid = ossafe_file_text_open_read(file);
if (instance_exists(obj_loadscreen))
obj_loadscreen.save_loaded = true;
global.truename = ossafe_file_text_read_string(myfileid);
ossafe_file_text_readln(myfileid);
if (global.is_console)
{
var othername_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(othername_list); i += 1)
global.othername[i] = ds_list_find_value(othername_list, i);
ds_list_destroy(othername_list);
ossafe_file_text_readln(myfileid);
}
else
{
for (i = 0; i < 6; i += 1)
{
global.othername[i] = file_text_read_string(myfileid);
file_text_readln(myfileid);
}
}
global.char[0] = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.char[1] = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.char[2] = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.gold = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.xp = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.lv = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.inv = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.invc = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
global.darkzone = ossafe_file_text_read_real(myfileid);
ossafe_file_text_readln(myfileid);
if (global.is_console)
{
var hp_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(hp_list); i += 1)
global.hp[i] = ds_list_find_value(hp_list, i);
ds_list_destroy(hp_list);
ossafe_file_text_readln(myfileid);
var maxhp_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(maxhp_list); i += 1)
global.maxhp[i] = ds_list_find_value(maxhp_list, i);
ds_list_destroy(maxhp_list);
ossafe_file_text_readln(myfileid);
var at_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(at_list); i += 1)
global.at[i] = ds_list_find_value(at_list, i);
ds_list_destroy(at_list);
ossafe_file_text_readln(myfileid);
var df_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(df_list); i += 1)
global.df[i] = ds_list_find_value(df_list, i);
ds_list_destroy(df_list);
ossafe_file_text_readln(myfileid);
var mag_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(mag_list); i += 1)
global.mag[i] = ds_list_find_value(mag_list, i);
ds_list_destroy(mag_list);
ossafe_file_text_readln(myfileid);
var guts_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(guts_list); i += 1)
global.guts[i] = ds_list_find_value(guts_list, i);
ds_list_destroy(guts_list);
ossafe_file_text_readln(myfileid);
var charweapon_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(charweapon_list); i += 1)
global.charweapon[i] = ds_list_find_value(charweapon_list, i);
ds_list_destroy(charweapon_list);
ossafe_file_text_readln(myfileid);
var chararmor1_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(chararmor1_list); i += 1)
global.chararmor1[i] = ds_list_find_value(chararmor1_list, i);
ds_list_destroy(chararmor1_list);
ossafe_file_text_readln(myfileid);
var chararmor2_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(chararmor2_list); i += 1)
global.chararmor2[i] = ds_list_find_value(chararmor2_list, i);
ds_list_destroy(chararmor2_list);
ossafe_file_text_readln(myfileid);
var weaponstyle_list = scr_ds_list_read(myfileid);
for (i = 0; i < ds_list_size(weaponstyle_list); i += 1)
global.weaponstyle[i] = ds_list_find_value(weaponstyle_list, i);
ds_list_destroy(weaponstyle_list);
ossafe_file_text_readln(myfileid);
}
... ()
|
|
2
|
{
|
|
3
|
snd_free_all();
|
|
4
|
filechoicebk = 0;
|
|
5
|
if (variable_global_exists("filechoice"))
|
|
6
|
filechoicebk = global.filechoice;
|
|
7
|
scr_gamestartscr_gamestart
function scr_gamestart()
{
global.chapter = 1;
global.darkzone = 0;
global.filechoice = 0;
global.plot = 0;
global.truename = "";
global.othername[0] = "";
global.othername[1] = "";
global.othername[2] = "";
global.othername[3] = "";
global.othername[4] = "";
global.othername[5] = "";
global.othername[6] = "";
global.time = 0;
global.fighting = 0;
global.char[0] = 1;
global.char[1] = 0;
global.char[2] = 0;
global.gold = 0;
global.xp = 0;
global.lv = 1;
global.inv = 0;
global.invc = 1;
global.charselect = -1;
global.encounterno = 1;
global.specialbattle = 0;
for (i = 0; i < 3; i += 1)
{
global.heromakex[i] = 100;
global.heromakey[i] = 200;
global.charauto[i] = 0;
global.charmove[i] = 0;
global.charcantarget[i] = 0;
global.chardead[i] = 0;
global.invincible[i] = 1;
global.charaction[i] = 0;
global.faceaction[i] = 0;
global.charcond[i] = 0;
}
global.charauto[0] = 0;
global.charauto[1] = 0;
global.charauto[2] = 1;
global.charauto[3] = 0;
for (i = 0; i < 4; i += 1)
{
global.hp[i] = 200;
global.maxhp[i] = 250;
global.at[i] = 10;
global.df[i] = 2;
global.mag[i] = 0;
global.guts[i] = 0;
global.charweapon[i] = 1;
global.chararmor1[i] = 0;
global.chararmor2[i] = 0;
global.weaponstyle[i] = ;
for (q = 0; q < 4; q += 1)
{
global.itemat[i][q] = 0;
global.itemdf[i][q] = 0;
global.itemmag[i][q] = 0;
global.itembolts[i][q] = 0;
global.itemgrazeamt[i][q] = 0;
global.itemgrazesize[i][q] = 0;
global.itemboltspeed[i][q] = 0;
global.itemspecial[i][q] = 0;
}
for (j = 0; j < 12; j += 1)
global.spell[i][j] = 0;
}
global.boltspeed = 100;
global.grazeamt = 100;
global.grazesize = 100;
global.charname[0] = " ";
global.charname[1] = ;
global.charname[2] = ;
global.charname[3] = ;
global.charweapon[0] = 0;
global.chararmor1[0] = 0;
global.chararmor2[0] = 0;
global.hp[0] = 0;
global.maxhp[0] = 0;
global.hp[1] = 90;
global.maxhp[1] = 90;
global.at[1] = 10;
global.charweapon[2] = 2;
global.hp[2] = 110;
global.maxhp[2] = 110;
global.at[2] = 14;
global.mag[2] = 1;
global.charweapon[3] = 3;
global.hp[3] = 70;
global.maxhp[3] = 70;
global.at[3] = 8;
global.mag[3] = 7;
global.spell[1][0] = 7;
global.spell[2][0] = 4;
global.spell[3][0] = 3;
global.spell[3][1] = 2;
scr_spellinfo_all();
global.item[0] = 0;
... ();
|
|
8
|
global.filechoice = filechoicebk;
|
|
9
|
file = "filech1_" + string(global.filechoice);
|
|
10
|
myfileid = ossafe_file_text_open_read(file);
|
|
11
|
if (instance_exists(obj_loadscreen))
|
|
12
|
obj_loadscreen.save_loaded = true;
|
|
13
|
global.truename = ossafe_file_text_read_string(myfileid);
|
|
14
|
ossafe_file_text_readln(myfileid);
|
|
15
|
if (global.is_console)
|
|
16
|
{
|
|
17
|
var othername_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
18
|
for (i = 0; i < ds_list_size(othername_list); i += 1)
|
|
19
|
global.othername[i] = ds_list_find_value(othername_list, i);
|
|
20
|
ds_list_destroy(othername_list);
|
|
21
|
ossafe_file_text_readln(myfileid);
|
|
22
|
}
|
|
23
|
else
|
|
24
|
{
|
|
25
|
for (i = 0; i < 6; i += 1)
|
|
26
|
{
|
|
27
|
global.othername[i] = file_text_read_string(myfileid);
|
|
28
|
file_text_readln(myfileid);
|
|
29
|
}
|
|
30
|
}
|
|
31
|
global.char[0] = ossafe_file_text_read_real(myfileid);
|
|
32
|
ossafe_file_text_readln(myfileid);
|
|
33
|
global.char[1] = ossafe_file_text_read_real(myfileid);
|
|
34
|
ossafe_file_text_readln(myfileid);
|
|
35
|
global.char[2] = ossafe_file_text_read_real(myfileid);
|
|
36
|
ossafe_file_text_readln(myfileid);
|
|
37
|
global.gold = ossafe_file_text_read_real(myfileid);
|
|
38
|
ossafe_file_text_readln(myfileid);
|
|
39
|
global.xp = ossafe_file_text_read_real(myfileid);
|
|
40
|
ossafe_file_text_readln(myfileid);
|
|
41
|
global.lv = ossafe_file_text_read_real(myfileid);
|
|
42
|
ossafe_file_text_readln(myfileid);
|
|
43
|
global.inv = ossafe_file_text_read_real(myfileid);
|
|
44
|
ossafe_file_text_readln(myfileid);
|
|
45
|
global.invc = ossafe_file_text_read_real(myfileid);
|
|
46
|
ossafe_file_text_readln(myfileid);
|
|
47
|
global.darkzone = ossafe_file_text_read_real(myfileid);
|
|
48
|
ossafe_file_text_readln(myfileid);
|
|
49
|
if (global.is_console)
|
|
50
|
{
|
|
51
|
var hp_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
52
|
for (i = 0; i < ds_list_size(hp_list); i += 1)
|
|
53
|
global.hp[i] = ds_list_find_value(hp_list, i);
|
|
54
|
ds_list_destroy(hp_list);
|
|
55
|
ossafe_file_text_readln(myfileid);
|
|
56
|
var maxhp_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
57
|
for (i = 0; i < ds_list_size(maxhp_list); i += 1)
|
|
58
|
global.maxhp[i] = ds_list_find_value(maxhp_list, i);
|
|
59
|
ds_list_destroy(maxhp_list);
|
|
60
|
ossafe_file_text_readln(myfileid);
|
|
61
|
var at_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
62
|
for (i = 0; i < ds_list_size(at_list); i += 1)
|
|
63
|
global.at[i] = ds_list_find_value(at_list, i);
|
|
64
|
ds_list_destroy(at_list);
|
|
65
|
ossafe_file_text_readln(myfileid);
|
|
66
|
var df_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
67
|
for (i = 0; i < ds_list_size(df_list); i += 1)
|
|
68
|
global.df[i] = ds_list_find_value(df_list, i);
|
|
69
|
ds_list_destroy(df_list);
|
|
70
|
ossafe_file_text_readln(myfileid);
|
|
71
|
var mag_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
72
|
for (i = 0; i < ds_list_size(mag_list); i += 1)
|
|
73
|
global.mag[i] = ds_list_find_value(mag_list, i);
|
|
74
|
ds_list_destroy(mag_list);
|
|
75
|
ossafe_file_text_readln(myfileid);
|
|
76
|
var guts_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
77
|
for (i = 0; i < ds_list_size(guts_list); i += 1)
|
|
78
|
global.guts[i] = ds_list_find_value(guts_list, i);
|
|
79
|
ds_list_destroy(guts_list);
|
|
80
|
ossafe_file_text_readln(myfileid);
|
|
81
|
var charweapon_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
82
|
for (i = 0; i < ds_list_size(charweapon_list); i += 1)
|
|
83
|
global.charweapon[i] = ds_list_find_value(charweapon_list, i);
|
|
84
|
ds_list_destroy(charweapon_list);
|
|
85
|
ossafe_file_text_readln(myfileid);
|
|
86
|
var chararmor1_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
87
|
for (i = 0; i < ds_list_size(chararmor1_list); i += 1)
|
|
88
|
global.chararmor1[i] = ds_list_find_value(chararmor1_list, i);
|
|
89
|
ds_list_destroy(chararmor1_list);
|
|
90
|
ossafe_file_text_readln(myfileid);
|
|
91
|
var chararmor2_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
92
|
for (i = 0; i < ds_list_size(chararmor2_list); i += 1)
|
|
93
|
global.chararmor2[i] = ds_list_find_value(chararmor2_list, i);
|
|
94
|
ds_list_destroy(chararmor2_list);
|
|
95
|
ossafe_file_text_readln(myfileid);
|
|
96
|
var weaponstyle_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
97
|
for (i = 0; i < ds_list_size(weaponstyle_list); i += 1)
|
|
98
|
global.weaponstyle[i] = ds_list_find_value(weaponstyle_list, i);
|
|
99
|
ds_list_destroy(weaponstyle_list);
|
|
100
|
ossafe_file_text_readln(myfileid);
|
|
101
|
}
|
|
102
|
for (i = 0; i < 4; i += 1)
|
|
103
|
{
|
|
104
|
if (!global.is_console)
|
|
105
|
{
|
|
106
|
global.hp[i] = ossafe_file_text_read_real(myfileid);
|
|
107
|
ossafe_file_text_readln(myfileid);
|
|
108
|
global.maxhp[i] = ossafe_file_text_read_real(myfileid);
|
|
109
|
ossafe_file_text_readln(myfileid);
|
|
110
|
global.at[i] = ossafe_file_text_read_real(myfileid);
|
|
111
|
ossafe_file_text_readln(myfileid);
|
|
112
|
global.df[i] = ossafe_file_text_read_real(myfileid);
|
|
113
|
ossafe_file_text_readln(myfileid);
|
|
114
|
global.mag[i] = ossafe_file_text_read_real(myfileid);
|
|
115
|
ossafe_file_text_readln(myfileid);
|
|
116
|
global.guts[i] = ossafe_file_text_read_real(myfileid);
|
|
117
|
ossafe_file_text_readln(myfileid);
|
|
118
|
global.charweapon[i] = ossafe_file_text_read_real(myfileid);
|
|
119
|
ossafe_file_text_readln(myfileid);
|
|
120
|
global.chararmor1[i] = ossafe_file_text_read_real(myfileid);
|
|
121
|
ossafe_file_text_readln(myfileid);
|
|
122
|
global.chararmor2[i] = ossafe_file_text_read_real(myfileid);
|
|
123
|
ossafe_file_text_readln(myfileid);
|
|
124
|
global.weaponstyle[i] = ossafe_file_text_read_string(myfileid);
|
|
125
|
ossafe_file_text_readln(myfileid);
|
|
126
|
}
|
|
127
|
for (q = 0; q < 4; q += 1)
|
|
128
|
{
|
|
129
|
global.itemat[i][q] = ossafe_file_text_read_real(myfileid);
|
|
130
|
ossafe_file_text_readln(myfileid);
|
|
131
|
global.itemdf[i][q] = ossafe_file_text_read_real(myfileid);
|
|
132
|
ossafe_file_text_readln(myfileid);
|
|
133
|
global.itemmag[i][q] = ossafe_file_text_read_real(myfileid);
|
|
134
|
ossafe_file_text_readln(myfileid);
|
|
135
|
global.itembolts[i][q] = ossafe_file_text_read_real(myfileid);
|
|
136
|
ossafe_file_text_readln(myfileid);
|
|
137
|
global.itemgrazeamt[i][q] = ossafe_file_text_read_real(myfileid);
|
|
138
|
ossafe_file_text_readln(myfileid);
|
|
139
|
global.itemgrazesize[i][q] = ossafe_file_text_read_real(myfileid);
|
|
140
|
ossafe_file_text_readln(myfileid);
|
|
141
|
global.itemboltspeed[i][q] = ossafe_file_text_read_real(myfileid);
|
|
142
|
ossafe_file_text_readln(myfileid);
|
|
143
|
global.itemspecial[i][q] = ossafe_file_text_read_real(myfileid);
|
|
144
|
ossafe_file_text_readln(myfileid);
|
|
145
|
}
|
|
146
|
for (j = 0; j < 12; j += 1)
|
|
147
|
{
|
|
148
|
global.spell[i][j] = ossafe_file_text_read_real(myfileid);
|
|
149
|
ossafe_file_text_readln(myfileid);
|
|
150
|
}
|
|
151
|
}
|
|
152
|
global.boltspeed = ossafe_file_text_read_real(myfileid);
|
|
153
|
ossafe_file_text_readln(myfileid);
|
|
154
|
global.grazeamt = ossafe_file_text_read_real(myfileid);
|
|
155
|
ossafe_file_text_readln(myfileid);
|
|
156
|
global.grazesize = ossafe_file_text_read_real(myfileid);
|
|
157
|
ossafe_file_text_readln(myfileid);
|
|
158
|
if (global.is_console)
|
|
159
|
{
|
|
160
|
var item_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
161
|
for (i = 0; i < ds_list_size(item_list); i += 1)
|
|
162
|
global.item[i] = ds_list_find_value(item_list, i);
|
|
163
|
ds_list_destroy(item_list);
|
|
164
|
ossafe_file_text_readln(myfileid);
|
|
165
|
var keyitem_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
166
|
for (i = 0; i < ds_list_size(keyitem_list); i += 1)
|
|
167
|
global.keyitem[i] = ds_list_find_value(keyitem_list, i);
|
|
168
|
ds_list_destroy(keyitem_list);
|
|
169
|
ossafe_file_text_readln(myfileid);
|
|
170
|
var weapon_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
171
|
for (i = 0; i < ds_list_size(weapon_list); i += 1)
|
|
172
|
global.weapon[i] = ds_list_find_value(weapon_list, i);
|
|
173
|
ds_list_destroy(weapon_list);
|
|
174
|
ossafe_file_text_readln(myfileid);
|
|
175
|
var armor_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
176
|
for (i = 0; i < ds_list_size(armor_list); i += 1)
|
|
177
|
global.armor[i] = ds_list_find_value(armor_list, i);
|
|
178
|
ds_list_destroy(armor_list);
|
|
179
|
ossafe_file_text_readln(myfileid);
|
|
180
|
}
|
|
181
|
else
|
|
182
|
{
|
|
183
|
for (j = 0; j < 13; j += 1)
|
|
184
|
{
|
|
185
|
global.item[j] = file_text_read_real(myfileid);
|
|
186
|
file_text_readln(myfileid);
|
|
187
|
global.keyitem[j] = file_text_read_real(myfileid);
|
|
188
|
file_text_readln(myfileid);
|
|
189
|
global.weapon[j] = file_text_read_real(myfileid);
|
|
190
|
file_text_readln(myfileid);
|
|
191
|
global.armor[j] = file_text_read_real(myfileid);
|
|
192
|
file_text_readln(myfileid);
|
|
193
|
}
|
|
194
|
}
|
|
195
|
global.tension = ossafe_file_text_read_real(myfileid);
|
|
196
|
ossafe_file_text_readln(myfileid);
|
|
197
|
global.maxtension = ossafe_file_text_read_real(myfileid);
|
|
198
|
ossafe_file_text_readln(myfileid);
|
|
199
|
global.lweapon = ossafe_file_text_read_real(myfileid);
|
|
200
|
ossafe_file_text_readln(myfileid);
|
|
201
|
global.larmor = ossafe_file_text_read_real(myfileid);
|
|
202
|
ossafe_file_text_readln(myfileid);
|
|
203
|
global.lxp = ossafe_file_text_read_real(myfileid);
|
|
204
|
ossafe_file_text_readln(myfileid);
|
|
205
|
global.llv = ossafe_file_text_read_real(myfileid);
|
|
206
|
ossafe_file_text_readln(myfileid);
|
|
207
|
global.lgold = ossafe_file_text_read_real(myfileid);
|
|
208
|
ossafe_file_text_readln(myfileid);
|
|
209
|
global.lhp = ossafe_file_text_read_real(myfileid);
|
|
210
|
ossafe_file_text_readln(myfileid);
|
|
211
|
global.lmaxhp = ossafe_file_text_read_real(myfileid);
|
|
212
|
ossafe_file_text_readln(myfileid);
|
|
213
|
global.lat = ossafe_file_text_read_real(myfileid);
|
|
214
|
ossafe_file_text_readln(myfileid);
|
|
215
|
global.ldf = ossafe_file_text_read_real(myfileid);
|
|
216
|
ossafe_file_text_readln(myfileid);
|
|
217
|
global.lwstrength = ossafe_file_text_read_real(myfileid);
|
|
218
|
ossafe_file_text_readln(myfileid);
|
|
219
|
global.ladef = ossafe_file_text_read_real(myfileid);
|
|
220
|
ossafe_file_text_readln(myfileid);
|
|
221
|
if (global.is_console)
|
|
222
|
{
|
|
223
|
var litem_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
224
|
for (i = 0; i < (ds_list_size(litem_list) - 1); i += 1)
|
|
225
|
global.litem[i] = ds_list_find_value(litem_list, i);
|
|
226
|
ds_list_destroy(litem_list);
|
|
227
|
ossafe_file_text_readln(myfileid);
|
|
228
|
var phone_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
229
|
for (i = 0; i < (ds_list_size(phone_list) - 1); i += 1)
|
|
230
|
global.phone[i] = ds_list_find_value(phone_list, i);
|
|
231
|
ds_list_destroy(phone_list);
|
|
232
|
ossafe_file_text_readln(myfileid);
|
|
233
|
var flag_list = scr_ds_list_readscr_ds_list_read
function scr_ds_list_read(arg0)
{
var new_list = ds_list_create();
var list_string = ossafe_file_text_read_string(arg0);
if (list_string != "")
ds_list_read(new_list, list_string);
return new_list;
} (myfileid);
|
|
234
|
for (i = 0; i < (ds_list_size(flag_list) - 1); i += 1)
|
|
235
|
global.flag[i] = ds_list_find_value(flag_list, i);
|
|
236
|
ds_list_destroy(flag_list);
|
|
237
|
ossafe_file_text_readln(myfileid);
|
|
238
|
}
|
|
239
|
else
|
|
240
|
{
|
|
241
|
for (i = 0; i < 8; i += 1)
|
|
242
|
{
|
|
243
|
global.litem[i] = ossafe_file_text_read_real(myfileid);
|
|
244
|
ossafe_file_text_readln(myfileid);
|
|
245
|
global.phone[i] = ossafe_file_text_read_real(myfileid);
|
|
246
|
ossafe_file_text_readln(myfileid);
|
|
247
|
}
|
|
248
|
for (i = 0; i < 9999; i += 1)
|
|
249
|
{
|
|
250
|
global.flag[i] = ossafe_file_text_read_real(myfileid);
|
|
251
|
ossafe_file_text_readln(myfileid);
|
|
252
|
}
|
|
253
|
}
|
|
254
|
global.plot = ossafe_file_text_read_real(myfileid);
|
|
255
|
ossafe_file_text_readln(myfileid);
|
|
256
|
global.currentroom = ossafe_file_text_read_real(myfileid);
|
|
257
|
ossafe_file_text_readln(myfileid);
|
|
258
|
global.time = ossafe_file_text_read_real(myfileid);
|
|
259
|
ossafe_file_text_readln(myfileid);
|
|
260
|
ossafe_file_text_close(myfileid);
|
|
261
|
global.lastsavedtime = global.time;
|
|
262
|
global.lastsavedlv = global.lv;
|
|
263
|
audio_group_set_gain(1, global.flag[15 sound_volume], 0);
|
|
264
|
audio_set_master_gain(0, global.flag[17 audio_volume]);
|
|
265
|
if (global.plot >= 156)
|
|
266
|
{
|
|
267
|
for (i = 0; i < 4; i += 1)
|
|
268
|
global.charauto[i] = 0;
|
|
269
|
}
|
|
270
|
var room_id = global.currentroom;
|
|
271
|
if (room_id < 10000)
|
|
272
|
{
|
|
273
|
if (global.flag[279 loaded_legacy_file] == 0)
|
|
274
|
{
|
|
275
|
global.flag[279 loaded_legacy_file] = 1;
|
|
276
|
var room_index = room_id;
|
|
277
|
var room_offset = room_index;
|
|
278
|
if (room_index < 281)
|
|
279
|
room_offset = 281 + room_index;
|
|
280
|
room_id = room_offset;
|
|
281
|
}
|
|
282
|
room_id += (global.chapter * 10000);
|
|
283
|
global.currentroom = room_id;
|
|
284
|
if (global.filechoice != 9)
|
|
285
|
{
|
|
286
|
var valid_room_index = scr_get_valid_roomscr_get_valid_room
function scr_get_valid_room(arg0, arg1, arg2 = 0)
{
var chapter = arg0;
var room_id = arg1;
var plot = arg2;
var current_room = new scr_valid_room(scr_get_room_by_id(room_id), plot);
var valid_rooms;
if (chapter == 1)
valid_rooms = [new scr_valid_room(2, 0), new scr_valid_room(35, 11), new scr_valid_room(40, 11), new scr_valid_room(45, 16), new scr_valid_room(49, 33), new scr_valid_room(59, 42), new scr_valid_room(68, 55), new scr_valid_room(71, 55), new scr_valid_room(73, 60), new scr_valid_room(82, 75), new scr_valid_room(90, 75), new scr_valid_room(96, 120), new scr_valid_room(97, 130), new scr_valid_room(107, 156), new scr_valid_room(114, 165), new scr_valid_room(123, 165), new scr_valid_room(126, 175), new scr_valid_room(111, 156), new scr_valid_room(56, 0)];
var is_valid = false;
for (var i = 0; i < array_length_1d(valid_rooms); i++)
{
if (scr_get_id_by_room_index(current_room.room_index) == scr_get_id_by_room_index(valid_rooms[i].room_index))
{
is_valid = true;
break;
}
}
if (!is_valid)
{
current_room.room_index++;
for (var i = 0; i < array_length_1d(valid_rooms); i++)
{
if (scr_get_id_by_room_index(current_room.room_index) == scr_get_id_by_room_index(valid_rooms[i].room_index))
{
is_valid = true;
break;
}
}
}
if (!is_valid)
current_room.room_index--;
return current_room.room_index;
}
function scr_valid_room(arg0, arg1) constructor
{
room_index = arg0;
plot = arg1;
}
function scr_add_valid_room(arg0, arg1, arg2) constructor
{
} (global.chapter, global.currentroom);
|
|
287
|
global.currentroom = scr_get_id_by_room_index(valid_room_index);
|
|
288
|
if (global.currentroom == scr_get_id_by_room_index(45) && global.plot >= 33)
|
|
289
|
global.currentroom = scr_get_id_by_room_index(49);
|
|
290
|
if (global.currentroom == scr_get_id_by_room_index(96) && global.plot >= 130)
|
|
291
|
global.currentroom = scr_get_id_by_room_index(97);
|
|
292
|
}
|
|
293
|
}
|
|
294
|
global.invc = 1;
|
|
295
|
__loadedroom = scr_get_room_by_idscr_get_room_by_id
function scr_get_room_by_id(arg0)
{
var room_id = arg0;
var rooms = scr_get_room_list();
if (room_id < 10000)
{
room_index = room_id;
var room_offset = room_index;
if (room_index < 281)
room_offset = 281 + room_index;
room_id = room_offset;
room_id += (global.chapter * 10000);
}
var room_index = 0;
for (var i = 0; i < array_length_1d(rooms); i++)
{
if (rooms[i].room_id == room_id)
{
room_index = rooms[i].room_index;
break;
}
}
return room_index;
}
function scr_get_id_by_room_index(arg0)
{
var room_index = arg0;
var rooms = scr_get_room_list();
var room_id = ROOM_INITIALIZE;
for (var i = 0; i < array_length_1d(rooms); i++)
{
if (rooms[i].room_index == room_index)
{
room_id = rooms[i].room_id;
break;
}
}
return room_id;
}
function scr_room(arg0, arg1) constructor
{
room_index = arg0;
room_id = arg1;
}
function scr_get_room_list()
{
var idsarr = [new scr_room(room_krisroom, 10283), new scr_room(room_krishallway, 10284), new scr_room(room_torroom, 10285), new scr_room(room_torhouse, 10286), new scr_room(room_torbathroom, 10287), new scr_room(room_town_krisyard, 10288), new scr_room(room_town_northwest, 10289), new scr_room(room_town_north, 10290), new scr_room(room_beach, 10291), new scr_room(room_town_mid, 10292), new scr_room(room_town_apartments, 10293), new scr_room(room_town_south, 10294), new scr_room(room_town_school, 10295), new scr_room(room_town_church, 10296), new scr_room(room_graveyard, 10297), new scr_room(room_town_shelter, 10298), new scr_room(room_hospital_lobby, 10299), new scr_room(room_hospital_hallway, 10300), new scr_room(room_hospital_rudy, 10301), new scr_room(room_hospital_room2, 10302), new scr_room(room_diner, 10303), new scr_room(room_townhall, 10304), new scr_room(room_flowershop_1f, 10305), new scr_room(room_flowershop_2f, 10306), new scr_room(room_library, 10307), new scr_room(room_alphysalley, 10308), new scr_room(room_torielclass, 10309), new scr_room(room_schoollobby, 10310), new scr_room(room_alphysclass, 10311), new scr_room(room_schooldoor, 10312), new scr_room(room_insidecloset, 10313), new scr_room(room_school_unusedroom, 10314), new scr_room(room_dark1, 10315), new scr_room(room_dark1a, 10316), new scr_room(room_dark2, 10317), new scr_room(room_dark3, 10318), new scr_room(room_dark3a, 10319), new scr_room(room_dark_wobbles, 10320), new scr_room(room_dark_eyepuzzle, 10321), new scr_room(room_dark7, 10322), new scr_room(room_dark_chase1, 10323), new scr_room(room_dark_chase2, 10324), new scr_room(room_castle_outskirts, 10325), new scr_room(room_castle_town, 10326), new scr_room(room_castle_front, 10327), new scr_room(room_castle_tutorial, 10328), new scr_room(room_castle_darkdoor, 10329), new scr_room(room_field_start, 10330), new scr_room(room_field_forest, 10331), new scr_room(room_field1, 10332), new scr_room(room_field2, 10333), new scr_room(room_field2A, 10334), new scr_room(room_field_topchef, 10335), new scr_room(room_field_puzzle1, 10336), new scr_room(room_field_maze, 10337), new scr_room(room_field_puzzle2, 10338), new scr_room(room_field_getsusie, 10339), new scr_room(room_field_shop1, 10340), new scr_room(room_field_puzzletutorial, 10341), new scr_room(room_field3, 10342), new scr_room(room_field_boxpuzzle, 10343), new scr_room(room_field4, 10344), new scr_room(room_field_secret1, 10345), new scr_room(room_field_checkers4, 10346), new scr_room(room_field_checkers2, 10347), new scr_room(room_field_checkers6, 10348), new scr_room(room_field_checkers3, 10349), new scr_room(room_field_checkers1, 10350), new scr_room(room_field_checkers5, 10351), new scr_room(room_field_checkers7, 10352), new scr_room(room_field_checkersboss, 10353), new scr_room(room_forest_savepoint1, 10354), new scr_room(room_forest_area0, 10355), new scr_room(room_forest_area1, 10356), new scr_room(room_forest_area2, 10357), new scr_room(room_forest_area2A, 10358), new scr_room(room_forest_puzzle1, 10359), new scr_room(room_forest_beforeclover, 10360), new scr_room(room_forest_area3A, 10361), new scr_room(room_forest_area3, 10362), new scr_room(room_forest_savepoint2, 10363), new scr_room(room_forest_smith, 10364), new scr_room(room_forest_area4, 10365), new scr_room(room_forest_dancers1, 10366), new scr_room(room_forest_secret1, 10367), new scr_room(room_forest_thrashmaker, 10368), new scr_room(room_forest_starwalker, 10369), new scr_room(room_forest_area5, 10370), new scr_room(room_forest_savepoint_relax, 10371), new scr_room(room_forest_maze1, 10372), new scr_room(room_forest_maze_deadend, 10373), new scr_room(room_forest_maze_susie, 10374), new scr_room(room_forest_maze2, 10375), new scr_room(room_forest_maze_deadend2, 10376), new scr_room(room_forest_savepoint3, 10377), new scr_room(room_forest_fightsusie, 10378), new scr_room(room_forest_afterthrash2, 10379), new scr_room(room_forest_afterthrash3, 10380), new scr_room(room_forest_afterthrash4, 10381), new scr_room(room_forest_castleview, 10382), new scr_room(room_forest_chase1, 10383), new scr_room(room_forest_chase2, 10384), new scr_room(room_forest_castlefront, 10385), new scr_room(room_cc_prison_cells, 10386), new scr_room(room_cc_prisonlancer, 10387), new scr_room(room_cc_prison_to_elevator, 10388), new scr_room(room_cc_prison2, 10389), new scr_room(room_cc_prisonelevator, 10390), new scr_room(room_cc_elevator, 10391), new scr_room(room_cc_prison_prejoker, 10392), new scr_room(room_cc_joker, 10393), new scr_room(room_cc_entrance, 10394), new scr_room(room_cc_1f, 10395), new scr_room(room_cc_rudinn, 10396), new scr_room(room_cc_2f, 10397), new scr_room(room_cc_rurus1, 10398), new scr_room(room_cc_3f, 10399), new scr_room(room_cc_hathy, 10400), new scr_room(room_cc_4f, 10401), new scr_room(room_cc_rurus2, 10402), new scr_room(room_cc_clover, 10403), new scr_room(room_cc_5f, 10404), new scr_room(room_cc_lancer, 10405), new scr_room(room_cc_6f, 10406), new scr_room(room_cc_throneroom, 10407), new scr_room(room_cc_preroof, 10408), new scr_room(room_cc_kingbattle, 10409), new scr_room(room_cc_prefountain, 10410), new scr_room(room_cc_fountain, 10411), new scr_room(room_empty, 10422), new scr_room(room_man, 10423)];
return idsarr;
} (global.currentroom);
|
|
296
|
with (obj_gamecontroller)
|
|
297
|
enable_loading();
|
|
298
|
if (scr_dogcheckscr_dogcheck
function scr_dogcheck()
{
var rooms = scr_get_room_list();
var dog_check = true;
for (var i = 0; i < array_length_1d(rooms); i++)
{
if (rooms[i].room_id == global.currentroom)
{
dog_check = false;
break;
}
}
return dog_check;
} ())
|
|
299
|
__loadedroom = 131;
|
|
300
|
room_goto(__loadedroom);
|
|
301
|
scr_tempsavescr_tempsave
function scr_tempsave()
{
filechoicebk2 = global.filechoice;
global.filechoice = 9;
scr_saveprocess(global.filechoice);
global.filechoice = filechoicebk2;
} ();
|
|
302
|
global.currentroom = __loadedroom;
|
|
303
|
}
|