Guest User

Untitled

a guest
Sep 16th, 2012
597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.04 KB | None | 0 0
  1. local hp_display = false
  2. local transparent = true
  3.  
  4. local function objects()
  5.     local start = 0x733D8
  6.     local x
  7.     local y
  8.     local xrad
  9.     local yrad
  10.     local base
  11.     local facing
  12.     local hp
  13.     local outl
  14.     local fill
  15.    
  16.     for i = 0,180,1 do
  17.         base = start + (i * 0xBC)
  18.        
  19.         xrad = memory.readbyte(base + 0x46)
  20.         yrad = memory.readbyte(base + 0x47)
  21.        
  22.         if xrad ~= 0 and yrad ~= 0 then    
  23.             x = memory.readword(base + 2)
  24.             y = memory.readword(base + 6)
  25.             if x <= 256 and x >= 0 and y <=240 and y >= 0 then
  26.                 hp = memory.readword(base + 0x3E)
  27.                 facing = memory.readbyte(base +0x14)
  28.                 xrad = memory.readbyte(base + 0x46)
  29.                 yrad = memory.readbyte(base + 0x47)
  30.                 xoff = memory.readwordsigned(base + 0x10)
  31.                 yoff = memory.readwordsigned(base + 0x12)
  32.                
  33.                 if facing == 1 then
  34.                     xoff = xoff * -1
  35.                 end
  36.                
  37.                 if base == 0x733D8 then -- Alucard/Richter
  38.                     outl = "#0000FFFF"
  39.                     if transparent == true then
  40.                         fill = "#0000FF00"
  41.                     else
  42.                         fill = "#0000FF35"
  43.                     end
  44.                 elseif base >= 0x73F98 and base <= 0x744BC then -- Alucard weapons/attacks
  45.                     outl = "#FFFFFFFF"
  46.                     if transparent == true then
  47.                         fill = "#FFFFFF00"
  48.                     else
  49.                         fill = "#FFFFFF35"
  50.                     end
  51.                 elseif base >= 0x74B58 and base <= 0x7565C then -- Alucard/Richter Subweapons
  52.                     outl = "#FFFF00FF"
  53.                     if transparent == true then
  54.                         fill = "#FFFF0000"
  55.                     else
  56.                         fill = "#FFFF0035"
  57.                     end
  58.                 else
  59.                     outl = "#FF0000FF"
  60.                     if transparent == true then
  61.                         fill = "#FF000000"
  62.                     else
  63.                         fill = "#FF000035"
  64.                     end
  65.                    
  66.                 end
  67.                
  68.                 if hp < 65500 then
  69.                     gui.box(x+xoff-xrad,y+yoff-yrad,x+xoff+xrad,y+yoff+yrad,fill,oult)
  70.                 end
  71.                
  72.                 if hp_display == true then
  73.                     if hp > 0 and hp ~= 32767 and hp < 65500 then
  74.                         gui.text(x-5,y-5,"HP: " .. hp)
  75.                     end
  76.                 end
  77.                
  78.                 -- gui.text(x+xoff,y+yoff,string.format("%X",base))  --debug
  79.                
  80.                 -- gui.text(20,5 + (i * 8),string.format("%X",base)) -- debug
  81.             end
  82.         end
  83.        
  84.     end
  85. end
  86.  
  87. gui.register(function()
  88.     objects()
  89. end)
Advertisement
Add Comment
Please, Sign In to add comment