1 |
function scr_saveprocess_ch1scr_saveprocess_ch1function scr_saveprocess_ch1(arg0)
{
global.lastsavedtime = global.time;
global.lastsavedlv = global.lv;
file = "filech1_" + string(arg0);
myfileid = ossafe_file_text_open_write_ch1(file);
ossafe_file_text_write_string_ch1(myfileid, global.truename);
ossafe_file_text_writeln_ch1(myfileid);
if (global.is_console)
{
scr_ds_list_write_ch1(global.othername, 6);
ossafe_file_text_writeln_ch1(myfileid);
}
else
{
for (i = 0; i < 6; i += 1)
{
ossafe_file_text_write_string_ch1(myfileid, global.othername[i]);
ossafe_file_text_writeln_ch1(myfileid);
}
}
ossafe_file_text_write_real_ch1(myfileid, global.char[0]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.char[1]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.char[2]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.gold);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.xp);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.lv);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.inv);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.invc);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.darkzone);
ossafe_file_text_writeln_ch1(myfileid);
if (global.is_console)
{
scr_ds_list_write_ch1(global.hp, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.maxhp, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.at, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.df, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.mag, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.guts, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.charweapon, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.chararmor1, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.chararmor2, 4);
ossafe_file_text_writeln_ch1(myfileid);
scr_ds_list_write_ch1(global.weaponstyle, 4);
ossafe_file_text_writeln_ch1(myfileid);
}
for (i = 0; i < 4; i += 1)
{
if (!global.is_console)
{
file_text_write_real(myfileid, global.hp[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.maxhp[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.at[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.df[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.mag[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.guts[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.charweapon[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.chararmor1[i]);
file_text_writeln(myfileid);
file_text_write_real(myfileid, global.chararmor2[i]);
file_text_writeln(myfileid);
file_text_write_string(myfileid, global.weaponstyle[i]);
file_text_writeln(myfileid);
}
for (q = 0; q < 4; q += 1)
{
ossafe_file_text_write_real_ch1(myfileid, global.itemat[i][q]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.itemdf[i][q]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.itemmag[i][q]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.itembolts[i][q]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.itemgrazeamt[i][q]);
ossafe_file_text_writeln_ch1(myfileid);
ossafe_file_text_write_real_ch1(myfileid, global.itemgrazesize[i][q]);
ossafe_file_text_writeln_ch1(myfileid);
... (arg0) |
2 |
{ |
3 |
global.lastsavedtime = global.time; |
4 |
global.lastsavedlv = global.lv; |
5 |
file = "filech1_" + string(arg0); |
6 |
myfileid = ossafe_file_text_open_write_ch1(file); |
7 |
ossafe_file_text_write_string_ch1(myfileid, global.truename); |
8 |
ossafe_file_text_writeln_ch1(myfileid); |
9 |
if (global.is_console) |
10 |
{ |
11 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.othername, 6); |
12 |
ossafe_file_text_writeln_ch1(myfileid); |
13 |
} |
14 |
else |
15 |
{ |
16 |
for (i = 0; i < 6; i += 1) |
17 |
{ |
18 |
ossafe_file_text_write_string_ch1(myfileid, global.othername[i]); |
19 |
ossafe_file_text_writeln_ch1(myfileid); |
20 |
} |
21 |
} |
22 |
ossafe_file_text_write_real_ch1(myfileid, global.char[0]); |
23 |
ossafe_file_text_writeln_ch1(myfileid); |
24 |
ossafe_file_text_write_real_ch1(myfileid, global.char[1]); |
25 |
ossafe_file_text_writeln_ch1(myfileid); |
26 |
ossafe_file_text_write_real_ch1(myfileid, global.char[2]); |
27 |
ossafe_file_text_writeln_ch1(myfileid); |
28 |
ossafe_file_text_write_real_ch1(myfileid, global.gold); |
29 |
ossafe_file_text_writeln_ch1(myfileid); |
30 |
ossafe_file_text_write_real_ch1(myfileid, global.xp); |
31 |
ossafe_file_text_writeln_ch1(myfileid); |
32 |
ossafe_file_text_write_real_ch1(myfileid, global.lv); |
33 |
ossafe_file_text_writeln_ch1(myfileid); |
34 |
ossafe_file_text_write_real_ch1(myfileid, global.inv); |
35 |
ossafe_file_text_writeln_ch1(myfileid); |
36 |
ossafe_file_text_write_real_ch1(myfileid, global.invc); |
37 |
ossafe_file_text_writeln_ch1(myfileid); |
38 |
ossafe_file_text_write_real_ch1(myfileid, global.darkzone); |
39 |
ossafe_file_text_writeln_ch1(myfileid); |
40 |
if (global.is_console) |
41 |
{ |
42 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.hp, 4); |
43 |
ossafe_file_text_writeln_ch1(myfileid); |
44 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.maxhp, 4); |
45 |
ossafe_file_text_writeln_ch1(myfileid); |
46 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.at, 4); |
47 |
ossafe_file_text_writeln_ch1(myfileid); |
48 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.df, 4); |
49 |
ossafe_file_text_writeln_ch1(myfileid); |
50 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.mag, 4); |
51 |
ossafe_file_text_writeln_ch1(myfileid); |
52 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.guts, 4); |
53 |
ossafe_file_text_writeln_ch1(myfileid); |
54 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.charweapon, 4); |
55 |
ossafe_file_text_writeln_ch1(myfileid); |
56 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.chararmor1, 4); |
57 |
ossafe_file_text_writeln_ch1(myfileid); |
58 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.chararmor2, 4); |
59 |
ossafe_file_text_writeln_ch1(myfileid); |
60 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.weaponstyle, 4); |
61 |
ossafe_file_text_writeln_ch1(myfileid); |
62 |
} |
63 |
for (i = 0; i < 4; i += 1) |
64 |
{ |
65 |
if (!global.is_console) |
66 |
{ |
67 |
file_text_write_real(myfileid, global.hp[i]); |
68 |
file_text_writeln(myfileid); |
69 |
file_text_write_real(myfileid, global.maxhp[i]); |
70 |
file_text_writeln(myfileid); |
71 |
file_text_write_real(myfileid, global.at[i]); |
72 |
file_text_writeln(myfileid); |
73 |
file_text_write_real(myfileid, global.df[i]); |
74 |
file_text_writeln(myfileid); |
75 |
file_text_write_real(myfileid, global.mag[i]); |
76 |
file_text_writeln(myfileid); |
77 |
file_text_write_real(myfileid, global.guts[i]); |
78 |
file_text_writeln(myfileid); |
79 |
file_text_write_real(myfileid, global.charweapon[i]); |
80 |
file_text_writeln(myfileid); |
81 |
file_text_write_real(myfileid, global.chararmor1[i]); |
82 |
file_text_writeln(myfileid); |
83 |
file_text_write_real(myfileid, global.chararmor2[i]); |
84 |
file_text_writeln(myfileid); |
85 |
file_text_write_string(myfileid, global.weaponstyle[i]); |
86 |
file_text_writeln(myfileid); |
87 |
} |
88 |
for (q = 0; q < 4; q += 1) |
89 |
{ |
90 |
ossafe_file_text_write_real_ch1(myfileid, global.itemat[i][q]); |
91 |
ossafe_file_text_writeln_ch1(myfileid); |
92 |
ossafe_file_text_write_real_ch1(myfileid, global.itemdf[i][q]); |
93 |
ossafe_file_text_writeln_ch1(myfileid); |
94 |
ossafe_file_text_write_real_ch1(myfileid, global.itemmag[i][q]); |
95 |
ossafe_file_text_writeln_ch1(myfileid); |
96 |
ossafe_file_text_write_real_ch1(myfileid, global.itembolts[i][q]); |
97 |
ossafe_file_text_writeln_ch1(myfileid); |
98 |
ossafe_file_text_write_real_ch1(myfileid, global.itemgrazeamt[i][q]); |
99 |
ossafe_file_text_writeln_ch1(myfileid); |
100 |
ossafe_file_text_write_real_ch1(myfileid, global.itemgrazesize[i][q]); |
101 |
ossafe_file_text_writeln_ch1(myfileid); |
102 |
ossafe_file_text_write_real_ch1(myfileid, global.itemboltspeed[i][q]); |
103 |
ossafe_file_text_writeln_ch1(myfileid); |
104 |
ossafe_file_text_write_real_ch1(myfileid, global.itemspecial[i][q]); |
105 |
ossafe_file_text_writeln_ch1(myfileid); |
106 |
} |
107 |
for (j = 0; j < 12; j += 1) |
108 |
{ |
109 |
ossafe_file_text_write_real_ch1(myfileid, global.spell[i][j]); |
110 |
ossafe_file_text_writeln_ch1(myfileid); |
111 |
} |
112 |
} |
113 |
ossafe_file_text_write_real_ch1(myfileid, global.boltspeed); |
114 |
ossafe_file_text_writeln_ch1(myfileid); |
115 |
ossafe_file_text_write_real_ch1(myfileid, global.grazeamt); |
116 |
ossafe_file_text_writeln_ch1(myfileid); |
117 |
ossafe_file_text_write_real_ch1(myfileid, global.grazesize); |
118 |
ossafe_file_text_writeln_ch1(myfileid); |
119 |
if (global.is_console) |
120 |
{ |
121 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.item, 13); |
122 |
ossafe_file_text_writeln_ch1(myfileid); |
123 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.keyitem, 13); |
124 |
ossafe_file_text_writeln_ch1(myfileid); |
125 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.weapon, 13); |
126 |
ossafe_file_text_writeln_ch1(myfileid); |
127 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.armor, 13); |
128 |
ossafe_file_text_writeln_ch1(myfileid); |
129 |
} |
130 |
else |
131 |
{ |
132 |
for (j = 0; j < 13; j += 1) |
133 |
{ |
134 |
file_text_write_real(myfileid, global.item[j]); |
135 |
file_text_writeln(myfileid); |
136 |
file_text_write_real(myfileid, global.keyitem[j]); |
137 |
file_text_writeln(myfileid); |
138 |
file_text_write_real(myfileid, global.weapon[j]); |
139 |
file_text_writeln(myfileid); |
140 |
file_text_write_real(myfileid, global.armor[j]); |
141 |
file_text_writeln(myfileid); |
142 |
} |
143 |
} |
144 |
ossafe_file_text_write_real_ch1(myfileid, global.tension); |
145 |
ossafe_file_text_writeln_ch1(myfileid); |
146 |
ossafe_file_text_write_real_ch1(myfileid, global.maxtension); |
147 |
ossafe_file_text_writeln_ch1(myfileid); |
148 |
ossafe_file_text_write_real_ch1(myfileid, global.lweapon); |
149 |
ossafe_file_text_writeln_ch1(myfileid); |
150 |
ossafe_file_text_write_real_ch1(myfileid, global.larmor); |
151 |
ossafe_file_text_writeln_ch1(myfileid); |
152 |
ossafe_file_text_write_real_ch1(myfileid, global.lxp); |
153 |
ossafe_file_text_writeln_ch1(myfileid); |
154 |
ossafe_file_text_write_real_ch1(myfileid, global.llv); |
155 |
ossafe_file_text_writeln_ch1(myfileid); |
156 |
ossafe_file_text_write_real_ch1(myfileid, global.lgold); |
157 |
ossafe_file_text_writeln_ch1(myfileid); |
158 |
ossafe_file_text_write_real_ch1(myfileid, global.lhp); |
159 |
ossafe_file_text_writeln_ch1(myfileid); |
160 |
ossafe_file_text_write_real_ch1(myfileid, global.lmaxhp); |
161 |
ossafe_file_text_writeln_ch1(myfileid); |
162 |
ossafe_file_text_write_real_ch1(myfileid, global.lat); |
163 |
ossafe_file_text_writeln_ch1(myfileid); |
164 |
ossafe_file_text_write_real_ch1(myfileid, global.ldf); |
165 |
ossafe_file_text_writeln_ch1(myfileid); |
166 |
ossafe_file_text_write_real_ch1(myfileid, global.lwstrength); |
167 |
ossafe_file_text_writeln_ch1(myfileid); |
168 |
ossafe_file_text_write_real_ch1(myfileid, global.ladef); |
169 |
ossafe_file_text_writeln_ch1(myfileid); |
170 |
if (global.is_console) |
171 |
{ |
172 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.litem, 8); |
173 |
ossafe_file_text_writeln_ch1(myfileid); |
174 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.phone, 8); |
175 |
ossafe_file_text_writeln_ch1(myfileid); |
176 |
scr_ds_list_write_ch1scr_ds_list_write_ch1function scr_ds_list_write_ch1(arg0, arg1)
{
var new_list = ds_list_create();
for (var i = 0; i < arg1; i += 1)
ds_list_add(new_list, arg0[i]);
var list_string = ds_list_write(new_list);
ds_map_set(myfileid, "data", ds_map_find_value(myfileid, "data") + list_string);
ds_list_destroy(new_list);
} (global.flag, 9999); |
177 |
ossafe_file_text_writeln_ch1(myfileid); |
178 |
} |
179 |
else |
180 |
{ |
181 |
for (i = 0; i < 8; i += 1) |
182 |
{ |
183 |
file_text_write_real(myfileid, global.litem[i]); |
184 |
file_text_writeln(myfileid); |
185 |
file_text_write_real(myfileid, global.phone[i]); |
186 |
file_text_writeln(myfileid); |
187 |
} |
188 |
for (i = 0; i < 9999; i += 1) |
189 |
{ |
190 |
file_text_write_real(myfileid, global.flag[i]); |
191 |
file_text_writeln(myfileid); |
192 |
} |
193 |
} |
194 |
ossafe_file_text_write_real_ch1(myfileid, global.plot); |
195 |
ossafe_file_text_writeln_ch1(myfileid); |
196 |
ossafe_file_text_write_real_ch1(myfileid, global.currentroom); |
197 |
ossafe_file_text_writeln_ch1(myfileid); |
198 |
ossafe_file_text_write_real_ch1(myfileid, global.time); |
199 |
if (scr_debug()) |
200 |
scr_add_valid_room(global.chapter, global.currentroom, global.plot); |
201 |
var is_valid = ossafe_file_text_close_ch1(myfileid); |
202 |
return is_valid; |
203 |
} |