Advertisement
feos

waterworld

Apr 21st, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. base = 0xA34C
  2. maxcount = 0
  3. enemies = {
  4.     { id = 117509910, name = "Smoker"    },
  5.     { id = 117513818, name = "Berserker" },
  6.     { id = 117518154, name = "Thrasher"  },
  7.     { id = 117521014, name = "Seeker"    },
  8.     { id = 117534562, name = "Boat"      },
  9.     { id = 117524248, name = "Shark"     }
  10. }
  11.  
  12. while true do
  13.     local count = 0
  14.     for i=24, 218 do
  15.         local addr = base + i * 0x48
  16.         local id = mainmemory.read_s32_le(addr)
  17.         for e = 1, 6 do
  18.             local enemy = enemies[e]
  19.             if id == enemy.id then
  20.                 gui.text(
  21.                     -40,
  22.                     100 + 16 * (count % 28),
  23.                     string.format("%8X: %s", addr, enemy.name)
  24.                 )
  25.                 count = count + 1
  26.                 if count > maxcount then maxcount = count end
  27.             end
  28.         end
  29.     end
  30.     gui.text(0, 50, string.format("count:    %d\nmaxcount: %d", count, maxcount))
  31.     emu.frameadvance()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement