how to run to mob [bot]

10/07/2012 12:23 nonosocr1986#1
hey all , i have troubles making my bot run to mob and then attack it , i've tried searching the forum for such a thing with no success , my bot currently attacks just when a mob attacks me , any ideas ?
10/07/2012 12:34 mohm195#2
It's totally sux atm cuz normal hit & skill are server sided.
Take a look at meak1 sources.
10/07/2012 12:43 nonosocr1986#3
Quote:
Originally Posted by mohm195 View Post
It's totally sux atm cuz normal hit & skill are server sided.
Take a look at meak1 sources.
i got my normal/skill attacks working , i just wanna make it more realistic , i don't wanna attack mobs from long range , i want it to run till it reaches the mob then attacks it .
10/07/2012 20:11 KillerExtreme#4
nah just use mages and use cd with swiching skillz :D
10/08/2012 00:38 hehepwnz#5
0x24://MobMove
0x25://MobMove-Stop
for both: x=chBuffer+3+4 (1 byte) and y=chBuffer+3+4+1 (1 byte)

0x33://Mob Appear
x=chBuffer+3+4+2 (4 bytes) and y=chBuffer+3+4+2+4 (4 bytes)

0x38://Mob Disappear


port(x,y) (you have to calculate coordinates... MovePaket= SendPaket(0x11,"bbb",x,y,z))
attack()

should be enough.
10/08/2012 10:25 katze123#6
nope thats not enough @ hehepwnz. he wants to know the speed of the character => coordinates per time to walk to the mob and attack it, when standing next to him (for other characters who see him)
i'll post a source snippet later (when on my pc ^^)
10/08/2012 10:48 meak1#7
PHP Code:
int WalkToMob(int target){

    while(
true){
    
difx=Mob[target].X-Player[0].X;
    
dify=Mob[target].Y-Player[0].Y;
    
range=((difx*difx)+(dify*dify))*1.0;

        
/*ATTACK IT*/
        
if (sqrt(range) < 33.0)
        {
printf("Attack!\n");
return 
2;
        }
        else
        {
tempx=((difx)/sqrt(range))*32;
tempy=((dify)/sqrt(range))*32;
tempz = (MyHeightDetour(Something(Player[0].X+tempx,0x20),Something(Player[0].Y+tempy,0x20))*10)-Player[0].Z;
PacketSend(0x12,"bbb",tempx,tempy,tempz);
Player[0].X+=tempx;
Player[0].Y+=tempy;
Player[0].Z+=tempz;
//printf("%d %d\n",Player[0].X,Player[0].Y);
if(Mob[target].== 0)
{
return 
1;
}
Sleep(600);
}
}

10/08/2012 16:53 hehepwnz#8
Quote:
Originally Posted by katze123 View Post
nope thats not enough @ hehepwnz. he wants to know the speed of the character => coordinates per time to walk to the mob and attack it, when standing next to him (for other characters who see him)
i'll post a source snippet later (when on my pc ^^)
ye sorry that i didnt post him a full source.
thats why i said he have to CALCULATE coordinates, that include speed, x,y,z ofc.
shouldnt be a problem to find out.
but ye, meak posted it now anyway
10/08/2012 22:23 nonosocr1986#9
Quote:
Originally Posted by meak1 View Post
PHP Code:
int WalkToMob(int target){

    while(
true){
    
difx=Mob[target].X-Player[0].X;
    
dify=Mob[target].Y-Player[0].Y;
    
range=((difx*difx)+(dify*dify))*1.0;

        
/*ATTACK IT*/
        
if (sqrt(range) < 33.0)
        {
printf("Attack!\n");
return 
2;
        }
        else
        {
tempx=((difx)/sqrt(range))*32;
tempy=((dify)/sqrt(range))*32;
tempz = (MyHeightDetour(Something(Player[0].X+tempx,0x20),Something(Player[0].Y+tempy,0x20))*10)-Player[0].Z;
PacketSend(0x12,"bbb",tempx,tempy,tempz);
Player[0].X+=tempx;
Player[0].Y+=tempy;
Player[0].Z+=tempz;
//printf("%d %d\n",Player[0].X,Player[0].Y);
if(Mob[target].== 0)
{
return 
1;
}
Sleep(600);
}
}

can i get an explaination for this function MyHeightDetour ? , thank you all for your support
10/08/2012 23:19 hehepwnz#10
found that source

Quote:
DWORD OrigHeight = SearchPattern("55 8B EC 81 EC 94 00 00 00 D9 45 08 D8 35 ? ? ? ? D9 5D 08",0x00400000,0x007FFFFF);
DWORD MyHeightBack = OrigHeight + 9;

float Naked MyHeightDetour(DWORD x,DWORD y,...)
{
__asm
{
push ebp
mov ebp, esp
sub esp, 94h
jmp MyHeightBack
}
}

DWORD Naked Something(DWORD some,DWORD some2,...)
{
_asm
{
push ebp
mov ebp, esp
push ecx
fild [ebp+0x08]
mov eax, [ebp+0x0C]
shl eax, 0Dh
mov [ebp-0x04], eax
fisub [ebp-0x04]
mov esp, ebp
pop ebp
fstp [ebp-0x04]
mov eax,[ebp-0x04]
retn
}
}

int Height(int X, int Y)
{
return (int)MyHeightDetour(Something(X,0x20),Something(Y, 0x20))*10;
}
10/09/2012 03:06 nonosocr1986#11
Quote:
Originally Posted by hehepwnz View Post
found that source
that's fabulous !! tyvm =] , thank u all guys
10/14/2012 01:36 katze123#12
yo so i dont have to post my source anymore xD
10/18/2012 15:37 nonosocr1986#13
anyone can get me this function ? "SearchPattern" , i found alot but all work with masks
11/05/2012 17:16 Juhnit#14
Sorry for bumping this1, but nonosocr1986:

Any luck getting it to look real?
11/06/2012 16:45 nonosocr1986#15
Quote:
Originally Posted by Juhnit View Post
Sorry for bumping this1, but nonosocr1986:

Any luck getting it to look real?
Well i got it stand in a spot , fight (with skills also) , use scrolls when needed , behade and pick ofc , and some other shit like if u want to mockery mobs when appear for fast fighting or using berserk every 1 min , and i made a list for specified items to pick you know for not picking useless items , that's what i did so far works perfectly but i still cant get it walks like real player