|
1
|
depth = 5000;
|
|
2
|
if (!is_interacting)
|
|
3
|
exit;
|
|
4
|
if (global.interact == 0)
|
|
5
|
global.interact = 1;
|
|
6
|
if (is_talking)
|
|
7
|
{
|
|
8
|
if (!d_ex())
|
|
9
|
is_talking = false;
|
|
10
|
else
|
|
11
|
exit;
|
|
12
|
}
|
|
13
|
else if (d_ex())
|
|
14
|
{
|
|
15
|
exit;
|
|
16
|
}
|
|
17
|
if (menu_display_type == 0)
|
|
18
|
{
|
|
19
|
if (shopcharx > -20)
|
|
20
|
shopcharx -= 4;
|
|
21
|
if (shopcharx > -40)
|
|
22
|
shopcharx -= 4;
|
|
23
|
if (shopcharx > -80)
|
|
24
|
shopcharx -= 4;
|
|
25
|
if (shopcharx <= -80)
|
|
26
|
shopcharx = -80;
|
|
27
|
}
|
|
28
|
else
|
|
29
|
{
|
|
30
|
if (shopcharx < -50)
|
|
31
|
shopcharx += 4;
|
|
32
|
if (shopcharx < -30)
|
|
33
|
shopcharx += 4;
|
|
34
|
if (shopcharx < 0)
|
|
35
|
shopcharx += 4;
|
|
36
|
if (shopcharx > 0)
|
|
37
|
shopcharx = 0;
|
|
38
|
}
|
|
39
|
talkbuffer -= 1;
|
|
40
|
draw_set_color(c_black);
|
|
41
|
scr_shopmenuscr_shopmenu
function scr_shopmenu(arg0)
{
if (arg0 == 0)
{
if (menu == 1 || menu == 2)
{
scr_darkbox_black(camerax() + 400, cameray() + minimenuy, camerax() + 640, cameray() + 255);
draw_set_color(c_white);
scr_84_set_draw_font("mainbig");
if (menuc[1] == 0)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[0]));
if (menuc[1] == 1)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[1]));
if (menuc[1] == 2)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[2]));
if (menuc[1] == 3)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[3]));
scr_84_set_draw_font("dotumche");
if (itemtype[menuc[1]] == "weapon" || itemtype[menuc[1]] == "armor")
{
for (i = 0; i < 3; i += 1)
{
can_index = 0;
facetype = spr_headkris;
which = global.char[i];
if (global.char[i] == 1)
facetype = spr_headkris;
if (global.char[i] == 2)
facetype = spr_headsusie;
if (global.char[i] == 3)
facetype = spr_headralsei;
if (which != 0)
{
if (i == 0)
{
locx = 0;
locy = 0;
}
if (i == 1)
{
locx = 100;
locy = 0;
}
if (i == 2)
{
locx = 0;
locy = 45;
}
if (canequip[menuc[1]][which] == 0)
can_index = 8;
draw_sprite(facetype, can_index, camerax() + 426 + locx, cameray() + minimenuy + 140 + locy);
if (itemtype[menuc[1]] == "weapon" && can_index != 8)
{
draw_set_color(c_white);
sum[0] = itematk[menuc[1]] - global.itemat[which][0];
sum[1] = itemmagic[menuc[1]] - global.itemmag[which][0];
for (j = 0; j < 2; j += 1)
{
dcolor = c_white;
addt = "";
draw_set_color(c_white);
if (sum[j] > 0)
{
draw_set_color(c_yellow);
addt = "+";
}
if (sum[j] < 0)
draw_set_color(c_aqua);
draw_sprite_ext(spr_shopicon, j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1);
draw_text(camerax() + 490 + locx, cameray() + minimenuy + locy + 135 + (20 * j), string_hash_to_newline(addt + string(sum[j])));
}
}
if (itemtype[menuc[1]] == "armor" && can_index != 8)
{
sum[0] = itemdef[menuc[1]] - global.itemdf[which][1];
sum[1] = itemdef[menuc[1]] - global.itemdf[which][2];
for (j = 0; j < 2; j += 1)
{
dcolor = c_white;
addt = "";
draw_set_color(c_white);
if (sum[j] > 0)
{
draw_set_color(c_yellow);
addt = "+";
}
if (sum[j] < 0)
draw_set_color(c_aqua);
draw_sprite_ext(spr_shopicon, 2 + j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1);
draw_text(camerax() + 490 + locx, cameray() + minimenuy + 135 + (20 * j) + locy, string_hash_to_newline(addt + string(sum[j])));
}
}
}
}
}
}
}
if (arg0 == 4)
{
if (menu == 11 || menu == 15)
{
... (0);
|
|
42
|
if (menu_display_type == 0)
|
|
43
|
{
|
|
44
|
scr_darkbox_blackscr_darkbox_black
function scr_darkbox_black(arg0, arg1, arg2, arg3)
{
draw_set_color(c_black);
ossafe_fill_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
} (camerax(), cameray() + 240, camerax() + 415, cameray() + 480);
|
|
45
|
scr_darkbox_blackscr_darkbox_black
function scr_darkbox_black(arg0, arg1, arg2, arg3)
{
draw_set_color(c_black);
ossafe_fill_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
} (camerax() + 400, cameray() + 240, camerax() + 640, cameray() + 480);
|
|
46
|
}
|
|
47
|
else if (menu_display_type == 1)
|
|
48
|
{
|
|
49
|
scr_darkbox_blackscr_darkbox_black
function scr_darkbox_black(arg0, arg1, arg2, arg3)
{
draw_set_color(c_black);
ossafe_fill_rectangle(arg0 + 20, arg1 + 20, arg2 - 20, arg3 - 20, false);
scr_darkbox(arg0, arg1, arg2, arg3);
} (camerax(), cameray() + 240, camerax() + 640, cameray() + 480);
|
|
50
|
}
|
|
51
|
if (menu == 0)
|
|
52
|
{
|
|
53
|
sidemessage = 0;
|
|
54
|
menuc[1] = 0;
|
|
55
|
menuc[2] = 0;
|
|
56
|
menuc[3] = 0;
|
|
57
|
menuc[4] = 0;
|
|
58
|
menu_display_type = 0;
|
|
59
|
if (instance_exists(obj_writer) == false)
|
|
60
|
{
|
|
61
|
global.typer = 6;
|
|
62
|
global.msg[0] = default_text;
|
|
63
|
instance_create(camerax() + 30, cameray() + 270, obj_writer);
|
|
64
|
}
|
|
65
|
menumax = array_length(menu_list) - 1;
|
|
66
|
draw_set_color(c_white);
|
|
67
|
scr_84_set_draw_fontscr_84_set_draw_font
function scr_84_set_draw_font(arg0)
{
global.chemg_font = arg0;
draw_set_font(scr_84_get_font(arg0));
} ("mainbig");
|
|
68
|
for (var i = 0; i < array_length(menu_list); i++)
|
|
69
|
draw_text(camerax() + 480, cameray() + ((130 + (i * 20)) * 2), string_hash_to_newline(menu_list[i].option_text));
|
|
70
|
menuc[0] = min(menuc[0], menumax);
|
|
71
|
draw_sprite(spr_heart, 0, camerax() + 450, cameray() + ((135 + (menuc[0] * 20)) * 2));
|
|
72
|
if (button1_p() && onebuffer < 0)
|
|
73
|
{
|
|
74
|
onebuffer = 2;
|
|
75
|
mainmessage = 1;
|
|
76
|
with (obj_writer)
|
|
77
|
instance_destroy();
|
|
78
|
menu = menu_list[menuc[0]].menu_type;
|
|
79
|
if (menu == 99)
|
|
80
|
{
|
|
81
|
alarm[10] = 1; gml_Object_obj_gerson_fountain_Alarm_10.gml
is_interacting = false;
sell = 0;
selling = 0;
sidemessage = 0;
menuc[0] = 0;
menuc[1] = 0;
menuc[2] = 0;
menuc[3] = 0;
menuc[4] = 0;
menu = 0;
submenu = 0;
global.interact = 0;
instance_destroy();
|
|
82
|
exit;
|
|
83
|
}
|
|
84
|
else
|
|
85
|
{
|
|
86
|
menu_list[menuc[0]].times_selected++;
|
|
87
|
menu_display_type = 0;
|
|
88
|
if (menu == 4 || menu == 6)
|
|
89
|
{
|
|
90
|
menu_talk_flag = menu_list[menuc[0]].talk_flag;
|
|
91
|
menu_talk_style = menu_list[menuc[0]].talk_style;
|
|
92
|
menu_display_type = 1;
|
|
93
|
menu_talk_con = 0;
|
|
94
|
}
|
|
95
|
}
|
|
96
|
}
|
|
97
|
}
|
|
98
|
if (menu == 4 || menu == 6)
|
|
99
|
{
|
|
100
|
if (instance_exists(obj_writer) == false && menu_talk_con == 0)
|
|
101
|
{
|
|
102
|
talk_counter = menu_list[menuc[0]].times_selected;
|
|
103
|
event_user(2);
|
|
104
|
if (menu_talk_style == 1)
|
|
105
|
d_make();
|
|
106
|
else if (menu_talk_style == 2)
|
|
107
|
alarm[10] = 1; gml_Object_obj_gerson_fountain_Alarm_10.gml
is_interacting = false;
sell = 0;
selling = 0;
sidemessage = 0;
menuc[0] = 0;
menuc[1] = 0;
menuc[2] = 0;
menuc[3] = 0;
menuc[4] = 0;
menu = 0;
submenu = 0;
global.interact = 0;
instance_destroy();
|
|
108
|
else
|
|
109
|
instance_create(camerax() + 30, cameray() + 270, obj_writer);
|
|
110
|
is_talking = true;
|
|
111
|
menu_talk_con = 1;
|
|
112
|
}
|
|
113
|
if (menu_talk_con == 1 && instance_exists(obj_writer) == false)
|
|
114
|
{
|
|
115
|
if (event_active)
|
|
116
|
{
|
|
117
|
event_active = false;
|
|
118
|
event_con = 0;
|
|
119
|
}
|
|
120
|
if (menu == 4)
|
|
121
|
{
|
|
122
|
menu = 0;
|
|
123
|
menu_talk_con = 0;
|
|
124
|
}
|
|
125
|
if (menu == 6)
|
|
126
|
{
|
|
127
|
menu_display_type = 99;
|
|
128
|
if (!d_ex())
|
|
129
|
{
|
|
130
|
menu = 0;
|
|
131
|
menu_talk_con = 0;
|
|
132
|
alarm[10] = 1; gml_Object_obj_gerson_fountain_Alarm_10.gml
is_interacting = false;
sell = 0;
selling = 0;
sidemessage = 0;
menuc[0] = 0;
menuc[1] = 0;
menuc[2] = 0;
menuc[3] = 0;
menuc[4] = 0;
menu = 0;
submenu = 0;
global.interact = 0;
instance_destroy();
|
|
133
|
exit;
|
|
134
|
}
|
|
135
|
}
|
|
136
|
}
|
|
137
|
}
|
|
138
|
if (menu == 10)
|
|
139
|
{
|
|
140
|
menuc[11] = 0;
|
|
141
|
menuc[12] = 0;
|
|
142
|
menuc[13] = 0;
|
|
143
|
menumax = 3;
|
|
144
|
draw_set_color(c_white);
|
|
145
|
scr_84_set_draw_fontscr_84_set_draw_font
function scr_84_set_draw_font(arg0)
{
global.chemg_font = arg0;
draw_set_font(scr_84_get_font(arg0));
} ("mainbig");
|
|
146
|
draw_text(camerax() + 80, cameray() + 260, string_hash_to_newline(stringsetloc(Toss unwanted item"Toss unwanted item", "obj_gerson_fountain_slash_Draw_0_gml_390_0" )));
|
|
147
|
draw_text(camerax() + 80, cameray() + 300, string_hash_to_newline(stringsetloc(Toss unwanted weapon"Toss unwanted weapon", "obj_gerson_fountain_slash_Draw_0_gml_391_0" )));
|
|
148
|
draw_text(camerax() + 80, cameray() + 340, string_hash_to_newline(stringsetloc(Toss unwanted armor"Toss unwanted armor", "obj_gerson_fountain_slash_Draw_0_gml_392_0" )));
|
|
149
|
draw_text(camerax() + 80, cameray() + 380, string_hash_to_newline(stringsetloc(Quit"Quit", "obj_gerson_fountain_slash_Draw_0_gml_393_0" )));
|
|
150
|
if (instance_exists(obj_writer) == false)
|
|
151
|
{
|
|
152
|
if (sidemessage == 0)
|
|
153
|
global.msg[0] = stringsetloc(Select an object."Select an&object.", "obj_gerson_fountain_slash_Draw_0_gml_398_0" );
|
|
154
|
if (sidemessage == 1)
|
|
155
|
global.msg[0] = stringsetloc(Object tossed."Object&tossed.", "obj_gerson_fountain_slash_Draw_0_gml_399_0" );
|
|
156
|
if (sidemessage == 2)
|
|
157
|
global.msg[0] = stringsetloc(Nothing to toss."Nothing&to toss.", "obj_gerson_fountain_slash_Draw_0_gml_400_0" );
|
|
158
|
instance_create(camerax() + 460, cameray() + 260, obj_writer);
|
|
159
|
}
|
|
160
|
menuc[10] = min(menuc[10], menumax);
|
|
161
|
draw_sprite(spr_heart, 0, camerax() + 50, cameray() + 270 + (menuc[10] * 40));
|
|
162
|
if (button1_p() && onebuffer < 0)
|
|
163
|
{
|
|
164
|
pagemax = 0;
|
|
165
|
sidemessage2 = 0;
|
|
166
|
onebuffer = 2;
|
|
167
|
with (obj_writer)
|
|
168
|
instance_destroy();
|
|
169
|
can = 1;
|
|
170
|
idealmenu = menuc[10] + 11;
|
|
171
|
if (idealmenu == 11)
|
|
172
|
{
|
|
173
|
scr_itemcheckscr_itemcheck
function scr_itemcheck(arg0)
{
haveit = 0;
itemcount = 0;
for (var __i = 0; __i < 12; __i += 1)
{
if (global.item[__i] == arg0)
haveit = 1;
if (global.item[__i] == arg0)
itemcount += 1;
}
return haveit;
} (0);
|
|
174
|
if (itemcount == 12)
|
|
175
|
{
|
|
176
|
sidemessage = 2;
|
|
177
|
can = 0;
|
|
178
|
}
|
|
179
|
nothingcount = itemcount;
|
|
180
|
scr_iteminfo_allscr_iteminfo_all
function scr_iteminfo_all()
{
for (i = 0; i < 12; i += 1)
{
itemid = global.item[i];
scr_iteminfo(itemid);
global.itemnameb[i] = itemnameb;
global.itemdescb[i] = itemdescb;
global.itemvalue[i] = value;
global.itemusable[i] = usable;
}
} ();
|
|
181
|
selltype = "item";
|
|
182
|
selltotal = 12;
|
|
183
|
for (var i = 0; i < selltotal; i++)
|
|
184
|
{
|
|
185
|
itemsellvalue[i] = global.itemvalue[i];
|
|
186
|
itemsellname[i] = global.itemnameb[i];
|
|
187
|
}
|
|
188
|
}
|
|
189
|
if (idealmenu == 12)
|
|
190
|
{
|
|
191
|
scr_weaponcheck_inventoryscr_weaponcheck_inventory
function scr_weaponcheck_inventory(arg0)
{
haveit = 0;
itemcount = 0;
for (i = 0; i < 48; i += 1)
{
if (global.weapon[i] == arg0)
haveit = 1;
if (global.weapon[i] == arg0)
itemcount += 1;
}
return haveit;
} (0);
|
|
192
|
if (itemcount == 48)
|
|
193
|
{
|
|
194
|
sidemessage = 2;
|
|
195
|
can = 0;
|
|
196
|
}
|
|
197
|
scr_weaponinfo_allscr_weaponinfo_all
function scr_weaponinfo_all()
{
for (i = 0; i < 48; i += 1)
{
scr_weaponinfo(global.weapon[i]);
weaponname[i] = weaponnametemp;
weapondesc[i] = weapondesctemp;
wmessage2[i] = wmessage2temp;
wmessage3[i] = wmessage3temp;
wmessage4[i] = wmessage4temp;
weaponat[i] = weaponattemp;
weapondf[i] = weapondftemp;
weaponmag[i] = weaponmagtemp;
weaponbolts[i] = weaponboltstemp;
weaponstyle[i] = weaponstyletemp;
weapongrazeamt[i] = weapongrazeamttemp;
weapongrazesize[i] = weapongrazesizetemp;
weaponchar1[i] = weaponchar1temp;
weaponchar2[i] = weaponchar2temp;
weaponchar3[i] = weaponchar3temp;
weaponchar4[i] = weaponchar4temp;
weaponvalue[i] = value;
weaponability[i] = weaponabilitytemp;
weaponabilityicon[i] = weaponabilityicontemp;
weaponicon[i] = weaponicontemp;
}
} ();
|
|
198
|
}
|
|
199
|
if (idealmenu == 13)
|
|
200
|
{
|
|
201
|
scr_armorcheck_inventoryscr_armorcheck_inventory
function scr_armorcheck_inventory(arg0)
{
haveit = 0;
itemcount = 0;
for (i = 0; i < 48; i += 1)
{
if (global.armor[i] == arg0)
haveit = 1;
if (global.armor[i] == arg0)
itemcount += 1;
}
return haveit;
} (0);
|
|
202
|
if (itemcount == 48)
|
|
203
|
{
|
|
204
|
sidemessage = 2;
|
|
205
|
can = 0;
|
|
206
|
}
|
|
207
|
scr_armorinfo_allscr_armorinfo_all
function scr_armorinfo_all()
{
for (i = 0; i < 48; i += 1)
{
scr_armorinfo(global.armor[i]);
armorname[i] = armornametemp;
armordesc[i] = armordesctemp;
amessage2[i] = amessage2temp;
amessage3[i] = amessage3temp;
amessage4[i] = amessage4temp;
armorat[i] = armorattemp;
armordf[i] = armordftemp;
armormag[i] = armormagtemp;
armorbolts[i] = armorboltstemp;
armorgrazeamt[i] = armorgrazeamttemp;
armorgrazesize[i] = armorgrazesizetemp;
armorchar1[i] = armorchar1temp;
armorchar2[i] = armorchar2temp;
armorchar3[i] = armorchar3temp;
armorchar4[i] = armorchar4temp;
armorvalue[i] = value;
armorability[i] = armorabilitytemp;
armorabilityicon[i] = armorabilityicontemp;
armoricon[i] = armoricontemp;
armorelement[i] = armorelementtemp;
armorelementamount[i] = armorelementamounttemp;
}
} ();
|
|
208
|
}
|
|
209
|
if (idealmenu == 14)
|
|
210
|
{
|
|
211
|
scr_itemcheck_pocketscr_itemcheck_pocket
function scr_itemcheck_pocket(arg0)
{
haveit = 0;
itemcount = 0;
for (var __i = 0; __i < global.flag[64 storage_size]; __i += 1)
{
if (global.pocketitem[__i] == arg0)
haveit = 1;
if (global.pocketitem[__i] == arg0)
itemcount += 1;
}
return haveit;
} (0);
|
|
212
|
if (itemcount == global.flag[64 storage_size])
|
|
213
|
{
|
|
214
|
sidemessage = 2;
|
|
215
|
can = 0;
|
|
216
|
}
|
|
217
|
selltype = "pocket";
|
|
218
|
nothingcount = 0;
|
|
219
|
selltotal = global.flag[64 storage_size];
|
|
220
|
for (var i = 0; i < global.flag[64 storage_size]; i++)
|
|
221
|
{
|
|
222
|
scr_iteminfoscr_iteminfo
function scr_iteminfo(arg0)
{
usable = 0;
replaceable = 0;
value = 0;
itemtarget = 0;
itemnameb = " ";
itemdescb = " ";
switch (arg0)
{
case 0:
itemnameb = " ";
itemdescb = "---";
break;
case 1:
itemnameb = stringsetloc(Darker Candy"Darker Candy", "scr_iteminfo_slash_scr_iteminfo_gml_16_0_b" );
itemdescb = stringsetloc(Heals#120HP"Heals#120HP", "scr_iteminfo_slash_scr_iteminfo_gml_17_0" );
itemtarget = 1;
value = 120;
usable = 1;
break;
case 2:
itemnameb = stringsetloc(ReviveMint"ReviveMint", "scr_iteminfo_slash_scr_iteminfo_gml_22_0" );
itemdescb = stringsetloc(Heal#Downed#Ally"Heal#Downed#Ally", "scr_iteminfo_slash_scr_iteminfo_gml_23_0" );
itemtarget = 1;
value = 400;
usable = 1;
break;
case 3:
itemnameb = stringsetloc(Glowshard"Glowshard", "scr_iteminfo_slash_scr_iteminfo_gml_29_0" );
itemdescb = stringsetloc(Sell#at#shops"Sell#at#shops", "scr_iteminfo_slash_scr_iteminfo_gml_30_0" );
itemtarget = 0;
value = 200 + (global.chapter * 100);
usable = 0;
break;
case 4:
itemnameb = stringsetloc(Manual"Manual", "scr_iteminfo_slash_scr_iteminfo_gml_36_0" );
itemdescb = stringsetloc(Read#out of#battle"Read#out of#battle", "scr_iteminfo_slash_scr_iteminfo_gml_37_0" );
itemtarget = 2;
value = 1;
usable = 0;
break;
case 5:
itemnameb = stringsetloc(BrokenCake"BrokenCake", "scr_iteminfo_slash_scr_iteminfo_gml_43_0" );
itemdescb = stringsetloc(Heals#20HP"Heals#20HP", "scr_iteminfo_slash_scr_iteminfo_gml_44_0" );
itemtarget = 1;
value = 5;
usable = 1;
break;
case 6:
itemnameb = stringsetloc(Top Cake"Top Cake", "scr_iteminfo_slash_scr_iteminfo_gml_50_0" );
itemdescb = stringsetloc(Heals#team#160HP"Heals#team#160HP", "scr_iteminfo_slash_scr_iteminfo_gml_51_0" );
itemtarget = 2;
value = 150;
usable = 1;
break;
case 7:
var healamount = (global.chapter == 1) ? 80 : 140;
if (global.chapter == 3)
healamount = 150;
if (global.chapter >= 4)
healamount = 160;
itemnameb = stringsetloc(Spincake"Spincake", "scr_iteminfo_slash_scr_iteminfo_gml_58_0" );
itemdescb = stringsetsubloc("Heals#team#~1HP", string(healamount), "scr_iteminfo_slash_scr_iteminfo_gml_59_0");
itemtarget = 2;
value = 5;
usable = 1;
break;
case 8:
itemnameb = stringsetloc(Darkburger"Darkburger", "scr_iteminfo_slash_scr_iteminfo_gml_65_0" );
itemdescb = stringsetloc(Heals#70HP"Heals#70HP", "scr_iteminfo_slash_scr_iteminfo_gml_66_0" );
itemtarget = 1;
value = 70;
usable = 1;
break;
case 9:
itemnameb = stringsetloc(LancerCookie"LancerCookie", "scr_iteminfo_slash_scr_iteminfo_gml_72_0" );
itemdescb = stringsetloc(Heals#50HP"Heals#50HP", "scr_iteminfo_slash_scr_iteminfo_gml_73_0" );
itemtarget = 1;
value = 10;
usable = 1;
break;
case 10:
itemnameb = stringsetloc(GigaSalad"GigaSalad", "scr_iteminfo_slash_scr_iteminfo_gml_79_0" );
itemdescb = stringsetloc(Heals#4HP"Heals#4HP", "scr_iteminfo_slash_scr_iteminfo_gml_80_0" );
itemtarget = 1;
value = 10;
usable = 1;
break;
case 11:
itemnameb = stringsetloc(ClubsSandwich"ClubsSandwich", "scr_iteminfo_slash_scr_iteminfo_gml_86_0" );
itemdescb = stringsetloc(Heals#team#70HP"Heals#team#70HP", "scr_iteminfo_slash_scr_iteminfo_gml_87_0" );
itemtarget = 2;
value = 70;
usable = 1;
break;
case 12:
itemnameb = stringsetloc(HeartsDonut"HeartsDonut", "scr_iteminfo_slash_scr_iteminfo_gml_93_0" );
itemdescb = stringsetloc(Healing#varies"Healing#varies", "scr_iteminfo_slash_scr_iteminfo_gml_94_0" );
itemtarget = 1;
value = 40;
... (global.pocketitem[i]);
|
|
223
|
itemsellvalue[i] = value;
|
|
224
|
itemsellname[i] = itemnameb;
|
|
225
|
}
|
|
226
|
idealmenu = 11;
|
|
227
|
}
|
|
228
|
if (menuc[10] < menumax)
|
|
229
|
{
|
|
230
|
if (can == 1)
|
|
231
|
menu = idealmenu;
|
|
232
|
sidemessage1 = 0;
|
|
233
|
}
|
|
234
|
else
|
|
235
|
{
|
|
236
|
menu = 0;
|
|
237
|
}
|
|
238
|
submenu = 0;
|
|
239
|
submenuc[1] = 0;
|
|
240
|
}
|
|
241
|
if (button2_p() && twobuffer < 0 && onebuffer < 0)
|
|
242
|
{
|
|
243
|
twobuffer = 2;
|
|
244
|
menu = 0;
|
|
245
|
with (obj_writer)
|
|
246
|
instance_destroy();
|
|
247
|
}
|
|
248
|
}
|
|
249
|
scr_shopmenuscr_shopmenu
function scr_shopmenu(arg0)
{
if (arg0 == 0)
{
if (menu == 1 || menu == 2)
{
scr_darkbox_black(camerax() + 400, cameray() + minimenuy, camerax() + 640, cameray() + 255);
draw_set_color(c_white);
scr_84_set_draw_font("mainbig");
if (menuc[1] == 0)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[0]));
if (menuc[1] == 1)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[1]));
if (menuc[1] == 2)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[2]));
if (menuc[1] == 3)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[3]));
scr_84_set_draw_font("dotumche");
if (itemtype[menuc[1]] == "weapon" || itemtype[menuc[1]] == "armor")
{
for (i = 0; i < 3; i += 1)
{
can_index = 0;
facetype = spr_headkris;
which = global.char[i];
if (global.char[i] == 1)
facetype = spr_headkris;
if (global.char[i] == 2)
facetype = spr_headsusie;
if (global.char[i] == 3)
facetype = spr_headralsei;
if (which != 0)
{
if (i == 0)
{
locx = 0;
locy = 0;
}
if (i == 1)
{
locx = 100;
locy = 0;
}
if (i == 2)
{
locx = 0;
locy = 45;
}
if (canequip[menuc[1]][which] == 0)
can_index = 8;
draw_sprite(facetype, can_index, camerax() + 426 + locx, cameray() + minimenuy + 140 + locy);
if (itemtype[menuc[1]] == "weapon" && can_index != 8)
{
draw_set_color(c_white);
sum[0] = itematk[menuc[1]] - global.itemat[which][0];
sum[1] = itemmagic[menuc[1]] - global.itemmag[which][0];
for (j = 0; j < 2; j += 1)
{
dcolor = c_white;
addt = "";
draw_set_color(c_white);
if (sum[j] > 0)
{
draw_set_color(c_yellow);
addt = "+";
}
if (sum[j] < 0)
draw_set_color(c_aqua);
draw_sprite_ext(spr_shopicon, j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1);
draw_text(camerax() + 490 + locx, cameray() + minimenuy + locy + 135 + (20 * j), string_hash_to_newline(addt + string(sum[j])));
}
}
if (itemtype[menuc[1]] == "armor" && can_index != 8)
{
sum[0] = itemdef[menuc[1]] - global.itemdf[which][1];
sum[1] = itemdef[menuc[1]] - global.itemdf[which][2];
for (j = 0; j < 2; j += 1)
{
dcolor = c_white;
addt = "";
draw_set_color(c_white);
if (sum[j] > 0)
{
draw_set_color(c_yellow);
addt = "+";
}
if (sum[j] < 0)
draw_set_color(c_aqua);
draw_sprite_ext(spr_shopicon, 2 + j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1);
draw_text(camerax() + 490 + locx, cameray() + minimenuy + 135 + (20 * j) + locy, string_hash_to_newline(addt + string(sum[j])));
}
}
}
}
}
}
}
if (arg0 == 4)
{
if (menu == 11 || menu == 15)
{
... (4);
|
|
250
|
if (menu == 11 || menu == 12 || menu == 13 || menu == 14)
|
|
251
|
{
|
|
252
|
if (instance_exists(obj_writer) == false)
|
|
253
|
{
|
|
254
|
if (sidemessage2 == 0 && (menu == 11 || menu == 14))
|
|
255
|
global.msg[0] = stringsetloc(Select an ITEM to toss."Select an&ITEM&to toss.", "obj_gerson_fountain_slash_Draw_0_gml_486_0" );
|
|
256
|
if (sidemessage2 == 0 && menu == 12)
|
|
257
|
global.msg[0] = stringsetloc(Select a WEAPON to toss."Select a&WEAPON&to toss.", "obj_gerson_fountain_slash_Draw_0_gml_487_0" );
|
|
258
|
if (sidemessage2 == 0 && menu == 13)
|
|
259
|
global.msg[0] = stringsetloc(Select an ARMOR to toss."Select an&ARMOR&to toss.", "obj_gerson_fountain_slash_Draw_0_gml_488_0" );
|
|
260
|
instance_create(camerax() + 450, cameray() + 260, obj_writer);
|
|
261
|
}
|
|
262
|
}
|
|
263
|
scr_shopmenuscr_shopmenu
function scr_shopmenu(arg0)
{
if (arg0 == 0)
{
if (menu == 1 || menu == 2)
{
scr_darkbox_black(camerax() + 400, cameray() + minimenuy, camerax() + 640, cameray() + 255);
draw_set_color(c_white);
scr_84_set_draw_font("mainbig");
if (menuc[1] == 0)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[0]));
if (menuc[1] == 1)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[1]));
if (menuc[1] == 2)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[2]));
if (menuc[1] == 3)
draw_text(camerax() + 440, cameray() + minimenuy + 28, string_hash_to_newline(shopdesc[3]));
scr_84_set_draw_font("dotumche");
if (itemtype[menuc[1]] == "weapon" || itemtype[menuc[1]] == "armor")
{
for (i = 0; i < 3; i += 1)
{
can_index = 0;
facetype = spr_headkris;
which = global.char[i];
if (global.char[i] == 1)
facetype = spr_headkris;
if (global.char[i] == 2)
facetype = spr_headsusie;
if (global.char[i] == 3)
facetype = spr_headralsei;
if (which != 0)
{
if (i == 0)
{
locx = 0;
locy = 0;
}
if (i == 1)
{
locx = 100;
locy = 0;
}
if (i == 2)
{
locx = 0;
locy = 45;
}
if (canequip[menuc[1]][which] == 0)
can_index = 8;
draw_sprite(facetype, can_index, camerax() + 426 + locx, cameray() + minimenuy + 140 + locy);
if (itemtype[menuc[1]] == "weapon" && can_index != 8)
{
draw_set_color(c_white);
sum[0] = itematk[menuc[1]] - global.itemat[which][0];
sum[1] = itemmagic[menuc[1]] - global.itemmag[which][0];
for (j = 0; j < 2; j += 1)
{
dcolor = c_white;
addt = "";
draw_set_color(c_white);
if (sum[j] > 0)
{
draw_set_color(c_yellow);
addt = "+";
}
if (sum[j] < 0)
draw_set_color(c_aqua);
draw_sprite_ext(spr_shopicon, j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1);
draw_text(camerax() + 490 + locx, cameray() + minimenuy + locy + 135 + (20 * j), string_hash_to_newline(addt + string(sum[j])));
}
}
if (itemtype[menuc[1]] == "armor" && can_index != 8)
{
sum[0] = itemdef[menuc[1]] - global.itemdf[which][1];
sum[1] = itemdef[menuc[1]] - global.itemdf[which][2];
for (j = 0; j < 2; j += 1)
{
dcolor = c_white;
addt = "";
draw_set_color(c_white);
if (sum[j] > 0)
{
draw_set_color(c_yellow);
addt = "+";
}
if (sum[j] < 0)
draw_set_color(c_aqua);
draw_sprite_ext(spr_shopicon, 2 + j, camerax() + 470 + locx, cameray() + minimenuy + locy + 135 + (20 * j), 1, 1, 0, dcolor, 1);
draw_text(camerax() + 490 + locx, cameray() + minimenuy + 135 + (20 * j) + locy, string_hash_to_newline(addt + string(sum[j])));
}
}
}
}
}
}
}
if (arg0 == 4)
{
if (menu == 11 || menu == 15)
{
... (5);
|
|
264
|
if (menu == 15 || menu == 16 || menu == 17 || menu == 18)
|
|
265
|
{
|
|
266
|
menumax = 1;
|
|
267
|
draw_set_color(c_white);
|
|
268
|
scr_84_set_draw_fontscr_84_set_draw_font
function scr_84_set_draw_font(arg0)
{
global.chemg_font = arg0;
draw_set_font(scr_84_get_font(arg0));
} ("mainbig");
|
|
269
|
var y1_off = langopt(260, 290);
|
|
270
|
var y2_off = langopt(290, 260);
|
|
271
|
draw_text(camerax() + 460, cameray() + y1_off, string_hash_to_newline(stringsetloc(Toss it for"Toss it for", "obj_gerson_fountain_slash_Draw_0_gml_505_0" )));
|
|
272
|
draw_text(camerax() + 460, cameray() + y2_off, string_hash_to_newline(stringsetsubloc("$~1 ?", string(sellvalue), "obj_shop_vending_slash_Draw_0_gml_456_0")));
|
|
273
|
draw_text(camerax() + 480, cameray() + 340, string_hash_to_newline(stringsetloc(Yes"Yes", "obj_shop_vending_slash_Draw_0_gml_457_0" )));
|
|
274
|
draw_text(camerax() + 480, cameray() + 370, string_hash_to_newline(stringsetloc(No"No", "obj_shop_vending_slash_Draw_0_gml_458_0" )));
|
|
275
|
menuc[menu] = min(menuc[menu], menumax);
|
|
276
|
draw_sprite(spr_heart, 0, camerax() + 450, cameray() + 350 + (menuc[menu] * 30));
|
|
277
|
}
|
|
278
|
if (down_p())
|
|
279
|
{
|
|
280
|
if (menu != 11 && menu != 12 && menu != 13)
|
|
281
|
{
|
|
282
|
menuc[menu] += 1;
|
|
283
|
if (menuc[menu] > menumax)
|
|
284
|
menuc[menu] = 0;
|
|
285
|
}
|
|
286
|
}
|
|
287
|
if (up_p())
|
|
288
|
{
|
|
289
|
if (menu != 11 && menu != 12 && menu != 13)
|
|
290
|
{
|
|
291
|
menuc[menu] -= 1;
|
|
292
|
if (menuc[menu] < 0)
|
|
293
|
menuc[menu] = menumax;
|
|
294
|
}
|
|
295
|
}
|
|
296
|
if (menu < itemtotal || menu >= 10)
|
|
297
|
{
|
|
298
|
if (menu >= 10 && menu < 18)
|
|
299
|
draw_text(camerax() + 440, cameray() + 420, "$" + string_hash_to_newline(string(global.gold)));
|
|
300
|
else if (menu_dollar)
|
|
301
|
draw_text(camerax() + 440, cameray() + 420, string_hash_to_newline("$" + string(global.gold)));
|
|
302
|
else
|
|
303
|
draw_text(camerax() + 440, cameray() + 420, string_hash_to_newline(string(global.flag[1044 points])) + " PTs");
|
|
304
|
if (itemtype[menuc[1]] != "key" && itemtype[menuc[1]] != "event")
|
|
305
|
{
|
|
306
|
if (menu == 1 || menu == 2)
|
|
307
|
{
|
|
308
|
if (menuc[1] < itemtotal)
|
|
309
|
scr_shop_space_displayscr_shop_space_display
function scr_shop_space_display(arg0, arg1 = 545, arg2 = 398)
{
var item_id = item[arg0];
var __cx = camerax();
var __cy = cameray();
if (itemtype[arg0] == "item")
{
scr_itemcheck(0);
var inventory_space = 12 - itemcount;
var inventory_amount = "00";
if (inventory_space < 10)
inventory_amount = "0" + string(inventory_space);
else
inventory_amount = string(inventory_space);
var y_offset = (global.lang == "ja") ? 4 : 0;
var base_y_pos = __cy + arg2 + y_offset;
var line_height = 12;
draw_sprite_ext(scr_84_get_sprite("spr_shop_space_ui"), 0, __cx + arg1, base_y_pos, 1, 1, 0, c_white, 1);
draw_set_font(fnt_8bit);
draw_text_ext_transformed(__cx + arg1 + 1, base_y_pos + line_height + 4, inventory_amount + "/12", 1, 999, 0.5, 0.5, 0);
draw_set_font(fnt_main);
draw_sprite_ext(scr_84_get_sprite("spr_shop_space_ui"), 2, __cx + arg1, base_y_pos + (line_height * 2) + 8, 1, 1, 0, c_white, 1);
scr_itemcheck_pocket(0);
var storage_space = global.flag[64 storage_size] - itemcount;
var storage_amount = "00";
if (storage_space < 10)
storage_amount = "0" + string(storage_space);
else
storage_amount = string(storage_space);
draw_set_font(fnt_8bit);
draw_text_ext_transformed(__cx + arg1 + 1, base_y_pos + (line_height * 3) + 12, storage_amount + "/" + string(global.flag[64 storage_size]), 1, 999, 0.5, 0.5, 0);
draw_set_font(fnt_main);
}
else
{
var inventory_space = 0;
if (itemtype[arg0] == "weapon")
{
scr_weaponcheck_inventory(0);
inventory_space = 48 - itemcount;
}
else
{
scr_armorcheck_inventory(0);
inventory_space = 48 - itemcount;
}
var inventory_amount = "00";
if (inventory_space < 10)
inventory_amount = "0" + string(inventory_space);
else
inventory_amount = string(inventory_space);
var base_y_pos = (__cy + arg2 + 20) - 8;
var line_height = 12;
var header_index = (itemtype[arg0] == "weapon") ? 3 : 4;
var header_y_pos = langopt(base_y_pos, base_y_pos + line_height);
draw_sprite_ext(scr_84_get_sprite("spr_shop_space_ui"), header_index, __cx + arg1, header_y_pos, 1, 1, 0, c_white, 1);
var inventory_y_pos = langopt(base_y_pos + line_height, base_y_pos);
var inventory_index = (global.lang == "ja") ? 1 : 0;
draw_sprite_ext(scr_84_get_sprite("spr_shop_space_ui"), inventory_index, __cx + arg1, inventory_y_pos, 1, 1, 0, c_white, 1);
draw_set_font(fnt_8bit);
draw_text_ext_transformed(__cx + arg1 + 1, base_y_pos + (line_height * 2) + 4, inventory_amount + "/48", 1, 999, 0.5, 0.5, 0);
draw_set_font(fnt_main);
}
}
function scr_shopspace_displaybox(arg0 = "item", arg1 = 413, arg2 = 161, arg3 = true, arg4 = false)
{
var cx = camerax();
var cy = cameray();
var xpos = cx + (arg1 - 8);
var ypos = cy + (arg2 - 8);
var wid = 211;
var hei = 97;
if (arg3)
{
draw_sprite_ext(spr_pxwhite, 0, xpos + 18, ypos + 18, wid - 36, hei - 36, 0, c_black, 1);
scr_darkbox(xpos, ypos, xpos + wid, ypos + hei);
if (arg4)
draw_sprite_ext(spr_pxwhite, 0, xpos + 22, (ypos - 2) + 8, 168, 2, 0, #9DA2C4, 1);
}
draw_set_color(c_white);
draw_set_font(fnt_mainbig);
draw_text(xpos + 39 + 8, ypos + 24 + 8, "$" + string(global.gold));
item = [0];
itemtype = [arg0];
scr_shop_space_display(0, (xpos - cx) + 131, (ypos - cy) + 21);
} (menuc[1]);
|
|
310
|
}
|
|
311
|
}
|
|
312
|
}
|
|
313
|
onebuffer -= 1;
|
|
314
|
twobuffer -= 1;
|