Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Kal Online
You last visited: Today at 15:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



how to run to mob [bot]

Discussion on how to run to mob [bot] within the Kal Online forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2005
Posts: 112
Received Thanks: 23
how to run to mob [bot]

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 ?
nonosocr1986 is offline  
Old 10/07/2012, 12:34   #2
 
elite*gold: 0
Join Date: Oct 2010
Posts: 159
Received Thanks: 73
It's totally sux atm cuz normal hit & skill are server sided.
Take a look at meak1 sources.
mohm195 is offline  
Thanks
1 User
Old 10/07/2012, 12:43   #3
 
elite*gold: 0
Join Date: Oct 2005
Posts: 112
Received Thanks: 23
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 .
nonosocr1986 is offline  
Old 10/07/2012, 20:11   #4
 
elite*gold: 0
Join Date: Oct 2007
Posts: 1,255
Received Thanks: 200
nah just use mages and use cd with swiching skillz
KillerExtreme is offline  
Thanks
1 User
Old 10/08/2012, 00:38   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 915
Received Thanks: 134
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.
hehepwnz is offline  
Thanks
1 User
Old 10/08/2012, 10:25   #6
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,979
Received Thanks: 270
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 ^^)
katze123 is offline  
Thanks
1 User
Old 10/08/2012, 10:48   #7
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
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);
}
}

meak1 is offline  
Thanks
1 User
Old 10/08/2012, 16:53   #8
 
elite*gold: 0
Join Date: Jan 2009
Posts: 915
Received Thanks: 134
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
hehepwnz is offline  
Thanks
1 User
Old 10/08/2012, 22:23   #9
 
elite*gold: 0
Join Date: Oct 2005
Posts: 112
Received Thanks: 23
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
nonosocr1986 is offline  
Old 10/08/2012, 23:19   #10
 
elite*gold: 0
Join Date: Jan 2009
Posts: 915
Received Thanks: 134
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;
}
hehepwnz is offline  
Old 10/09/2012, 03:06   #11
 
elite*gold: 0
Join Date: Oct 2005
Posts: 112
Received Thanks: 23
Quote:
Originally Posted by hehepwnz View Post
found that source
that's fabulous !! tyvm =] , thank u all guys
nonosocr1986 is offline  
Old 10/14/2012, 01:36   #12
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,979
Received Thanks: 270
yo so i dont have to post my source anymore xD
katze123 is offline  
Old 10/18/2012, 15:37   #13
 
elite*gold: 0
Join Date: Oct 2005
Posts: 112
Received Thanks: 23
anyone can get me this function ? "SearchPattern" , i found alot but all work with masks
nonosocr1986 is offline  
Old 11/05/2012, 17:16   #14
 
elite*gold: 0
Join Date: Nov 2012
Posts: 10
Received Thanks: 0
Sorry for bumping this1, but nonosocr1986:

Any luck getting it to look real?
Juhnit is offline  
Old 11/06/2012, 16:45   #15
 
elite*gold: 0
Join Date: Oct 2005
Posts: 112
Received Thanks: 23
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 **** 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
nonosocr1986 is offline  
Thanks
1 User
Reply




All times are GMT +1. The time now is 15:14.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.