Uploading v 0.8 right now. Updating the main post with the changelog and new instructions.
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_difx, closest_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].X != 0)
{
if (Mob[i].HP == 0)
{
Mob[i].X = 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 == 1 || playerx >= 2 ))
{
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 == 1 || 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);
}
}
}
}
Quote:
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_difx, closest_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].X != 0)
{
if (Mob[i].HP == 0)
{
Mob[i].X = 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 == 1 || playerx >= 2 ))
{
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 == 1 || 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);
}
}
}
}