Rabi-Ribi Ironbun mod
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ironbun/Ironbun.LUA

39 lines
1.2 KiB

2 years ago
erinaCostume = readInteger("rabiribi.exe+167CFB4")
ribbonCostume = readInteger("rabiribi.exe+167CFB8")
print("Started Bun")
writeInteger("rabiribi.exe+167CFB4",5*65536)
writeInteger("rabiribi.exe+167CFB8",3)
maxHealthPointer=readPointer("rabiribi.exe+01682364")+0x4F0
healthPointer=readPointer("rabiribi.exe+01682364")+0x4E0
currentHealth=50
currentMaxHealth=50
titleScreenPointer=readPointer("rabiribi.exe+00E8E67C")+0x5C
function update(timer)
if (readInteger(titleScreenPointer)==0) then
currentHealth=50
currentMaxHealth=50
return
else
if (readInteger(healthPointer)<currentHealth) then
currentHealth=readInteger(healthPointer)
end
if (readInteger(maxHealthPointer)>currentMaxHealth) then
currentHealth=currentHealth+readInteger(maxHealthPointer)-currentMaxHealth
currentMaxHealth=readInteger(maxHealthPointer)
end
writeInteger(healthPointer,currentHealth)
end
end
healthSetTimer=createTimer(getMainForm())
healthSetTimer.setInterval(50)
healthSetTimer.setOnTimer(update)
healthSetTimer.setEnabled(true)