User File #35327584229057333

Upload All User Files

#35327584229057333 (unlisted) - Quackshot TAS script

quackshot.lua
18 downloads
Uploaded 11/29/2016 11:16 PM by Dooty (see all 36)
A pretty basic script for the game Quackshot.
--Quackshot TAS script

while true do

--useful addresses
 Dsx = mainmemory.read_s32_be(0xA2D8)
 Dsy = mainmemory.read_s32_be(0xA2DC)
 Dpx = mainmemory.read_u16_be(0xA2D0)
 Dpy = mainmemory.read_u16_be(0xA2D4)
 Act = mainmemory.read_u16_be(0xA2E6)
 Pep = mainmemory.read_u16_be(0x8FA8)
 Scx = mainmemory.read_u16_be(0x852C)
 Scy = mainmemory.read_u16_be(0x8528)
 Hxr = mainmemory.read_u16_be(0x8F5A)
 Hyt = mainmemory.read_u16_be(0x8F54)
 Hyb = mainmemory.read_u16_be(0x8F5E)
 Hxl = mainmemory.read_u16_be(0x8F60)
 Bss = mainmemory.read_u8(0x92A1)

--a more visible frame counter
 Fct = emu.framecount()
 Lag = emu.islagged()
  if Lag == true
   then Col = 0xFFFF0000
   else Col = 0xFFFFFFFF
  end

--basic hit box for Donald
  if Hxl > 10000 then Hxl = 1 end
  if Hyt > 10000 then Hyt = 1 end
 gui.drawBox(Hxl-Scx,Hyt-Scy,Hxr-Scx,Hyb-Scy,"blue")

--things I think are important to watch
 gui.drawText(1,12,"Frames: "..Fct,Col)
 gui.drawText(1,26,"Spd. x: "..Dsx)
 gui.drawText(1,40,"Pos. x: "..Dpx)
 gui.drawText(1,54,"Spd. y: "..Dsy)
 gui.drawText(1,68,"Pos. y: "..Dpy)
 gui.drawText(1,82,"Action: "..Act)
 gui.drawText(1,96,"Bosses: "..Bss)
 gui.drawText(1,110,"Pepper: "..Pep)

 emu.frameadvance()
end