//==================================================
// TWMS_V100 快速恢復 HP/MP 合併版
// 代碼原創:qqazedctgb
// Address:00425C20
// EIP=HookFR
// 說明:每次恢復10倍HP,8倍MP
//==================================================
[Enable]
alloc(HookFR,256)
registersymbol(HookFR)
label(HookRet)
label(HPHandler)
label(MPHandler)
label(FastRecoverHP)
label(DoNormalHP)
label(HPCheck)
alloc(HPCounter,4)
alloc(SetHPCounter,4)
alloc(RecoverTime,4)
registersymbol(SetHPCounter)
label(FastRecoverMP)
label(DoNormalMP)
label(MPCheck)
alloc(MPCounter,4)
alloc(SetMPCounter,4)
registersymbol(SetMPCounter)
HookFR:
cmp [esp],00944655
je HPHandler
cmp [esp],009447C3
je MPHandler
HookRet:
push ebp
jmp 00425C21
HPHandler:
mov [esp],FastRecoverHP
jmp HookRet
MPHandler:
mov [esp],FastRecoverMP
jmp HookRet
FastRecoverHP:
push eax
mov eax,[ebp-1c]
mov [RecoverTime],eax
pop eax
cmp [HPCounter],0
je HPCheck
dec [HPCounter]
cmp ebx,1
jmp 00944658
HPCheck:
sub [RecoverTime],0A
cmp ebx,[RecoverTime]
jna DoNormalHP
push eax
mov eax,[SetHPCounter]
dec eax
mov [HPCounter],eax
pop eax
DoNormalHP:
cmp ebx,[ebp-1c]
jmp 00944658
FastRecoverMP:
cmp [MPCounter],0
je MPCheck
dec [MPCounter]
cmp ebx,1
jmp 009447C9
MPCheck:
cmp ebx,00002708
jna DoNormalMP
push eax
mov eax,[SetMPCounter]
dec eax
mov [MPCounter],eax
pop eax
DoNormalMP:
cmp ebx,00002710
jmp 009447C9
SetHPCounter:
dd A // 10倍HP,易斷線的請調低倍數
SetMPCounter:
dd 8 // 8倍MP,易斷線的請調低倍數
[Disable]
unregistersymbol(HookFR)
dealloc(HookFR)
dealloc(HPCounter)
dealloc(SetHPCounter)
dealloc(RecoverTime)
unregistersymbol(SetHPCounter)
dealloc(MPCounter)
dealloc(SetMPCounter)
unregistersymbol(SetMPCounter)