vcbfm

The Krion Conquest_魔女小红帽

Oct 20th, 2024
47
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | Source Code | 0 0
  1.  
  2. local hpBoxWidth = 34
  3. local hpBoxHeight = 8
  4. local hpBoxXOffset = -5
  5. local hpBoxYOffset = -10
  6.  
  7. emu.addEventCallback(function()
  8.     local playerX = emu.read(0x50, emu.memType.nesInternalRam)
  9.     local playerY = emu.read(0x51, emu.memType.nesInternalRam)  
  10.    
  11.     local hp = emu.read(0x4C, emu.memType.nesInternalRam)  
  12.  
  13.     local hpBoxX = playerX + hpBoxXOffset
  14.     local hpBoxY = playerY + hpBoxYOffset
  15.     local hpText = "HP: " .. hp
  16.  
  17.     emu.drawRectangle(hpBoxX, hpBoxY, hpBoxWidth, hpBoxHeight, 0x800000, true)  
  18.     emu.drawString(hpBoxX, hpBoxY, hpText, 0x00FFFF, 0)
  19. end, emu.eventType.endFrame)
  20.  
  21.  
Tags: lua NES fc mesen2
Advertisement
Comments
  • vcbfm
    1 year (edited)
    # Lua 0.11 KB | 0 0
    1. 2024.10.11 发布
    2. 首发 http://forum.cheatmaker.org/
    3. 显示血量.
    4. 显示血量没什么难度的游戏.
    5. BUG:
Add Comment
Please, Sign In to add comment