Guest User

A2600 Donkey Kong Lua

a guest
May 19th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. Position = "Positions :"
  2. MovingDirection = "Directions:"
  3. Counter = "Counter:"
  4. DirectionChange = "New direction!"
  5. Directions = {}
  6. Directions[0] = "L"
  7. Directions[1] = "R"
  8. Floors = {}
  9. Floors[0] = "1st floor fire"
  10. Floors[1] = "2nd floor fire"
  11. Floors[2] = "3rd floor fire"
  12. Floors[3] = "4th floor fire"
  13.  
  14. function DirectionChangeNotify()
  15.     gui.drawText(0,30,Floors[emu.getregister("X")],white,black,10)
  16.     gui.drawText(0,40,DirectionChange,white,black,10)
  17. end
  18.  
  19. event.onmemoryexecute(DirectionChangeNotify,0xf48d)
  20. event.onmemoryexecute(DirectionChangeNotify,0xf4d1)
  21.  
  22. while true do
  23.     gui.drawText(0,0,Position,white,black,10)
  24.     for i = 0,3 do gui.drawText(72+(i*22),0,memory.readbyte(0xc1+i),white,black,10) end
  25.     gui.drawText(0,10,MovingDirection,white,black,10)
  26.     for i = 0,3 do gui.drawText(72+(i*22),10,Directions[memory.readbyte(0xc5+i)],white,black,10) end
  27.     gui.drawText(0,20,Counter,white,black,10)
  28.     gui.drawText(50,20,memory.readbyte(0xe7),white,black,10)
  29.     emu.frameadvance()
  30. end
Advertisement
Add Comment
Please, Sign In to add comment