Code:
if (strcmp(rw,"/spampt") == 0)
{
int you=0;
string STRING;
ifstream infile;
infile.open ("Prince/Spam.txt");
while(infile) // To get you all the lines.
{
getline(infile,STRING); // Saves the line in STRING.
Sleep(10);
for(int name=0;name<=MAX_P;name++)
{
if(STRING==Player[name].szPlayerName)
{
for(int spom=0;spom<350;spom++)
{
SendKoemV2(0x2c,"d",Player[name].dwPlayerUID);
}
}
infile.close();
}
}
}
if (strcmp(rw,"/spamall") == 0)
{
for(int name=1;name<=MAX_P;name++)
{
for(int spom=0;spom<100;spom++)
{
SendKoemV2(0x2c,"d",Player[name].dwPlayerUID);
Sleep(1);
}
Sleep(10);
}
}
if (strcmp(rw,"/spamon") == 0)
{
spam=1;
}
if (strcmp(rw,"/spamoff") == 0)
{
spam=0;
}
if (strcmp(rw,"/drop") == 0)
{
if(drophack != 0 )
{
for(int i = 0 ; i<80 ; i++)
{
SendKoemV2(0x1A,"dd",drophack,1);
Sleep(1);
}
}
else if (drophack == 0 )
{
Kal::ChatBox("[Prince] ",1,"Item ID not taken for drop hack, Press 7.");
}
}
if (strcmp(rw,"/ug") == 0)
{
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
SendKoemV2(0x15,"bbb",0,0,-127);
}
if (strcmp(rw,"/port") == 0)
{
int you=0;
string STRING;
ifstream infile;
infile.open ("Prince/Port.txt");
while(infile) // To get you all the lines.
{
getline(infile,STRING); // Saves the line in STRING.
Sleep(10);
for(int i=0;i<MAX_P;i++)
{
if(STRING==Player[i].szPlayerName)
{
DWORD* coordpointerX = (DWORD*)0x006F3840;
DWORD* coordpointerY = (DWORD*)0x006F3840;
DWORD PX;
DWORD PY;
Memory::MemcpyEx((DWORD)&PX,(((DWORD)*coordpointerX)+0x0000463C),4);
Memory::MemcpyEx((DWORD)&PY,(((DWORD)*coordpointerY)+0x00004644),4);
int difX = Player[i].dwPlayerX - PX;
int difY = Player[i].dwPlayerY - PY;
float range =((difX*difX)+(difY*difY))*1.0;
if(sqrt(range) < 40)
{
Kal::ChatBox("[Prince] ",1,"Player %s is very near.",Player[i].szPlayerName);
}
if((sqrt(range) > 40 ) && (sqrt(range) < 1200))
{
for(int ii=0;ii<11;ii++)
{
unsigned char tempx=(double(difX)/sqrt(range))*30;
unsigned char tempy=(double(difY)/sqrt(range))*30;
//PX += tempx;//Player[0].dwPlayerX
//PY += tempy;//Player[0].dwPlayerY
SendKoemV2(0x15,"bbb",tempx,tempy,0);
if (tempx < 128)
{
PX+=tempx;
}
else
{
if (tempx > 128)
{
minus2=tempx - 256;
PX+=minus2;
}
}
if (tempy < 128)
{
PY+=tempy;
}
else
{
if (tempy > 128)
{
minus2=tempy - 256;
PY+=minus2;
}
}
if(sqrt(range) < 50)
break;
Sleep(5);
}
}
}
}
infile.close();
}
}
if (strcmp(rw,"/count") == 0)
{
NpcCount = 0;
PlayerCount = 0;
Kal::ChatBox("[Prince] ",1,"Player/Npc count resetted.");
}
if (strcmp(rw,"/bot") == 0)
{
if(bOt==0)
{
bOt=1;
}
else
{
bOt=0;
}
}
if(strcmp(rw,"/test12")==0)
{
for(int times=0;times<10;times++)
{
for(int i=0; i<MAX_N;i++)
{
if(Npc[i].dwNpcID != 0)
{
SendKoemV2(0x18,"dbbww",Npc[i].dwNpcID,115,1,410,1);//hex to dec
Sleep(1);
}
}
}
}
}