Advertisement
imbued

Peahat AE Setup Script Prototype

Jun 10th, 2022 (edited)
892
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.57 KB | None | 0 0
  1. itools = dofile('lib_input_tools.lua')
  2. core = dofile('lib_core.lua')
  3.  
  4. N = 15 -- number of visual frames to advance before assuming link does not clip out of bounds
  5. M = 30 -- number of visual frames to advance before assuming link does not land out of bounds
  6.  
  7. function i_advance(amount)
  8.     for i = 1, amount, 1 do
  9.         itools.iframe_advance()
  10.     end
  11. end
  12.  
  13. function v_advance(amount)
  14.     for i = 1, amount, 1 do
  15.         itools.vframe_advance()
  16.     end
  17. end
  18.  
  19. function v_advance_press_A(amount)
  20.     for i = 1, amount, 1 do
  21.         itools.vframe_advance({['A']=true})
  22.     end
  23. end
  24.  
  25. function v_advance_press_Z(amount)
  26.     for i = 1, amount, 1 do
  27.         itools.vframe_advance({['Z']=true})
  28.     end
  29. end
  30.  
  31. function v_advance_press_R(amount)
  32.     for i = 1, amount, 1 do
  33.         itools.vframe_advance({['R']=true})
  34.     end
  35. end
  36.  
  37. function v_advance_hold_up(amount)
  38.     for i = 1, amount, 1 do
  39.         itools.vframe_advance({['X Axis']=0,['Y Axis']=127})
  40.     end
  41. end
  42.  
  43. function v_advance_hold_up_and_target(amount)
  44.     for i = 1, amount, 1 do
  45.         itools.vframe_advance({['X Axis']=0,['Y Axis']=127,['Z']=true})
  46.     end
  47. end
  48.  
  49. function v_advance_hold_down_and_target(amount)
  50.     for i = 1, amount, 1 do
  51.         itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['Z']=true})
  52.     end
  53. end
  54.  
  55. function v_advance_hold_right(amount)
  56.     for i = 1, amount, 1 do
  57.         itools.vframe_advance({['X Axis']=127,['Y Axis']=0})
  58.     end
  59. end
  60.  
  61. function v_advance_hold_right_and_target(amount)
  62.     for i = 1, amount, 1 do
  63.         itools.vframe_advance({['X Axis']=127,['Y Axis']=0,['Z']=true})
  64.     end
  65. end
  66.  
  67. function set_down_isg_targeted()
  68.  
  69.     -- set down a bomb (on C-Down) and get isg
  70.     -- This takes a total of 42 visual frames
  71.    
  72.     itools.vframe_advance({['C Down']=true})
  73.     itools.clear_inputs()
  74.    
  75.     v_advance(1)
  76.     itools.vframe_advance({['A']=true})
  77.     itools.clear_inputs()
  78.    
  79.     v_advance_press_R(12)
  80.     itools.vframe_advance({['R']=true,['B']=true})
  81.     itools.clear_inputs()
  82.    
  83.     v_advance_press_R(6)
  84.     itools.vframe_advance({['R']=true,['A']=true})
  85.     itools.clear_inputs()
  86.    
  87.     v_advance_press_Z(19)
  88.     itools.clear_inputs()
  89.    
  90.     -- can perform the first input to walk somewhere (for example) on the next frame
  91.    
  92.  
  93. end
  94.  
  95. function shield_drop_isg()
  96.  
  97.     -- frame perfectly shield drop a bomb (on C-Down) and get isg off of it
  98.     -- This takes a total of 34 visual frames
  99.    
  100.     itools.vframe_advance({['C Down']=true})
  101.     itools.clear_inputs()
  102.    
  103.     v_advance(2)
  104.     v_advance_press_R(4)
  105.    
  106.     itools.vframe_advance({['R']=true,['B']=true})
  107.     itools.clear_inputs()
  108.    
  109.     v_advance_press_R(6)
  110.     itools.vframe_advance({['R']=true,['A']=true})
  111.     itools.clear_inputs()
  112.    
  113.     v_advance(19)
  114.    
  115.     -- can perform the first input to walk somewhere (for example) on the next frame
  116.  
  117. end
  118.  
  119.  
  120. -- Define functions to perform each movement option (except for 'Nothing')
  121.  
  122. -- Movement_Options = ['Untargeted Horizontal Slash',
  123. -- 'Untargeted Horizontal Slash, Shield', 'Targeted Vertical Slash', 'Targeted Vertical Slash, Untarget ASAP',
  124. -- 'Untargeted Right Slash', 'Untargeted Right Slash, Shield', 'Targeted Forward Thrust',
  125. -- 'Targeted Forward Thrust, Untarget ASAP', 'Nothing', 'Dry Roll']
  126.  
  127.  
  128.  
  129. function Untargeted_Horizontal_Slash()
  130.    
  131.     itools.clear_inputs()
  132.    
  133.     v_advance(2)
  134.    
  135.     itools.vframe_advance({['B']=true})
  136.    
  137.     itools.clear_inputs()
  138.    
  139.     v_advance(15)
  140.    
  141. end
  142.  
  143. function Untargeted_Horizontal_Slash_Shield()
  144.    
  145.     itools.clear_inputs()
  146.    
  147.     itools.vframe_advance()
  148.    
  149.     itools.vframe_advance({['B']=true})
  150.    
  151.     itools.clear_inputs()
  152.    
  153.     v_advance_press_R(10)
  154.    
  155.     itools.clear_inputs()
  156.    
  157.     v_advance(8)
  158.    
  159. end
  160.  
  161. function Targeted_Vertical_Slash()
  162.    
  163.     itools.clear_inputs()
  164.    
  165.     itools.vframe_advance()
  166.    
  167.     itools.vframe_advance({['B']=true, ['Z']=true})
  168.    
  169.     v_advance_press_Z(8)
  170.    
  171.     itools.clear_inputs()
  172.    
  173.     v_advance(7)
  174.    
  175.     itools.clear_inputs()
  176.    
  177.     itools.vframe_advance()
  178. end
  179.  
  180. function Targeted_Vertical_Slash_Untarget_ASAP()
  181.    
  182.     itools.clear_inputs()
  183.    
  184.     itools.vframe_advance()
  185.    
  186.     itools.vframe_advance({['B']=true, ['Z']=true})
  187.    
  188.     itools.clear_inputs()
  189.    
  190.     v_advance(14)
  191.    
  192. end
  193.  
  194. function Untargeted_Right_Slash()
  195.    
  196.     itools.clear_inputs()
  197.    
  198.     itools.vframe_advance()
  199.    
  200.     itools.vframe_advance({['Z']=true})
  201.    
  202.     itools.clear_inputs()
  203.    
  204.     v_advance(5)
  205.    
  206.     itools.vframe_advance({['X Axis']=127,['Y Axis']=0,['B']=true})
  207.    
  208.     itools.clear_inputs()
  209.    
  210.     v_advance(17)
  211.    
  212. end
  213.  
  214. function Untargeted_Right_Slash_Shield()
  215.    
  216.     itools.clear_inputs()
  217.    
  218.     itools.vframe_advance()
  219.    
  220.     itools.vframe_advance({['Z']=true})
  221.    
  222.     itools.clear_inputs()
  223.    
  224.     v_advance(5)
  225.    
  226.     itools.vframe_advance({['X Axis']=127,['Y Axis']=0,['B']=true})
  227.    
  228.     itools.clear_inputs()
  229.    
  230.     v_advance_press_R(9)
  231.    
  232.     itools.clear_inputs()
  233.    
  234.     v_advance(8)
  235.    
  236. end
  237.  
  238. function Targeted_Forward_Thrust()
  239.    
  240.     itools.clear_inputs()
  241.    
  242.     itools.vframe_advance()
  243.    
  244.     itools.vframe_advance()
  245.    
  246.     itools.vframe_advance({['Z']=true})
  247.    
  248.     itools.clear_inputs()
  249.    
  250.     v_advance(5)
  251.    
  252.     itools.vframe_advance({['X Axis']=0,['Y Axis']=127,['B']=true,['Z']=true})
  253.    
  254.     itools.clear_inputs()
  255.    
  256.     v_advance_press_Z(8)
  257.    
  258.     itools.clear_inputs()
  259.    
  260.     v_advance(5)
  261.    
  262. end
  263.  
  264. function Targeted_Forward_Thrust_Untarget_ASAP()
  265.    
  266.     itools.clear_inputs()
  267.    
  268.     itools.vframe_advance()
  269.    
  270.     itools.vframe_advance({['Z']=true})
  271.    
  272.     itools.clear_inputs()
  273.    
  274.     v_advance(5)
  275.    
  276.     itools.vframe_advance({['X Axis']=0,['Y Axis']=127,['B']=true,['Z']=true})
  277.    
  278.     itools.clear_inputs()
  279.    
  280.     --v_advance(12)
  281.     v_advance(4)
  282.    
  283. end
  284.  
  285. function Dry_Roll()
  286.    
  287.     ------ This puts away sword before dry rolling
  288.    
  289.     itools.clear_inputs()
  290.    
  291.     v_advance_press_A(1)
  292.    
  293.     --- v_advance_press_Z(1) and get rid of the A press above if sword isn't drawn already
  294.     v_advance_press_Z(6)
  295.     itools.vframe_advance({['Z']=true, ['A']=true})
  296.     itools.clear_inputs()
  297.    
  298.     v_advance(12)
  299.    
  300. end
  301.  
  302. -- START OF CODE
  303.  
  304. file_write = io.open('peahat_ae.txt', 'w+')
  305.  
  306. initial_state_slot = 0
  307. state_slot_1 = 1
  308. state_slot_2 = 2
  309. state_slot_3 = 3
  310. state_slot_0 = 4
  311.  
  312. --walk_options = {14, 15}
  313. walk_options = {15, 14}
  314. target_options = {'target', 'no_target'}
  315. options = {'drop_bomb', 'backwalk'}
  316.  
  317.  
  318.  
  319.  
  320.  
  321. itools.load_state(initial_state_slot)
  322. itools.clear_inputs()
  323. frame_count = 0 -- I orignally named this "current_frame" but accidentally wrote "frame_count" in most of the code instead, so I changed its name
  324.  
  325. -- COLLECT DATA OF INITIAL State (JP 1.0)
  326. X_Position = core.read_float_be(0x3FFFC4,'RDRAM')
  327. Z_Position = core.read_float_be(0x3FFFCC,'RDRAM')
  328. Y_Position = core.read_float_be(0x3FFFC8,'RDRAM')
  329.  
  330. Angle1 = bizstring.hex(mainmemory.readbyte(0x40005E))
  331. Angle2 = bizstring.hex(mainmemory.readbyte(0x40005F))
  332.  
  333. X_Position1 = bizstring.hex(mainmemory.readbyte(0x3FFFC4))
  334. X_Position2 = bizstring.hex(mainmemory.readbyte(0x3FFFC5))
  335. X_Position3 = bizstring.hex(mainmemory.readbyte(0x3FFFC6))
  336. X_Position4 = bizstring.hex(mainmemory.readbyte(0x3FFFC7))
  337.  
  338. Y_Position1 = bizstring.hex(mainmemory.readbyte(0x3FFFC8))
  339. Y_Position2 = bizstring.hex(mainmemory.readbyte(0x3FFFC9))
  340. Y_Position3 = bizstring.hex(mainmemory.readbyte(0x3FFFCA))
  341. Y_Position4 = bizstring.hex(mainmemory.readbyte(0x3FFFCB))
  342.  
  343. Z_Position1 = bizstring.hex(mainmemory.readbyte(0x3FFFCC))
  344. Z_Position2 = bizstring.hex(mainmemory.readbyte(0x3FFFCD))
  345. Z_Position3 = bizstring.hex(mainmemory.readbyte(0x3FFFCE))
  346. Z_Position4 = bizstring.hex(mainmemory.readbyte(0x3FFFCF))
  347.  
  348.  
  349.  
  350.  
  351. file_write:write('Type 1 Backflip = Hold Backflip, Type 2 Backflip = Tap Backflip\n')
  352. file_write:write('== Initial State Data ==\n')
  353. file_write:write('Angle: ' .. Angle1 .. Angle2 .. '\n')
  354. file_write:write('X Position: ' .. X_Position1 .. X_Position2 .. X_Position3 .. X_Position4 .. '     Float: ' .. X_Position .. '\n')
  355. file_write:write('Y Position: ' .. Y_Position1 .. Y_Position2 .. Y_Position3 .. Y_Position4 .. '     Float: ' .. Y_Position .. '\n')
  356. file_write:write('Z Position: ' .. Z_Position1 .. Z_Position2 .. Z_Position3 .. Z_Position4 .. '     Float: ' .. Z_Position .. '\n\n================================================================\n\n')
  357.  
  358.  
  359.  
  360. -- in case the state wasn't already targeted, stand in place targeting for 6 frames
  361. v_advance_press_Z(6)
  362.  
  363. -- assume bomb is on C-Down, need to hold shield for at least 3 frames!!
  364. itools.vframe_advance({['R']=true,['Z']=true,['C Down']=true,['X Axis']=0,['Y Axis']=127})
  365. itools.clear_inputs()
  366. frame_count = frame_count + 1
  367.  
  368. itools.vframe_advance({['R']=true,['Z']=true,['X Axis']=0,['Y Axis']=127})
  369. itools.clear_inputs()
  370. frame_count = frame_count + 1
  371.  
  372. itools.vframe_advance({['R']=true,['Z']=true,['X Axis']=0,['Y Axis']=127})
  373. itools.clear_inputs()
  374. frame_count = frame_count + 1
  375.  
  376. store_frame_count_1 = frame_count
  377.  
  378. --- Create a Save State
  379. itools.save_state(state_slot_0)
  380.  
  381. for i = 1, table.getn(walk_options), 1 do
  382.    
  383.     frame_count = store_frame_count_1
  384.    
  385.     -- load state
  386.     itools.load_state(state_slot_0)
  387.     itools.clear_inputs()
  388.    
  389.     -- keep in mind that we are on frame 3 instead of frame 0, so we already walked for 1 frame, so 14 becomes 11 and 15 becomes 12
  390.     v_advance_hold_up_and_target(walk_options[i] - 3)
  391.     itools.clear_inputs()
  392.     frame_count = frame_count + walk_options[i] - 3
  393.    
  394.     --- Create a Save State
  395.     itools.save_state(state_slot_1)
  396.    
  397.     store_frame_count_2 = frame_count
  398.    
  399.     for j = 1, table.getn(target_options), 1 do
  400.    
  401.         itools.load_state(state_slot_1)
  402.         itools.clear_inputs()
  403.         frame_count = store_frame_count_2
  404.        
  405.         if target_options[j] == 'target' then
  406.        
  407.             -- pull bomb
  408.             itools.vframe_advance({['C Down']=true,['Z']=true})
  409.             itools.clear_inputs()
  410.             v_advance_press_Z(4)
  411.             itools.clear_inputs()
  412.             frame_count = frame_count + 5
  413.            
  414.             v_advance(1)
  415.             frame_count = frame_count + 1
  416.            
  417.         elseif target_options[j] == 'no_target' then
  418.        
  419.             itools.vframe_advance({['C Down']=true})
  420.             itools.clear_inputs()
  421.             v_advance(5)
  422.             frame_count = frame_count + 6
  423.        
  424.         end
  425.        
  426.         -- now turn left
  427.         itools.vframe_advance({['X Axis']=-128,['Y Axis']=0})
  428.         itools.clear_inputs()
  429.         frame_count = frame_count + 1
  430.        
  431.         -- now target for at least 6 frames
  432.         v_advance_press_Z(6)
  433.         itools.clear_inputs()
  434.         frame_count = frame_count + 6
  435.        
  436.         itools.save_state(state_slot_2)
  437.        
  438.         store_frame_count_3 = frame_count
  439.        
  440.         for k = frame_count, 46, 1 do
  441.            
  442.             itools.load_state(state_slot_2)
  443.             itools.clear_inputs()
  444.             frame_count = store_frame_count_3
  445.            
  446.             v_advance_press_Z(k - frame_count)
  447.             itools.clear_inputs()
  448.             frame_count = frame_count + k - frame_count
  449.            
  450.             -- set down the bomb and start backwalking
  451.             itools.vframe_advance({['C Down']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true})
  452.             itools.clear_inputs()
  453.             frame_count = frame_count + 1
  454.            
  455.             v_advance_hold_down_and_target(66 - frame_count)
  456.             itools.clear_inputs()
  457.             frame_count = frame_count + 66 - frame_count
  458.            
  459.             itools.save_state(state_slot_3)
  460.             store_frame_count_4 = frame_count
  461.            
  462.             for L = 1, 2, 1 do
  463.            
  464.                 print('i=' .. i .. ' j=' .. j .. ' k=' .. k .. ' L=' .. L .. ' --')
  465.                
  466.                 itools.load_state(state_slot_3)
  467.                 itools.clear_inputs()
  468.                 frame_count = store_frame_count_4
  469.                
  470.                 successful_clip = false
  471.                
  472.                 -- hold backflip
  473.                 if L == 1 then
  474.                     itools.vframe_advance({['A']=true,['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 1
  475.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 2
  476.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 3
  477.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 4
  478.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 5
  479.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 6
  480.                     itools.clear_inputs()
  481.                    
  482.                     frame_count = frame_count + 6
  483.                    
  484.                 -- tap backflip
  485.                 elseif L == 2 then
  486.                
  487.                     itools.vframe_advance({['A']=true,['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 1
  488.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 2
  489.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 3
  490.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 4
  491.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 5
  492.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 6
  493.                     itools.clear_inputs()
  494.                    
  495.                     frame_count = frame_count + 6
  496.                    
  497.                 end
  498.                
  499.                 shuffle = false
  500.                 drose = 0
  501.                 while drose < 40 do
  502.                
  503.                     y_pos = core.read_float_be(0x3FFFC8,'RDRAM')
  504.                     y_vel = core.read_float_be(0x400008,'RDRAM')
  505.                    
  506.                     if ((walk_options[i] == 14 and y_vel < -9.1 and y_vel > -9.3) or (walk_options[i] == 15 and y_vel < -10.1 and y_vel > -10.3)) and shuffle == false then
  507.                        
  508.                         --print('yes A     ' .. y_vel)
  509.                        
  510.                         itools.clear_inputs()
  511.                         v_advance_press_Z(2)
  512.                         itools.clear_inputs()
  513.                         itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['Z']=true})
  514.                         itools.clear_inputs()
  515.                         frame_count = frame_count + 3
  516.                         shuffle = true
  517.                        
  518.                     elseif shuffle == false then
  519.                    
  520.                         --print('Yes B     ' .. y_vel)
  521.                    
  522.                         itools.vframe_advance({['X Axis']=-30,['Y Axis']=127,['Z']=true})
  523.                         itools.clear_inputs()
  524.                         frame_count = frame_count + 1
  525.                    
  526.                     elseif shuffle == true then
  527.                    
  528.                         v_advance_press_Z(1)
  529.                         itools.clear_inputs()
  530.                         frame_count = frame_count + 1
  531.                    
  532.                     end
  533.                    
  534.                     if y_pos < -21 and successful_clip == false then
  535.                         print('Success!!!!!!!!!!!!!!!!!!!!!')
  536.                         successful_clip = true
  537.                     end
  538.                    
  539.                     drose = drose + 1
  540.                
  541.                 end
  542.            
  543.             itools.clear_inputs()
  544.            
  545.             if successful_clip == true then
  546.                 successful_clip_string = 'True'
  547.             else
  548.                 successful_clip_string = 'False'
  549.             end
  550.            
  551.             file_write:write('Walk_Option: ' .. walk_options[i] .. '     Target_Option: ' .. target_options[j] .. '     Bomb_Drop_Option: Set_Down_Bomb     Backwalk_Frame: ' .. k .. '     Backflip_Type: ' .. L .. '     Successful_Clip: ' .. successful_clip_string .. '\n\n')
  552.            
  553.             end -- end L for loop
  554.            
  555.        
  556.        
  557.         end
  558.        
  559.         frame_count = store_frame_count_3
  560.        
  561.         for k = frame_count, 66, 1 do
  562.        
  563.             itools.load_state(state_slot_2)
  564.             itools.clear_inputs()
  565.             frame_count = store_frame_count_3
  566.            
  567.             v_advance_press_Z(k - frame_count)
  568.             itools.clear_inputs()
  569.             frame_count = frame_count + k - frame_count
  570.            
  571.             -- shield drop the bomb and start backwalking
  572.             if frame_count < 66 then
  573.                 itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true})
  574.                 itools.clear_inputs()
  575.                 frame_count = frame_count + 1
  576.             end
  577.            
  578.             v_advance_hold_down_and_target(66 - frame_count)
  579.             itools.clear_inputs()
  580.             frame_count = frame_count + 66 - frame_count
  581.            
  582.             itools.save_state(state_slot_3)
  583.             store_frame_count_4 = frame_count
  584.            
  585.             for L = 1, 2, 1 do
  586.            
  587.                 print('i=' .. i .. ' j=' .. j .. ' k=' .. k .. ' L=' .. L .. ' --')
  588.                
  589.                 itools.load_state(state_slot_3)
  590.                 itools.clear_inputs()
  591.                 frame_count = store_frame_count_4
  592.                
  593.                 successful_clip = false
  594.                
  595.                 -- hold backflip
  596.                 if L == 1 then
  597.                     itools.vframe_advance({['A']=true,['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 1
  598.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 2
  599.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 3
  600.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 4
  601.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 5
  602.                     itools.vframe_advance({['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 6
  603.                     itools.clear_inputs()
  604.                    
  605.                     frame_count = frame_count + 6
  606.                    
  607.                 -- tap backflip
  608.                 elseif L == 2 then
  609.                
  610.                     itools.vframe_advance({['A']=true,['R']=true,['X Axis']=0,['Y Axis']=-128,['Z']=true}) -- 1
  611.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 2
  612.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 3
  613.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 4
  614.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 5
  615.                     itools.vframe_advance({['R']=true,['Z']=true}) -- 6
  616.                     itools.clear_inputs()
  617.                    
  618.                     frame_count = frame_count + 6
  619.                    
  620.                 end
  621.                
  622.                 shuffle = false
  623.                 drose = 0
  624.                 while drose < 40 do
  625.                
  626.                     y_pos = core.read_float_be(0x3FFFC8,'RDRAM')
  627.                     y_vel = core.read_float_be(0x400008,'RDRAM')
  628.                    
  629.                     if ((walk_options[i] == 14 and y_vel < -9.1 and y_vel > -9.3) or (walk_options[i] == 15 and y_vel < -10.1 and y_vel > -10.3)) and shuffle == false then
  630.                        
  631.                         itools.clear_inputs()
  632.                         v_advance_press_Z(2)
  633.                         itools.clear_inputs()
  634.                         itools.vframe_advance({['X Axis']=0,['Y Axis']=-128,['Z']=true})
  635.                         itools.clear_inputs()
  636.                         frame_count = frame_count + 3
  637.                         shuffle = true
  638.                        
  639.                     elseif shuffle == false then
  640.                    
  641.                         itools.vframe_advance({['X Axis']=-30,['Y Axis']=127,['Z']=true})
  642.                         itools.clear_inputs()
  643.                         frame_count = frame_count + 1
  644.                    
  645.                     elseif shuffle == true then
  646.                    
  647.                         v_advance_press_Z(1)
  648.                         itools.clear_inputs()
  649.                         frame_count = frame_count + 1
  650.                    
  651.                     end
  652.                    
  653.                     if y_pos < -21 and successful_clip == false then
  654.                         print('Success!!!!!!!!!!!!!!!!!!!!!')
  655.                         successful_clip = true
  656.                     end
  657.                    
  658.                     drose = drose + 1
  659.                
  660.                 end
  661.            
  662.             itools.clear_inputs()
  663.            
  664.             if successful_clip == true then
  665.                 successful_clip_string = 'True'
  666.             else
  667.                 successful_clip_string = 'False'
  668.             end
  669.            
  670.             file_write:write('Walk_Option: ' .. walk_options[i] .. '     Target_Option: ' .. target_options[j] .. '     Bomb_Drop_Option: Shield_Drop_Bomb     Backwalk_Frame: ' .. k .. '     Backflip_Type: ' .. L .. '     Successful_Clip: ' .. successful_clip_string .. '\n\n')
  671.            
  672.             end -- end L for loop (2)
  673.        
  674.        
  675.         end
  676.        
  677.    
  678.     end
  679.    
  680.  
  681. end
  682.  
  683. file_write:close()
  684. print('done')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement