-
Notifications
You must be signed in to change notification settings - Fork 5
/
load_game.py
784 lines (661 loc) · 22.6 KB
/
load_game.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
# Libraries and Core Files
import json
import logging
import os
from pathlib import Path
import airship_pathing
import area.dream_zan
import memory.main
import pathing
import reset
import screen
import vars
import xbox
from players import Kimahri, Rikku, Tidus
logger = logging.getLogger(__name__)
# This file is intended to load the game to a saved file.
# This assumes that the save is the first non-auto-save in the list of saves.
logger = logging.getLogger(__name__)
FFXC = xbox.controller_handle()
game_vars = vars.vars_handle()
def move_after_load(spec_move: str):
if spec_move == "miihen_laugh":
load_miihen_start_laugh()
elif spec_move == "miihen_no_laugh":
load_miihen_start()
elif spec_move == "MRR":
load_mrr()
elif spec_move == "moonflow_north":
moonflow_2()
elif spec_move == "Kilika_rng_manip":
kilika_rng_manip()
elif spec_move == "MRR_crit_manip":
mrr_crit()
elif spec_move == "guado_start":
guado_start()
elif spec_move == "calm_lands":
load_calm()
elif spec_move == "after_ronso":
load_gagazet_gates()
def guado_start():
memory.main.await_control()
start_map = memory.main.get_map()
while memory.main.get_map() == start_map:
FFXC.set_movement(1, -1)
FFXC.set_neutral()
memory.main.await_control()
def load_into_game(gamestate: str, step_counter: str):
logger.debug(f"Loading game state {gamestate} | {step_counter}")
# If wrong maps are loaded in, try to reset.
if memory.main.get_map() not in [23, 348, 349]:
reset.reset_to_main_menu()
area.dream_zan.new_game(gamestate=gamestate)
if gamestate == "Showcase":
load_save_num(int(step_counter))
memory.main.await_control()
return
# Now to get details for the load/save files
filepath = os.path.join("json_ai_files", "save_load_details.json")
with open(filepath, "r") as fp:
results = json.load(fp)
# Try to use new method, otherwise try old method.
try:
step_counter = str(step_counter)
num_results = len(results[gamestate][step_counter])
if num_results == 0:
logger.debug("Failure 1")
load_into_game_old(gamestate=gamestate, step_counter=step_counter)
return
if gamestate == "Nem_Farm":
game_vars.nemesis_set(True)
# Init variables so we don't crash later
save_num_conf = 0
blitz_win = "none"
end_ver = "none"
nea_zone = "none"
nem_ap = "none"
spec_move = "none"
logger.debug(results[gamestate][step_counter].keys())
for key in results[gamestate][step_counter]:
save_num = int(results[gamestate][step_counter][key]["save_num"])
logger.debug(f"Save number check for Nemesis {key} : {save_num}")
if save_num > 200:
pass # FFX only allows 200 saves.
elif key != str(game_vars.nemesis()):
pass # Wrong version of the run.
else:
nemesis = key
logger.debug(f"Found save {save_num}")
save_num_conf = save_num
blitz_win = results[gamestate][step_counter][key]["blitz_win_value"]
end_ver = results[gamestate][step_counter][key]["end_game_version_val"]
logger.debug(f"Blitz Win {blitz_win}")
logger.debug(f"End game version {end_ver}")
nea_zone = results[gamestate][step_counter][key]["nea_zone"]
nem_ap = results[gamestate][step_counter][key]["nem_ap_val"]
spec_move = results[gamestate][step_counter][key]["special_movement"]
mrr_skip = results[gamestate][step_counter][key]["mrr_skip"]
logger.debug(f"NEA zone {nea_zone}")
logger.debug(f"Nemesis checkpoint {nem_ap}")
if save_num_conf == 0:
logger.debug(f"Failure 2 : {gamestate} : {step_counter} : {save_num}")
load_into_game_old(gamestate=gamestate, step_counter=step_counter)
return
else:
# Perform the load
load_save_num(int(save_num_conf))
logger.debug("Save has been loaded.")
memory.main.await_control()
game_vars.set_blitz_win(value=(blitz_win == "True"))
game_vars.end_game_version_set(value=int(end_ver))
if nemesis == str(game_vars.nemesis()):
game_vars.set_nea_zone(value=int(nea_zone))
game_vars.set_nem_checkpoint_ap(value=int(nem_ap))
if spec_move != "none":
logger.debug(f"Special movement needed: {spec_move}")
move_after_load(spec_move=spec_move)
else:
logger.debug("No Special movement needed")
if mrr_skip is True:
game_vars.mrr_skip_set(True)
logger.debug(f"Blitz Win {game_vars.get_blitz_win()}")
logger.debug(f"End game version {game_vars.end_game_version()}")
logger.debug(f"NEA zone {game_vars.get_nea_zone()}")
logger.debug(f"Nemesis checkpoint {game_vars.nem_checkpoint_ap()}")
memory.main.check_nea_armor()
except Exception as err_msg:
logger.debug(f"Error message: {err_msg}")
logger.debug("Failure 3")
load_into_game_old(gamestate=gamestate, step_counter=step_counter)
def load_into_game_old(gamestate: str, step_counter: str):
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
xbox.tap_a()
logger.warning(f"No game state found for vars {gamestate} | {step_counter}")
# Now to tell the user where they went wrong:
filepath = os.path.join("json_ai_files", "save_load_details.json")
with open(filepath, "r") as fp:
results = json.load(fp)
try:
if len(results[gamestate]) >= 1:
logger.warning(f"For game state {gamestate}, valid step values: ")
list_keys = results[gamestate].keys()
for key in list_keys:
logger.warning(key)
except Exception:
logger.warning("For game states, the valid values are (in non-sorted order): ")
for key in results:
logger.warning(key)
# for x in results[key]:
# logger.warning(str(results[key][x]) + " | ")
logger.error("TAS terminating")
exit(1)
def get_saved_files():
save_files_full = sorted(
Path(game_vars.game_save_path()).iterdir(), key=os.path.getmtime
)
save_files = [os.path.basename(i) for i in save_files_full]
save_files = save_files[::-1]
return save_files
def load_save_num(number):
save_files = get_saved_files()
# First get the autosave position
test_string = "ffx_000"
logger.debug(f"Searching for string: {test_string}")
save_pos = 255
for x in range(len(save_files)):
if save_files[x] == test_string:
logger.debug(f"Save file is in position: {x}")
save_pos = x
save_zero = save_pos
save_pos = 255
# Then get the actual save position
test_string = "ffx_" + str(number).zfill(3)
logger.debug(f"Searching for string: {test_string}")
save_pos = 255
for x in range(len(save_files)):
if save_files[x] == test_string:
logger.info(f"Save file is in position: {x}")
save_pos = x
if save_zero > save_pos:
save_pos += 1
memory.main.wait_frames(20)
if save_pos != 255:
while memory.main.load_game_pos() != save_pos:
if memory.main.load_game_pos() + 4 < save_pos:
xbox.trigger_r()
elif memory.main.load_game_pos() < save_pos:
xbox.tap_down()
else:
xbox.tap_up()
for _ in range(5):
xbox.tap_b()
FFXC.set_neutral()
while not memory.main.user_control() and not memory.main.battle_active():
pass
memory.main.wait_frames(5)
# So that we don't evaluate battle as complete after loading.
if not memory.main.battle_active():
memory.main.reset_battle_end()
else:
logger.error("That save file does not exist. Quitting program.")
exit()
def game_over_reload_autosave():
while not memory.main.save_menu_open():
if memory.main.get_map() != 23:
xbox.menu_b()
elif memory.main.save_menu_cursor() == 0:
xbox.menu_down()
else:
xbox.menu_b()
memory.main.wait_frames(3)
load_save_num(0)
def load_first():
logger.info("Loading to first save file")
xbox.menu_b()
memory.main.wait_frames(30 * 2.5)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_b()
memory.main.wait_frames(30 * 0.1)
xbox.menu_b()
memory.main.await_control()
def load_offset(offset):
logger.info(f"Loading to save file in position {offset}")
total_offset = offset
memory.main.wait_frames(30 * 2.5)
for _ in range(total_offset):
xbox.tap_down()
for _ in range(7):
xbox.tap_b()
FFXC.set_neutral()
memory.main.wait_frames(120)
# So that we don't evaluate battle as complete after loading.
memory.main.reset_battle_end()
def load_offset_battle(offset):
logger.info(f"Loading to save file in position {offset}")
xbox.menu_b()
memory.main.wait_frames(30 * 2.5)
while offset > 0:
xbox.tap_down()
offset -= 1
memory.main.wait_frames(30 * 0.1)
xbox.menu_b()
memory.main.wait_frames(30 * 0.1)
xbox.menu_b()
memory.main.wait_frames(30 * 3)
def load_mem_cursor():
memory.main.await_control()
memory.main.open_menu()
if memory.main.get_story_progress() <= 200: # Up to Besaid save, after Trials
cursor_target = 5
else:
cursor_target = 8
logger.debug(f"Aiming at {cursor_target}")
while memory.main.get_menu_cursor_pos() != cursor_target:
logger.debug(memory.main.get_menu_cursor_pos())
xbox.tap_up()
logger.debug(memory.main.get_menu_cursor_pos())
if game_vars.use_pause():
memory.main.wait_frames(2)
while memory.main.menu_number() == 5:
xbox.tap_b()
if game_vars.use_pause():
memory.main.wait_frames(90)
while memory.main.config_cursor() != 3:
xbox.tap_down()
if game_vars.use_pause():
memory.main.wait_frames(1)
while memory.main.config_cursor_column() != 1:
xbox.tap_right()
if game_vars.use_pause():
memory.main.wait_frames(1)
memory.main.close_menu()
def load_post_blitz():
logger.info("Loading to first save file")
load_offset(1)
while not screen.Minimap1():
if screen.Minimap4():
FFXC.set_value("axis_lx", -1)
FFXC.set_value("axis_ly", -1)
memory.main.wait_frames(30 * 0.5)
FFXC.set_value("axis_lx", 0)
memory.main.wait_frames(30 * 1)
FFXC.set_value("axis_ly", 0)
else:
xbox.menu_b()
# Reverse T screen
FFXC.set_value("axis_lx", 1)
memory.main.wait_frames(30 * 4.5)
FFXC.set_value("axis_ly", -1)
memory.main.wait_frames(30 * 1)
FFXC.set_value("axis_ly", 0)
memory.main.wait_frames(30 * 5)
FFXC.set_value("axis_lx", 0)
# Carnival vendor screen
memory.main.await_control()
FFXC.set_value("axis_ly", 1)
memory.main.wait_frames(30 * 1.5)
FFXC.set_value("axis_lx", 1)
memory.main.wait_frames(30 * 3)
FFXC.set_value("axis_lx", 0)
memory.main.wait_frames(30 * 1)
FFXC.set_value("axis_lx", 1)
memory.main.wait_frames(30 * 3)
FFXC.set_value("axis_lx", 0)
FFXC.set_value("axis_ly", 0)
logger.debug("Rejoining the party.")
memory.main.click_to_control() # Scene, rejoining the party
logger.debug("Walking up to Yuna.")
FFXC.set_value("axis_ly", -1)
FFXC.set_value("axis_lx", -1)
memory.main.wait_frames(30 * 3)
FFXC.set_value("axis_lx", 0)
FFXC.set_value("axis_ly", 0) # Enters laughing scene, ends Luca section.
logger.debug("End of loading section.")
def load_neutral():
load_first()
def load_baaj():
FFXC.set_movement(1, 0)
memory.main.wait_frames(30 * 0.4)
FFXC.set_neutral()
memory.main.wait_frames(30 * 0.04)
def kilika_rng_manip():
# Kilika start, RNG01
# 1904657448
logger.warning("==== Hard setting value for testing")
rng_value = 1904657448
memory.main.set_rng_by_index(value=rng_value, index=1)
# Basically, hunt until we don't find a good battle in 'advances'
advances = 5
import area.kilika
import rng_track
next_two = rng_track.coming_battles(
area="kilika_woods", battle_count=advances, extra_advances=1
)
while area.kilika.select_best_of_two(next_two) != 99:
rng_value += 1
memory.main.set_rng_by_index(value=rng_value, index=1)
next_two = rng_track.coming_battles(
area="kilika_woods", battle_count=advances, extra_advances=1
)
logger.warning(f"==== Chosen Value: {rng_value}")
def mrr_crit():
from memory.main import next_crit
from memory.main import advance_rng_index
escape_count = 0
while next_crit(character=3, char_luck=18, enemy_luck=15) != 1:
advance_rng_index(index=23)
escape_count += 1
if escape_count > 1000:
print("Could not find RNG value.")
return
print("RNG value found.")
return
def besaid_trials():
# Exit Tent
while memory.main.get_map() != 17:
t_coords = memory.main.get_coords()
pathing.set_movement([-1, t_coords[1] - 15])
# To the temple
while not pathing.set_movement([35, 182]):
pass
while not pathing.set_movement([17, 22]):
pass
while not pathing.set_movement([14, -67]):
pass
while memory.main.get_map() != 42:
t_coords = memory.main.get_coords()
pathing.set_movement([-2, t_coords[1] - 15])
# Start the trials
while memory.main.get_map() != 122:
t_coords = memory.main.get_coords()
pathing.set_movement([-2, t_coords[1] + 15])
def boat_1():
memory.main.wait_frames(30 * 3)
# To the junction screen, then back.
FFXC.set_value("axis_ly", -1)
memory.main.wait_frames(30 * 1)
FFXC.set_value("axis_ly", 0)
memory.main.wait_frames(30 * 6)
FFXC.set_value("axis_ly", -1)
memory.main.wait_frames(30 * 1)
FFXC.set_value("axis_ly", 0)
def kilika():
xbox.menu_b()
memory.main.wait_frames(30 * 2.5)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_down()
memory.main.wait_frames(30 * 0.1)
xbox.menu_b()
memory.main.wait_frames(30 * 0.1)
xbox.menu_b()
memory.main.wait_frames(30 * 4)
memory.main.await_control()
def kilika_trials():
FFXC.set_movement(0, -1)
memory.main.wait_frames(30 * 2)
FFXC.set_neutral()
def load_miihen_start_laugh():
import pathing
while not pathing.set_movement([-440, 0]):
pass
memory.main.click_to_event_temple(4)
# Reverse T screen
memory.main.await_control()
while not pathing.set_movement([-39, 18]):
pass
while not pathing.set_movement([3, 31]):
pass
while not pathing.set_movement([64, 15]):
pass
while not pathing.set_movement([163, 0]):
pass
memory.main.click_to_event_temple(2)
# Carnival vendor screen
memory.main.await_control()
while not pathing.set_movement([30, -86]):
pass
while not pathing.set_movement([60, -24]):
pass
while not pathing.set_movement([101, 72]):
pass
while not pathing.set_movement([129, 101]):
pass
memory.main.click_to_event_temple(1)
memory.main.wait_frames(30 * 1)
memory.main.click_to_control()
FFXC.set_movement(-1, -1)
memory.main.wait_frames(30 * 0.2)
memory.main.await_event()
FFXC.set_neutral()
def load_miihen_start():
import pathing
while not pathing.set_movement([-440, 0]):
pass
memory.main.click_to_event_temple(4)
# Reverse T screen
memory.main.await_control()
while not pathing.set_movement([-39, 18]):
pass
while not pathing.set_movement([3, 31]):
pass
while not pathing.set_movement([64, 15]):
pass
while not pathing.set_movement([163, 0]):
pass
memory.main.click_to_event_temple(2)
# Carnival vendor screen
memory.main.await_control()
while not pathing.set_movement([30, -86]):
pass
while not pathing.set_movement([60, -24]):
pass
while not pathing.set_movement([101, 72]):
pass
while not pathing.set_movement([129, 101]):
pass
memory.main.click_to_event_temple(1)
# -----Use this if you've already done the laughing scene.
memory.main.click_to_control()
while not pathing.set_movement([2, 57]):
pass
while not pathing.set_movement([108, 59]):
pass
while not pathing.set_movement([108, 26]):
pass
while not pathing.set_movement([78, -3]):
pass
while not pathing.set_movement([-68, -7]):
pass
while not pathing.set_movement([-99, 24]):
pass
while not pathing.set_movement([-126, 117]):
pass
memory.main.click_to_event_temple(1)
logger.info("Load complete. Now for Mi'ihen area.")
def load_mrr():
memory.main.await_control()
while not pathing.set_movement([-49, 166]):
pass
while not pathing.set_movement([-43, 285]):
pass
while not pathing.set_movement([-39, 354]):
pass
FFXC.set_movement(0, 1)
memory.main.await_event()
FFXC.set_neutral()
memory.main.click_to_control()
def load_mrr_2():
FFXC.set_movement(0, 1)
memory.main.wait_frames(30 * 0.3)
FFXC.set_movement(1, 1)
memory.main.wait_frames(30 * 1)
xbox.skip_dialog(2)
FFXC.set_neutral()
xbox.menu_b()
memory.main.wait_frames(30 * 2)
memory.main.await_control()
for i in range(20):
logger.debug(f"Sleeping for {20-i} more seconds...")
memory.main.wait_frames(30 * 1)
def after_gui():
memory.main.await_control()
FFXC.set_movement(-1, 0)
memory.main.wait_frames(30 * 2.5)
FFXC.set_neutral()
target = [[463, -163], [498, 77], [615, -39], [935, 12], [1200, 200]]
checkpoint = 0
while memory.main.get_map() != 93:
if memory.main.user_control():
if pathing.set_movement(target[checkpoint]):
checkpoint += 1
else:
FFXC.set_neutral()
FFXC.set_neutral()
def djose_temple():
load_offset(19)
memory.main.wait_frames(30 * 6)
FFXC.set_value("axis_ly", -1)
FFXC.set_value("axis_lx", -1)
memory.main.wait_frames(30 * 1.7)
FFXC.set_value("axis_ly", 0)
FFXC.set_value("axis_lx", 0)
memory.main.wait_frames(30 * 0.5)
def moonflow_2():
memory.main.wait_frames(30 * 2)
FFXC.set_movement(-1, -1)
memory.main.wait_frames(30 * 0.7)
FFXC.set_neutral()
memory.main.wait_frames(30 * 0.5)
def load_guado_skip():
memory.main.click_to_control_3()
FFXC.set_movement(1, -1)
memory.main.await_event()
FFXC.set_neutral()
memory.main.await_control()
FFXC.set_movement(-1, 0)
memory.main.wait_frames(30 * 0.6)
FFXC.set_movement(0, 1)
memory.main.wait_frames(30 * 1.5)
FFXC.set_movement(-1, 1)
memory.main.wait_frames(30 * 0.9)
FFXC.set_movement(-1, -1)
memory.main.wait_frames(30 * 2.2)
FFXC.set_movement(1, -1)
memory.main.wait_frames(30 * 2)
FFXC.set_movement(1, 1)
memory.main.await_event()
FFXC.set_neutral()
memory.main.wait_frames(30 * 0.2)
memory.main.await_control()
FFXC.set_movement(0, -1)
memory.main.wait_frames(30 * 1)
FFXC.set_neutral()
import area.guadosalam as guadosalam
guadosalam.after_speech(checkpoint=26)
def load_mac_lake():
memory.main.await_control()
FFXC.set_movement(0, 1)
memory.main.await_event()
FFXC.set_neutral()
memory.main.await_control()
def load_mac_temple():
FFXC.set_movement(-1, 0)
memory.main.wait_frames(30 * 3)
FFXC.set_neutral()
memory.main.await_control()
FFXC.set_movement(0, 1)
memory.main.wait_frames(30 * 3)
FFXC.set_neutral()
def load_mac_temple_2():
memory.main.await_control()
FFXC.set_movement(-1, -1)
memory.main.wait_frames(30 * 1.5)
FFXC.set_movement(-1, 1)
memory.main.wait_frames(30 * 1.5)
FFXC.set_neutral()
def load_wendigo():
import battle.boss
import battle.main
battle.boss.wendigo()
logger.info("Wendigo fight over - end of loading game to Wendigo fight")
def load_rescue():
memory.main.await_control()
FFXC.set_movement(1, -1)
memory.main.wait_frames(30 * 0.7)
FFXC.set_movement(0, -1)
while memory.main.user_control():
pass
FFXC.set_neutral()
memory.main.wait_frames(30 * 1)
memory.main.await_control()
memory.main.update_formation(Tidus, Rikku, Kimahri)
airship_pathing.air_ship_path(1) # The run from cockpit to the deck
def load_bahamut():
load_offset(1)
memory.main.await_control()
FFXC.set_value("axis_ly", 1)
FFXC.set_value("axis_lx", 1)
memory.main.wait_frames(30 * 0.2)
FFXC.set_value("axis_lx", 0)
memory.main.wait_frames(30 * 2)
FFXC.set_value("axis_ly", 0)
def load_calm():
FFXC.set_movement(1, 1)
memory.main.wait_frames(30 * 1)
FFXC.set_movement(0, 1)
memory.main.wait_frames(30 * 2)
FFXC.set_neutral()
memory.main.await_control()
def load_gagazet_gates():
FFXC.set_movement(1, 1)
memory.main.wait_frames(90)
FFXC.set_movement(0, 1)
memory.main.await_event()
FFXC.set_neutral()
memory.main.await_control()
#memory.main.wait_frames(150)
def zan_entrance():
FFXC.set_movement(0, 1)
memory.main.wait_frames(30 * 2)
FFXC.set_movement(1, 1)
memory.main.wait_frames(30 * 2.5)
FFXC.set_neutral()
def zan_trials():
FFXC.set_movement(1, 1)
memory.main.wait_frames(30 * 0.5)
FFXC.set_movement(0, 1)
memory.main.wait_frames(30 * 2)
FFXC.set_neutral()
def load_gagazet_dream():
logger.debug("Positioning to next map")
while memory.main.get_map() != 309:
FFXC.set_movement(1, 1)
FFXC.set_neutral()
logger.debug("Positioning complete")
memory.main.await_control()
def load_egg_hunt():
memory.main.await_control()
while not pathing.set_movement([-10, -507]):
pass
while not pathing.set_movement([-5, -360]):
pass
while memory.main.get_map() != 324:
FFXC.set_movement(0, 1)
FFXC.set_neutral()