| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
if (show_timer) |
| 4 |
scr_determine_playtimescr_determine_playtimefunction scr_determine_playtime()
{
var time_new = date_current_datetime();
var time_difference = floor(date_second_span(global.saved_datetime, time_new));
global.elapsed_seconds += time_difference;
global.saved_datetime = time_new;
} (); |
| 5 |
var dbg_soundtest = mouse_check_button_pressed(mb_left); |
| 6 |
if (dbg_soundtest) |
| 7 |
audio_play_sound(snd_monster_damage_death, 1, 0); |
| 8 |
var dbg_up = keyboard_check_pressed(ord("W")); |
| 9 |
var dbg_down = keyboard_check_pressed(ord("S")); |
| 10 |
var dbg_right = keyboard_check_pressed(ord("D")); |
| 11 |
var dbg_left = keyboard_check_pressed(ord("A")); |
| 12 |
var dbg_conf = keyboard_check_pressed(ord("E")); |
| 13 |
var dbg_canc = keyboard_check_pressed(ord("Q")); |
| 14 |
var dbg_time = keyboard_check_pressed(ord("M")); |
| 15 |
if (dbg_up && !alarm[0]) |
| 16 |
alarm[0] = 5; |
| 17 |
else |
| 18 |
dbg_up = false; |
| 19 |
if (dbg_down && !alarm[1]) |
| 20 |
alarm[1] = 5; |
| 21 |
else |
| 22 |
dbg_down = false; |
| 23 |
if (dbg_time) |
| 24 |
{ |
| 25 |
if (show_timer == false) |
| 26 |
show_timer = true; |
| 27 |
else |
| 28 |
show_timer = false; |
| 29 |
} |
| 30 |
switch (dbg_menu) |
| 31 |
{ |
| 32 |
case 0: |
| 33 |
if (dbg_down) |
| 34 |
{ |
| 35 |
if (dbg_pos < 5) |
| 36 |
dbg_pos += 1; |
| 37 |
else |
| 38 |
dbg_pos = 1; |
| 39 |
} |
| 40 |
if (dbg_up) |
| 41 |
{ |
| 42 |
if (dbg_pos > 1) |
| 43 |
dbg_pos -= 1; |
| 44 |
else |
| 45 |
dbg_pos = 5; |
| 46 |
} |
| 47 |
if (dbg_conf) |
| 48 |
{ |
| 49 |
if (dbg_pos == 5) |
| 50 |
{ |
| 51 |
var code_string = get_string("Enter code:", "") + "; return 1"; |
| 52 |
show_debug_message("code_string: " + code_string); |
| 53 |
if (live_execute_string(code_string)) |
| 54 |
show_debug_message("Result: " + string(global.live_result)); |
| 55 |
else |
| 56 |
show_debug_message("Error: " + string(global.live_result)); |
| 57 |
exit; |
| 58 |
} |
| 59 |
else |
| 60 |
{ |
| 61 |
dbg_menu = dbg_pos; |
| 62 |
dbg_pos = 1; |
| 63 |
} |
| 64 |
} |
| 65 |
if (dbg_canc) |
| 66 |
instance_destroy(); |
| 67 |
break; |
| 68 |
case 1: |
| 69 |
if (dbg_down) |
| 70 |
{ |
| 71 |
if (dbg_pos < dbg_room_count) |
| 72 |
dbg_pos += 1; |
| 73 |
else |
| 74 |
dbg_pos = 0; |
| 75 |
} |
| 76 |
if (dbg_up) |
| 77 |
{ |
| 78 |
if (dbg_pos > 0) |
| 79 |
dbg_pos -= 1; |
| 80 |
else |
| 81 |
dbg_pos = dbg_room_count; |
| 82 |
} |
| 83 |
if (dbg_right) |
| 84 |
{ |
| 85 |
if (dbg_pos < dbg_room_count) |
| 86 |
dbg_pos += 5; |
| 87 |
else |
| 88 |
dbg_pos = 0; |
| 89 |
} |
| 90 |
if (dbg_left) |
| 91 |
{ |
| 92 |
if (dbg_pos > 0) |
| 93 |
dbg_pos -= 5; |
| 94 |
else |
| 95 |
dbg_pos = dbg_room_count; |
| 96 |
} |
| 97 |
if (dbg_conf) |
| 98 |
room_goto(asset_get_index(ds_list_find_value(room_list, dbg_pos))); |
| 99 |
if (dbg_canc) |
| 100 |
{ |
| 101 |
dbg_pos = 1; |
| 102 |
dbg_menu = 0; |
| 103 |
} |
| 104 |
break; |
| 105 |
case 2: |
| 106 |
if (dbg_down) |
| 107 |
{ |
| 108 |
if (dbg_pos < 4) |
| 109 |
dbg_pos += 1; |
| 110 |
else |
| 111 |
dbg_pos = 1; |
| 112 |
} |
| 113 |
if (dbg_up) |
| 114 |
{ |
| 115 |
if (dbg_pos > 1) |
| 116 |
dbg_pos -= 1; |
| 117 |
else |
| 118 |
dbg_pos = 4; |
| 119 |
} |
| 120 |
if (dbg_right) |
| 121 |
{ |
| 122 |
if (dbg_pos == 3) |
| 123 |
{ |
| 124 |
if (dbg_enemy_current < (array_length_1d(dbg_battle_enemy_name) - 1)) |
| 125 |
dbg_enemy_current++; |
| 126 |
else |
| 127 |
dbg_enemy_current = 0; |
| 128 |
} |
| 129 |
if (dbg_pos == 4) |
| 130 |
{ |
| 131 |
if (dbg_boss_current < (array_length_1d(dbg_battle_boss_name) - 1)) |
| 132 |
dbg_boss_current++; |
| 133 |
else |
| 134 |
dbg_boss_current = 0; |
| 135 |
} |
| 136 |
} |
| 137 |
if (dbg_left) |
| 138 |
{ |
| 139 |
if (dbg_pos == 3) |
| 140 |
{ |
| 141 |
if (dbg_enemy_current > 0) |
| 142 |
dbg_enemy_current--; |
| 143 |
else |
| 144 |
dbg_enemy_current = array_length_1d(dbg_battle_enemy_name) - 1; |
| 145 |
} |
| 146 |
if (dbg_pos == 4) |
| 147 |
{ |
| 148 |
if (dbg_boss_current > 0) |
| 149 |
dbg_boss_current--; |
| 150 |
else |
| 151 |
dbg_boss_current = array_length_1d(dbg_battle_boss_name) - 1; |
| 152 |
} |
| 153 |
} |
| 154 |
if (dbg_conf) |
| 155 |
{ |
| 156 |
if (dbg_pos == 1) |
| 157 |
{ |
| 158 |
if (global.player_level >= 19) |
| 159 |
exit; |
| 160 |
global.player_level += 1; |
| 161 |
global.max_hp_self = global.player_hp_next[global.player_level]; |
| 162 |
global.current_hp_self = global.max_hp_self; |
| 163 |
global.player_attack = global.player_attack_next[global.player_level]; |
| 164 |
global.player_defense = global.player_defense_next[global.player_level]; |
| 165 |
} |
| 166 |
if (dbg_pos == 2) |
| 167 |
{ |
| 168 |
global.player_level = 1; |
| 169 |
global.max_hp_self = 20; |
| 170 |
global.current_hp_self = global.max_hp_self; |
| 171 |
global.player_attack = global.player_attack_next[1]; |
| 172 |
global.player_defense = global.player_defense_next[1]; |
| 173 |
} |
| 174 |
if (dbg_pos == 3) |
| 175 |
{ |
| 176 |
instance_create(obj_pl.x - 4, obj_pl.y - 26, obj_exclamation_mark); |
| 177 |
global.battle_enemy_name = dbg_battle_enemy_name[dbg_enemy_current]; |
| 178 |
global.current_room_overworld = room_get_name(room); |
| 179 |
global.battling_boss = false; |
| 180 |
global.battle_start = true; |
| 181 |
instance_destroy(); |
| 182 |
} |
| 183 |
if (dbg_pos == 4) |
| 184 |
{ |
| 185 |
instance_create(obj_pl.x - 4, obj_pl.y - 26, obj_exclamation_mark); |
| 186 |
global.battle_enemy_name = dbg_battle_boss_name[dbg_boss_current]; |
| 187 |
global.current_room_overworld = room_get_name(room); |
| 188 |
global.battling_enemy = false; |
| 189 |
global.battling_boss = true; |
| 190 |
global.battle_start = true; |
| 191 |
instance_destroy(); |
| 192 |
} |
| 193 |
} |
| 194 |
if (dbg_canc) |
| 195 |
{ |
| 196 |
dbg_pos = 1; |
| 197 |
dbg_menu = 0; |
| 198 |
} |
| 199 |
break; |
| 200 |
case 3: |
| 201 |
if (dbg_down) |
| 202 |
{ |
| 203 |
if (dbg_pos < (ds_map_size(cheat_map) - 1)) |
| 204 |
dbg_pos += 1; |
| 205 |
else |
| 206 |
dbg_pos = 0; |
| 207 |
} |
| 208 |
if (dbg_up) |
| 209 |
{ |
| 210 |
if (dbg_pos > 0) |
| 211 |
dbg_pos -= 1; |
| 212 |
else |
| 213 |
dbg_pos = ds_map_size(cheat_map) - 1; |
| 214 |
} |
| 215 |
if (dbg_canc) |
| 216 |
{ |
| 217 |
dbg_pos = 1; |
| 218 |
dbg_menu = 0; |
| 219 |
} |
| 220 |
var current_value = ds_map_find_value(cheat_map, dbg_pos); |
| 221 |
switch (dbg_pos) |
| 222 |
{ |
| 223 |
case 0: |
| 224 |
if (dbg_left) |
| 225 |
{ |
| 226 |
if (current_value > 0.5) |
| 227 |
ds_map_replace(cheat_map, dbg_pos, current_value - 0.5); |
| 228 |
else |
| 229 |
ds_map_replace(cheat_map, dbg_pos, 6); |
| 230 |
} |
| 231 |
else if (dbg_right) |
| 232 |
{ |
| 233 |
if (current_value < 4) |
| 234 |
ds_map_replace(cheat_map, dbg_pos, current_value + 0.5); |
| 235 |
else |
| 236 |
ds_map_replace(cheat_map, dbg_pos, 0.5); |
| 237 |
} |
| 238 |
else if (dbg_conf) |
| 239 |
{ |
| 240 |
room_speed = current_value * 30; |
| 241 |
} |
| 242 |
break; |
| 243 |
case 1: |
| 244 |
if (dbg_left || dbg_right) |
| 245 |
{ |
| 246 |
if (current_value == 1) |
| 247 |
ds_map_replace(cheat_map, dbg_pos, 0); |
| 248 |
else |
| 249 |
ds_map_replace(cheat_map, dbg_pos, 1); |
| 250 |
} |
| 251 |
if (dbg_conf) |
| 252 |
{ |
| 253 |
if (current_value == 1) |
| 254 |
{ |
| 255 |
global.current_hp_self = 9999; |
| 256 |
global.max_hp_self = 9999; |
| 257 |
} |
| 258 |
else if (current_value == 2) |
| 259 |
{ |
| 260 |
global.max_hp_self = global.player_hp_next[global.player_level]; |
| 261 |
global.current_hp_self = global.max_hp_self; |
| 262 |
} |
| 263 |
} |
| 264 |
break; |
| 265 |
case 2: |
| 266 |
if (dbg_left || dbg_right) |
| 267 |
{ |
| 268 |
if (current_value == 1) |
| 269 |
ds_map_replace(cheat_map, dbg_pos, 0); |
| 270 |
else |
| 271 |
ds_map_replace(cheat_map, dbg_pos, 1); |
| 272 |
} |
| 273 |
if (dbg_conf) |
| 274 |
{ |
| 275 |
if (current_value == 1) |
| 276 |
global.debug_move = true; |
| 277 |
else if (current_value == 0) |
| 278 |
global.debug_move = false; |
| 279 |
} |
| 280 |
break; |
| 281 |
case 3: |
| 282 |
if (dbg_right) |
| 283 |
{ |
| 284 |
if (current_value < 9999) |
| 285 |
ds_map_replace(cheat_map, dbg_pos, current_value + 1); |
| 286 |
} |
| 287 |
else if (dbg_left) |
| 288 |
{ |
| 289 |
if (current_value > 0) |
| 290 |
ds_map_replace(cheat_map, dbg_pos, current_value - 1); |
| 291 |
} |
| 292 |
else if (dbg_conf) |
| 293 |
{ |
| 294 |
audio_play_sound(snd_success, 1, 0); |
| 295 |
global.player_gold += current_value; |
| 296 |
} |
| 297 |
break; |
| 298 |
case 4: |
| 299 |
if (dbg_conf) |
| 300 |
{ |
| 301 |
scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Golden Scarf"); |
| 302 |
scr_itemscr_itemfunction scr_item(arg0)
{
nm = arg0;
for (var i = 1; i <= 8; i++)
{
if (global.item_slot[i] == "Nothing")
{
global.item_slot[i] = nm;
return true;
break;
}
else if (i == 8)
{
return false;
}
}
} ("Super Ammo"); |
| 303 |
} |
| 304 |
break; |
| 305 |
case 5: |
| 306 |
if (dbg_right) |
| 307 |
{ |
| 308 |
if (global.route < 3) |
| 309 |
ds_map_replace(cheat_map, dbg_pos, current_value + 1); |
| 310 |
} |
| 311 |
else if (dbg_left) |
| 312 |
{ |
| 313 |
if (global.route > 1) |
| 314 |
ds_map_replace(cheat_map, dbg_pos, current_value - 1); |
| 315 |
} |
| 316 |
else if (dbg_conf) |
| 317 |
{ |
| 318 |
audio_play_sound(snd_confirm, 1, 0); |
| 319 |
global.route = current_value; |
| 320 |
} |
| 321 |
break; |
| 322 |
case 6: |
| 323 |
if (dbg_conf) |
| 324 |
{ |
| 325 |
if (!kanako_time) |
| 326 |
{ |
| 327 |
kanako_time = true; |
| 328 |
} |
| 329 |
else |
| 330 |
{ |
| 331 |
kanako_time = false; |
| 332 |
global.player_sprites = "normal"; |
| 333 |
} |
| 334 |
} |
| 335 |
break; |
| 336 |
case 7: |
| 337 |
if (dbg_conf) |
| 338 |
{ |
| 339 |
if (!instance_exists(obj_debug_skipper)) |
| 340 |
{ |
| 341 |
instance_create(0, 0, obj_debug_skipper); |
| 342 |
} |
| 343 |
else |
| 344 |
{ |
| 345 |
room_speed = 30; |
| 346 |
instance_destroy(obj_debug_skipper); |
| 347 |
} |
| 348 |
} |
| 349 |
break; |
| 350 |
} |
| 351 |
break; |
| 352 |
case 4: |
| 353 |
game_restart(); |
| 354 |
break; |
| 355 |
} |
| 356 |
if (no_encounters) |
| 357 |
{ |
| 358 |
if (instance_exists(obj_rndenc)) |
| 359 |
instance_destroy(obj_rndenc); |
| 360 |
if (instance_exists(obj_scriptedencounters)) |
| 361 |
instance_destroy(); |
| 362 |
} |
| 363 |
if (sixty_fps) |
| 364 |
{ |
| 365 |
if (room_speed < 180) |
| 366 |
room_speed += 15; |
| 367 |
else |
| 368 |
room_speed = 30; |
| 369 |
sixty_fps = false; |
| 370 |
} |
| 371 |
if (kanako_time == true) |
| 372 |
global.player_sprites = "kanako"; |
| 373 |
if (mouse_check_button_pressed(mb_left)) |
| 374 |
{ |
| 375 |
obj_pl.x = mouse_x; |
| 376 |
obj_pl.y = mouse_y; |
| 377 |
} |
| 378 |
if (mouse_check_button_pressed(mb_right)) |
| 379 |
{ |
| 380 |
var inst = instance_position(mouse_x, mouse_y, all); |
| 381 |
show_debug_message(object_get_name(inst.object_index)); |
| 382 |
} |