冰楓論壇

標題: TwMS v224.1 CRC 自動補buff2.0 [打印本頁]

作者: eghuai    時間: 2020-4-30 15:28
標題: TwMS v224.1 CRC 自動補buff2.0
本帖最後由 eghuai 於 2020-5-6 05:48 編輯

// TwMS v224.1 CRC autobuff2.0
//用法:開啟數據後會自動讀取右上角技能buff列表,即將失效或已經失效則自動補上,沒有補buff的人物動作,不再需要寵物
//藥物,大部分被動技無法補充
//蜘蛛之鏡的蜘蛛也可以補成常駐的召喚獸
//部分職業有掉線可能,賬號被鎖,這段數據不再繼續完善了
[ENABLE]
registersymbol(AutoBuff)
alloc(AutoBuff,512)
label(Original)
registersymbol(AutoBuff_List)
alloc(AutoBuff_List,512)
registersymbol(Buffid)
alloc(Buffid,4)

registersymbol(AutoBuff_AddList)
alloc(AutoBuff_AddList,512)
label(AutoBuff_AddList_end)
label(AutoBuff_AddList_continue)
label(AutoBuff_AddList_foreach)

registersymbol(AutoBuff_GetBuffIDFromList)
alloc(AutoBuff_GetBuffIDFromList,512)
label(AutoBuff_GetBuffIDFromLis_end)
label(AutoBuff_GetBuffIDFromLis_break)
label(AutoBuff_GetBuffIDFromLis_foreach)

registersymbol(AutoBuff_List_Index)
alloc(AutoBuff_List_Index,4)

AutoBuff_List_Index:
dd 0

Buffid:
dd 0

01C114E6:
jmp AutoBuff



AutoBuff:
push ecx
mov ecx,[edx+98]
mov [Buffid],ecx
cmp ecx,000F4240//过滤掉莫名其妙的buff 1000000
pop ecx
jle Original
cmp byte ptr [edx+94],02//判断是否技能
jne Original

call AutoBuff_AddList
jmp Original

Original:
test al,al
je 01C114F3
push edi
JMP 01C114EB

AutoBuff_AddList:
pushad
mov eax,AutoBuff_List
xor ecx,ecx
mov ebx,[Buffid]
AutoBuff_AddList_foreach:
cmp [eax+ecx*4],ebx//has
je AutoBuff_AddList_end
cmp [eax+ecx*4],0
jne AutoBuff_AddList_continue
mov [eax+ecx*4],ebx
jmp AutoBuff_AddList_end

AutoBuff_AddList_end:
popad
ret

AutoBuff_AddList_continue:
inc ecx
jmp AutoBuff_AddList_foreach


//获取buffidList
AutoBuff_GetBuffIDFromList:
push eax
push esi
mov eax,AutoBuff_List
mov esi,[AutoBuff_List_Index]
xor ecx,ecx
AutoBuff_GetBuffIDFromLis_foreach:
cmp [eax+esi*4],0//end or not found
je AutoBuff_GetBuffIDFromLis_break
inc [AutoBuff_List_Index]
mov ecx,[eax+esi*4]
jmp AutoBuff_GetBuffIDFromLis_end

AutoBuff_GetBuffIDFromLis_break:
mov [AutoBuff_List_Index],0
xor ecx,ecx
jmp AutoBuff_GetBuffIDFromLis_end
AutoBuff_GetBuffIDFromLis_end:
pop esi
pop eax
ret

//==========
registersymbol(KeepBuff)
alloc(KeepBuff,512)
label(KeepBuff_Loop)
label(KeepBuff_end)
registersymbol(Call_GetBuff)
alloc(Call_GetBuff,512)
registersymbol(Var_structural_PACK)
alloc(Var_structural_PACK,512)
registersymbol(Var_PACK)
alloc(Var_PACK,512)
registersymbol(lasttimeB)
alloc(lasttimeB,1024)
registersymbol(lag)
alloc(lag,4)
lag:
dd 3E8

lasttimeB:
dd 0

Var_structural_PACK:
DB A8 DD E4 41 74 54 18 00 E6 D2 DB 27 FF FF FF FF 80 54 18 00 D5 2C 75 00 A8 DD E4 41 08 4C D4 60 00 00 00 00 00 00 00 00 7F 07 00 00 4E 00 00 00

Var_PACK:
db A9 1C 00 00 00 00 9D CC 60 01 01 00 00 00 10 84 DF 5F 00 00 00 00 00 00 00 00 00 00 00 00 01
registersymbol(streg)
alloc(streg,8192)

streg+4:
db B8 7D A5 BB 3A A6 DB B0 CA B8 C9 42 55 46 46 2D 3E 00
//==========
KeepBuff:
pushad

KeepBuff_Loop:

call AutoBuff_GetBuffIDFromList//return to ecx
cmp ecx,0
je KeepBuff_end
push ecx
call timegettime
push eax
call Call_GetBuff
jmp KeepBuff_end


KeepBuff_end:
popad
push 0360FEDC
JMP 02761CEA

Call_GetBuff:

mov eax,[ESP+4]
mov edi,[ESP+8]
mov ebx,[03F77988]
mov ecx,ebx
push eax
push edi
mov eax,[ebx]
call dword ptr [eax+24]
mov ecx,eax
call 00B96220

cmp eax,00008
jLE +3
ret 8
mov ecx,[3F77708]
mov edi,[ESP+8]
push edi
call 02B75480
test eax,eax
je +3
ret 8




push 0000015E
mov ecx,Var_structural_PACK
call 008565B0
cmp eax,0
jg +3
ret 8
mov eax,[eax+4]
mov eax,[eax]
mov [Var_PACK],eax

mov esi,[ESP+8]
mov [Var_PACK+6],esi  

mov ecx,[esp+4]
mov ebx,ecx
sub ecx,[lasttimeB]
cmp ecx,[lag]
jge +3
ret 8
mov [lasttimeB],ebx

mov esi,[ESP+8]
mov eax,[3F77708]
mov eax,[eax+2280]
mov ecx,[03F77700]
push 01
push 00
push 00
push 00
push 00
push esi
push EAX
call 00902E80
cmp eax,0
jg +3
ret 8
mov [Var_PACK+A],eax

pushad
//out put
mov esi, [Var_PACK+6]
mov eax,streg+15
push 0A
push eax
push esi//skillID
call itoa
add esp,C

mov eax,streg+4
mov [streg],eax
push 9//type
push streg
call 0119F020
add esp,8
//out put
popad

mov eax,[03F7CB44]
mov [Var_PACK+E],eax

call 0291F730
mov [Var_PACK+2],eax

mov [Var_structural_PACK+8],1F

mov ecx,[03F77704]
mov eax,Var_PACK
mov  [Var_structural_PACK+4],eax
push Var_structural_PACK
jmp 0043B0F1


ret 8

0043B0F1:
call 01190070
ret 8

02761CE5:
jmp KeepBuff


[DISABLE]
01C114E6:
db 84 C0 74 09 57


02761CE5:
push 0360FEDC







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