[Release] New KalOnline Bot

04/18/2009 05:39 Gogeta70#61
Uploading v 0.8 right now. Updating the main post with the changelog and new instructions.
04/18/2009 15:54 kevinikill#62
Quote:
Originally Posted by SFX-Cookie View Post
LOL?! Where the fuck do you learn things like these?? oO
you don't want to know that !! xD

b2t

bot works perfect for me :D
04/18/2009 18:38 slayerdeath555#63
Why i cant play kalonline in 800x600...when i select this it throw me in game with full screen
04/18/2009 19:56 BorSti#64
Quote:
Originally Posted by slayerdeath555 View Post
Why i cant play kalonline in 800x600...when i select this it throw me in game with full screen
window mode.....
04/18/2009 20:32 slayerdeath555#65
what? i
04/18/2009 21:59 BorSti#66
800x600 dont meen that u play in window mode / in full screen ....

1024*786
800*600

both are sizes of graficcash ( well not realy cash but what ever xD)


full screen
windowmode
are 2 different mod options
04/18/2009 22:35 slayerdeath555#67
how do i set than to play in small window?
04/18/2009 23:29 kevinikill#68
MODE_WINDOW=1
in system.ini
04/19/2009 01:45 painTman#69
works perfect for me ty
04/19/2009 02:55 Gogeta70#70
You're welcome ^_^
04/19/2009 03:05 bloodx#71
Gogeta why not go try to make a packet bot? i think u will succe :)

when u have questions here are for now enough ppl who know something about packets...
04/19/2009 08:22 Agzar#72
its good but sometimes clicks on player xd and autopot could be better ;>
04/19/2009 11:16 chibis#73
thx to hello and unkown person <3

PHP Code:
void spot()
{
    
spotx Player[0].X;
    
spoty Player[0].Y;
    
printf("Spot: X: [%d], Y: [%d]\n",spotx,spoty);
}

void save()
{
    
savex Player[0].X;
    
savey Player[0].Y;
    
printf("Saveplace: X: [%d], Y: [%d]\n",savex,savey);
}

if (
strcmp(input,"botclasse") == 0)
{
    
printf("Enter Botclasse 1, where u want to bot(enter the number and then relog!!!): \n");
    
scanf_s("%d",&botclasse1);
    
printf("Enter Botclasse 2:\n");
    
scanf_s("%d",&botclasse2);
    
printf("Botting at Mobclasse: [%d] and [%d]\n",botclasse1,botclasse2);


if (
strcmp(input,"bot") == 0)
{
    
printf("Run bot\n");
    
Underground();
    
int i;
    
int safex,safey,mob_count;
    
int lowhealth = (maxhp*0.90);
    
int dangerzone = (maxhp*0.40);
    
behead 1;
    
safex Player[0].X;
    
safey Player[0].Y;

    while(
mybot == 1)
    {
        
behead 1;
        
int closest_id 0;
        
float closest_range 65535000;
        
float closest_sqrt_range 65535000;
        
int closest_difxclosest_dify;
        
float sqrt_range 0;
     
        
/*  if (mp<50)
        {
            //run
            char messagetext[255] = "*Very low mana, running to safe.";
            SendDetour(0x11,"Us",last_u,messagetext); 
            behead=0;
            int difx=Player[0].X-safex;
            int dify=Player[0].Y-safey;
            float range=(difx * difx)+(dify * dify);
            float sqrt_range=sqrt(range);
            if (sqrt_range > 50.0)
            {
                unsigned char tempsafex=-(difx/sqrt(range))*30;
                unsigned char tempsafey=-(dify/sqrt(range))*30;
                printf("Very Low mana\n");
                SendDetour(0x15,"Ubbb",last_u,tempsafex,tempsafey,0) ;
                SendDetour(0x21,"Ud",last_u,dropID);
                Sleep(50);
                
                int movestatus = 0;
                Underground();
                while (movestatus == 0) 
                    {
                        int difx=Player[0].X-savex;
                        int dify=Player[0].Y-savey;
                        float range=(difx * difx)+(dify * dify);
                        float sqrt_range=sqrt(range);
                        if (sqrt_range > 20.0)
                            {
                                unsigned char movex=-(difx/sqrt(range))*30;
                                unsigned char movey=-(dify/sqrt(range))*30;
                                char messagetext[255] = "*Low Mana, moving back to saveplace.";
                                SendDetour(0x11,"Us",last_u,messagetext);
                                printf("Moving to Saveplace because low mana\n");
                                SendDetour(0x15,"Ubbb",last_u,movex,movey,0) ;
                                Sleep(50);
                            }
                            else
                                {
                                    printf("Arrived at Saveplace, taking mana ...\n");
                                    movestatus = 1;
                                    Underground();
                                    SendDetour(0x21,"Ud",last_u,-2091220505);
                                    Sleep(20000);
                                }
                            }
                    }
                continue;
                }*/

        
if (dangerzone hp)
        {
            
//run
            
char messagetext[255] = "*Very low HP, running to safe.";
            
SendDetour(0x11,"Us",last_u,messagetext); 
            
behead=0;
            
int difx=Player[0].X-safex;
            
int dify=Player[0].Y-safey;
            
float range=(difx difx)+(dify dify);
            
float sqrt_range=sqrt(range);
            if (
sqrt_range 50.0)
            {
                
unsigned char tempsafex=-(difx/sqrt(range))*30;
                
unsigned char tempsafey=-(dify/sqrt(range))*30;
                
printf("Very Low HP\n");
                
SendDetour(0x15,"Ubbb",last_u,tempsafex,tempsafey,0) ;
                
SendDetour(0x21,"Ud",last_u,dropID);
                
Sleep(50);
                
int movestatus 0;
                while (
dangerzone hp)
                    {
                        
SendDetour(0x21,"Ud",last_u,dropID);
                    }
                
Underground();
                
                while (
movestatus == 0
                    {
                        
int difx=Player[0].X-savex;
                        
int dify=Player[0].Y-savey;
                        
float range=(difx difx)+(dify dify);
                        
float sqrt_range=sqrt(range);
                        if (
sqrt_range 20.0)
                            {
                                
unsigned char movex=-(difx/sqrt(range))*30;
                                
unsigned char movey=-(dify/sqrt(range))*30;
                                
char messagetext[255] = "*Low HP, moving back to saveplace.";
                                
SendDetour(0x11,"Us",last_u,messagetext);
                                
printf("Moving to Saveplace because low hp\n");
                                
SendDetour(0x15,"Ubbb",last_u,movex,movey,0) ;
                                
SendDetour(0x21,"Ud",last_u,dropID);
                                
Sleep(50);
                            }
                            else
                                {
                                    
printf("Arrived at Saveplace, potting ...\n");
                                    
movestatus 1;
                                    
SendDetour(0x21,"Ud",last_u,dropID);
                                    
Underground();
                                }
                            }
                    }
                continue;
                }
        if (
mobsx == 0)
        {
            
int difx=Player[0].X-safex;
            
int dify=Player[0].Y-safey;
            
float range=(difx difx)+(dify dify);
            
float sqrt_range=sqrt(range);
            if (
sqrt_range 50.0)
            {
                
unsigned char tempsafex=-(difx/sqrt(range))*30;
                
unsigned char tempsafey=-(dify/sqrt(range))*30;
                
printf("No mobs in area\n");
                
SendDetour(0x15,"Ubbb",last_u,tempsafex,tempsafey,0) ;
                
Sleep(50);

                
int movestatus 0;
                
Underground();
                while (
movestatus == 0)
                    {
                        
int difx=Player[0].X-spotx;
                        
int dify=Player[0].Y-spoty;
                        
float range=(difx difx)+(dify dify);
                        
float sqrt_range=sqrt(range);
                        if (
sqrt_range 20.0)
                            {
                                
unsigned char movex=-(difx/sqrt(range))*30;
                                
unsigned char movey=-(dify/sqrt(range))*30;
                                
char messagetext[255] = "*No Mobs, moving back to spot.";
                                
SendDetour(0x11,"Us",last_u,messagetext);
                                
printf("Moving back to Spot\n");
                                
SendDetour(0x15,"Ubbb",last_u,movex,movey,0) ;
                                
Sleep(50);
                            }
                            else
                                {
                                    
printf("Arrived at Spot\n");
                                    
movestatus 1;
                                    
Underground();
                                }
                            }
                    }
                continue;
            }

        
mob_count 0;
        for (
i=0;i<500;i++)
        {
            if (
Mob[i].!= 0)
            {
                if (
Mob[i].HP == 0)
                {
                    
Mob[i].0;
                    continue;
                }
                if (
Mob[i].Classe == botclasse1 || Mob[i].Classe == botclasse2)
                {
                
mob_count++;
                
int difx=Player[0].X-Mob[i].X;
                
int dify=Player[0].Y-Mob[i].Y;
                
float range=(difx difx)+(dify dify);
                
float sqrt_range=sqrt(range);
//                printf("MID:%d X:%d Y:%d Z:%d difx:%d dify:%d range:%f\n",Mob[i].MID,Mob[i].X,Mob[i].Y,Mob[i].Z,difx,dify,range/*, tempx, tempy*/);
                
if (range closest_range)
                {
                    
closest_range range;
                    
closest_id Mob[i].MID;
                    
closest_sqrt_range sqrt_range;
                    
closest_difx difx;
                    
closest_dify dify;
                }
            }
        }
            }
//        printf("Closest Mob: %d\n",closest_id);
//        printf("closest sqrt range %f\n",closest_sqrt_range);
        
if ((playerx == || playerx >= ))
        {
            if (
closest_sqrt_range 50.0)
            {
                if (
Player[0].Classe == 129)
                {
                    
// mage attack, 129 = mage, 0x2b = animation, 0x10 = skill
    //                SendDetour(0x2b,"Ubd",last_u,4,0,closest_id);
    //                SendDetour(0x10,"Ubbd",last_u,4,1,closest_id);

                
}
                else
                {
        
//            printf("%d in attack range\n",closest_id);
                    // physical attack, 128 = knight, 130 = arch, 131 = thief?
                    
SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                    
Sleep(400);
                }
    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
//                Sleep(150);
                
Sleep(100);

    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                // 100 is maybe good for mages but no pa
//                Sleep(100);
//                Sleep(150);
            
}
            else
            {
                
unsigned char tempx=-(closest_difx/sqrt(closest_range))*30;
                
unsigned char tempy=-(closest_dify/sqrt(closest_range))*30;
            
//            signed char tempx=-(closest_difx/sqrt(closest_range))*30;
            //            signed char tempy=-(closest_dify/sqrt(closest_range))*30;
    //            printf("The closest mob is %d so move to it\n",closest_id);
                        // go to closest mob
                
printf("Move to mob\n");
                
SendDetour(0x15,"Ubbb",last_u,tempx,tempy,0) ;
                
Sleep(10);
            }
        }
        if (((
playerx == || playerx >= 2))&&((lowhealth hp)&&(hp dangerzone)))
        {
            if (
closest_sqrt_range 50.0)
            {
                if (
Player[0].Classe == 129)
                {
                    
// mage attack, 129 = mage, 0x2b = animation, 0x10 = skill
    //                SendDetour(0x2b,"Ubd",last_u,4,0,closest_id);
    //                SendDetour(0x10,"Ubbd",last_u,4,1,closest_id);

                
}
                else
                {
        
//            printf("%d in attack range\n",closest_id);
                    // physical attack, 128 = knight, 130 = arch, 131 = thief?
                    
SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                    
SendDetour(0x21,"Ud",last_u,dropID);
                    
Sleep(400);
                }
    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
//                Sleep(150);
                
Sleep(100);

    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                // 100 is maybe good for mages but no pa
//                Sleep(100);
//                Sleep(150);
            
}
            else
            {
                
unsigned char tempx=-(closest_difx/sqrt(closest_range))*30;
                
unsigned char tempy=-(closest_dify/sqrt(closest_range))*30;
            
//            signed char tempx=-(closest_difx/sqrt(closest_range))*30;
            //            signed char tempy=-(closest_dify/sqrt(closest_range))*30;
    //            printf("The closest mob is %d so move to it\n",closest_id);
                        // go to closest mob
                
printf("Move to mob\n");
                
SendDetour(0x15,"Ubbb",last_u,tempx,tempy,0) ;
                
Sleep(10);
            }
        }
    }
    } 
04/19/2009 12:36 iamunknowed#74
Quote:
Originally Posted by chibis View Post
thx to hello and unkown person <3

PHP Code:
void spot()
{
    
spotx Player[0].X;
    
spoty Player[0].Y;
    
printf("Spot: X: [%d], Y: [%d]\n",spotx,spoty);
}

void save()
{
    
savex Player[0].X;
    
savey Player[0].Y;
    
printf("Saveplace: X: [%d], Y: [%d]\n",savex,savey);
}

if (
strcmp(input,"botclasse") == 0)
{
    
printf("Enter Botclasse 1, where u want to bot(enter the number and then relog!!!): \n");
    
scanf_s("%d",&botclasse1);
    
printf("Enter Botclasse 2:\n");
    
scanf_s("%d",&botclasse2);
    
printf("Botting at Mobclasse: [%d] and [%d]\n",botclasse1,botclasse2);


if (
strcmp(input,"bot") == 0)
{
    
printf("Run bot\n");
    
Underground();
    
int i;
    
int safex,safey,mob_count;
    
int lowhealth = (maxhp*0.90);
    
int dangerzone = (maxhp*0.40);
    
behead 1;
    
safex Player[0].X;
    
safey Player[0].Y;

    while(
mybot == 1)
    {
        
behead 1;
        
int closest_id 0;
        
float closest_range 65535000;
        
float closest_sqrt_range 65535000;
        
int closest_difxclosest_dify;
        
float sqrt_range 0;
     
        
/*  if (mp<50)
        {
            //run
            char messagetext[255] = "*Very low mana, running to safe.";
            SendDetour(0x11,"Us",last_u,messagetext); 
            behead=0;
            int difx=Player[0].X-safex;
            int dify=Player[0].Y-safey;
            float range=(difx * difx)+(dify * dify);
            float sqrt_range=sqrt(range);
            if (sqrt_range > 50.0)
            {
                unsigned char tempsafex=-(difx/sqrt(range))*30;
                unsigned char tempsafey=-(dify/sqrt(range))*30;
                printf("Very Low mana\n");
                SendDetour(0x15,"Ubbb",last_u,tempsafex,tempsafey,0) ;
                SendDetour(0x21,"Ud",last_u,dropID);
                Sleep(50);
                
                int movestatus = 0;
                Underground();
                while (movestatus == 0) 
                    {
                        int difx=Player[0].X-savex;
                        int dify=Player[0].Y-savey;
                        float range=(difx * difx)+(dify * dify);
                        float sqrt_range=sqrt(range);
                        if (sqrt_range > 20.0)
                            {
                                unsigned char movex=-(difx/sqrt(range))*30;
                                unsigned char movey=-(dify/sqrt(range))*30;
                                char messagetext[255] = "*Low Mana, moving back to saveplace.";
                                SendDetour(0x11,"Us",last_u,messagetext);
                                printf("Moving to Saveplace because low mana\n");
                                SendDetour(0x15,"Ubbb",last_u,movex,movey,0) ;
                                Sleep(50);
                            }
                            else
                                {
                                    printf("Arrived at Saveplace, taking mana ...\n");
                                    movestatus = 1;
                                    Underground();
                                    SendDetour(0x21,"Ud",last_u,-2091220505);
                                    Sleep(20000);
                                }
                            }
                    }
                continue;
                }*/

        
if (dangerzone hp)
        {
            
//run
            
char messagetext[255] = "*Very low HP, running to safe.";
            
SendDetour(0x11,"Us",last_u,messagetext); 
            
behead=0;
            
int difx=Player[0].X-safex;
            
int dify=Player[0].Y-safey;
            
float range=(difx difx)+(dify dify);
            
float sqrt_range=sqrt(range);
            if (
sqrt_range 50.0)
            {
                
unsigned char tempsafex=-(difx/sqrt(range))*30;
                
unsigned char tempsafey=-(dify/sqrt(range))*30;
                
printf("Very Low HP\n");
                
SendDetour(0x15,"Ubbb",last_u,tempsafex,tempsafey,0) ;
                
SendDetour(0x21,"Ud",last_u,dropID);
                
Sleep(50);
                
int movestatus 0;
                while (
dangerzone hp)
                    {
                        
SendDetour(0x21,"Ud",last_u,dropID);
                    }
                
Underground();
                
                while (
movestatus == 0
                    {
                        
int difx=Player[0].X-savex;
                        
int dify=Player[0].Y-savey;
                        
float range=(difx difx)+(dify dify);
                        
float sqrt_range=sqrt(range);
                        if (
sqrt_range 20.0)
                            {
                                
unsigned char movex=-(difx/sqrt(range))*30;
                                
unsigned char movey=-(dify/sqrt(range))*30;
                                
char messagetext[255] = "*Low HP, moving back to saveplace.";
                                
SendDetour(0x11,"Us",last_u,messagetext);
                                
printf("Moving to Saveplace because low hp\n");
                                
SendDetour(0x15,"Ubbb",last_u,movex,movey,0) ;
                                
SendDetour(0x21,"Ud",last_u,dropID);
                                
Sleep(50);
                            }
                            else
                                {
                                    
printf("Arrived at Saveplace, potting ...\n");
                                    
movestatus 1;
                                    
SendDetour(0x21,"Ud",last_u,dropID);
                                    
Underground();
                                }
                            }
                    }
                continue;
                }
        if (
mobsx == 0)
        {
            
int difx=Player[0].X-safex;
            
int dify=Player[0].Y-safey;
            
float range=(difx difx)+(dify dify);
            
float sqrt_range=sqrt(range);
            if (
sqrt_range 50.0)
            {
                
unsigned char tempsafex=-(difx/sqrt(range))*30;
                
unsigned char tempsafey=-(dify/sqrt(range))*30;
                
printf("No mobs in area\n");
                
SendDetour(0x15,"Ubbb",last_u,tempsafex,tempsafey,0) ;
                
Sleep(50);

                
int movestatus 0;
                
Underground();
                while (
movestatus == 0)
                    {
                        
int difx=Player[0].X-spotx;
                        
int dify=Player[0].Y-spoty;
                        
float range=(difx difx)+(dify dify);
                        
float sqrt_range=sqrt(range);
                        if (
sqrt_range 20.0)
                            {
                                
unsigned char movex=-(difx/sqrt(range))*30;
                                
unsigned char movey=-(dify/sqrt(range))*30;
                                
char messagetext[255] = "*No Mobs, moving back to spot.";
                                
SendDetour(0x11,"Us",last_u,messagetext);
                                
printf("Moving back to Spot\n");
                                
SendDetour(0x15,"Ubbb",last_u,movex,movey,0) ;
                                
Sleep(50);
                            }
                            else
                                {
                                    
printf("Arrived at Spot\n");
                                    
movestatus 1;
                                    
Underground();
                                }
                            }
                    }
                continue;
            }

        
mob_count 0;
        for (
i=0;i<500;i++)
        {
            if (
Mob[i].!= 0)
            {
                if (
Mob[i].HP == 0)
                {
                    
Mob[i].0;
                    continue;
                }
                if (
Mob[i].Classe == botclasse1 || Mob[i].Classe == botclasse2)
                {
                
mob_count++;
                
int difx=Player[0].X-Mob[i].X;
                
int dify=Player[0].Y-Mob[i].Y;
                
float range=(difx difx)+(dify dify);
                
float sqrt_range=sqrt(range);
//                printf("MID:%d X:%d Y:%d Z:%d difx:%d dify:%d range:%f\n",Mob[i].MID,Mob[i].X,Mob[i].Y,Mob[i].Z,difx,dify,range/*, tempx, tempy*/);
                
if (range closest_range)
                {
                    
closest_range range;
                    
closest_id Mob[i].MID;
                    
closest_sqrt_range sqrt_range;
                    
closest_difx difx;
                    
closest_dify dify;
                }
            }
        }
            }
//        printf("Closest Mob: %d\n",closest_id);
//        printf("closest sqrt range %f\n",closest_sqrt_range);
        
if ((playerx == || playerx >= ))
        {
            if (
closest_sqrt_range 50.0)
            {
                if (
Player[0].Classe == 129)
                {
                    
// mage attack, 129 = mage, 0x2b = animation, 0x10 = skill
    //                SendDetour(0x2b,"Ubd",last_u,4,0,closest_id);
    //                SendDetour(0x10,"Ubbd",last_u,4,1,closest_id);

                
}
                else
                {
        
//            printf("%d in attack range\n",closest_id);
                    // physical attack, 128 = knight, 130 = arch, 131 = thief?
                    
SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                    
Sleep(400);
                }
    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
//                Sleep(150);
                
Sleep(100);

    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                // 100 is maybe good for mages but no pa
//                Sleep(100);
//                Sleep(150);
            
}
            else
            {
                
unsigned char tempx=-(closest_difx/sqrt(closest_range))*30;
                
unsigned char tempy=-(closest_dify/sqrt(closest_range))*30;
            
//            signed char tempx=-(closest_difx/sqrt(closest_range))*30;
            //            signed char tempy=-(closest_dify/sqrt(closest_range))*30;
    //            printf("The closest mob is %d so move to it\n",closest_id);
                        // go to closest mob
                
printf("Move to mob\n");
                
SendDetour(0x15,"Ubbb",last_u,tempx,tempy,0) ;
                
Sleep(10);
            }
        }
        if (((
playerx == || playerx >= 2))&&((lowhealth hp)&&(hp dangerzone)))
        {
            if (
closest_sqrt_range 50.0)
            {
                if (
Player[0].Classe == 129)
                {
                    
// mage attack, 129 = mage, 0x2b = animation, 0x10 = skill
    //                SendDetour(0x2b,"Ubd",last_u,4,0,closest_id);
    //                SendDetour(0x10,"Ubbd",last_u,4,1,closest_id);

                
}
                else
                {
        
//            printf("%d in attack range\n",closest_id);
                    // physical attack, 128 = knight, 130 = arch, 131 = thief?
                    
SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                    
SendDetour(0x21,"Ud",last_u,dropID);
                    
Sleep(400);
                }
    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
//                Sleep(150);
                
Sleep(100);

    
//            printf("%d in attack range\n",closest_id);
//                SendDetour(0x0F,"Ubdd",last_u,1,closest_id,lastweapon);
                // 100 is maybe good for mages but no pa
//                Sleep(100);
//                Sleep(150);
            
}
            else
            {
                
unsigned char tempx=-(closest_difx/sqrt(closest_range))*30;
                
unsigned char tempy=-(closest_dify/sqrt(closest_range))*30;
            
//            signed char tempx=-(closest_difx/sqrt(closest_range))*30;
            //            signed char tempy=-(closest_dify/sqrt(closest_range))*30;
    //            printf("The closest mob is %d so move to it\n",closest_id);
                        // go to closest mob
                
printf("Move to mob\n");
                
SendDetour(0x15,"Ubbb",last_u,tempx,tempy,0) ;
                
Sleep(10);
            }
        }
    }
    } 




















nicht jeder kriegt so nen tollen bot hin wie du chib... :D hf :X welches lvl ist dein kn mittlerweile... :X
04/19/2009 12:37 bloodx#75
chibis why machste nicht einfach nen eigenen Thread auf mit dem ganzen Projekt? o.O Das du dein Snippet überall postest hat auch kein sin xD