You last visited: Today at 21:19
Advertisement
[Release]Testsystem Source
Discussion on [Release]Testsystem Source within the Kal Hacks, Bots, Cheats & Exploits forum part of the Kal Online category.
01/30/2012, 20:35
#31
elite*gold: 0
Join Date: Feb 2008
Posts: 1,105
Received Thanks: 186
hm from experience on crystal for example i set speed (with your system) to 100, which shouldn't be a prob. , as EE speed (EA skill) is much faster...
01/30/2012, 20:44
#32
elite*gold: 0
Join Date: Dec 2009
Posts: 204
Received Thanks: 360
Quote:
Originally Posted by
hoseta
gr8 release and its not so ugly written :P
.. Meh.
Still, thumbs up for the single fact of sharing, @bloodx =]
01/30/2012, 22:00
#33
elite*gold: 0
Join Date: Dec 2008
Posts: 80
Received Thanks: 6
Nicely done!
Could someone post a quick tut. how to do it? :P
Nicely Done!
Could someone post/write a quick tut for newbies?
01/30/2012, 23:56
#34
elite*gold: 0
Join Date: Oct 2007
Posts: 474
Received Thanks: 159
Quote:
Originally Posted by
brotom
Nicely done!
Could someone post a quick tut. how to do it? :P
Nicely Done!
Could someone post/write a quick tut for newbies?
u tried to translate english to english? oO
and for what u need a tut?
01/31/2012, 12:14
#35
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
Quote:
Originally Posted by
brotom
Nicely done!
Could someone post a quick tut. how to do it? :P
Nicely Done!
Could someone post/write a quick tut for newbies?
Quote:
Originally Posted by
bloodx
Guys learn the Basics of C++?
^this
02/03/2012, 14:30
#36
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
could some1 help me with 1 thing?
when mob is disappear or death and i try to search in "for loop < MAX_MOB" for match ID its faill?, -.-,
It seems that it can not find the correct ID.
PS: LA Bot work fine but i need to delate monster from table after kill cuz i wont to attack non exist monster xD.
And one more thing on XP this work sweet, but on win7 after inject i cant even see a welcome message any idea (BIND DONT WORK TOO)?
here is full code:
functions.h
Code:
//------------------------Based on orginal bloodx Source--------------------
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//----------------------------DECLARATION-----------------------------------
#include "stuff.h"
//Chat & Notice message
#define MAX_P 500
#define MAX_MOB 500
extern DWORD Attacker;
unsigned int atCount=0;
unsigned long Notice_add;
unsigned int AutoBehead = 0;
typedef void (__cdecl* Notice_org)(char*, int);
typedef int (__cdecl * Chat_org)(char, char*, int);
BYTE pChat[] = {0x55,0x8B,0xEC,0x83,0x3D,0x48,0x2B,0x86,0x00,0x00,0x74,0x17,0x8B,0x45,0x10,0x50}; // pattern //
char * mChat = "xxx????????xxxx"; // mask //
unsigned long Chat_add = Memory::dwFindPattern( 0x00400000,0x00700000,pChat,mChat);
//end
DWORD SpeedValue = 0;
DWORD dX = 0;
DWORD dY = 0;
#define ID_INFO 9010
const char g_szClassName[] = "toolkal based on bloodx source modify by FANEq";
unsigned int nAttackHack = 0;
unsigned int nLABOT = 0;
DWORD HP0 = 0;
unsigned int MonsterCount=0;
unsigned int PlayerCount=0;
char chWindow_Name[100];
char GameMaster1[26];
char GameMaster2[26];
char GameMaster3[26];
char GameMaster4[26];
char GameMaster5[26];
char GameMaster6[26];
char GameMaster7[26];
char GameMaster8[26];
char GameMaster9[26];
char GameMaster10[26];
DWORD ManaKey;
WPARAM key_Mana;
HWND hwndupdate;
HWND EditBoxA;
HWND EditBoxX;
HWND EditBoxY;
DWORD* dwSpeedpointer = (DWORD*)0x006F3840;
DWORD dwMyPlayerUID=0;
DWORD PlayerNear=1;
DWORD Attackhack_AttackMonster;
//----------------------------end-------------------------------------------
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//---------------------------STRUCT & Function -----------------------------
struct onOFF
{
unsigned int nWinShow;
unsigned int nAutoPick;
unsigned int LOGGED;
onOFF() {
nWinShow = 0;
nAutoPick = 0;
LOGGED = 0;
}
};onOFF SWITCHER;
struct Players {
DWORD dwPlayerUID;
char szPlayerName[255];
DWORD dwPlayerX;
DWORD dwPlayerY;
DWORD dwPlayerZ;
BYTE CharacterType;
int reserved;
};Players Player[MAX_P]={0};
struct Items {
WORD Itemindex;
DWORD dwItemID;
DWORD dwIX;
DWORD dwIY;
DWORD Amount;
};Items Itemx;
struct ActiveMonster{
WORD MonsterID;
DWORD MonsterIndexID;
DWORD mX;
DWORD mY;
DWORD mHp;
};ActiveMonster ActivateMonsters[MAX_MOB];
void Kal::SpeedHack(DWORD Speed){
Memory::MemcpyEx(DWORD(((DWORD)*dwSpeedpointer)+0x00004B14),(DWORD)&Speed,4);
}
DWORD Kal::GetCurHP(DWORD dwAttacker,DWORD dwTarget,WORD dwDamage, bool attacktype){
int i;
for(i=0; i<=MAX_MOB;i++)
{
if(ActivateMonsters[i].MonsterID==dwTarget || ActivateMonsters[i].MonsterID==dwAttacker)
{
if(ActivateMonsters[i].MonsterID==dwTarget)ActivateMonsters[i].mHp -= dwDamage;
break;
}
}
return ActivateMonsters[i].mHp;
}
void Kal::MonsterAppear(char *szBuffer){
int i = 0;
if (MonsterCount < MAX_MOB)
{
while(1){
if(ActivateMonsters[i].MonsterID==0) break;
i++;
}
ActivateMonsters[i].MonsterID = *(DWORD*)&szBuffer[5];
ActivateMonsters[i].MonsterIndexID = *(WORD*)&szBuffer[3];
ActivateMonsters[i].mX = *(DWORD*)&szBuffer[9];
ActivateMonsters[i].mY = *(DWORD*)&szBuffer[9+4];
ActivateMonsters[i].mHp = *(WORD*)&szBuffer[19]; // = *(DWORD*)&szBuffer[19+4]; Hp Current / or Total?
MonsterCount++;
//MessageBox(hwndupdate, "incrased ++", "Information", MB_OK); //TESTED
}
}
void Kal::MonsterDisapear(char *szBuffer){
DWORD MonsterID=*(DWORD*)&szBuffer[3];
for(int i=0; i<=MAX_MOB;i++){
if(ActivateMonsters[i].MonsterID==MonsterID){
MonsterCount--;
memset(&ActivateMonsters[i],0,sizeof(ActivateMonsters[i]));
char szMyString[10] ={0}; // Have enough storage in character array.
sprintf(szMyString, "0x%08x",MonsterID);
//test
MessageBox(NULL, szMyString, TEXT(" dissapear"), MB_OK) ;
break;
}
}
}
void Kal::MonsterMove(char *szBuffer){
DWORD MonsterID = *(DWORD*)&szBuffer[3];
int X= szBuffer[7];
int Y= szBuffer[8];
for(int i=0; i<=MAX_MOB;i++){
if(ActivateMonsters[i].MonsterID==MonsterID){
ActivateMonsters[i].mX+=X;
ActivateMonsters[i].mY+=Y;
break;
}
}
}
void Kal::MonsterDie(char *szBuffer){
DWORD MonsterID=*(DWORD*)&szBuffer[3];
BYTE BehadeState = *(BYTE*)&szBuffer[7];
//ActivateMonsters[i].MonsterID==0
for(int i=0; i<=MAX_MOB;i++){
if(ActivateMonsters[i].MonsterID==MonsterID){
if (AutoBehead == 1 && BehadeState == 0x08){
SendKoemV2(0x10,"bbd",1,1,MonsterID);
}
memset(&ActivateMonsters[i],0,sizeof(ActivateMonsters[i]));
MonsterCount--;
//test
MessageBox(hwndupdate, "decrased --", "Information", MB_OK);
break;
}
}
}
void Kal::ItemDropped(char* szBuffer)
{
if(SWITCHER.nAutoPick==1)
{
Itemx.Itemindex =*(WORD*)&szBuffer[3];
Itemx.dwItemID = *(DWORD*)&szBuffer[5];
Itemx.dwIX = *(DWORD*)&szBuffer[5+4];
Itemx.dwIY = *(DWORD*)&szBuffer[5+4+4];
Itemx.Amount = *(DWORD*)&szBuffer[17];
SendKoemV2(0x20,"ddd",Itemx.dwItemID,Itemx.dwIX/32,Itemx.dwIY/32);
}
}
// When f3 is pressed storm hack
void Kal::StormHack()
{
//cordinates Y and Y read
DWORD_PTR* cordY = reinterpret_cast< DWORD_PTR* >( (*(DWORD_PTR*)0x006F3840) + 0x463C);
DWORD_PTR* cordX = reinterpret_cast< DWORD_PTR* >( (*(DWORD_PTR*)0x006F3840) + 0x4644);
unsigned int SetCordX = *cordX;
unsigned int SetCordY = *cordY;
//end
SendKoemV2(0x10,"bdd",43,SetCordX,SetCordY);
}
void Kal::ChatBox(const char *prefix, int mType, char* mFormat,...)
{
if (!*(DWORD*)0x0070eaf8) { return; }
char* uText = new char[255];
char* mText = new char[255];
DWORD RGBCol;
// DWORD cRGBCol;
DWORD cbCall = 0x00475830;
if (mType == 1) RGBCol = 0x004080ff; //255 128 64 StudentChat Orange
/*
Colours:
Flashy Green : 0x06c40b
Sweet Blue : 0xcd944f
Soft Red : 0x3030ff
Flashy Fuchsia : 0xb337f4
*/
// else { RGBCol = cRGBCol; } // highly destructive ?
va_list args;
va_start(args, mFormat);
vsprintf_s(mText,255,mFormat,args);
va_end(args);
strcpy_s(uText,255,prefix);
strcat_s(uText,255,mText);
__asm
{
mov eax, RGBCol
push eax
mov ecx, uText
push ecx
mov dl, 0x40
push edx
mov ecx, dword ptr ds:[0x0070eaf8]
call cbCall
}
delete[] mText;
delete[] uText;
}
void Kal::Notice(int color,char* mFormat,...){
char* mText = new char[255];
va_list args;
va_start(args, mFormat);
vsprintf_s(mText,255,mFormat,args);
va_end(args);
((Notice_org)Notice_add)(mText,color);
}
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]));
Player[i].dwPlayerUID=0;
PlayerCount--;
break;
}
}
}
void Kal::Login(char* szBuffer)
{
nAttackHack=0;
nLABOT=0;
SWITCHER.nAutoPick=0;
SpeedValue=0;
dwMyPlayerUID=0;
PlayerCount=0;
MonsterCount=0;
AutoBehead = 0;
for(int i = 0;i <= MAX_P;i++)
{
memset(&Player[i],0,sizeof(Player[i]));
memset(&ActivateMonsters[i],0,sizeof(Player[i]));
Player[i].dwPlayerUID=0;
}
}
void Kal::TP(char* szBuffer)
{
}
void Kal::PlayeMove (char *szBuffer){
DWORD PlayerID = *(DWORD*)&szBuffer[3];
int X= szBuffer[7];
int Y= szBuffer[8];
int Z= szBuffer[9];
for(int i=0; i<=MAX_P;i++){
if(Player[i].dwPlayerUID==PlayerID){
Player[i].dwPlayerX+=X;
Player[i].dwPlayerY+=Y;
Player[i].dwPlayerZ+=Z;
//cout << "Monster Move: " << Monsters[ActiveMonsters[i].MonsterIndexID].MonsterName << " Coord: (x,y) :" << ActiveMonsters[i].mX << "," << ActiveMonsters[i].mY << endl;
break;
}
}
}
void Kal::PlayerMoveSit(char *szBuffer){
DWORD PlayerID = *(DWORD*)&szBuffer[3];
if(Player[0].dwPlayerUID==PlayerID){
Player[0].dwPlayerX = *(DWORD *)&szBuffer[7];
Player[0].dwPlayerY = *(DWORD *)&szBuffer[11];
Player[0].dwPlayerZ = *(DWORD *)&szBuffer[15];
}
}
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::Chat(red,"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
}
}
}
}
//----------------------------end-------------------------------------------
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//---------------------kalonline settings load------------------------------
void Kal::SetManaKey()
{
switch (ManaKey)
{
case 0:
key_Mana = 0x30;
break;
case 1:
key_Mana = 0x31;
break;
case 2:
key_Mana = 0x32;
break;
case 3:
key_Mana = 0x33;
break;
case 4:
key_Mana = 0x34;
break;
case 5:
key_Mana = 0x35;
break;
case 6:
key_Mana = 0x36;
break;
case 7:
key_Mana = 0x37;
break;
case 8:
key_Mana = 0x38;
break;
case 9:
key_Mana = 0x39;
break;
}
}
void Kal::ReadSettings()
{
char temp_key[2];
DWORD destSize;
destSize=100;
int x = 0;
if(x==0)
{
GetPrivateProfileString("KalWindow","Name","NULL",chWindow_Name,destSize,"Testsystem/Settings.ini");
x++;
}
GetPrivateProfileString("Settings","ManaKey","NULL",temp_key,destSize,"Testsystem/Settings.ini");
ManaKey = atoi(temp_key);
Kal::SetManaKey();
GetPrivateProfileString("GM","1","NULL",GameMaster1,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","2","NULL",GameMaster2,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","3","NULL",GameMaster3,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","4","NULL",GameMaster4,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","5","NULL",GameMaster5,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","6","NULL",GameMaster6,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","7","NULL",GameMaster7,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","8","NULL",GameMaster8,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","9","NULL",GameMaster9,destSize,"Testsystem/Settings.ini");
GetPrivateProfileString("GM","10","NULL",GameMaster10,destSize,"Testsystem/Settings.ini");
}
main.h
Code:
#ifndef MAIN_H
#define MAIN_H
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <ws2tcpip.h>
#include <WinSock2.h>
#include <detours.h>
#include <Windows.h>
#include <iostream>
#include <io.h>
#include <fcntl.h>
#include <process.h>
#include <math.h>
#include <stdio.h>
#include <fstream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <string>
#include <cstring>
#pragma comment(lib, "detours.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "winmm.lib")
#define INST_NOP 0x90
#define INST_CALL 0xe8
#define INST_JMP 0xe9
#define INST_BYTE 0x00
#define SHORT_JZ 0x74
#define orange 16594
#define lightblue 15073034
#define violett 12615808
#define green 32768
#define pink 16751615
#define blue 15453831
#define red 255
#undef UNICODE
// TODO: reference additional headers your program requires here
class Memory
{
public:
static void ShowWelcomeMessage(HWND hwNd);
static LPVOID MemcpyEx(DWORD lpDest, DWORD lpSource, int len);
static unsigned int __stdcall InitSend(void * pParams);
static bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask);
static DWORD dwFindPattern(DWORD dwAddress,DWORD dwLen, BYTE *bMask, char * szMask);
static DWORD Intercept(int instruction, DWORD lpSource, DWORD lpDest, int len);
};
class Kal
{
public:
static DWORD GetCurHP(DWORD dwAttacker,DWORD dwTarget,WORD dwDamage, bool attacktype);
static void ItemDropped(char* szBuffer);
static void SetManaKey();
static void ReadSettings();
static void SpeedHack(DWORD Speed);
static void PlayerAppear(char* szBuffer);
static void ChatBox(const char *prefix,int mType, char* mFormat,...);
static void StormHack();
static void Notice(int color,char* mFormat,...);
static void PlayerDisappear(char* szBuffer);
static void Login(char* szBuffer);
static void TP(char* szBuffer);
static void MonsterAppear(char *szBuffer);
static void MonsterDisapear(char *szBuffer);
static void PlayerMoveSit(char *szBuffer);
static void PlayeMove (char *szBuffer);
static void MonsterDie(char *szBuffer);
static void MonsterMove(char *szBuffer);
};
#endif MAIN_H
recv.h
Code:
#ifndef recv_h
#define recv_h
#pragma once
int __cdecl SendKoemV2(BYTE type , char* format, ...);
extern DWORD Attackhack_AttackMonster;
extern unsigned int atCount;
extern unsigned int AutoBehead;
extern DWORD dwMyPlayerUID;
extern unsigned int nLABOT;
extern DWORD HP0;
extern unsigned int nAttackHack;
enum RecvHeader {
MobApear=0x33,
LOGIN=0x2A,
GamSTARTnTP=0x0A,
PlayerDisappear=0x37,
MobDisappear=0x38,
ItemDrop=0x36,
PlayerAppear=0x32,
MonsterNormalAttack=0x3E,
MonsterMove=0x24,
MonsterMoveStop=0x25,
PlayerMove=0x22,
PlayerMoveStop=0x23,
PlayerMoveSit=0x21,
MonsterDie=0x3d,
SkillAttack=0x3f};
struct myPlayer
{
BYTE myPlayerRace;
DWORD Monster;
DWORD CheckAttack;
};
struct SMob
{
DWORD MID;
DWORD X;
DWORD Y;
DWORD Z;
BYTE Classe;
DWORD HP;
};
#endif recv_h
stuff.h
Code:
void Memory::ShowWelcomeMessage(HWND hwNd)
{
MessageBox(hwNd, "Welcome to toolkal orginal bloodx source modify by FANEq\nBINDS:\n(+)KEY Speed incrase\n(-)KEY Speed decrase\nF2 = AttackHack\nF3 = StormHack\nF4 = AutoPick on\off\nF5 = Window on/off\nF6 = LA HACK on/off\nF7 = BOT\nF8 = AutoSplashy on/off\nF9 = UG\nF11 = AutoBehead on/off\nF12 = Binds Information", "Information", MB_OK);
}
DWORD SendKoemBack;
char SendText[]="SEND TYPE: 0x%0.2x FORMAT: %s\n";
__declspec (naked) int __cdecl SendKoemV2(BYTE type , char* format, ...)
{
__asm jmp SendKoemBack
}
extern HANDLE InitSendx;
unsigned int __stdcall Memory::InitSend(void * pParams)
{
SendKoemBack = ((*(DWORD*)(0x004921F4+1))+(0x004921F4+1)+4);
CloseHandle(InitSendx);
_endthreadex(0);
return NULL;
}
bool Memory::bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for(;*szMask;++szMask,++pData,++bMask)
if(*szMask=='x' && *pData!=*bMask )
return false;
return (*szMask) == NULL;
}
DWORD Memory::dwFindPattern(DWORD dwAddress,DWORD dwLen, BYTE *bMask, char * szMask) {
for(DWORD i=0;i<dwLen;i++)
if( bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) )
return (DWORD)(dwAddress+i);
return NULL;
}
DWORD Memory::Intercept(int instruction, DWORD lpSource, DWORD lpDest, int len)
{
DWORD realtarget;
LPBYTE buffer = new BYTE[len];
memset(buffer,0x90,len);
if (instruction != INST_NOP && len >= 5)
{
buffer[(len-5)] = instruction;
DWORD dwJMP = (DWORD)lpDest - (lpSource + 5 + (len-5));
memcpy(&realtarget,(void*)(lpSource+1),4);
realtarget = realtarget+lpSource+5;
memcpy(buffer + 1 + (len-5),&dwJMP,4);
}
if (instruction == SHORT_JZ)
{
buffer[0]=instruction;
buffer[1]=(BYTE)lpDest;
}
if (instruction == INST_BYTE)
{
buffer[0]=(BYTE)lpDest;
}
MemcpyEx(lpSource, (DWORD) buffer, len);
delete[] buffer;
return realtarget;
}
LPVOID Memory::MemcpyEx(DWORD lpDest, DWORD lpSource, int len)
{
DWORD oldSourceProt,oldDestProt=0;
VirtualProtect((LPVOID)lpSource,len,PAGE_EXECUTE_READWRITE,&oldSourceProt);
VirtualProtect((LPVOID)lpDest,len,PAGE_EXECUTE_READWRITE,&oldDestProt);
memcpy((void*)lpDest,(void*)lpSource,len);
VirtualProtect((LPVOID)lpDest,len,oldDestProt,&oldDestProt);
VirtualProtect((LPVOID)lpSource,len,oldSourceProt,&oldSourceProt);
return (LPVOID)lpDest;
};
functions.cpp
Code:
//--------------------MENU AND ALL FUNCTIONS--------------------------------
//--------------------------------------------------------------------------
//--------------------------include-----------------------------------------
//--------------------------------------------------------------------------
#include "main.h"
#include "functions.h"
#include "recv.h"
//----------------------------end-------------------------------------------
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//----------------------------declare---------------------------------------
//----------------------------end-------------------------------------------
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
switch(Message)
{
case WM_CREATE:
{
hwndupdate = hwnd;
Sleep(1);
int waiter;
std::cin >> waiter;
HMENU hMenu, hSubMenu;
hMenu = CreateMenu();
HMENU hCurrent = GetMenu(0);
AppendMenu(hMenu, MF_STRING ,ID_INFO, "&Information");
hSubMenu = CreatePopupMenu();
SetMenu(hwnd, hMenu);
}
case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_INFO:
Memory::ShowWelcomeMessage(hwndupdate);
break;
}
default:
Sleep(3);
return DefWindowProc(hwnd, Message, wParam, lParam);
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = NULL;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = NULL;
if(!RegisterClassEx(&wc))
{
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
//InitConsole();
//Sleep(500);
//FindWindow(0, ConsoleTitle);
hwnd = CreateWindowEx(
0,
g_szClassName,
"toolkal // modify bloodx's source",//Name of the Hack Window
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 240, 165,
NULL, NULL, hInstance, NULL);
EditBoxA = CreateWindow(TEXT("Edit"),TEXT("200"),WS_CHILD|WS_VISIBLE|WS_THICKFRAME,1, 1, 100 , 30, hwnd, (HMENU) 1, 0, 0);
EditBoxX = CreateWindow(TEXT("Edit"),TEXT("0"),WS_CHILD|WS_VISIBLE|WS_THICKFRAME,1, 60, 100 , 30, hwnd, (HMENU) 2, 0, 0);
EditBoxY = CreateWindow(TEXT("Edit"),TEXT("0"),WS_CHILD|WS_VISIBLE|WS_THICKFRAME,110, 60, 100 , 30, hwnd, (HMENU) 3, 0, 0);
SetWindowText(EditBoxX, "X CORD");
SetWindowText(EditBoxY, "Y CORD");
if(hwnd == NULL)
{
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
Memory::ShowWelcomeMessage(hwndupdate);
ShowWindow(hwnd, nCmdShow);
// widow hiden on start.
UpdateWindow(hwnd);
while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}
extern HANDLE InitConsoleThread;
unsigned int __stdcall ConsoleMenu(void * pParams){ WinMain(NULL,NULL,NULL,1); CloseHandle(InitConsoleThread); _endthreadex(0); return NULL; }
unsigned int __stdcall AttackHackMainThread(void * start_parameter)
{
while(true)
{
Sleep(1);
if(atCount == 1)
{
SendKoemV2(0x10,"bbd",3,1,Attackhack_AttackMonster);
SendKoemV2(0x10,"bbd",16,1,Attackhack_AttackMonster);
SendKoemV2(0x10,"bbd",9,1,Attackhack_AttackMonster);
SendKoemV2(0x10,"bbd",21,1,Attackhack_AttackMonster);
//PostMessage(Kal,WM_KEYDOWN,key_Mana,NULL);
atCount = 0;
Sleep(1);
}
if(atCount == 2)
{
do{
SendKoemV2(0x10,"bbd",18,1,Attackhack_AttackMonster);
atCount = 0;
Sleep(1);
}while(HP0>30);
if(HP0==0 || HP0 == 1 || HP0 < 0){
SendKoemV2(0x10,"bbd",18,1,Attackhack_AttackMonster);
SendKoemV2(0x10,"bbd",3,1,Attackhack_AttackMonster);
}
}
}
return 0;
}
// sniff key pressed
unsigned int __stdcall Sniff_KB(void * start_parameter)
{
while(true)
{
Sleep(5); // PROC usage
if(GetAsyncKeyState(VK_F2) & 1) // HotKey F2 tests.
{
if((nAttackHack == 0) && (atCount == 0)){
nAttackHack=1;
Kal::ChatBox("[toolkal] ",1,"AttackHack: ON");
Sleep(500); // avoid keyspam
goto skip;
//Kal::Notice(red,"ON");
}
if ((nAttackHack == 1) && (atCount == 0)){
nAttackHack=0;
Kal::ChatBox("[toolkal] ",1,"AttackHack: OFF");
Sleep(500); // avoid keyspam
}
skip:;
}
if(GetAsyncKeyState(VK_F3) & 1) // HotKey F3 Storm Hack
{
Kal::StormHack();
Sleep(5); // avoid keyspam
}
if(GetAsyncKeyState(VK_F4) & 1) // HotKey F4 AutoPick on/off
{
if(SWITCHER.nAutoPick==1){
SWITCHER.nAutoPick=0;
Kal::ChatBox("[toolkal] ",1,"AutoPick: OFF");
Sleep(500); // avoid keyspam
}else{
SWITCHER.nAutoPick=1;
Kal::ChatBox("[toolkal] ",1,"AutoPick: ON");
Sleep(500); // avoid keyspam
}
}
if(GetAsyncKeyState(VK_F5) & 1) // HotKey F3
{
if(SWITCHER.nWinShow==1){
ShowWindow(hwndupdate,0); // window hide
SWITCHER.nWinShow=0;
Sleep(500); // avoid keyspam
}else{
ShowWindow(hwndupdate,5); // window show
SWITCHER.nWinShow=1;
Sleep(500); // avoid keyspam
}
}
if(GetAsyncKeyState(VK_F6) & 1) // Speed Set
{
if((nLABOT == 0) && (atCount == 0)){
nLABOT = 1;
Kal::ChatBox("[toolkal] ",1,"LAHack: ON");
Sleep(500); // avoid keyspam
goto jump;
}
if ((nLABOT == 1) && (atCount == 0)){
nLABOT = 0;
Kal::ChatBox("[toolkal] ",1,"LAHack: OFF");
Sleep(500); // avoid keyspam
}
jump:;
}
if(GetAsyncKeyState(VK_F11) & 1) // Speed Set
{
if((AutoBehead == 0) && (atCount == 0)){
AutoBehead = 1;
Kal::ChatBox("[toolkal] ",1,"BeheadHack ON");
Sleep(500); // avoid keyspam
goto jumper;
}
if ((AutoBehead == 1) && (atCount == 0)){
AutoBehead = 0;
Kal::ChatBox("[toolkal] ",1,"BeheadHack OFF");
Sleep(500); // avoid keyspam
}
jumper:;
}
if(GetAsyncKeyState(VK_F12) & 1) // Bind key info
{
Memory::ShowWelcomeMessage(hwndupdate);
}
if(GetAsyncKeyState(VK_ADD) & 1) // Speed Set
{
if(SpeedValue < 5000)
{
SpeedValue+=50;
Kal::SpeedHack(SpeedValue);
Kal::ChatBox("[toolkal] ",1,"Speed incrased to %u", SpeedValue);
Sleep(500); // avoid keyspam
}
}
if(GetAsyncKeyState(VK_SUBTRACT) & 1) // Speed Set
{
if(SpeedValue > 0)
{
SpeedValue-=50;
Kal::SpeedHack(SpeedValue);
Kal::ChatBox("[toolkal] ",1,"Speed decrease to %u", SpeedValue);
Sleep(500); // avoid keyspam
}
}
}
return 0;
}
main.cpp
Code:
#include "main.h"
HANDLE MainThreadx = INVALID_HANDLE_VALUE;
unsigned int MainThreadIID = 0;
HANDLE InitSendx = INVALID_HANDLE_VALUE;
unsigned int InitSendIID = 0;
HANDLE InitMenux = INVALID_HANDLE_VALUE;
unsigned int InitMenuIID = 0;
HANDLE AttackhackThread = INVALID_HANDLE_VALUE;
unsigned int AttackhackID = 0;
HANDLE InitConsoleThread = INVALID_HANDLE_VALUE;
unsigned int InitConsoleThreadID = 0;
HANDLE Sniff_KThread = INVALID_HANDLE_VALUE;
unsigned int Sniff_KThreadID = 0;
extern DWORD dwFindPattern(DWORD dwAddress,DWORD dwLen, BYTE *bMask, char * szMask);
extern DWORD Intercept(int instruction, DWORD lpSource, DWORD lpDest, int len);
extern unsigned int __stdcall InitSend(void * pParams);
extern unsigned int __stdcall InitMenu(void * pParams);
extern unsigned int __stdcall ConsoleMenu(void * pParams);
extern int (__stdcall *DetourRecv)(SOCKET Socket, char *Buffer, int Length, int Flags);
extern int __stdcall FilterRecv(SOCKET Socket, char* Buffer,int iLenght, int iFlags);
HWND hKal, hKal1,hWait;
extern unsigned int __stdcall InitConsole(void * start_parameter);
extern unsigned int __stdcall AttackHackMainThread(void * start_parameter);
extern unsigned int __stdcall Sniff_KB(void * start_parameter);
extern void ReadSettings();
extern char chWindow_Name[100];;
unsigned int __stdcall MainThread(void * pParams)
{
Sleep(5500);
BYTE Replacer=0x85;
DWORD Virutal_add=0x00504DBF-0x00104DBF;
Memory::MemcpyEx(Virutal_add+0x00104DBF,(DWORD)&Replacer,1);
Replacer=0x75;
Memory::MemcpyEx(Virutal_add+0x00104F66,(DWORD)&Replacer,1);
Memory::MemcpyEx(Virutal_add+0x0010DB66,(DWORD)&Replacer,1);
Replacer=0x61;
Memory::MemcpyEx(Virutal_add+0x002A2A6D,(DWORD)&Replacer,1);
Kal::ReadSettings();
while(true)
{
hKal = FindWindow(NULL,chWindow_Name);
SetWindowTextA(hKal,"KalOnline toolkal");
hWait = FindWindow(0,"KalOnline toolkal");
hKal1 = GetForegroundWindow();
if (hWait == hKal1) goto endwait;
Sleep(100);
}
endwait:;
DetourRecv = (int (__stdcall *)(SOCKET, char *, int, int))DetourFunction((PBYTE)0x0052F060,(PBYTE)FilterRecv);
InitSendx = (HANDLE)_beginthreadex(NULL,0,&Memory::InitSend,NULL,NULL,&InitSendIID);
// load menu
// InitMenux = (HANDLE)_beginthreadex(NULL,0,&InitMenu,NULL,NULL,&InitMenuIID);
InitConsoleThread = (HANDLE)_beginthreadex(NULL,0,&ConsoleMenu,NULL,NULL,&InitConsoleThreadID);
Sniff_KThread = (HANDLE)_beginthreadex(NULL,0,&Sniff_KB,NULL,NULL,&Sniff_KThreadID);
AttackhackThread = (HANDLE)_beginthreadex(NULL,0,&AttackHackMainThread,NULL,NULL,&AttackhackID);
CloseHandle(MainThreadx);
_endthreadex(0);
return NULL;
}
BOOL APIENTRY DllMain(HMODULE hModule, unsigned long ulCallReason, LPVOID lpReserved) {
switch(ulCallReason){
case DLL_PROCESS_ATTACH:
MainThreadx = (HANDLE)_beginthreadex(NULL,0,&MainThread,NULL,NULL,&MainThreadIID);
break;
case DLL_PROCESS_DETACH:
break;
}
return 1;
}
recv.cpp
Code:
#include "main.h"
#include "recv.h"
extern HWND hwndupdate;
extern void ItemDropped(char* szBuffer);
struct SMobx
{
DWORD MID;
DWORD X;
DWORD Y;
DWORD Z;
BYTE Classe;
DWORD HP;
};
SMobx Mob[500]={0};
DWORD mobsx;
DWORD Target;
DWORD Attacker;
void MyRecv(char* szBuffer,int iLenght)
{
switch(szBuffer[2])
{
case ItemDrop:
Kal::ItemDropped(szBuffer);
break;
case PlayerAppear:
Kal::PlayerAppear(szBuffer);
break;
case PlayerDisappear:
Kal::PlayerDisappear(szBuffer);
break;
case SkillAttack:
{
DWORD Attacker = *(DWORD*)&szBuffer[3+1];
DWORD Target = *(DWORD*)&szBuffer[7+1];
WORD Damage = *(WORD*)&szBuffer[11+3];
if(nLABOT == 0 && nAttackHack == 0)
{
Kal::GetCurHP(Attacker,Target,Damage,1);
}
if(nAttackHack == 1 && nLABOT == 0)
{
if(Attacker==dwMyPlayerUID)
{
Attackhack_AttackMonster = Target;
atCount=1;
}
}
if(nLABOT == 1 && nAttackHack == 0)
{
if(Attacker==dwMyPlayerUID)
{
HP0 = Kal::GetCurHP(Attacker,Target,Damage,0);
Attackhack_AttackMonster = Target;
atCount=2;
}
}
break;
}
case MonsterNormalAttack:
{
Attacker = *(DWORD*)&szBuffer[3];
Target = *(DWORD*)&szBuffer[7];
WORD Damage = *(WORD*)&szBuffer[11];
if(nAttackHack == 1 && nLABOT == 0)
{
if(Attacker==dwMyPlayerUID)
{
Attackhack_AttackMonster = Target;
atCount=1;
}
}
if(nLABOT == 1 && nAttackHack == 0)
{
if(Attacker==dwMyPlayerUID)
{
HP0 = Kal::GetCurHP(Attacker,Target,Damage,0);
Attackhack_AttackMonster = Target;
atCount=2;
}
}
break;
}
case MonsterMove:
Kal::MonsterMove(szBuffer);
break;
case MonsterMoveStop:
Kal::MonsterMove(szBuffer);
break;
case MobApear:
Kal::MonsterAppear(szBuffer);
break;
case PlayerMove:
Kal::PlayeMove(szBuffer);
break;
case PlayerMoveStop:
break;
case PlayerMoveSit:
Kal::PlayerMoveSit(szBuffer);
break;
case MonsterDie:
{
/*DWORD MonsterID=*(DWORD*)&szBuffer[3];
BYTE BehadeState = *(BYTE*)&szBuffer[7];
if (AutoBehead==1 && BehadeState==0x08)
{
SendKoemV2(0x10,"bbd",1,1,MonsterID);
}*/
Kal::MonsterDie(szBuffer);
break;
}
case LOGIN:
Kal::Login(szBuffer);
break;
case GamSTARTnTP:
Kal::TP(szBuffer);
break;
}
}
int (__stdcall *DetourRecv)(SOCKET Socket, char *Buffer, int Length, int Flags);
int ASyncPos = 0;
int FinalSize = 0;
int __stdcall FilterRecv(SOCKET Socket,char *Buffer, int iLength, int iFlags)
{
if (ASyncPos==FinalSize && FinalSize>0)
{
MyRecv(Buffer, ASyncPos);
ASyncPos = 0;
}
int RecvRET = DetourRecv(Socket, Buffer, iLength, iFlags);
if (RecvRET<0)
{
return RecvRET;
}
if (ASyncPos==0)
FinalSize = *((short int*) Buffer);
ASyncPos+=RecvRET;
return RecvRET;
}
02/03/2012, 14:34
#37
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Gratz on posting your main.cpp twice
02/03/2012, 14:42
#38
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
Quote:
Gratz on posting your main.cpp twice
edited.
02/03/2012, 15:47
#39
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
It's not "MonsterDie" it's animation state.
Your functions shouldn't be in header files.
Your whole structure is somehow ****** up.
But what about ActivateMonsters.MonsterID = 0; Leave the rest as it is and just check if ID != 0 when choosing a mob.
Code:
char GameMaster1[26];
char GameMaster2[26];
...
char GameMaster10[26];
char GameMaster[10][26]? :>
02/03/2012, 15:58
#40
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
Quote:
Originally Posted by
MoepMeep
It's not "MonsterDie" it's animation state.
Your functions shouldn't be in header files.
Your whole structure is somehow ****** up.
But what about ActivateMonsters.MonsterID = 0; Leave the rest as it is and just check if ID != 0 when choosing a mob.
Code:
char GameMaster1[26];
char GameMaster2[26];
...
char GameMaster10[26];
char GameMaster[10][26]? :>
GameMaster etc was already in source of bloodx, i didint delate it yet, my pc crashed it should be fixed today and I'll check your advice thanks.
PS: any idea why on win7 (my main pc) hack wont run? just title of window change and nothing else. (my sec. pc is on win XP).
(About rest, i know its not written well, we can say i am beginner and still learning but thanks for advices)
02/03/2012, 16:06
#41
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
bloodx warum hast du denn für player und monster ein festes array?
mit dynamischen speicherstrukturen ist das doch viel schöner
02/03/2012, 16:36
#42
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by
RunzelEier
bloodx warum hast du denn für player und monster ein festes array?
mit dynamischen speicherstrukturen ist das doch viel schöner
Und nun überleg mal wieviele leute hier damit arbeiten könnten ;P
02/03/2012, 17:00
#43
elite*gold: 0
Join Date: Oct 2007
Posts: 474
Received Thanks: 159
Quote:
Originally Posted by
hoseta
GameMaster etc was already in source of bloodx, i didint delate it yet, my pc crashed it should be fixed today and I'll check your advice thanks.
PS: any idea why on win7 (my main pc) hack wont run? just title of window change and nothing else. (my sec. pc is on win XP).
(About rest, i know its not written well, we can say i am beginner and still learning but thanks for advices)
well for me it works on win7 64bit ... i also get an error message when injecting the dll but just click on ignore and it will work ... if u click on retry ur game will crash, if u click on ignore it works ... dunno what's wrong there :S
02/03/2012, 17:41
#44
elite*gold: 0
Join Date: Aug 2010
Posts: 30
Received Thanks: 9
Quote:
Originally Posted by
RunzelEier
bloodx warum hast du denn für player und monster ein festes array?
mit dynamischen speicherstrukturen ist das doch viel schöner
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.. "
hm bin aufm falschen Acc ups xD
02/03/2012, 18:06
#45
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
Quote:
Originally Posted by
hello123456
well for me it works on win7 64bit ... i also get an error message when injecting the dll but just click on ignore and it will work ... if u click on retry ur game will crash, if u click on ignore it works ... dunno what's wrong there :S
Did you even read source? u need put into kal folder Testsystem folder with settings.ini etc file... i didint change settings by bloodx cuz i just add stuff and lern. also u need put into settings.ini kalonline window name or hack wont run!!!!
for exemple if kal win name is set to "" like on superkal u just left name= empty.
for legend kal for exmeple
Name=UnitedMMO - Legend of Kal V2
superkal
Name=
here is folder...
Attached Files
Testsystem.rar
(56.0 KB, 163 views)
Similar Threads
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code
02/13/2011 - AutoIt - 6 Replies
Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein.
Funktionsweise:
1. in CE Rechtsklick auf den Pointer und auf "Copy" klicken
2. in meinem Programm auf "Code generieren" klicken
3. In euer Scite gehen und einfügen
Hier ist der Source Code vom Programm:
[Release]How To Make Tq Source Work + Working Source + Server ByBass + Commands
12/08/2008 - CO2 PServer Guides & Releases - 15 Replies
1: How To Make The Server Work
In fact, before other people did not just let ACC now with hi EACC Columbia landing on the settlement of the issue, and the rest is our own how to improve the content of those interested can improve the next. MY MY set and the same. INI MAP INI files and MAP with the client-to-date coverage of the account. server.dat ! And then as long as the client will be able to modify server.dat!
127.0.0.1 192.168.0.1 192.168.1.1 IP。 Please do generally use...
[Release] Project-X Source (Lolmasters Secret Source)
09/29/2008 - CO2 Private Server - 11 Replies
Projekt-X Source (Lolmasters Secret Source)
Example that is in the source, stigma guards
LINK: RapidShare: Easy Filehosting
Well People search for things in this source that others dont got and use it for your server ;) or just release it to get many thankes:p
All times are GMT +1. The time now is 21:19 .