Decided to make one thread in which I'll post next [awesome] stuff I create. This time these are not edit of existing scripts, but (since I've learned how to implement part of the code to .dll) totally new ones. The .exe which I use is that one with rarara.dll (because the .exe which I think is the latest version from this forum, doesn't work with OllyDBG), so if you're not using this one, you need to find out the specific parts of the code in your .exe and know how to implement my code to your .dll.
Ok, here we go:
This time I present you new form of chasing (yay). All you need to do in your data changer is to write hit_Fa: 15, and tadah, done.
Somehow I didn't manage to make it object oriented and it chases only the first teammate it start to focus (doesn't change target). It also goes to frame 100 when near target, so it may work as some kind of pet, waiting till it's master move. It dies when owner dies (actually goes to frame 10).
Code: (first one goes to the rarara.Asm, second goes to .code part of any 'file' there, I chose text.inc cause it's almost not used, next two are procedures and you paste it below .code part)
There are actually two scripts, because first one is new kind of chase working as a pet, and second makes hit_Fa: 15 to chase target from your team.
I'd be very grateful if someone made it object oriented (still I don't really think anyone will try to do this, because this isn't easy, so just report any bugs ;d).
EDIT!!!
Thanks to xsoameix or o_g349 now it's object oriented! Just found that 354h address he added, which stores owner number. ^^
------------------------------------
Time for random function (actually a state which randomizes your next frame):
This is the part of State_Turning proc from states.inc, so basically put this code there. I rewrote the random function with little changes and tested it so I'm pretty sure it works.
Also, a small question: do I have to edit my post everytime when I want to upload a code or can I make new posts under? I ask, cause I think nobody can see when I make change in posts..
Ok, here we go:
This time I present you new form of chasing (yay). All you need to do in your data changer is to write hit_Fa: 15, and tadah, done.
Somehow I didn't manage to make it object oriented and it chases only the first teammate it start to focus (doesn't change target). It also goes to frame 100 when near target, so it may work as some kind of pet, waiting till it's master move. It dies when owner dies (actually goes to frame 10).
Code: (first one goes to the rarara.Asm, second goes to .code part of any 'file' there, I chose text.inc cause it's almost not used, next two are procedures and you paste it below .code part)
Spoiler (Click to View)
Code:
invoke JmpPatch, 0040867Ch, addr Fa_proc
invoke JmpPatch, 004070BEh, addr chase_proc
Spoiler (Click to View)
Code:
Fa_3 dd 00408786h
Fa_3_qt dd 00408687h
Fa_3_qt2 dd 00407230h
Fa_3_qE dd 0040722Eh
ff dd 00403270h
chase dd 00407210h
chase_e dd 004070C4h
chase_u dd 00407FDFh
chase_end dd 0040867Ch
Spoiler (Click to View)
Code:
Fa_3_proc proc
cmp ebx,15
je hit_Fa15
cmp ebx,16
je hit_Fa16
cmp ebx,3
fstp st
jnz j
jmp dword ptr [Fa_3_qt]
j: jmp dword ptr [Fa_3_qt2]
hit_Fa15:
FSTP ST
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
CMP DWORD PTR DS:[ESI+ECX+4h],0
je w
CMP DWORD PTR DS:[EAX+2FCh],0
jle w
jmp n
w: MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR DS:[EAX+70h],10
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
jmp dword ptr [Fa_3_qE]
n:
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
FLD QWORD PTR DS:[4479C8h]
;x
MOV EaX,DWORD PTR DS:[EaX+10h] ;target
MOV EdX,DWORD PTR DS:[EdX+10h]
cmp eax,edx
jl xs
sub eax,edx
jmp xk
xs:
sub edx,eax
mov eax,edx
xk:
cmp eax,25 ;x range
jg b
;z
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EaX,DWORD PTR DS:[EaX+18h] ;target
MOV EdX,DWORD PTR DS:[EdX+18h]
cmp eax,edx
jl vs
sub eax,edx
jmp vk
vs:
sub edx,eax
mov eax,edx
vk:
cmp eax,25 ;z range
jg b
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+70h],100
b:
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EAX,DWORD PTR DS:[EAX+10h]
CMP EAX,DWORD PTR DS:[EDX+10h]
JLE SHORT q2
FLD QWORD PTR DS:[EDX+40h]
FADD ST,ST(1)
FSTP QWORD PTR DS:[EDX+40h]
push eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+80h],0
pop eax
q2: MOV EDX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EDX,DWORD PTR DS:[EDX+10h]
CMP EDX,DWORD PTR DS:[EAX+10h]
JGE SHORT q3
FSUBR QWORD PTR DS:[EAX+40h]
FSTP QWORD PTR DS:[EAX+40h]
push eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+80h],1
pop eax
JMP SHORT q4
q3: FSTP ST
;z
q4: MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447970h]
MOV EDX,DWORD PTR DS:[EAX+18h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h]
ADD EDX,10
CMP DWORD PTR DS:[EBX+18h],EDX
JLE SHORT q5
FLD QWORD PTR DS:[EAX+50h]
FADD ST,ST(1)
FSTP QWORD PTR DS:[EAX+50h]
q5: MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EDX,DWORD PTR DS:[EAX+18h]
MOV ECX,DWORD PTR DS:[ESI+ECX*4+194h]
SUB EDX,10
CMP DWORD PTR DS:[ECX+18h],EDX
JGE SHORT q6
FSUBR QWORD PTR DS:[EAX+50h]
FSTP QWORD PTR DS:[EAX+50h]
JMP SHORT q7
q6: FSTP ST
;
q7: MOV ECX,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447968h]
FCOM QWORD PTR DS:[ECX+40h]
FSTSW AX
TEST AH,5
JPE SHORT q8
FSTP QWORD PTR DS:[ECX+40h]
JMP SHORT q9
q8: FSTP ST
q9: MOV ECX,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447960h]
FCOM QWORD PTR DS:[ECX+40h]
FSTSW AX
TEST AH,41h
JNZ SHORT qA
FSTP QWORD PTR DS:[ECX+40h]
JMP SHORT qB
qA: FSTP ST
qB: MOV ECX,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447958h]
FCOM QWORD PTR DS:[ECX+50h]
FSTSW AX
TEST AH,5
JPE SHORT qC
FSTP QWORD PTR DS:[ECX+50h]
JMP SHORT qD
qC: FSTP ST
qD: MOV ESI,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447950h]
FCOM QWORD PTR DS:[ESI+50h]
FSTSW AX
TEST AH,41h
JNZ qE
FSTP QWORD PTR DS:[ESI+50h]
jmp dword ptr [Fa_3]
;jmp dword ptr [Fa_3_q1]
qE: jmp dword ptr [Fa_3_qE]
;#########################################################
hit_Fa16:
FSTP ST
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[edx+90h],0
FILD DWORD PTR SS:[edx+90h]
FSTP QWORD PTR DS:[edx+40h]
MOV DWORD PTR SS:[edx+90h],0
FILD DWORD PTR SS:[edx+90h]
FSTP QWORD PTR DS:[edx+48h]
MOV DWORD PTR SS:[edx+90h],0
FILD DWORD PTR SS:[edx+90h]
FSTP QWORD PTR DS:[edx+50h]
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
CMP DWORD PTR DS:[ESI+ECX+4h],0
je w2
CMP DWORD PTR DS:[EAX+2FCh],0
jle w2
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EDX,DWORD PTR DS:[edx+354h]
CMP edx,ecx
je w3
jmp n2
w2: ;MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
;MOV DWORD PTR DS:[EAX+70h],10
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
jmp dword ptr [Fa_3_qE]
w3: MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR DS:[EAX+70h],10
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
jmp dword ptr [Fa_3_qE]
n2:
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
FLD QWORD PTR DS:[4479C8h]
;x
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EaX,DWORD PTR DS:[EaX+10h] ;target
MOV EdX,DWORD PTR DS:[EdX+10h]
cmp eax,edx
jl xs2
sub eax,edx
jmp xk2
xs2:
sub edx,eax
mov eax,edx
xk2:
cmp eax,30 ;x range
jg b2
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h] ;object
MOV EAX,DWORD PTR DS:[EAX+10h]
CMP EAX,DWORD PTR DS:[EDX+10h]
JLE SHORT j1
MOV EDX,DWORD PTR DS:[EDX+10h]
sub eax,edx
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[edx+90h],eax
FILD DWORD PTR SS:[edx+90h]
FSTP QWORD PTR DS:[edx+40h]
push eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+80h],0
pop eax
jmp h3
j1:
MOV EDX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h] ;object
MOV EDX,DWORD PTR DS:[EDX+10h]
CMP EDX,DWORD PTR DS:[EAX+10h]
JGE h3
MOV EAX,DWORD PTR DS:[EAX+10h]
sub eax,edx
mov edx,eax
neg edx
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[eax+90h],edx
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+40h]
;FSUBR QWORD PTR DS:[EAX+40h]
;FSTP QWORD PTR DS:[EAX+40h]
push eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+80h],1
pop eax
jmp h3
;MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
;mov dword ptr ds:[eax+70h],100
b2:
cmp eax,100 ;x range
jg destroy
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EAX,DWORD PTR DS:[EAX+10h]
CMP EAX,DWORD PTR DS:[EDX+10h]
JLE SHORT h2
MOV DWORD PTR SS:[edx+90h],30
FILD DWORD PTR SS:[edx+90h]
FSTP QWORD PTR DS:[edx+40h]
;FLD QWORD PTR DS:[EDX+40h]
;FADD ST,ST(1)
;FSTP QWORD PTR DS:[EDX+40h]
push eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+80h],0
pop eax
jmp h3
h2: MOV EDX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EDX,DWORD PTR DS:[EDX+10h]
CMP EDX,DWORD PTR DS:[EAX+10h]
JGE SHORT h3
MOV DWORD PTR SS:[eax+90h],-30
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+40h]
;FSUBR QWORD PTR DS:[EAX+40h]
;FSTP QWORD PTR DS:[EAX+40h]
push eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
mov dword ptr ds:[eax+80h],1
pop eax
;JMP SHORT h4
h3: FSTP ST
h4:
;z
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EaX,DWORD PTR DS:[EaX+18h] ;target
MOV EdX,DWORD PTR DS:[EdX+18h]
cmp eax,edx
jl vs2
sub eax,edx
jmp vk2
vs2:
sub edx,eax
mov eax,edx
vk2:
cmp eax,30 ;z range
jg b3
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h] ;object
FLD QWORD PTR DS:[447970h]
MOV EDX,DWORD PTR DS:[EAX+18h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
;ADD EDX,10
CMP DWORD PTR DS:[EBX+18h],EDX
JLE j2
MOV EAX,DWORD PTR DS:[EBX+18h]
sub eax,edx
mov edx,eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[eax+90h],edx
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+50h]
jmp h6
j2:
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h] ;object
MOV EDX,DWORD PTR DS:[EAX+18h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
;SUB EDX,10
CMP DWORD PTR DS:[EBX+18h],EDX
JGE h6
MOV EAX,DWORD PTR DS:[EBX+18h]
sub edx,eax
neg edx
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[eax+90h],edx
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+50h]
;FSUBR QWORD PTR DS:[EAX+50h]
;FSTP QWORD PTR DS:[EAX+50h]
jmp h6
b3:
cmp eax,100 ;z range
jg destroy
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447970h]
MOV EDX,DWORD PTR DS:[EAX+18h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h]
;ADD EDX,10
CMP DWORD PTR DS:[EBX+18h],EDX
JLE SHORT h5
MOV DWORD PTR SS:[eax+90h],30
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+50h]
;FLD QWORD PTR DS:[EAX+50h]
;FADD ST,ST(1)
;FSTP QWORD PTR DS:[EAX+50h]
jmp h6
h5: MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EDX,DWORD PTR DS:[EAX+18h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h]
;SUB EDX,10
CMP DWORD PTR DS:[EBX+18h],EDX
JGE SHORT h6
MOV DWORD PTR SS:[eax+90h],-30
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+50h]
;FSUBR QWORD PTR DS:[EAX+50h]
;FSTP QWORD PTR DS:[EAX+50h]
h6: FSTP ST
hE:
;y
MOV EAX,DWORD PTR DS:[ESI+ECX*4+194h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EaX,DWORD PTR DS:[EaX+14h] ;target
MOV EdX,DWORD PTR DS:[EdX+14h]
cmp eax,edx
jl vs3
sub eax,edx
jmp vk3
vs3:
sub edx,eax
mov eax,edx
vk3:
cmp eax,30 ;y range
jg b5
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h] ;object
FLD QWORD PTR DS:[447970h]
MOV EDX,DWORD PTR DS:[EAX+14h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
ADD EDX,30
CMP DWORD PTR DS:[EBX+14h],EDX
JLE j3
MOV EAX,DWORD PTR DS:[EBX+14h]
sub eax,edx
mov edx,eax
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[eax+90h],edx
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+48h]
jmp hG
j3:
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h] ;object
MOV EDX,DWORD PTR DS:[EAX+14h]
MOV ECX,DWORD PTR DS:[ESI+ECX*4+194h] ;target
add EDX,30
CMP DWORD PTR DS:[ECX+14h],EDX
JGE hG
MOV EAX,DWORD PTR DS:[EBX+14h]
sub edx,eax
neg edx
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR SS:[eax+90h],edx
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+48h]
;FSUBR QWORD PTR DS:[EAX+50h]
;FSTP QWORD PTR DS:[EAX+50h]
jmp hG
b5:
cmp eax,100 ;y range
jg destroy
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
FLD QWORD PTR DS:[447970h]
MOV EDX,DWORD PTR DS:[EAX+14h]
MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h]
;ADD EDX,10
CMP DWORD PTR DS:[EBX+14h],EDX
JLE SHORT hF
MOV DWORD PTR SS:[eax+90h],30
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+48h]
;FLD QWORD PTR DS:[EAX+50h]
;FADD ST,ST(1)
;FSTP QWORD PTR DS:[EAX+50h]
jmp hG
hF: MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV EDX,DWORD PTR DS:[EAX+14h]
MOV ECX,DWORD PTR DS:[ESI+ECX*4+194h]
;SUB EDX,10
CMP DWORD PTR DS:[ECX+14h],EDX
JGE SHORT hG
MOV DWORD PTR SS:[eax+90h],-30
FILD DWORD PTR SS:[eax+90h]
FSTP QWORD PTR DS:[eax+48h]
;FSUBR QWORD PTR DS:[EAX+50h]
;FSTP QWORD PTR DS:[EAX+50h]
hG: FSTP ST
jmp dword ptr [Fa_3]
destroy:
FSTP ST
MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR DS:[eax+70h],10
jmp dword ptr [Fa_3]
Fa_3_proc endp
Spoiler (Click to View)
Code:
chase_proc proc
cmp eax,15
je pet
cmp eax,16
je thunderbolt
MOV EAX,DWORD PTR DS:[EDX+3F8h]
jmp dword ptr [chase_e]
pet:
MOV EAX,DWORD PTR DS:[EDX+3F8h]
CMP EAX,-1
JE q
CMP BYTE PTR DS:[EAX+ESI+4],0
JE e
MOV ECX,DWORD PTR DS:[ESI+EAX*4+194h]
CMP DWORD PTR DS:[ECX+2FCh],0
JLE e
MOV EAX,DWORD PTR DS:[ECX+8h]
PUSH EAX
call ff
ADD ESP,4
CMP EAX,2
jg q
MOV ECX,DWORD PTR DS:[ECX+354h]
CMP ECX,DWORD PTR DS:[EDX+354h]
JnE q
CMP DWORD PTR SS:[ESP+20h],ECX
jnz u
q: XOR EAX,EAX
LEA ECX,DWORD PTR DS:[ESI+194h]
MOV DWORD PTR SS:[ESP+2Ch],EAX
MOV DWORD PTR SS:[ESP+24h],ECX
h: CMP EAX,EDI
je f
CMP BYTE PTR DS:[EAX+ESI+4],0
je f
MOV EDX,DWORD PTR SS:[ESP+24h]
MOV EBX,DWORD PTR DS:[EDX]
MOV EAX,DWORD PTR DS:[EBX+368h]
CMP DWORD PTR DS:[EAX+6F8h],0
jnz f
MOV EAX,DWORD PTR DS:[EBX+354h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
CMP EAX,DWORD PTR DS:[EDX+354h]
JnE f
CMP DWORD PTR SS:[ESP+20h],EAX
je f
MOV ECX,DWORD PTR SS:[ESP+24h]
MOV EAX,DWORD PTR DS:[ECX]
MOV ECX,DWORD PTR DS:[EBX+8h]
PUSH ECX
CALL ff
ADD ESP,4
CMP EAX,2
JLE o
d: CMP DWORD PTR DS:[EDX+3F8h],-1
JNZ f
o: CMP DWORD PTR DS:[EBX+2FCh],0
JLE f
MOV EAX,DWORD PTR DS:[EBX+18h]
SUB EAX,DWORD PTR DS:[EDX+18h]
PUSH EAX
CALL ff
MOV ECX,EAX
MOV EAX,DWORD PTR DS:[EBX+10h]
SUB EAX,DWORD PTR DS:[EDX+10h]
PUSH EAX
CALL ff
ADD ECX,EAX
ADD ESP,8
CMP ECX,DWORD PTR SS:[ESP+28h]
JGE f
MOV EAX,DWORD PTR SS:[ESP+2Ch]
MOV DWORD PTR DS:[EDX+3F8h],EAX
MOV DWORD PTR SS:[ESP+28h],ECX
f: MOV EAX,DWORD PTR SS:[ESP+2Ch]
ADD DWORD PTR SS:[ESP+24h],4
ADD EAX,1
CMP EAX,400
MOV DWORD PTR SS:[ESP+2Ch],EAX
JL h
jmp dword ptr [chase]
u: jmp dword ptr [chase_u]
e: MOV ECX,DWORD PTR DS:[ESI+EDI*4+194h]
mov DWORD PTR DS:[ECX+70h],10
jmp q
;###################################################################### hit_Fa: 16
thunderbolt:
MOV EAX,DWORD PTR DS:[EDX+3F8h]
CMP EAX,-1
JE q2
CMP BYTE PTR DS:[EAX+ESI+4],0
JE q2
MOV ECX,DWORD PTR DS:[ESI+EAX*4+194h]
cmp DWORD PTR DS:[ECX+8h],0
jg j1
MOV EBX,DWORD PTR DS:[ESI+EAX*4+194h]
MOV ECX,DWORD PTR DS:[EBX+70h]
MOV EBX,DWORD PTR DS:[EBX+368h]
IMUL ECX,ECX,178h
CMP DWORD PTR DS:[ECX+EBX+7ACh],14
JE j1
CMP DWORD PTR DS:[ECX+EBX+7ACh],13
JE j1
MOV ECX,DWORD PTR DS:[ESI+EAX*4+194h]
CMP DWORD PTR DS:[ECX+2FCh],0
JLE q2
jmp j2
j1:
mov ecx,DWORD PTR DS:[EDX+354h]
MOV DWORD PTR DS:[EDX+3F8h],ecx
MOV ECX,DWORD PTR DS:[ESI+EAX*4+194h]
jmp q2
j2:
MOV EAX,DWORD PTR DS:[ESI+EAX*4+194h]
MOV EBX,DWORD PTR DS:[EAX+70h]
MOV EAX,DWORD PTR DS:[EAX+368h]
IMUL EBX,EBX,178h
CMP DWORD PTR DS:[EBX+EAX+7ACh],14
JE SHORT q2
CMP DWORD PTR DS:[EBX+EAX+7ACh],13
JE SHORT q2
MOV EAX,DWORD PTR DS:[ECX+8h]
PUSH EAX
call ff
ADD ESP,4
CMP EAX,0
jg q2
MOV ECX,DWORD PTR DS:[ECX+364h]
;CMP ECX,DWORD PTR DS:[EDX+364h]
;JE q2
CMP DWORD PTR SS:[ESP+20h],ECX
jnz u
q2: XOR EAX,EAX
LEA ECX,DWORD PTR DS:[ESI+194h]
MOV DWORD PTR SS:[ESP+2Ch],EAX
MOV DWORD PTR SS:[ESP+24h],ECX
h2: CMP EAX,EDI
je x
CMP BYTE PTR DS:[EAX+ESI+4],0
je f2
MOV EDX,DWORD PTR SS:[ESP+24h]
MOV EBX,DWORD PTR DS:[EDX]
MOV EAX,DWORD PTR DS:[EBX+368h]
CMP DWORD PTR DS:[EAX+6F8h],0
jnz f2
MOV EAX,DWORD PTR DS:[EBX+364h]
MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
CMP EAX,DWORD PTR DS:[EDX+364h]
JE f2
CMP DWORD PTR SS:[ESP+20h],EAX
je f2
MOV ECX,DWORD PTR SS:[ESP+24h]
MOV EAX,DWORD PTR DS:[ECX]
MOV ECX,DWORD PTR DS:[EAX+70h]
MOV EAX,DWORD PTR DS:[EAX+368h]
IMUL ECX,ECX,178h
CMP DWORD PTR DS:[ECX+EAX+7ACh],13
JE SHORT d2
CMP DWORD PTR DS:[ECX+EAX+7ACh],14
JE SHORT d2
MOV ECX,DWORD PTR DS:[EBX+8h]
PUSH ECX
CALL ff
ADD ESP,4
CMP EAX,0
JLE o2
d2: CMP DWORD PTR DS:[EDX+3F8h],-1
JNZ f2
o2: CMP DWORD PTR DS:[EBX+2FCh],0
JLE f2
MOV EAX,DWORD PTR DS:[EBX+18h]
SUB EAX,DWORD PTR DS:[EDX+18h]
PUSH EAX
CALL ff
MOV ECX,EAX
MOV EAX,DWORD PTR DS:[EBX+10h]
SUB EAX,DWORD PTR DS:[EDX+10h]
PUSH EAX
CALL ff
ADD ECX,EAX
ADD ESP,8
CMP ECX,DWORD PTR SS:[ESP+28h] ;check range
JGE f2
MOV EAX,DWORD PTR SS:[ESP+2Ch]
MOV DWORD PTR DS:[EDX+3F8h],EAX
MOV DWORD PTR SS:[ESP+28h],ECX
f2: MOV EAX,DWORD PTR SS:[ESP+2Ch]
ADD DWORD PTR SS:[ESP+24h],4
ADD EAX,1
CMP EAX,400
MOV DWORD PTR SS:[ESP+2Ch],EAX
JL h2
jmp dword ptr [chase]
x: jmp dword ptr [chase_end]
x2: MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
MOV DWORD PTR DS:[edx+70h],10
jmp dword ptr [chase_end]
chase_proc endp
I'd be very grateful if someone made it object oriented (still I don't really think anyone will try to do this, because this isn't easy, so just report any bugs ;d).
EDIT!!!
Thanks to xsoameix or o_g349 now it's object oriented! Just found that 354h address he added, which stores owner number. ^^
------------------------------------
Time for random function (actually a state which randomizes your next frame):
Spoiler (Click to View)
Code:
cmp dword ptr ds:[edx+ecx+7ACh],320 ;random_frame
je s320
---------
s320: ;random_frame
push esp
push ecx
push edx
PUSH ESI
MOV ESI,DWORD PTR SS:[ESP+0Ch]
MOV EAX,DWORD PTR DS:[450C34h]
ADD EAX,1
CDQ
MOV ECX,5 ;range (in this case you can get 0,1,2,3,4)
IDIV ECX
MOV EAX,DWORD PTR DS:[450BCCh]
ADD EAX,1
PUSH EDI
MOV EDI,1
MOV ECX,EDX
CDQ
IDIV EDI
POP EDI
MOV DWORD PTR DS:[450C34h],ECX
mov EAX,ECX
MOV DWORD PTR DS:[450BCCh],EDX
CDQ
IDIV ESI
POP ESI
MOV EAX,EDX
add eax,60 ;add start number (in this case you get 60,61,62,63,64)
pop edx
pop ecx
pop esp
mov dword ptr ds:[esi+70h],eax ;go to frame
jmp dword ptr [st_r2]
Also, a small question: do I have to edit my post everytime when I want to upload a code or can I make new posts under? I ask, cause I think nobody can see when I make change in posts..