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:
Okay 0x15 is the packet for Move stop.
the bytes are the coordinates which you move. how i can explain it in english....
I'm try to say it like Mahatma say it to me (danke übrigens):
Maybe you stay on
Now Packet 0x15 with byte
appeared. Now you stand on
so the bytes from 0x15 means the steps you walk on the coordinates.
So that's easy i think.....but now the difficult part.
How to make a "bot"?
Okay i'm try to explain it but i can't finish my bot...xD
--
A bot is a program which make things in games automatticly.
So a bot in KalOnline can be very usefull.
You can lvl without do anything.
Behead.
Pick.
Skilluse.
All these things without do anything.
That would be great.
So how to program a Bot?
I'm try to explain it on Autopick.
First thing who appeared is the item.
The program see: "aah a item appeared", and give you information about the item like
so now we come to step two:
now we have to calculate the differenz about the item and us.
so now it can be look like:
difx: 115
dify: 105
--
now calculate the range:
The range is important....but this comes later.
sqrt(ItemRange) means you calculate the square root of the range.
so now calulate the move....
So now you have the steps that your character have to do in KalOnline.
It looks like this:
tempx: 23
tempy: 15
But that's not all....you have calculate the differenz about the item and you. You have calculate the Range and you make the square root about the Range. You have calculate the steps you have to do.
But you must Send a Packet to the Server, so the server knows that your Character have to move.
of course you have to send a packet to pick up the item:
So there are a different other things you have to add this is only a little help for you....cause i'm a noob in this but i want to help other noobs :D
sorry for bad english and thx for reading.
Your
Diamond.
p.s. auf deutsch:
für alle die jetzt meinen rumpöbeln zu müssen und meinen das wäre alles falsch etc....geht kacken und get a reallife.
ich habe dies hier alles selbst aufgeschrieben natürlich hatte ich hilfe und ja mein gott ich bin ein noob darin aber warum sollte ich nicht anderen helfen dürfen? falls was falsch ist sagt es bitte in einem freundlichen ton und helft mir auch beim lernen.
thx to: meak1, BorSti, bloodx, bakabug.
sry wenn ich jemanden vergessen habe :D
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:
PHP Code:
PACKET TYPE: 0x15 FORMAT: bbb
b: 1
b: 0
b: 1
the bytes are the coordinates which you move. how i can explain it in english....
I'm try to say it like Mahatma say it to me (danke übrigens):
Maybe you stay on
PHP Code:
X: 100
Y: 100
Z: 100
PHP Code:
b:1
b:0
b:1
PHP Code:
X: 101
Y: 100
Z: 101
So that's easy i think.....but now the difficult part.
How to make a "bot"?
Okay i'm try to explain it but i can't finish my bot...xD
--
A bot is a program which make things in games automatticly.
So a bot in KalOnline can be very usefull.
You can lvl without do anything.
Behead.
Pick.
Skilluse.
All these things without do anything.
That would be great.
So how to program a Bot?
I'm try to explain it on Autopick.
First thing who appeared is the item.
PHP Code:
if (packet[2] == 0x36)
{
DWORD itemid,x,y;
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);
PHP Code:
ItemID: XYXYXY ItemX: BlubbBla ItemY: BlaBlubb
now we have to calculate the differenz about the item and us.
PHP Code:
int difx=x-Player[0].X;
int dify=y-Player[0].Y;
difx: 115
dify: 105
--
now calculate the range:
PHP Code:
float ItemRange=(difx*difx+dify*dify)*1.0;
DWORD ItemRangesqrt= sqrt(ItemRange);
sqrt(ItemRange) means you calculate the square root of the range.
so now calulate the move....
PHP Code:
unsigned char tempx=difx/ItemRangesqrt)*30;
unsigned char tempy=dify/ItemRangesqrt)*30;
It looks like this:
tempx: 23
tempy: 15
But that's not all....you have calculate the differenz about the item and you. You have calculate the Range and you make the square root about the Range. You have calculate the steps you have to do.
But you must Send a Packet to the Server, so the server knows that your Character have to move.
PHP Code:
SendDetour(0x15,"bbb",tempx,tempy,0);
PHP Code:
SendDetour(0x20,"ddd",ItemID,ItemX/32,ItemY/32
sorry for bad english and thx for reading.
Your
Diamond.
p.s. auf deutsch:
für alle die jetzt meinen rumpöbeln zu müssen und meinen das wäre alles falsch etc....geht kacken und get a reallife.
ich habe dies hier alles selbst aufgeschrieben natürlich hatte ich hilfe und ja mein gott ich bin ein noob darin aber warum sollte ich nicht anderen helfen dürfen? falls was falsch ist sagt es bitte in einem freundlichen ton und helft mir auch beim lernen.
thx to: meak1, BorSti, bloodx, bakabug.
sry wenn ich jemanden vergessen habe :D