[Release]Testsystem Source

02/03/2012 18:18 千代子#46
So you can edit your AttackHack.cpp like this ->

Code:
unsigned int __stdcall AttackHackMainThread(void * start_parameter)
{
	while(true)
	{
		Sleep(1);
		if(AttackHackStatus == 1)
		{

			for(size_t i=0;i<Skills.size();i++)
			{
				DWORD SkillID = atoi(Skills[i].c_str());
				if(BotCharacter == Archer)
				{
					switch(SkillID)
					{
					case Stagger:
						Sleep(800);
						break;
					case HeartBreaker:
						Sleep(600);
						break;
					case FocusShot:
						Sleep(1000);
						break;
					case MysteriousArrow:
						Sleep(5000);
						break;
					case LifeAbsorbtion:
						Sleep(6000);
						break;
					case BlowUp:
						Sleep(800);
						break;
					case FlamyArrow:
						Sleep(800);
						break;
					}
				}
				if(BotCharacter == Mage)
				{
					switch(SkillID)
					{
					case Lightning:
						Sleep(600);
						break;
					case Fire:
						Sleep(600);
						break;
					case Ice:
						Sleep(600);
						break;
					case LightningBlow:
						Sleep(600);
						break;
					case LightningSummons:
						Sleep(600);
						break;
					case Thunder:
						Sleep(600);
						break;
					case ShockWave:
						break;
					case SoulDestruction:
						Sleep(6000);
						break;
					case  Hail:
						Sleep(600);
						break;
					}
				}
				CSend::SendKoemV2(0x2b,"b",SkillID);
				CSend::SendKoemV2(0x10,"bbd",SkillID,1,Monster_Target);
			}
			AttackHackStatus-=1;
		}
	}

	return 0;
}
it's just more comfortable

still no good way but better than the one Released ;)
02/03/2012 19:27 RunzelEier#47
Quote:
Originally Posted by MoepMeep View Post
Und nun überleg mal wieviele leute hier damit arbeiten könnten ;P
und jetzt überleg mal wie viele leute hier überhaupt was mit c++ anfangen können :D

Quote:
Originally Posted by 千代子 View Post
Wie BakaBug mal so schön sagte: "BTW ich gebe meine source nur weiter wenn sie scheiße sind Oo
wieso sollte ich gute source weiter geben Oo ? lol..
"
Keine beleidigung, aber schon damals von baka hat sich das nur nach ner lamen entschuldigung angehört :P
02/03/2012 19:54 MoepMeep#48
I posted a way better way in my crappy bot guide thread. Just needs to be adjusted a bit ;o
02/03/2012 21:43 hoseta#49
@MoepMeep.
Hehe i know what i was doing wrong -.-...
I didint put recv for MonsterDisapear thats why it wasnt work, now its gr8, anyway thanks for your advices.

PS:@hello123456 which injector do you use on win7 64bit?
02/03/2012 23:15 hello123456#50
Quote:
Originally Posted by hoseta View Post
@MoepMeep.
Hehe i know what i was doing wrong -.-...
I didint put recv for MonsterDisapear thats why it wasnt work, now its gr8, anyway thanks for your advices.

PS:@hello123456 which injector do you use on win7 64bit?
that one ... took me a while to get a working one xD
02/06/2012 17:32 Fedol#51
Wo ruft der seine C-GUI auf ich find nix in der Testsystem.cpp..
02/09/2012 21:18 pamz12#52
mkay stupid question, but how could i make this command to "return" me the name of the player that disappeared, becouse it returns empty [] value or smth

Quote:
void Kal::PlayerDisappear(char* szBuffer)
{
DWORD PlayerID=*(DWORD*)&szBuffer[3];
for(int i=0; i<=MAX_P;i++)
{
if(Player[i].dwPlayerUID==PlayerID)
{ memset(&Player[i],0,sizeof(Player[i]));

Kal::ChatBox( " test",1,"Player[%s] disappeared",Player[i].szPlayerName);
Player[i].dwPlayerUID=0;
PlayerCount--;
break;

}
}
}
02/09/2012 22:12 Fedol#53
Kann ich ein Packet senden wo ich eine Mana Med benutze?
Denn PostMessage funktioniert bei mir net denn Superkal hat kein Fensternamen und der kann es nicht targen. Hab im Forum gefunden Type: 0x1e Format: Ud - Use Item.
Aber SendKoemV2(0x1e,"Ud",982) funktioniert nicht..
02/09/2012 22:26 MoepMeep#54
@pamz12 Looks like deleting before printing it, could that be? ;)
@Fedol 0x21,"d",ID ist useitem auf pserver ;) Natürlich die uid des items, nicht den index.
02/09/2012 22:31 Fedol#55
Quote:
Originally Posted by MoepMeep View Post
@Fedol 0x21,"d",ID ist useitem auf pserver ;) Natürlich die uid des items, nicht den index.
Hmm an die UID komm ich ja net ran, ausser wenn ich wüsste wie man das Inventar ausliest und dann Medicine da steht...Gibt es keine andere Möglichkeit?
02/10/2012 00:47 MoepMeep#56
0x07/0x09 oder send sniffen bzw direkt inventory packet am anfang auslesen :p
02/10/2012 20:38 pamz12#57
hmmm i tried to set PlayerCount--; almost everywhere, didn't work out well

then i looked up some old sources found this:
HTML Code:
 if (packet[2] == 0x37)
            {
                    //disapear
                    DWORD id;
                    memcpy((void*)&id,(void*)((DWORD)packet+3),4);
                    int i;
                    for (i=0;i<500;i++)
                    {
                            if (Player[i].PID == id)
                            {
                                    printf("Player disapear [PID: %08x Name: %s]\n",id,Player[i].name);
                                    Player[i].X=0; //deactive !
                                    playerx-=1;
                                    break;
                            }
                    }
            }
so i set my example to
PHP Code:

void Kal
::PlayerDisappear(charszBuffer)

{
    
     
    
DWORD PlayerID=*(DWORD*)&szBuffer[3];
    for(
int i=0i<MAX_P;i++)
    {
            
        if(
Player[i].dwPlayerUID==PlayerID)
        {    
memset(&Player[i],0,sizeof(Player[i]));                    
        
        
        
        
Kal::ChatBox"[test]: ",1,"Player[PID: %08x Name: %s] disappeared",PlayerID,Player[i].szPlayerName);    
            
            
Player[i].dwPlayerUID=0;
            
PlayerCount-=1;    
            break;    
    }        
    
            
    }

so i think there's some prob with Player[i].szPlayerName/Player[i].dwPlayerUID=0;
as it prints PID allkay in window

any suggestions what to put in it?

here's appear packet
Code:
void Kal::PlayerAppear(char* szBuffer)
{
	if(PlayerCount <= MAX_P)
	{
	int i;
	for (i = 0;i < MAX_P;i++)
	{
		if (Player[i].dwPlayerUID == 0)
		{
			Player[i].dwPlayerUID=*(DWORD*)&szBuffer[3];
			memcpy((void*)&Player[i].szPlayerName,(void*)((DWORD)szBuffer+7),16);
			Player[i].reserved=strlen(Player[i].szPlayerName);
			Player[i].dwPlayerX=*(DWORD*)&szBuffer[7+Player[i].reserved+2];
			Player[i].dwPlayerY=*(DWORD*)&szBuffer[7+Player[i].reserved+2+4];
			Player[i].dwPlayerZ=*(DWORD*)&szBuffer[7+Player[i].reserved+2+4+4];
			if(dwMyPlayerUID == 0)dwMyPlayerUID=Player[0].dwPlayerUID;
				Kal::ChatBox("[toolkal] ",1,"Player[%s] is in Range @ (%d/%d/%d)",Player[i].szPlayerName,Player[i].dwPlayerX,Player[i].dwPlayerY,Player[i].dwPlayerZ);
				Sleep(1);
			PlayerCount++;
			break; //ender der schleife
		}
	}
	}
}

free advice please :)
02/11/2012 16:50 hoseta#58
Here u have full source with working player disappear, I just added it and tested on Dominion Kal.

for sure u had something wrong with recv.

PS:[FOLDER] kalxoor put in kal folder in settings ini change name= (to kal window name),
open first kalxoor.exe then kalonline, this injector work too on windows 7 64/32 bit tested... ( u need open as administrator in win7 )..(Injector inject just dll with name kalxoor, dll must be in the same folder)

Link ([MIRROR] File Front / Game Front ):
[Only registered and activated users can see links. Click Here To Register...]
02/11/2012 16:56 RunzelEier#59
hwnd can be read out of memory.
no need to get the window title
02/11/2012 17:32 hoseta#60
hmm yes you are right but here i put window read to avoid "ANTI-HACKING PROBLEM",
cuz if u inject ur dll to fast u will get that information. and when i put kal wind check my dll inject after window is activte and can safely inject.

Code:
unsigned int __stdcall MainThread(void * pParams)
{
	//wait to avoid anti-hacking.
	Sleep(4500);
	Kal::ReadSettings();
		while(true)
	{
		hKal = FindWindow(NULL,chWindow_Name);
		SetWindowTextA(hKal,"KalOnline kalxoor");
		hWait = FindWindow(0,"KalOnline kalxoor");
		hKal1 = GetForegroundWindow();
		if (hWait == hKal1) goto endwait;
		Sleep(100);
	}
endwait:;
...
See? if u will put wrong kal window name then while wont end.
I add that cuz i cant use any injector on windows 7 64 bit and i made one,
I wont to play with Sleep shit, 'while' is good for me.