Guest User

Quadzerker Gogo steal

a guest
Jul 18th, 2020
9
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. save = savestate.create()
  2. savestate.save(save)
  3. hairpin = false
  4. reloads = -1
  5. clears = 0
  6. hairpin_count = 0
  7. reload_time = os.clock()
  8. leather = 0
  9.  
  10. function reload(reason)
  11.    vba.print(reason)
  12.    reloads = reloads + 1
  13.    reload_time = os.clock()
  14.    hairpin = false
  15.    savestate.load(save)
  16.    rng = math.random(300)
  17.    while(rng > 0) do
  18.      vba.message("R: " .. reloads  .. " H: " .. hairpin_count .. " C: " .. clears .. " L: " .. leather)
  19.      vba.frameadvance()
  20.      rng = rng - 1
  21.    end
  22.    i = 0
  23.    while(i < 30) do
  24.      joypad.set(1, {A=true})
  25.      vba.message("R: " .. reloads  .. " H: " .. hairpin_count .. " C: " .. clears .. " L: " .. leather)
  26.      vba.frameadvance()
  27.      i = i+1
  28.    end
  29.    i = 0
  30.    while(i < 120) do
  31.      vba.frameadvance()
  32.      i = i+1
  33.    end
  34.    i = 0
  35.    while(i < 30) do
  36.      joypad.set(1, {A=true})
  37.      vba.message("R: " .. reloads  .. " H: " .. hairpin_count .. " C: " .. clears .. " L: " .. leather)
  38.      vba.frameadvance()
  39.      i = i+1
  40.    end
  41. end
  42.  
  43. reload("Start")
  44.  
  45. while true do
  46.    in_fight = memory.readwordsigned(0x0201F056) == -17822
  47.    butz_dead = memory.readwordsigned(0x0201EE04) == 0
  48.    lenna_dead = memory.readwordsigned(0x0201EE98) == 0
  49.    krile_dead = memory.readwordsigned(0x0201EF2C) == 0
  50.    faris_dead = memory.readwordsigned(0x0201EFC0) == 0
  51.    gogo_dead = memory.readwordsigned(0x0201F054) == 0
  52.    vba.message((in_fight and 't' or 'f').. " " .. (butz_dead and 't' or 'f') .. " " .. (lenna_dead and 't' or 'f').. " " .. (krile_dead and 't' or 'f').. " " .. (faris_dead and 't' or 'f').. " " .. (gogo_dead and 't' or 'f'))
  53.    if(memory.readbyte(0x0201C36A) == 5) then
  54.       leather = leather + 1
  55.       reload("Stole leather")
  56.    end
  57.    if(memory.readbyte(0x0201C360) == 148 and hairpin == false) then
  58.       vba.print("Seen it!")
  59.       hairpin = true
  60.       hairpin_count = hairpin_count + 1
  61.    end
  62.    if(in_fight and gogo_dead) then
  63.      clears = clears + 1
  64.      vba.print("Cleared!")
  65.      vba.print(clears)
  66.      if(hairpin == true) then
  67.        vba.print("GOT IT!")
  68.        vba.pause()
  69.        break
  70.      end
  71.      if(hairpin == false) then
  72.        reload("Didn't steal the thing")
  73.      end
  74.    end
  75.    if(in_fight and krile_dead and hairpin == false) then
  76.      reload("Krile died")
  77.    end
  78.    if(in_fight and butz_dead and lenna_dead and krile_dead and faris_dead) then
  79.      reload("Wrecked")
  80.    end
  81.    vba.frameadvance()
  82. end
  83.  
  84. vba.print("Done")
RAW Paste Data