Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- itools = dofile('lib_input_tools.lua')
- core = dofile('lib_core.lua')
- N = 15 -- number of visual frames to advance before assuming link does not clip out of bounds
- M = 30 -- number of visual frames to advance before assuming link does not land out of bounds
- function i_advance(amount)
- for i = 1, amount, 1 do
- itools.iframe_advance()
- end
- end
- function v_advance(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance()
- end
- end
- function v_advance_press_A(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['A']=true})
- end
- end
- function v_advance_press_Z(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['Z']=true})
- end
- end
- function v_advance_press_R(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['R']=true})
- end
- end
- function v_advance_hold_up(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['X Axis']=0,['Y Axis']=127})
- end
- end
- function v_advance_hold_up_and_target(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['X Axis']=0,['Y Axis']=127,['Z']=true})
- end
- end
- function v_advance_hold_down_and_target(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['Z']=true})
- end
- end
- function v_advance_hold_right(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['X Axis']=127,['Y Axis']=0})
- end
- end
- function v_advance_hold_right_and_target(amount)
- for i = 1, amount, 1 do
- itools.vframe_advance({['X Axis']=127,['Y Axis']=0,['Z']=true})
- end
- end
- function set_down_isg_targeted()
- -- set down a bomb (on C-Down) and get isg
- -- This takes a total of 42 visual frames
- itools.vframe_advance({['C Down']=true})
- itools.clear_inputs()
- v_advance(1)
- itools.vframe_advance({['A']=true})
- itools.clear_inputs()
- v_advance_press_R(12)
- itools.vframe_advance({['R']=true,['B']=true})
- itools.clear_inputs()
- v_advance_press_R(6)
- itools.vframe_advance({['R']=true,['A']=true})
- itools.clear_inputs()
- v_advance_press_Z(19)
- itools.clear_inputs()
- -- can perform the first input to walk somewhere (for example) on the next frame
- end
- function shield_drop_isg()
- -- frame perfectly shield drop a bomb (on C-Down) and get isg off of it
- -- This takes a total of 34 visual frames
- itools.vframe_advance({['C Down']=true})
- itools.clear_inputs()
- v_advance(2)
- v_advance_press_R(4)
- itools.vframe_advance({['R']=true,['B']=true})
- itools.clear_inputs()
- v_advance_press_R(6)
- itools.vframe_advance({['R']=true,['A']=true})
- itools.clear_inputs()
- v_advance(19)
- -- can perform the first input to walk somewhere (for example) on the next frame
- end
- -- Define functions to perform each movement option (except for 'Nothing')
- -- Movement_Options = ['Untargeted Horizontal Slash',
- -- 'Untargeted Horizontal Slash, Shield', 'Targeted Vertical Slash', 'Targeted Vertical Slash, Untarget ASAP',
- -- 'Untargeted Right Slash', 'Untargeted Right Slash, Shield', 'Targeted Forward Thrust',
- -- 'Targeted Forward Thrust, Untarget ASAP', 'Nothing', 'Dry Roll']
- function Untargeted_Horizontal_Slash()
- itools.clear_inputs()
- v_advance(2)
- itools.vframe_advance({['B']=true})
- itools.clear_inputs()
- v_advance(15)
- end
- function Untargeted_Horizontal_Slash_Shield()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance({['B']=true})
- itools.clear_inputs()
- v_advance_press_R(10)
- itools.clear_inputs()
- v_advance(8)
- end
- function Targeted_Vertical_Slash()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance({['B']=true, ['Z']=true})
- v_advance_press_Z(8)
- itools.clear_inputs()
- v_advance(7)
- itools.clear_inputs()
- itools.vframe_advance()
- end
- function Targeted_Vertical_Slash_Untarget_ASAP()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance({['B']=true, ['Z']=true})
- itools.clear_inputs()
- v_advance(14)
- end
- function Untargeted_Right_Slash()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance({['Z']=true})
- itools.clear_inputs()
- v_advance(5)
- itools.vframe_advance({['X Axis']=127,['Y Axis']=0,['B']=true})
- itools.clear_inputs()
- v_advance(17)
- end
- function Untargeted_Right_Slash_Shield()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance({['Z']=true})
- itools.clear_inputs()
- v_advance(5)
- itools.vframe_advance({['X Axis']=127,['Y Axis']=0,['B']=true})
- itools.clear_inputs()
- v_advance_press_R(9)
- itools.clear_inputs()
- v_advance(8)
- end
- function Targeted_Forward_Thrust()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance()
- itools.vframe_advance({['Z']=true})
- itools.clear_inputs()
- v_advance(5)
- itools.vframe_advance({['X Axis']=0,['Y Axis']=127,['B']=true,['Z']=true})
- itools.clear_inputs()
- v_advance_press_Z(8)
- itools.clear_inputs()
- v_advance(5)
- end
- function Targeted_Forward_Thrust_Untarget_ASAP()
- itools.clear_inputs()
- itools.vframe_advance()
- itools.vframe_advance({['Z']=true})
- itools.clear_inputs()
- v_advance(5)
- itools.vframe_advance({['X Axis']=0,['Y Axis']=127,['B']=true,['Z']=true})
- itools.clear_inputs()
- v_advance(12)
- end
- function Dry_Roll()
- itools.clear_inputs()
- v_advance_press_Z(1)
- itools.vframe_advance({['Z']=true, ['A']=true})
- itools.clear_inputs()
- v_advance(12)
- end
- Movement_Options = {'Untargeted Horizontal Slash', 'Untargeted Horizontal Slash, Shield', 'Targeted Vertical Slash', 'Targeted Vertical Slash, Untarget ASAP','Untargeted Right Slash', 'Untargeted Right Slash, Shield', 'Targeted Forward Thrust', 'Targeted Forward Thrust, Untarget ASAP', 'Nothing', 'Dry Roll'}
- Directions = {'Up', 'Up + Target', 'Right', 'Right + Target'}
- file_write = io.open('Bank Clip Backflip Exit Shop Angle Data.txt', 'w+')
- Clip_Exists = false
- Setup_Exists = false
- Line_Count = 1
- for i = 1, table.getn(Movement_Options), 1 do
- print('i: ' .. i .. ' Clip Exists ' .. tostring(Clip_Exists) .. ' Setup Exists ' .. tostring(Setup_Exists))
- option = Movement_Options[i]
- itools.clear_inputs()
- --- load save state (5)
- itools.load_state(5)
- --- Perform the chosen movement option (unless it is 'Nothing')
- if option == 'Untargeted Horizontal Slash' then
- Untargeted_Horizontal_Slash()
- elseif option == 'Untargeted Horizontal Slash, Shield' then
- Untargeted_Horizontal_Slash_Shield()
- elseif option == 'Targeted Vertical Slash' then
- Targeted_Vertical_Slash()
- elseif option == 'Targeted Vertical Slash, Untarget ASAP' then
- Targeted_Vertical_Slash_Untarget_ASAP()
- elseif option == 'Untargeted Right Slash' then
- Untargeted_Right_Slash()
- elseif option == 'Untargeted Right Slash, Shield' then
- Untargeted_Right_Slash_Shield()
- elseif option == 'Targeted Forward Thrust' then
- Targeted_Forward_Thrust()
- elseif option == 'Targeted Forward Thrust, Untarget ASAP' then
- Targeted_Forward_Thrust_Untarget_ASAP()
- elseif option == 'Dry Roll' then
- Dry_Roll()
- end
- --- Get ISG
- set_down_isg_targeted()
- --- Create a Save State
- itools.save_state(6)
- for j = 1, table.getn(Directions), 1 do
- direction = Directions[j]
- ---------------------------------------------------------------------------------------------------
- if direction == 'Up' then
- --- Test each frame of the backflip
- for k = 2, 12, 1 do
- print('(' .. i .. ', ' .. j .. ', ' .. k .. ')')
- itools.clear_inputs()
- --- Load new save
- itools.load_state(6)
- Clip_Successful_14 = false
- Clip_Successful_15 = false
- Setup_Successful_14 = false
- Setup_Successful_15 = false
- ----- First find out how many frames to reach -2 Y Velocity
- ----- Use this to determine when to initially backflip
- ----- Try two timings: -14 Y Velocity and -15 Y Velocity
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- found_y_velocity = false
- reach_y_velocity_time = 0
- Not_On_Banker = false
- while found_y_velocity == false and Not_On_Banker == false do
- reach_y_velocity_time = reach_y_velocity_time + 1
- v_advance_hold_up(1)
- Y_Velocity = core.read_float_be(0x3FFE18,'RDRAM')
- Y_Position = core.read_float_be(0x3FFDD8,'RDRAM')
- if Y_Velocity == -2 then
- found_y_velocity = true
- end
- if reach_y_velocity_time >= 20 and Y_Position ~= 133 then
- Not_On_Banker = true
- end
- end
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 12 to get to -14 y velocity. 32 - 13 = 19
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 13 to get to -15 y velocity. 32 - 14 = 18
- Backflip_Wait_Time_14 = 19 - k - reach_y_velocity_time
- Backflip_Wait_Time_15 = 18 - k - reach_y_velocity_time
- print(reach_y_velocity_time)
- --- Ensure you are on the banker
- if Not_On_Banker == false and Backflip_Wait_Time_14 >= 0 then
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- ---------- First Test -14 Y Velocity
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up Until -11 Y Velocity
- v_advance_hold_up(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_14 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_14 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_14 = true
- Clip_Exists = true
- print('Clip (-14 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_14 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up Until -11 Y Velocity
- v_advance_hold_up(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- if Midframe_Change_14 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_14 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- ---------- Now Test -15 Y Velocity
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up Until -11 Y Velocity
- v_advance_hold_up(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_15 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_15 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_15 = true
- Clip_Exists = true
- print('Clip (-15 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_15 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up Until -11 Y Velocity
- v_advance_hold_up(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- if Midframe_Change_15 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_15 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? Yes\n')
- if Clip_Successful_14 == true then
- file_write:write(k .. '.14 Clips? Yes\n')
- elseif Clip_Successful_14 == false then
- file_write:write(k .. '.14 Clips? No\n')
- end
- if Setup_Successful_14 == true then
- file_write:write(k .. '.14 Lands? Yes\n')
- elseif Setup_Successful_14 == false then
- file_write:write(k .. '.14 Lands? No\n')
- end
- if Midframe_Change_14 == true then
- file_write:write(k .. '.14 Midframe Change? Yes\n')
- elseif Midframe_Change_14 == false then
- file_write:write(k .. '.14 Midframe Change? No\n')
- end
- file_write:write(k .. '.14 Backflip Wait Time:' .. Backflip_Wait_Time_14 .. '\n')
- if Clip_Successful_15 == true then
- file_write:write(k .. '.15 Clips? Yes\n')
- elseif Clip_Successful_15 == false then
- file_write:write(k .. '.15 Clips? No\n')
- end
- if Setup_Successful_15 == true then
- file_write:write(k .. '.15 Lands? Yes\n')
- elseif Setup_Successful_15 == false then
- file_write:write(k .. '.15 Lands? No\n')
- end
- if Midframe_Change_15 == true then
- file_write:write(k .. '.15 Midframe Change? Yes\n')
- elseif Midframe_Change_15 == false then
- file_write:write(k .. '.15 Midframe Change? No\n')
- end
- file_write:write(k .. '.15 Backflip Wait Time:' .. Backflip_Wait_Time_15 .. '\n')
- file_write:write('---\n')
- elseif Not_On_Banker == true then
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? No\n')
- file_write:write(k .. '.14 Clips? N/A\n')
- file_write:write(k .. '.14 Lands? N/A\n')
- file_write:write(k .. '.14 Midframe Change? N/A\n')
- file_write:write(k .. '.14 Backflip Wait Time: N/A\n')
- file_write:write(k .. '.15 Clips? N/A\n')
- file_write:write(k .. '.15 Lands? N/A\n')
- file_write:write(k .. '.15 Midframe Change? N/A\n')
- file_write:write(k .. '.15 Backflip Wait Time: N/A\n')
- file_write:write('---\n')
- end
- end
- elseif direction == 'Up + Target' then
- --- Test each frame of the backflip
- for k = 2, 12, 1 do
- print('(' .. i .. ', ' .. j .. ', ' .. k .. ')')
- itools.clear_inputs()
- --- Load new save
- itools.load_state(6)
- Clip_Successful_14 = false
- Clip_Successful_15 = false
- Setup_Successful_14 = false
- Setup_Successful_15 = false
- ----- First find out how many frames to reach -2 Y Velocity
- ----- Use this to determine when to initially backflip
- ----- Try two timings: -14 Y Velocity and -15 Y Velocity
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- found_y_velocity = false
- reach_y_velocity_time = 0
- Not_On_Banker = false
- while found_y_velocity == false and Not_On_Banker == false do
- reach_y_velocity_time = reach_y_velocity_time + 1
- v_advance_hold_up_and_target(1)
- Y_Velocity = core.read_float_be(0x3FFE18,'RDRAM')
- Y_Position = core.read_float_be(0x3FFDD8,'RDRAM')
- if Y_Velocity == -2 then
- found_y_velocity = true
- end
- if reach_y_velocity_time >= 20 and Y_Position ~= 133 then
- Not_On_Banker = true
- end
- end
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 12 to get to -14 y velocity. 32 - 13 = 19
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 13 to get to -15 y velocity. 32 - 14 = 18
- Backflip_Wait_Time_14 = 19 - k - reach_y_velocity_time
- Backflip_Wait_Time_15 = 18 - k - reach_y_velocity_time
- --- Ensure you are on the banker
- if Not_On_Banker == false and Backflip_Wait_Time_14 >= 0 then
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- ---------- First Test -14 Y Velocity
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up and Target Until -11 Y Velocity
- v_advance_hold_up_and_target(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_14 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_14 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_14 = true
- Clip_Exists = true
- print('Clip (-14 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_14 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up and Target Until -11 Y Velocity
- v_advance_hold_up_and_target(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- if Midframe_Change_14 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_14 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- ---------- Now Test -15 Y Velocity
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up and Target Until -11 Y Velocity
- v_advance_hold_up_and_target(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_15 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_15 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_15 = true
- Clip_Exists = true
- print('Clip (-15 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_15 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Up Until -12 Y Velocity
- v_advance_hold_up_and_target(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- if Midframe_Change_15 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_15 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? Yes\n')
- if Clip_Successful_14 == true then
- file_write:write(k .. '.14 Clips? Yes\n')
- elseif Clip_Successful_14 == false then
- file_write:write(k .. '.14 Clips? No\n')
- end
- if Setup_Successful_14 == true then
- file_write:write(k .. '.14 Lands? Yes\n')
- elseif Setup_Successful_14 == false then
- file_write:write(k .. '.14 Lands? No\n')
- end
- if Midframe_Change_14 == true then
- file_write:write(k .. '.14 Midframe Change? Yes\n')
- elseif Midframe_Change_14 == false then
- file_write:write(k .. '.14 Midframe Change? No\n')
- end
- file_write:write(k .. '.14 Backflip Wait Time:' .. Backflip_Wait_Time_14 .. '\n')
- if Clip_Successful_15 == true then
- file_write:write(k .. '.15 Clips? Yes\n')
- elseif Clip_Successful_15 == false then
- file_write:write(k .. '.15 Clips? No\n')
- end
- if Setup_Successful_15 == true then
- file_write:write(k .. '.15 Lands? Yes\n')
- elseif Setup_Successful_15 == false then
- file_write:write(k .. '.15 Lands? No\n')
- end
- if Midframe_Change_15 == true then
- file_write:write(k .. '.15 Midframe Change? Yes\n')
- elseif Midframe_Change_15 == false then
- file_write:write(k .. '.15 Midframe Change? No\n')
- end
- file_write:write(k .. '.15 Backflip Wait Time:' .. Backflip_Wait_Time_15 .. '\n')
- file_write:write('---\n')
- elseif Not_On_Banker == true then
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? No\n')
- file_write:write(k .. '.14 Clips? N/A\n')
- file_write:write(k .. '.14 Lands? N/A\n')
- file_write:write(k .. '.14 Midframe Change? N/A\n')
- file_write:write(k .. '.14 Backflip Wait Time: N/A\n')
- file_write:write(k .. '.15 Clips? N/A\n')
- file_write:write(k .. '.15 Lands? N/A\n')
- file_write:write(k .. '.15 Midframe Change? N/A\n')
- file_write:write(k .. '.15 Backflip Wait Time: N/A\n')
- file_write:write('---\n')
- end
- end
- elseif direction == 'Right' then
- --- Test each frame of the backflip
- for k = 2, 12, 1 do
- print('(' .. i .. ', ' .. j .. ', ' .. k .. ')')
- itools.clear_inputs()
- --- Load new save
- itools.load_state(6)
- Clip_Successful_14 = false
- Clip_Successful_15 = false
- Setup_Successful_14 = false
- Setup_Successful_15 = false
- ----- First find out how many frames to reach -2 Y Velocity
- ----- Use this to determine when to initially backflip
- ----- Try two timings: -14 Y Velocity and -15 Y Velocity
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- found_y_velocity = false
- reach_y_velocity_time = 0
- Not_On_Banker = false
- while found_y_velocity == false and Not_On_Banker == false do
- reach_y_velocity_time = reach_y_velocity_time + 1
- v_advance_hold_right(1)
- Y_Velocity = core.read_float_be(0x3FFE18,'RDRAM')
- Y_Position = core.read_float_be(0x3FFDD8,'RDRAM')
- if Y_Velocity == -2 then
- found_y_velocity = true
- end
- if reach_y_velocity_time >= 20 and Y_Position ~= 133 then
- Not_On_Banker = true
- end
- end
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 12 to get to -14 y velocity. 32 - 13 = 19
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 13 to get to -15 y velocity. 32 - 14 = 18
- Backflip_Wait_Time_14 = 19 - k - reach_y_velocity_time
- Backflip_Wait_Time_15 = 18 - k - reach_y_velocity_time
- --- Ensure you are on the banker
- if Not_On_Banker == false and Backflip_Wait_Time_14 >= 0 then
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- ---------- First Test -14 Y Velocity
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right Until -11 Y Velocity
- v_advance_hold_right(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_14 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_14 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_14 = true
- Clip_Exists = true
- print('Clip (-14 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_14 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right Until -11 Y Velocity
- v_advance_hold_right(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- if Midframe_Change_14 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_14 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- ---------- Now Test -15 Y Velocity
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right Until -11 Y Velocity
- v_advance_hold_right(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_15 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_15 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_15 = true
- Clip_Exists = true
- print('Clip (-15 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_15 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right Until -12 Y Velocity
- v_advance_hold_right(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- if Midframe_Change_15 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_15 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? Yes\n')
- if Clip_Successful_14 == true then
- file_write:write(k .. '.14 Clips? Yes\n')
- elseif Clip_Successful_14 == false then
- file_write:write(k .. '.14 Clips? No\n')
- end
- if Setup_Successful_14 == true then
- file_write:write(k .. '.14 Lands? Yes\n')
- elseif Setup_Successful_14 == false then
- file_write:write(k .. '.14 Lands? No\n')
- end
- if Midframe_Change_14 == true then
- file_write:write(k .. '.14 Midframe Change? Yes\n')
- elseif Midframe_Change_14 == false then
- file_write:write(k .. '.14 Midframe Change? No\n')
- end
- file_write:write(k .. '.14 Backflip Wait Time:' .. Backflip_Wait_Time_14 .. '\n')
- if Clip_Successful_15 == true then
- file_write:write(k .. '.15 Clips? Yes\n')
- elseif Clip_Successful_15 == false then
- file_write:write(k .. '.15 Clips? No\n')
- end
- if Setup_Successful_15 == true then
- file_write:write(k .. '.15 Lands? Yes\n')
- elseif Setup_Successful_15 == false then
- file_write:write(k .. '.15 Lands? No\n')
- end
- if Midframe_Change_15 == true then
- file_write:write(k .. '.15 Midframe Change? Yes\n')
- elseif Midframe_Change_15 == false then
- file_write:write(k .. '.15 Midframe Change? No\n')
- end
- file_write:write(k .. '.15 Backflip Wait Time:' .. Backflip_Wait_Time_15 .. '\n')
- file_write:write('---\n')
- elseif Not_On_Banker == true then
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? No\n')
- file_write:write(k .. '.14 Clips? N/A\n')
- file_write:write(k .. '.14 Lands? N/A\n')
- file_write:write(k .. '.14 Midframe Change? N/A\n')
- file_write:write(k .. '.14 Backflip Wait Time: N/A\n')
- file_write:write(k .. '.15 Clips? N/A\n')
- file_write:write(k .. '.15 Lands? N/A\n')
- file_write:write(k .. '.15 Midframe Change? N/A\n')
- file_write:write(k .. '.15 Backflip Wait Time: N/A\n')
- file_write:write('---\n')
- end
- end
- elseif direction == 'Right + Target' then
- --- Test each frame of the backflip
- for k = 2, 12, 1 do
- print('(' .. i .. ', ' .. j .. ', ' .. k .. ')')
- itools.clear_inputs()
- --- Load new save
- itools.load_state(6)
- Clip_Successful_14 = false
- Clip_Successful_15 = false
- Setup_Successful_14 = false
- Setup_Successful_15 = false
- ----- First find out how many frames to reach -2 Y Velocity
- ----- Use this to determine when to initially backflip
- ----- Try two timings: -14 Y Velocity and -15 Y Velocity
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- found_y_velocity = false
- reach_y_velocity_time = 0
- Not_On_Banker = false
- while found_y_velocity == false and Not_On_Banker == false do
- reach_y_velocity_time = reach_y_velocity_time + 1
- v_advance_hold_right_and_target(1)
- Y_Velocity = core.read_float_be(0x3FFE18,'RDRAM')
- Y_Position = core.read_float_be(0x3FFDD8,'RDRAM')
- if Y_Velocity == -2 then
- found_y_velocity = true
- end
- if reach_y_velocity_time >= 20 and Y_Position ~= 133 then
- Not_On_Banker = true
- end
- end
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 12 to get to -14 y velocity. 32 - 13 = 19
- ---- 74 - 42 = 32. 32 - 1 - k - reach_y_velocity_time - 13 to get to -15 y velocity. 32 - 14 = 18
- Backflip_Wait_Time_14 = 19 - k - reach_y_velocity_time
- Backflip_Wait_Time_15 = 18 - k - reach_y_velocity_time
- --- Ensure you are on the banker
- if Not_On_Banker == false and Backflip_Wait_Time_14 >= 0 then
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- ---------- First Test -14 Y Velocity
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right and Target Until -11 Y Velocity
- v_advance_hold_right_and_target(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_14 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_14 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_14 = true
- Clip_Exists = true
- print('Clip (-14 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_14 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_14)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right and Target Until -11 Y Velocity
- v_advance_hold_right_and_target(reach_y_velocity_time + 9)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -14 Y Velocity unless Midframe Change
- if Midframe_Change_14 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_14 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_14 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- ---------- Now Test -15 Y Velocity
- itools.clear_inputs()
- --- Load the newly created state (6)
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right and Target Until -11 Y Velocity
- v_advance_hold_right_and_target(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- Movement_Angle_1 = memory.read_s16_be(0x400884,'RDRAM')
- i_advance(1)
- Movement_Angle_2 = memory.read_s16_be(0x400884,'RDRAM')
- if Movement_Angle_1 == Movement_Angle_2 then
- Midframe_Change_15 = false
- elseif Movement_Angle_1 ~= Movement_Angle_2 then
- Midframe_Change_15 = true
- end
- i_advance(2)
- --- Check if link clips
- for i = 1, N, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is less than 60
- if(core.read_float_be(0x3FFDD8,'RDRAM') < 60) then
- Clip_Successful_15 = true
- Clip_Exists = true
- print('Clip (-15 Y Velocity)')
- break
- end
- end
- ---------- If clip is successful, check if JS can land
- if Clip_Successful_15 == true then
- itools.load_state(6)
- v_advance_press_Z(Backflip_Wait_Time_15)
- --- Shield drop the bomb and backflip
- itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['R']=true,['Z']=true,['A']=true})
- itools.clear_inputs()
- --- For each frame of the backflip
- v_advance_hold_down_and_target(k)
- itools.clear_inputs()
- --- Hold Right and Target Until -12 Y Velocity
- v_advance_hold_right_and_target(reach_y_velocity_time + 10)
- itools.clear_inputs()
- v_advance_press_R(2)
- itools.clear_inputs()
- v_advance(1)
- --- Now have -15 Y Velocity unless Midframe Change
- if Midframe_Change_15 == true then
- i_advance(2)
- itools.iframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!')
- break
- end
- end
- elseif Midframe_Change_15 == false then
- itools.vframe_advance({['X Axis']=-128,['Y Axis']=0,['B']=true})
- for j = 1, M, 1 do
- itools.vframe_advance()
- -- Check if link's Y Position is 133, which is the height of the bank
- if(core.read_float_be(0x3FFDD8,'RDRAM') == 133) then
- Setup_Successful_15 = true
- Setup_Exists = true
- print('SUCCESS!!!!!!!!!!!!!!!')
- break
- end
- end
- end
- end
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? Yes\n')
- if Clip_Successful_14 == true then
- file_write:write(k .. '.14 Clips? Yes\n')
- elseif Clip_Successful_14 == false then
- file_write:write(k .. '.14 Clips? No\n')
- end
- if Setup_Successful_14 == true then
- file_write:write(k .. '.14 Lands? Yes\n')
- elseif Setup_Successful_14 == false then
- file_write:write(k .. '.14 Lands? No\n')
- end
- if Midframe_Change_14 == true then
- file_write:write(k .. '.14 Midframe Change? Yes\n')
- elseif Midframe_Change_14 == false then
- file_write:write(k .. '.14 Midframe Change? No\n')
- end
- file_write:write(k .. '.14 Backflip Wait Time:' .. Backflip_Wait_Time_14 .. '\n')
- if Clip_Successful_15 == true then
- file_write:write(k .. '.15 Clips? Yes\n')
- elseif Clip_Successful_15 == false then
- file_write:write(k .. '.15 Clips? No\n')
- end
- if Setup_Successful_15 == true then
- file_write:write(k .. '.15 Lands? Yes\n')
- elseif Setup_Successful_15 == false then
- file_write:write(k .. '.15 Lands? No\n')
- end
- if Midframe_Change_15 == true then
- file_write:write(k .. '.15 Midframe Change? Yes\n')
- elseif Midframe_Change_15 == false then
- file_write:write(k .. '.15 Midframe Change? No\n')
- end
- file_write:write(k .. '.15 Backflip Wait Time:' .. Backflip_Wait_Time_15 .. '\n')
- file_write:write('---\n')
- elseif Not_On_Banker == true then
- file_write:write(option .. ' ' .. direction .. '\n')
- file_write:write(k .. ' On Bank? No\n')
- file_write:write(k .. '.14 Clips? N/A\n')
- file_write:write(k .. '.14 Lands? N/A\n')
- file_write:write(k .. '.14 Midframe Change? N/A\n')
- file_write:write(k .. '.14 Backflip Wait Time: N/A\n')
- file_write:write(k .. '.15 Clips? N/A\n')
- file_write:write(k .. '.15 Lands? N/A\n')
- file_write:write(k .. '.15 Midframe Change? N/A\n')
- file_write:write(k .. '.15 Backflip Wait Time: N/A\n')
- file_write:write('---\n')
- end
- end
- end
- --------------------------------------------------------------------------------------------------------
- end
- end
- file_write:close()
- print('done')
Add Comment
Please, Sign In to add comment