1 |
if (global.mnfight == 2) |
2 |
{ |
3 |
alarm[1] = round(random(20)) + 10;gml_Object_obj_movedogehead_Alarm_1.gmlif (global.mnfight == 2)
{
alarm[1] = round(random(20)) + 10;
}
else
{
if (instance_exists(blcon))
{
with (blcon)
instance_destroy();
}
if (instance_exists(blconwd))
{
with (blconwd)
instance_destroy();
}
exit;
}
gg = floor(random(3));
if (instance_exists(blcon))
{
with (blcon)
instance_destroy();
}
if (instance_exists(blconwd))
{
with (blconwd)
instance_destroy();
}
if (gg == 0)
{
xx = x - random(sprite_width / 2) - 40;
yy = y + random(sprite_height / 3);
}
if (gg == 1)
{
xx = x + random(sprite_width / 3) + 100;
yy = y + random(sprite_height / 3);
}
if (gg == 2)
{
xx = (x + random(sprite_width)) - (sprite_width / 2);
yy = y - 18;
}
blcon = instance_create(xx, yy, obj_blconsm);
blcon.depth = 14;
blcon.sprite_index = spr_blcontiny;
global.msg[0] = ;
global.msg[1] = Close MessageClose MessageClose Message ;
global.typer = 2;
blconwd = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER);
blconwd.depth = 13; |
4 |
} |
5 |
else |
6 |
{ |
7 |
if (instance_exists(blcon)) |
8 |
{ |
9 |
with (blcon) |
10 |
instance_destroy(); |
11 |
} |
12 |
if (instance_exists(blconwd)) |
13 |
{ |
14 |
with (blconwd) |
15 |
instance_destroy(); |
16 |
} |
17 |
exit; |
18 |
} |
19 |
gg = floor(random(3)); |
20 |
if (instance_exists(blcon)) |
21 |
{ |
22 |
with (blcon) |
23 |
instance_destroy(); |
24 |
} |
25 |
if (instance_exists(blconwd)) |
26 |
{ |
27 |
with (blconwd) |
28 |
instance_destroy(); |
29 |
} |
30 |
if (gg == 0) |
31 |
{ |
32 |
xx = x - random(sprite_width / 2) - 40; |
33 |
yy = y + random(sprite_height / 3); |
34 |
} |
35 |
if (gg == 1) |
36 |
{ |
37 |
xx = x + random(sprite_width / 3) + 100; |
38 |
yy = y + random(sprite_height / 3); |
39 |
} |
40 |
if (gg == 2) |
41 |
{ |
42 |
xx = (x + random(sprite_width)) - (sprite_width / 2); |
43 |
yy = y - 18; |
44 |
} |
45 |
blcon = instance_create(xx, yy, obj_blconsm); |
46 |
blcon.depth = 14; |
47 |
blcon.sprite_index = spr_blcontiny; |
48 |
global.msg[0] = MOVING?scr_gettextscr_gettextvar text_id = argument[0];
var text = ds_map_find_value(global.text_data_en, text_id);
if (is_undefined(text))
text = "";
if (global.language == "ja")
{
var loc_text = ds_map_find_value(global.text_data_ja, text_id);
if (!is_undefined(loc_text))
text = loc_text;
}
for (var i = 1; i <= (string_length(text) - 3); i++)
{
if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]")
{
var sel = string_char_at(text, i + 2);
var replace;
if (sel == "C")
replace = global.charname;
else if (sel == "G")
replace = string(global.gold);
else if (sel == "I")
replace = global.itemname[global.menucoord[1]];
else if (sel == "1" && argument_count > 1)
replace = argument[1];
else if (sel == "2" && argument_count > 2)
replace = argument[2];
else if (sel == "3" && argument_count > 3)
replace = argument[3];
else if (sel == "4" && argument_count > 4)
replace = argument[4];
else if (sel == "5" && argument_count > 5)
replace = argument[5];
else if (sel == "6" && argument_count > 6)
replace = argument[6];
else if (sel == "7" && argument_count > 7)
replace = argument[7];
else if (sel == "8" && argument_count > 8)
replace = argument[8];
else if (sel == "9" && argument_count > 9)
replace = argument[9];
else
replace = "";
var before = string_copy(text, 1, i - 1);
var after = string_copy(text, i + 4, string_length(text));
text = before + replace + after;
i += (string_length(replace) - 1);
}
}
return text; ("obj_movedogehead_263") ; |
49 |
global.msg[1] = Close MessageClose MessageClose Messagescr_gettextscr_gettextvar text_id = argument[0];
var text = ds_map_find_value(global.text_data_en, text_id);
if (is_undefined(text))
text = "";
if (global.language == "ja")
{
var loc_text = ds_map_find_value(global.text_data_ja, text_id);
if (!is_undefined(loc_text))
text = loc_text;
}
for (var i = 1; i <= (string_length(text) - 3); i++)
{
if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]")
{
var sel = string_char_at(text, i + 2);
var replace;
if (sel == "C")
replace = global.charname;
else if (sel == "G")
replace = string(global.gold);
else if (sel == "I")
replace = global.itemname[global.menucoord[1]];
else if (sel == "1" && argument_count > 1)
replace = argument[1];
else if (sel == "2" && argument_count > 2)
replace = argument[2];
else if (sel == "3" && argument_count > 3)
replace = argument[3];
else if (sel == "4" && argument_count > 4)
replace = argument[4];
else if (sel == "5" && argument_count > 5)
replace = argument[5];
else if (sel == "6" && argument_count > 6)
replace = argument[6];
else if (sel == "7" && argument_count > 7)
replace = argument[7];
else if (sel == "8" && argument_count > 8)
replace = argument[8];
else if (sel == "9" && argument_count > 9)
replace = argument[9];
else
replace = "";
var before = string_copy(text, 1, i - 1);
var after = string_copy(text, i + 4, string_length(text));
text = before + replace + after;
i += (string_length(replace) - 1);
}
}
return text; ("obj_movedogehead_264") ; |
50 |
global.typer = 2; |
51 |
blconwd = instance_create(blcon.x + 15, blcon.y + 10, OBJ_NOMSCWRITER); |
52 |
blconwd.depth = 13; |