-
Notifications
You must be signed in to change notification settings - Fork 5
/
n_mac_skip_test.py
84 lines (74 loc) · 1.87 KB
/
n_mac_skip_test.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
# Libraries and Core Files
import area.baaj
import area.besaid
import area.boats
import area.djose
import area.dream_zan
import area.gagazet
import area.guadosalam
import area.home
import area.kilika
import area.luca
import area.mac_temple
import area.mac_woods
import area.miihen
import area.moonflow
import area.mrr
import area.rescue_yuna
import area.sin
import area.thunder_plains
import area.zanarkand
import load_game
import memory.main
import pathing
import reset
import vars
import xbox
game_vars = vars.vars_handle()
game_vars.set_start_vars()
# Plug in controller
FFXC = xbox.controller_handle()
gamestate = "Macalania"
step_counter = 1 # x9
while not memory.main.start():
pass
if memory.main.get_map in [23, 348, 349]:
pass
else:
reset.reset_to_main_menu()
if gamestate != "none":
if not (gamestate == "Luca" and step_counter == 3):
area.dream_zan.new_game(gamestate)
if gamestate == "Macalania" and step_counter == 1: # 1 = south, 2 = north
load_game.load_save_num(9)
if gamestate == "Macalania" and step_counter == 2: # 1 = south, 2 = north
load_game.load_save_num(7)
# Approach the position
prep_step = [[303, 34], [284, 104], [222, 160], [209, 170]]
for i in range(len(prep_step)):
while not pathing.set_movement(prep_step[i]):
if memory.main.diag_skip_possible():
xbox.tap_b()
FFXC.set_neutral()
memory.main.wait_frames(30)
# Into position
while not pathing.set_movement([190, 180]):
memory.main.wait_frames(2)
FFXC.set_neutral()
memory.main.wait_frames(6)
print("Position Ready")
FFXC.set_neutral()
memory.main.wait_frames(30)
# Angle
FFXC.set_movement(-1, -1)
memory.main.wait_frames(1)
FFXC.set_neutral()
print("Angle Ready")
memory.main.wait_frames(40)
# Engage
FFXC.set_movement(1, 1)
memory.main.wait_frames(2)
xbox.tap_b()
memory.main.wait_frames(5)
FFXC.set_neutral()
memory.main.wait_frames(60)