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:
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 ^^
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:
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"...
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); }
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
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:
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
*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!=x || 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..
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.
[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