- UID
- 8784
- 帖子
- 4732
- 主題
- 343
- 精華
- 0
- 積分
- 3298
- 楓幣
- 2833
- 威望
- 3240
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 0
- GP
- 9
- 閱讀權限
- 90
- 性別
- 保密
- 在線時間
- 1162 小時
- 註冊時間
- 2012-6-9
- 最後登入
- 2025-1-6
|
//==================================================
// TwMs_V113 快速恢復HP/MP 合併版
//
// 代碼原創:qqazedctgb
//
// 代碼:0042A553
//
// EIP:HookFR
//
// 說明:每次恢復10倍HP,8倍MP
//==================================================
[Enable]
alloc(HookFR,1024)
********symbol(HookFR)
label(HookRet)
label(HPHandler)
label(MPHandler)
label(FastRecoverHP)
label(DoNormalHP)
label(HPCheck)
alloc(HPCounter,4)
alloc(SetHPCounter,4)
alloc(RecoverTime,4)
********symbol(SetHPCounter)
label(FastRecoverMP)
label(DoNormalMP)
label(MPCheck)
alloc(MPCounter,4)
alloc(SetMPCounter,4)
********symbol(SetMPCounter)
HookFR:
cmp [esp],00A1F484
je HPHandler
cmp [esp],00A1F5F2
je MPHandler
HookRet:
push ebp
mov ebp,esp
sub esp,0c
jmp 0042A559
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 00A1F487
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 00A1F487
FastRecoverMP:
cmp [MPCounter],0
je MPCheck
dec [MPCounter]
cmp ebx,1
jmp 00A1F5F8
MPCheck:
cmp ebx,00002134
jna DoNormalMP
push eax
mov eax,[SetMPCounter]
dec eax
mov [MPCounter],eax
pop eax
DoNormalMP:
cmp ebx,00002134
jmp 00A1F5F8
SetHPCounter:
dd A // 10倍HP,易斷線的請調低倍數
SetMPCounter:
dd 8 // 8倍MP,易斷線的請調低倍數
[Disable]
un********symbol(HookFR)
dealloc(HookFR)
dealloc(HPCounter)
dealloc(SetHPCounter)
dealloc(RecoverTime)
un********symbol(SetHPCounter)
dealloc(MPCounter)
dealloc(SetMPCounter)
un********symbol(SetMPCounter) |
|