冰楓論壇

標題: 如何將延遲加進數據 [打印本頁]

作者: plusline    時間: 2021-10-2 19:21
標題: 如何將延遲加進數據
本帖最後由 plusline 於 2021-10-2 20:34 編輯

我想要將尾隨怪物的數據加入延遲(黃底的部分)
但我實在是試不出來
下面是有我改出來有bug的數據
可以告訴我哪一個部分做錯了嗎
正常的尾隨怪物數據我更新在這裡: https://bingfong.com/thread-1810607-1-1.html

// TwMs v237.1 ICS 延遲尾隨怪物
[ENABLE]
Alloc(Check_Esp,128)
Label(Teleport)
Label(Exit)

Alloc(Timer,4)
Registersymbol(AutoKeyDelay)
Alloc(AutoKeyDelay,4)


Check_Esp:
cmp [esp+10],02EEB8E1
jne GetLastError
mov [esp+10],Teleport
jmp GetLastError

//攻擊間隔(毫秒)十六進制
AutoKeyDelay:
DD 7FFF
Timer:
DD 0




Teleport:
push edx
push eax
push ecx

//判斷時間是否到了
call GetTickCount
mov ecx,eax
sub ecx,[Timer]
cmp ecx,[AutoKeyDelay]
jl Exit
mov [Timer],eax




mov edx,[041F8D30]
mov eax,[edx+04]
lea ecx,[edx+04]
mov eax,[eax+24]
call eax
test eax,eax
je Exit
push [edi+970+4]
push [edi+970]
push 00
mov ecx,eax
call 00C1EA90
jmp Exit

Exit:
pop ecx
pop eax
pop edx
jmp 02EEB8E1

039E5158:
DD Check_Esp

[DISABLE]
039E5158:
DD GetLastError

DeAlloc(Check_Esp)
DeAlloc(Timer)
DeAlloc(AutoKeyDelay)





作者: qwas963563    時間: 2021-10-2 19:21
原本:
Check_Esp:
cmp [esp+10],02EEB8E1
jne GetLastError
mov [esp+10],Teleport
jmp GetLastError

//攻擊間隔(毫秒)十六進制
AutoKeyDelay:
DD 7FFF
Timer:
DD 0

(把它們交換一下順序)改成:

//攻擊間隔(毫秒)十六進制
AutoKeyDelay:
DD 7FFF
Timer:
DD 0

Check_Esp:
cmp [esp+10],02EEB8E1
jne GetLastError
mov [esp+10],Teleport
jmp GetLastError
作者: qwas963563    時間: 2021-10-2 20:26
你是遇到了什麼 bug ?




歡迎光臨 冰楓論壇 (https://bingfong.com/) Powered by 冰楓