Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Kal Online
You last visited: Today at 19:40

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

Advertisement



[Hilfe] Packets Mob Walk

Discussion on [Hilfe] Packets Mob Walk within the Kal Online forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 208
Received Thanks: 24
[Hilfe] Packets Mob Walk

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:
PHP Code:
if(lastMoveId!=id || lastMoveX != || lastMoveY != y//|| GetTickCount()< (lastMoveTime+150)) 
but i think i miss / count to much or less packets.

after getting aggro, i run around a little bit, kill the mob nearly me, and difference x is arround 8000

... Hope u can understand my english
Doofy is offline  
Old 05/28/2009, 10:57   #2
 
kalhacker9000's Avatar
 
elite*gold: 0
Join Date: Dec 2006
Posts: 648
Received Thanks: 342
why you don't do it with target behead? oO
sniff the mobid which you attack, then check if the died mob == target and then send the beheadpacket.
kalhacker9000 is offline  
Old 05/28/2009, 11:33   #3
 
elite*gold: 0
Join Date: Jun 2007
Posts: 259
Received Thanks: 17
i think his problem is, that he gets the right coordinates for a mob, if he spawns.

but if the mob walks around, the packet, that the mob walks is recieved more than once.
if u add all movements of the mob, u get the wrong coordinate because some packets are recieved too much..

that is my problem, too. but i dont want to behead, i want to walk to a mob.. but i cant walk to the right position ^^
cheater-.- is offline  
Old 05/28/2009, 12:33   #4
 
elite*gold: 0
Join Date: Dec 2008
Posts: 208
Received Thanks: 24
Quote:
Originally Posted by kalhacker9000 View Post
why you don't do it with target behead? oO
sniff the mobid which you attack, then check if the died mob == target and then send the beheadpacket.
ill try a splashybot.. but i dont want to behead alls mobs in d1 ^^. Only mobs arround me.

so i have no "targetmob"
Doofy is offline  
Old 05/28/2009, 13:02   #5
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,979
Received Thanks: 270
Quote:
Originally Posted by Doofy View Post
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:
PHP Code:
if(lastMoveId!=id || lastMoveX != || lastMoveY != y//|| GetTickCount()< (lastMoveTime+150)) 
but i think i miss / count to much or less packets.

after getting aggro, i run around a little bit, kill the mob nearly me, and difference x is arround 8000

... Hope u can understand my english
lastmoveid!=id ... so if the mob moves again, it wont be recorded, delete that thing... because we can say:
Mob1 moves 3x and 2y
Mob1 moves -3x and 5y
-> same mobid... so delete "lastmoveid!=id"...
katze123 is offline  
Old 05/28/2009, 13:18   #6
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
the same thread started here again, w8 i search thread

EDIT: i have it ^^

PHP Code:
if(prevxplayer!=|| prevyplayer != || prevPID!=Player[i].PID)
                {
                
prevxplayer=x;
                
prevyplayer=y;
                
prevPID=Player[i].PID;

                
Player[i].X+=x;
                
Player[i].Y+=y;
                
Player[i].Z+=z;
                } 
the same u can make with mobs ;>
meak1 is offline  
Old 05/28/2009, 14:09   #7
 
elite*gold: 0
Join Date: Dec 2008
Posts: 208
Received Thanks: 24
Quote:
Originally Posted by katze123 View Post
lastmoveid!=id ... so if the mob moves again, it wont be recorded, delete that thing... because we can say:
Mob1 moves 3x and 2y
Mob1 moves -3x and 5y
-> same mobid... so delete "lastmoveid!=id"...
if id is the same, but x or y is different it execute the if-block..

@meak1 danke. ist doch genau das was ich auch mach oder?
gibt nicht irgendwie eine id, die mitgesendet wird? kal-client muss es ja auch erkennen... ich sniff nochmal mit. vllt finde ich ja sowas


edit:
PHP Code:
for (int i=0;i<500;i++)
        {
            if (
mob[i].MID == id)
            {
                
signed char x,y;
                
memcpy((void*)&(x),(void*)((DWORD)buf2+3+4),1);
                
memcpy((void*)&(y),(void*)((DWORD)buf2+3+4+1),1);
                
//if(debug==0) { printf("Mob move, old:ID:%d x%d y%d\n",lastMoveId,lastMoveX,lastMoveY); }
                
                
if(lastMoveId!=id || lastMoveX != || lastMoveY != y//|| GetTickCount()< (lastMoveTime+150))
                
{
                    if(
debug==1) { printf("Mob move, change:ID:%d x%d y%d\n",id,x,y); }
                    
mob[i].X+= (lastMoveX=x);
                    
mob[i].Y+= (lastMoveY=y);
                    
lastMoveId=id;                            
                }
                else { if(
debug==1) {printf("dropped: ID:%d x%d y%d\n",id,x,y); } }
                break;
            }
        } 
ich verlier oder zähl immernoch doppelt...
Doofy is offline  
Old 05/28/2009, 15:34   #8
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
PHP Code:
if(PrevMobx!=|| PrevMoby != || PrevMID!=Mob[i].MID)
                {
                
PrevMobx=x;
                
PrevMoby=y;
                
PrevMID=Mob[i].MID;

                
Mob[i].X+=x;
                
Mob[i].Y+=y;
                } 
meak1 is offline  
Old 05/29/2009, 15:44   #9
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,979
Received Thanks: 270
und was ist wenn sich ein mob 2 ma hintereinander bewegt? >.>
katze123 is offline  
Old 05/29/2009, 15:48   #10
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
es läuft glaube nie gleich glaube ;O X: +1 Y:+1 > X: +2 Y:+1 bin mir nich 100% sicher aber wenn ichs so mache läuft er immer richtig zum mob...
meak1 is offline  
Old 05/29/2009, 16:12   #11
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,979
Received Thanks: 270
nein.. ich meine wenn einfach das selbe mob rennt.. also ID bleibt gleich, xy nich...
d.h. dann ja dass er das auch nich zählt :P
katze123 is offline  
Old 05/29/2009, 17:09   #12
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
ja als ob ich dich nich verstehe^^ ich meinte nur der mob läuft nicht immer gleich große schritte zu dir glaube ich aber wie gesagt nich 100% sicher , aber es klappt damit super also er läuft eig. immer richtig zum mob ;O
meak1 is offline  
Old 05/29/2009, 17:25   #13
 
elite*gold: 0
Join Date: Jun 2007
Posts: 259
Received Thanks: 17
Quote:
Originally Posted by meak1 View Post
PHP Code:
if(PrevMobx!=|| PrevMoby != || PrevMID!=Mob[i].MID)
                {
                
PrevMobx=x;
                
PrevMoby=y;
                
PrevMID=Mob[i].MID;

                
Mob[i].X+=x;
                
Mob[i].Y+=y;
                } 
wtf.. irgendwie lese ich die mobbewegung immernoch falsch mit..ich habe mehreres ausprobiert.. aber manche mobs stehen bei mir anders, als sie wirklich stehen .. wäre es sinnvoll die if-abfrage zu verändern:
PHP Code:
if((PrevMobx!=|| PrevMoby != y) && PrevMID!=Mob[i].MID)
{...} 
somit ollte ich ja nurnioch die bewegungen mitschreiben, die NICHT doppelt kommen, denn es muss eine bewegungsrichtung (x oder y) unterschiedlich sein UND die mobid darf nicht die selbe sein..

stimmt meine überlegung?!.. oder logge ich so wieder doppelte bewegungen oder so mit?.. bitte helfen
cheater-.- is offline  
Old 05/29/2009, 23:02   #14
 
elite*gold: 0
Join Date: Jun 2007
Posts: 259
Received Thanks: 17
*push*
ich hba eine funktion mobMovement.. aber ich bekomme nicht hin, dass ich richtig das Laufen der Mobs mitlogge.. wenn ich dan den mob, der am nähsten bei mir ist attacken wil lande ich immer bei nem falschen..
PHP Code:
void mobMovement(){
    
DWORD id;
    
DWORD x,y;
    
memcpy((void*)&id,(void*)((DWORD)buf2+3),4);
    
memcpy((void*)&(x),(void*)((DWORD)buf2+3+4),1);
    
memcpy((void*)&(y),(void*)((DWORD)buf2+3+4+1),1);
    if((
prevMobx!=|| prevMoby != y) || prevMID!=id){
              
//Mob in meinem Array finden und aktualisieren
        
}

liege ich da so richtig? zu info: prevMob* und prevMID sind globale variablen und werden bei jedem aktualisieren der daten gescheichert .. durch die if abfrage soll das doppelte aktualisieren von einträgen verhindert werden..
cheater-.- is offline  
Old 05/30/2009, 00:17   #15
 
elite*gold: 20
Join Date: Jul 2007
Posts: 1,979
Received Thanks: 270
PHP Code:
if(PrevMobx!=|| PrevMoby != y/* || PrevMID!=Mob[i].MID*/)
                {
                
PrevMobx=x;
                
PrevMoby=y;
            
//    PrevMID=Mob[i].MID;

                
Mob[i].X+=x;
                
Mob[i].Y+=y;
                } 
Machs so...
Denn: Stell dir vor du siehst nur ein monster. Es bewegt sich, sagen wir es hat die ID 123.
Und da bewegt es sicher wieder! aber was ist? es wird nicht gerechnet. Warum? Weil die gleiche ID sich bewegt. Also rausdamit.
2. Fall.
Es gibt 2 Mobs.
Eins bewegt sich mit x5 y4.
Das zweite bewegt sich nun mit x5 y-3.
Huch, die x5 sind gleich. Es wird wieder nichts gerechnet.
=> Speicher für jedes Mob den vorherigen schritt, nicht für alle allgemein.
... Mehr tips geb ich nicht ;]

p.s.
3. Fall:
2 Mobs vorhanden.
1. Mob bewegt sich mit x5 y4.
2. mit ---------------- x3 y4.
Das ist nicht derselbe schritt, aber er würde nach dem obigen code nich berechnet werden. also mach aus dem || ein && .
Also sodass prevx und prevy gleich sein müssen, damits nich berechnet wird.

hoffe das reicht... sonst schreib mir ne PN...
katze123 is offline  
Thanks
1 User
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
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.
[Question]Walk with packets.
04/22/2009 - Kal Online - 53 Replies
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: int difx=Player.X-ItemX; int dify=Player.Y-ItemY; float range=difx*difx+dify*dify; float sqrt_range=sqrt(range); unsigned char tempitemx=-(difx/sqrt(range))*30; ...
packets fürs mixen hilfe pls
10/12/2008 - Kal Online - 3 Replies
hi ich brauch hilfe bei den packets: BYTE MIX = {0x62, G40weap, Armor, Weapon, medicine, money}; woher bekomme ich die IDs fürs g40 weapon und den rest? danke für alle hilfreichen antworten, alle die nich helfen wollen und nur ihren senf dazu geben möchten, lasst es einfach sein, danke



All times are GMT +2. The time now is 19:40.


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.