Advertisement
Guest User

Untitled

a guest
May 11th, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.80 KB | None | 0 0
  1. --trace cv.log,0,{tracelog "A0=%08X, A1=%08X, A2=%08X, A3=%08X, A4=%08X, A5=%08X, A6=%08X, A7=%08X, D0=%08X, D1=%08X, D2=%08X, D3=%08X, D4=%08X, D5=%08X, D6=%08X ",a0,a1,a2,a3,a4,a5,a6,a7,d0,d1,d2,d3,d4,d5,d6}
  2.  
  3. -------------------------------
  4. ----Castlevania Blood Lines----
  5. -------------------------------
  6.  
  7. ---------------
  8. ----Toggles----
  9. ---------------
  10. local draw_ehp = true -- Set to false to turn off HP display for enemies
  11. local draw_php = true -- Set to false to turn off HP display for 1P
  12. local draw_pproj = true --Set to false to turn off player projectiles
  13.  
  14. local draw_ph = true -- Set to false to turn off player hitboxes
  15. local draw_eh = true -- Set to false to turn off enemie hitboxes
  16.  
  17. local infhp = true --Set to false to turn off infinite HP for the player
  18.  
  19.  
  20. local playerbase = 0xFFB300
  21. local face = 0x2C
  22. local php = 0xFF9C11
  23. local weapon = 0xFFB480
  24. local spear = 0xFF9CA7
  25. local enemybase = 0xFFB380
  26.  
  27. local xcord = 0x18
  28. local ycord = 0x1C
  29.  
  30.  
  31.  
  32.  
  33. local function playerhitbox()
  34.  
  35.     -------------------------
  36.     ----Vulnerability box----
  37.     -------------------------
  38.     local facing = memory.readbyte(playerbase+face)
  39.     local x = memory.readword(playerbase+0x18)
  40.     local y = memory.readword(playerbase+0x1C)
  41.     local xoff = memory.readwordsigned(playerbase+0x34)
  42.     local yoff = memory.readwordsigned(playerbase+0x36)
  43.     local xrad = memory.readword(playerbase+0x38)
  44.     local yrad = memory.readword(playerbase+0x3A)
  45.        
  46.     gui.box(x+xoff,y+yoff,x+xoff+xrad,y+yoff+yrad,0x0000FF30,0x0000FFF0)
  47.  
  48.        
  49.     ---------------------  
  50.     ----weapon hitbox----
  51.     ---------------------
  52.     facing = memory.readbyte(playerbase+face)
  53.    
  54.     x = memory.readword(weapon+0x18)
  55.     y = memory.readword(weapon+0x1C)
  56.     xoff = memory.readwordsigned(weapon+0x34)
  57.     yoff = memory.readwordsigned(weapon+0x36)
  58.     xrad = memory.readword(weapon+0x38)
  59.     yrad = memory.readword(weapon+0x3A)
  60.    
  61.     if memory.readbyte(weapon+0x01) == 1 and memory.readbyte(weapon+0x28) > 0 then
  62.         gui.box(x+xoff,y+yoff,x+xoff+xrad,y+yoff+yrad,0xFFFFFF40,0xFFFFFFFF)
  63.     end
  64.  
  65. end
  66.  
  67. local function player_projectiles()
  68.  
  69.     local start = 0xFFC900
  70.     local base
  71.     local x
  72.     local y
  73.     local xoff
  74.     local yoff
  75.     local xrad
  76.     local yrad
  77.     local facing
  78.     local ehp
  79.     local oend = 32
  80.     local active = false
  81.    
  82.     for i = 0,oend,1 do
  83.         active = false
  84.         base = start
  85.        
  86.         if i ~= 0 then
  87.             base = start + (i * 0x80)
  88.         end
  89.        
  90.         x = memory.readword(base + xcord)
  91.         y = memory.readword(base + ycord)
  92.        
  93.         if memory.readbyte(base+1) == 1 then
  94.             active = true
  95.         end
  96.        
  97.         if y < 224 and y > 0 and x < 320 and x > 0 and active == true and (memory.readbyte(base+0x45)) > 0 and memory.readbyte(base+0x4F) > 0 and memory.readbyte(base+0x28) == 1 then
  98.            
  99.             facing = memory.readbyte(base+face)
  100.             x = memory.readword(base+0x18)
  101.             y = memory.readword(base+0x1C)
  102.             xoff = memory.readwordsigned(base+0x34)
  103.             yoff = memory.readwordsigned(base+0x36)
  104.             xrad = memory.readword(base+0x38)
  105.             yrad = memory.readword(base+0x3A)
  106.            
  107.             gui.box(x+xoff,y+yoff,x+xoff+xrad,y+yoff+yrad,0xFFFFFF40,0xFFFFFFFF)
  108.                                    
  109.             gui.text(x-8,y+10,"DMG: " .. memory.readbyte(base+0x45))
  110.         end
  111.                
  112.     end
  113. end
  114.  
  115. local function playerinfo()
  116.     local x = memory.readword(playerbase+xcord)
  117.     local y = memory.readword(playerbase+ycord)
  118.     local hp = memory.readbyte(php)
  119.    
  120.     if draw_php == true then
  121.         gui.text(x-12,y,"HP: " .. hp)
  122.     end
  123.    
  124.     if draw_ph == true then
  125.         playerhitbox()
  126.     end
  127.    
  128.     if draw_pproj == true then
  129.         player_projectiles()
  130.     end
  131.    
  132. end
  133.  
  134. local function enemyinfo()
  135.  
  136.     local base
  137.     local x
  138.     local y
  139.     local xoff
  140.     local yoff
  141.     local xrad
  142.     local yrad
  143.     local facing
  144.     local ehp
  145.     local oend = 44
  146.     local active = false
  147.  
  148.     for i = 0,oend,1 do
  149.        
  150.         active = false
  151.         base = enemybase
  152.        
  153.         if i ~= 0 then
  154.             base = enemybase + (i * 0x80)
  155.         end
  156.        
  157.         x = memory.readword(base + xcord)
  158.         y = memory.readword(base + ycord)
  159.        
  160.         if memory.readbyte(base+1) == 1 then
  161.             active = true
  162.         end
  163.        
  164.         if base ~= weapon then
  165.        
  166.             if y < 224 and y > 0 and x < 320 and x > 0 and active == true then
  167.            
  168.                 if draw_ehp == true then
  169.                     gui.text(x-10,y,"HP: " .. memory.readbyte(base+0x55))
  170.                 end
  171.                
  172.                 --------------------
  173.                 ----Enemy Hitbox----
  174.                 --------------------
  175.                
  176.                 if draw_eh == true then
  177.                     facing = memory.readbyte(base+face)
  178.                     x = memory.readword(base+0x18)
  179.                     y = memory.readword(base+0x1C)
  180.                     xoff = memory.readwordsigned(base+0x34)
  181.                     yoff = memory.readwordsigned(base+0x36)
  182.                     xrad = memory.readword(base+0x38)
  183.                     yrad = memory.readword(base+0x3A)
  184.                
  185.                     gui.box(x+xoff,y+yoff,x+xoff+xrad,y+yoff+yrad,0xFF000040,0xFF0000FF)
  186.  
  187.                 end
  188.                    
  189.             end
  190.         end
  191.        
  192.     end
  193.    
  194. end
  195.  
  196.  
  197.  
  198. local function infinitehp()
  199.     memory.writebyte(php,80)
  200. end
  201.  
  202. gui.register(function()
  203.     playerinfo()
  204.     enemyinfo()
  205.     if infhp == true then
  206.         infinitehp()
  207.     end
  208. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement