Jump to content
Moopler
  • 0
Progity

Question Kami causing dc?

Question

i'm trying to use this script : 

//GMS v177.3
//Credit to Sprux creator
//update by ngnam87
define(CUserLocal,023AD2DC) // A1 ? ? ? ? 85 C0 75 ? 5F C3 8D

define(CMobPool,023B1B18) // 00514A33: 8B 0D ? ? ? ? ? E8 ? ? ? ? 8B ? 85 ? 74 ? 8B ? ? 8B
define(CMob_3,1B4)

define(x_dist,#100)
define(y_dist,#0)

[enable]
alloc(kami,128)
label(kami_end)

alloc(get_mob_pos,256)
label(get_mob_false)
label(get_mob_true)
label(get_mob_next)

alloc(teleport,128)
label(teleport_end)

get_mob_pos:
mov esi,[CMobPool]
test esi,esi
je get_mob_false
mov edx,[esi+10]
test edx,edx
je get_mob_false
mov esi,[esi+28]
test esi,esi
je get_mob_false
mov edx,[esi+04]
test edx,edx
je get_mob_false
mov edx,[edx+CMob_3]
test edx,edx
je get_mob_false
mov edx,[edx+24]
test edx,edx
je get_mob_false
mov ebx,[edx+68]
or ebx,[edx+6C]
test ebx,ebx
jne get_mob_true
mov esi,[esi-10]
test esi,esi
je get_mob_false

get_mob_next:
mov edx,[esi+18]
test edx,edx
je get_mob_false
mov edx,[edx+CMob_3]
test edx,edx
je get_mob_false
mov edx,[edx+24]
test edx,edx
je get_mob_false
mov ebx,[edx+68]
or ebx,[edx+6C]
test ebx,ebx
jne get_mob_true
mov esi,[esi+04]
test esi,esi
je get_mob_false
jmp get_mob_next

get_mob_false:
xor eax,eax
ret

get_mob_true:
lea eax,[edx+60]
ret

teleport:
mov esi,[CUserLocal]
lea ecx,[esi+04]
mov eax,[esi+04]
mov eax,[eax+20]
call eax
test eax,eax
je teleport_end
push ebx
push edx
push 00
mov ecx,eax
call 01736AD0 //8B ? 24 ? 8B ? ? 8B ? ? ? 8D ? ? 8B ? ? ? ? ? ? FF ? 85 C0 ? ? ? ? ? ? ? ? ? E8(2nd result)
teleport_end:
ret

kami:
cmp dword ptr [esp],017DF09A //address under call edx
pushad
jne kami_end
mov eax,[CUserLocal]
test eax,eax
je kami_end
call get_mob_pos
test eax,eax
je kami_end
mov ebx,[eax+4]
sub ebx,y_dist
mov edx,[eax]
sub edx,x_dist
call teleport
jmp kami_end

kami_end:
popad
jmp 017FD730 //original call

02107C48+68:
dd kami

[disable]
02107C48+68: // 017DF095 ref: 8B ? ? FF ? 8B ? B8 ? ? ? ? F7 ? C1 ? ? 8B ? C1 ? ? 03 ? 83 ? ? 74 ? 81 ? ? ? ? ? 75 ? 80 ? ? ? ? ? ? 74
dd 017FD730

dealloc(teleport)
dealloc(get_mob_pos)
dealloc(kami)

and it work for a little time, and then, it dc me. there's a way to fix the dc?

Share this post


Link to post

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×