Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Kal Online
You last visited: Today at 16:07

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

Advertisement



[Question]Walk with packets.

Discussion on [Question]Walk with packets. within the Kal Online forum part of the MMORPGs category.

Reply
 
Old   #1
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
[Question]Walk with packets.

Hey guys/ladies..
because i don't know how to make a bot....what means i don't know...i know but i still can't do it...no enough experience.
so i think i try to start only to walk with packets.
i try to make a "walk-hack", that means:
PHP Code:
                int difx=Player[0].X-ItemX;
                
int dify=Player[0].Y-ItemY;
                
float range=difx*difx+dify*dify;
                
float sqrt_range=sqrt(range);
                
unsigned char tempitemx=-(difx/sqrt(range))*30;
                
unsigned char tempitemy=-(dify/sqrt(range))*30;
                
printf("Item dropped [%d] [%d , %d]\n",id,x,y);
                
printf("Walk to Item...\n");
                
SendDetour(0x15,"bbb",tempitemx,tempitemy,0); 
as you can see in the code i try to walk to items which was dropped in my near.
but there are still bugs i can't fix.
ex.:
my character walking.....yeah i was surprised he walking...but not to the items....he walking everywhere.
(baaad english...)
i don't know why.
Player[0].X-ItemX
Player[0].Y-ItemY
...
is right or not?
Player[0].Z i've set away....i change it to 0.
because when i try to sniff my Z-Coordinate it nothing changed to the actually Z-Coordinate....but 0 can work or not?
--
okay lange rede kurzer sinn
--
the only one thing i want to ask you is:
what i've to changed in my code that my character go to the items?
--
Thank you for reading.
Diamond
kalhacker9000 is offline  
Old 04/18/2009, 19:57   #2
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
wollt dir gerade ne pm schicken auf deine pm frage, warte kurz^^
meak1 is offline  
Old 04/18/2009, 20:01   #3
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
jo^^
kalhacker9000 is offline  
Old 04/19/2009, 11:13   #4
 
elite*gold: 20
Join Date: Apr 2008
Posts: 820
Received Thanks: 177
hab doch ne source gepostet, benutz die doch
chibis is offline  
Old 04/19/2009, 12:56   #5
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
ich hab die auch benutzt nur leider geht das bei mir nicht....also es geht schon....aber er läuft weder zu den mobs hin, noch in die safezone, noch zu gedroppten items....
es sieht eher so aus
Packet Type: 0x15 Byte: Ubbb
U: 0
b: 15
b: 354
b: 0

und er läuft in alle möglichen richtungen nur nich dahin wo er soll...
kalhacker9000 is offline  
Old 04/19/2009, 12:59   #6
 
Mahatma's Avatar
 
elite*gold: 281
Join Date: Oct 2007
Posts: 6,248
Received Thanks: 886
difx und dify haste doch...send doch einfach immer 255 und ziehs vom difx/dify ab bis die beiden 0 sind....wenns kleiner als 255 is sendest du noch rest....
Mahatma is offline  
Old 04/19/2009, 13:12   #7
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
Quote:
Originally Posted by Mahatma View Post
difx und dify haste doch...send doch einfach immer 255 und ziehs vom difx/dify ab bis die beiden 0 sind....wenns kleiner als 255 is sendest du noch rest....
PHP Code:
if (packet[2] == 0x36)
{
DWORD itemid,x,y,itemX,itemY;
memcpy((void*)&itemid,(void*)((DWORD)packet+5),4);
memcpy((void*)&x,(void*)((DWORD)packet+5+4),4);
memcpy((void*)&y,(void*)((DWORD)packet+5+4+4),4);
itemX=x;
itemY=y;
                
int difx=Player[0].X-itemX;
                
int dify=Player[0].Y-itemY;
                
float range=difx*difx+dify*dify*1.0;
                
float sqrt_range=sqrt(range);
                
unsigned char tempitemx=-(difx/sqrt(range))*30;
                
unsigned char tempitemy=-(dify/sqrt(range))*30;
                
printf("Item dropped [%d] [%d , %d]\n",itemid,itemX,itemY);
if (
sqrt(range) < 15)
{
SendDetour(0x20,"ddd",itemid,itemX/32,itemY/32);
printf("Item picked...\n");
}
else
{
printf("Item too far away...walk to item...\n");
SendDetour(0x15,"bbb",tempitemx,tempitemy,0);
SendDetour(0x20,"ddd",itemid,itemX/32,itemY/32); 
das ist mein bisheriger code...
ich weiß jetzt nicht wie du das meinst.....


edit:
meinste jetzt 255-difx, 255-dify ??
kalhacker9000 is offline  
Old 04/19/2009, 14:19   #8
 
elite*gold: 0
Join Date: Mar 2008
Posts: 96
Received Thanks: 3
hab genau das gleiche problem. und ich schnall nich warums nicht geht..
hab eben auch die differenz zwischen ziel und eigener position gebildet. und sende dann 0x15 mit den variable. dabei kommt dann aber nur müll raus. der char bewegt sich zwar aber nich so wie er soll. mein problem ist allerdings auch das ich irgendwie warten muss bis der bot mit dem laufen fertig ist. sleep() ist ungünstig, da verabschiedet sich kal.

achja, müsste man bei der differenz nicht eigentlich ziel-koord - eigene-koord. rechnen? anstatt eigene-koord. - ziel-koord.

PHP Code:
    Xdif Mob[i].X-PlayerX
    
Ydif Mob[i].Y-PlayerY;

    
SendPacket(0x15,"bbb",Xdif,Ydif,0);    //walkstop
    
    
PlayerX += Xdif;
    
PlayerY += Ydif
Grabgewalt is offline  
Old 04/19/2009, 14:24   #9
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
hm ich weiß schon so ungefähr wie mahatma meint, wenn man X in minus berreich läuft und Y ,schreibt er 255 oder 250 oder so, man rechnet 256 - 255 = 1, 256 - 250 = 6 dann läuft er 1 in minus oder 6 halt aber kp muss noch kurz überlegen ;D
meak1 is offline  
Old 04/19/2009, 14:39   #10
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
@Grabgewalt
ich glaub dein code ist komplett für die tonne...

PHP Code:
    Xdif Mob[i].X-PlayerX
    
Ydif Mob[i].Y-PlayerY;

    
SendPacket(0x15,"bbb",Xdif,Ydif,0);    //walkstop 
    
------
    
Xdif PlayerX-MobX
    Ydif 
PlayerY-MobY 
ich weiß nicht ob sqrt, also die quadratwurzel ausrechnen, umbedingt notwendig ist aber
PHP Code:
    Xdif PlayerX-MobX
    Ydif 
PlayerY-MobY 
reicht doch nicht alleine aus oder?

edit:
hier mal der link von kalhack11....@grabgewalt da kannst dir ein wenig ideen raussammeln. da ist auch erst die eigene position-die andere
kalhacker9000 is offline  
Old 04/19/2009, 14:43   #11
 
elite*gold: 0
Join Date: Mar 2008
Posts: 96
Received Thanks: 3
hm naja, soweit ich weiß wird bei 0x15 ja nur die differenz gesendet. also das was man + oder - auf x,y,z läuft. aber naja.. ka
nebenbei, dein code ist ja im grunde genau das gleiche nur das du noch was mit der range machst. da ich aber nur erstmal laufen will interessiert es mich nicht ob das ziel schon in meiner range ist oder nicht.
Grabgewalt is offline  
Old 04/19/2009, 14:57   #12
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
okay hast recht....naja bin ersma back in reallife heute abend weiter daran "arbeiten"......
kalhacker9000 is offline  
Old 04/19/2009, 16:26   #13
 
Mahatma's Avatar
 
elite*gold: 281
Join Date: Oct 2007
Posts: 6,248
Received Thanks: 886
der maximale x/y/z wert, der pro 0x14/0x15 packet gesendet werden kann is 255
ihr müsst das also auf mehrere packets aufteilen....geht net alles in einem packet^^
Mahatma is offline  
Old 04/19/2009, 16:44   #14
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
joa so ich guck jez mal zum mob laufen ;S@Grabwalt du hast recht mit MobX - PlayerX
ich kriege es zwar hin das er in richtung des items läuft aber ich muss das noch i-wie mit gettickcount() checken ;S
meak1 is offline  
Old 04/19/2009, 16:46   #15




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
meak dann poste es halt für die anderen xD damit die probieren können ihre bots oder what ever weiter zu machen
bloodx is offline  
Reply


Similar Threads Similar Threads
[TuT]Walk with packets.
08/02/2009 - Kal Hacks, Bots, Cheats & Exploits - 19 Replies
Hey guys, yes i make a tut. i'm not the best in making Tutorials....of course not for Packets. but i try to do it so "noobs" can read it and don't have to ask. So here we go: Walk in Kalonline is, i think, "simple". A walk packet looks like this: PACKET TYPE: 0x15 FORMAT: bbb b: 1
[Question] walk, attack
07/16/2009 - Kal Online - 9 Replies
hello everyone! i got a question: i am sick of it... its not moving directly to where i need! its always missing here is my currect code for the moving to dropped item: and plzzzzzzzzzzzzzz help me if (buf2 == 0x36) { DWORD itemid,x,y;
[Hilfe] Packets Mob Walk
06/03/2009 - Kal Online - 32 Replies
Hello all, after arround 4-5 Hours of hard learning, my bot works very simple. Now i try to fix, that my Bot beheads all died mobs arround me... There should be something like a range arround 50. For Pick, it works. difference between x,y and some math ^^. After a Mobs spawn / apear, i get x,y coords. But they walk arround. And thats the Problem. I recive 1 Packet (for exampe: Mob move: x=2 y=4) 3-4 times. How can i fix that problem? My Try: if(lastMoveId!=id || lastMoveX != x ||...
Walk Packets
05/18/2009 - Kal Online - 15 Replies
So ich hab mir heute in der Schule (ist eh nix los nurnoch zumsitzen nächste Woche Prüfungen) mir das Walk system von kal durch den kopf gehen lassen....mir fiel auf das ich vieles nicht verstanden habe.... ######### ######### ####X#### ######### ######### X steht jetzt für Null jedes "#" steht für die coordinate eins alles was rechts oben neben dem x ist ist postitiv, alles rechts unten negativ genauso wie links unten und links oben.
packets tut (question^^)
04/14/2009 - Kal Online - 21 Replies
hey guy im "hacking" realy long kalonline. But Just with Uce and i learned all from tuts from this forum. But since i started "hacking" everybody said that u can hack much better with packets. But i dont know how xD. I searched long in this forum for tuts but didnt find one that explained everything. Would be nice if someone make one. greez Nightmare



All times are GMT +2. The time now is 16:07.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.