conhuevos

Untitled

May 15th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.61 KB | None | 0 0
  1. -----------------------
  2. ----DISPLAY TOGGLES----
  3. -----------------------
  4.  
  5. local enemylife = true
  6. local playerlife = true
  7. local caxis = true
  8. local cheat = true
  9.  
  10. -------------------
  11. ----END TOGGLES----
  12. -------------------
  13.  
  14. local pbase = 0x8A0
  15. local ebase = 0x6a0
  16. local ehp = 0x2C
  17. local php = 0x7E001D
  18. local ux = 0x02
  19. local uy = 0x04
  20. local bx1 = 0x0A  -- left
  21. local bx2 = 0x0E  -- Right
  22. local by1 = 0x0C  -- Top
  23. local by2 = 0x10  -- Bottom
  24. local camx = 0x7E0022
  25. local camy = 0x7E0024
  26. local timer = 0x7E00E5
  27.  
  28. local function centeraxis(x,y)
  29.         gui.line(x-6,y,x+6,y,"#FFFFFFFF")
  30.         gui.line(x,y-6,x,y+6,"#FFFFFFFF")  
  31. end
  32.  
  33. local function player()
  34.  
  35.     local LE = memory.readword(camx)
  36.     local TE = memory.readword(camy)
  37.  
  38.     local x = memory.readword(pbase + ux) - LE
  39.     local y = memory.readword(pbase + uy) - TE
  40.    
  41.     local x1 = memory.readword(pbase+bx1)
  42.     local x2 = memory.readword(pbase+bx2)
  43.     local y1 = memory.readword(pbase+by1)
  44.     local y2 = memory.readword(pbase+by2)
  45.    
  46.    
  47.     local hitpt = memory.readword(0x8C0)
  48.    
  49.     -- Hard coded attack pointers until I figure out what makes them active
  50.     if hitpt == 0x87A6 or hitpt == 0x886F or hitpt == 0x890E or hitpt == 0x899F or hitpt == 0x8bb9 or hitpt == 0x8c58 or hitpt == 0x8cdb or hitpt == 0x8A97 or hitpt == 0x8A0D or hitpt == 0x8B44 or hitpt == 0x8E38 or hitpt == 0x8ED7 or hitpt == 0x8F53 then
  51.         gui.box(x-x1,y-y1,x+x2,y+y2,"#FFFFFF40","#FFFFFFFF")
  52.     else
  53.         gui.box(x-x1,y-y1,x+x2,y+y2,"#0000FF40","#0000FFFF")
  54.     end
  55.            
  56.     if playerlife == true then
  57.         gui.text(x-x1+4,y-y1-10,"HP: " .. memory.readbyte(php))
  58.     end
  59.    
  60.     if caxis == true then
  61.         centeraxis(x,y,y1,y2)
  62.     end
  63. end
  64.  
  65. local function cheats()
  66.     memory.writeword(timer,36363)
  67.     memory.writebyte(php,8)
  68. end
  69.  
  70. local function enemy()
  71.     local LE = memory.readword(camx)
  72.     local TE = memory.readword(camy)
  73.     local base = 0
  74.     local oend = 64
  75.        
  76.     for i = 0,oend,1 do
  77.         base = ebase + (i * 0x40)
  78.        
  79.         if i == 0 then
  80.             base = ebase
  81.         end
  82.        
  83.         if memory.readword(base) == 0 and base ~= pbase then
  84.        
  85.             local x = memory.readword(base + ux) - LE
  86.             local y = memory.readword(base + uy) - TE
  87.        
  88.             local x1 = memory.readword(base+bx1)
  89.             local x2 = memory.readword(base+bx2)
  90.             local y1 = memory.readword(base+by1)
  91.             local y2 = memory.readword(base+by2)
  92.                
  93.             gui.box(x-x1,y-y1,x+x2,y+y2,"#FF000040","#FF0000FF")
  94.  
  95.            
  96.             if enemylife == true then
  97.                 gui.text(x-x1+4,y-y1-10, "HP: " .. memory.readbyte(base+ehp))
  98.             end
  99.            
  100.             if caxis == true then
  101.                 centeraxis(x,y,false)
  102.             end
  103.            
  104.         end
  105.     end
  106.  
  107.  
  108. end
  109.  
  110.  
  111. gui.register(function()
  112.     player()
  113.     if cheat == true then
  114.         cheats()
  115.     end
  116.     enemy()
  117. end)
Advertisement
Add Comment
Please, Sign In to add comment