[Release][C++ Code] GM/AOE/Range

07/30/2012 18:01 iconmage#166
sir can we play the range number? can we put the range to 100? sorry im noob -_-
07/30/2012 23:24 lintekens02#167
Quote:
Originally Posted by syndrah View Post
the aoe check is a flag, you can enable and disable using the same key instead of using 2 different keys.
---------------------------------------
if (GetKeyState(VK_F12) < 0) // Turn On/off
{

if (i==1) {
*(DWORD*)ADDR_GM = 2;
*(DWORD*)ADDR_AOE = 100;
*(DWORD*)ADDR_RANGE = 7;
i=2;
}
else if (i==2){
*(DWORD*)ADDR_GM = 0;
*(DWORD*)ADDR_AOE = 0;
*(DWORD*)ADDR_RANGE = 0;
i=1;
}
}

-----------------------------
is this what u mean??

Quote:
Originally Posted by jslvdr View Post
@syndrah I think there will be an error if you compile it because there is no windows.h in the header.

You need windows.h for the hotkeys.
no need for to include windows.h, it's already inside "stdafx.h".


@syndrah i think we have the same problem.. i got the aoe/gm/range working with just 1 key. eg f12, it works. but when i added another key eg f11 for combo, all wouldn't function anymore..
07/31/2012 01:50 bartbilf#168
@linktekens02
the combo addresses are a level 1 combo, you can't just code it like the gm/aoe/range addresses, which are statics, are you sure that you code it as a level 1 pointer?
07/31/2012 08:06 CreatedByMe#169
sir what's the problem to my code? only aoe works.



#include "stdafx.h"

#define ADDR_GM 0x1075C40
#define ADDR_AOE 0x10C630C
#define ADDR_RANGE 0x10C6308
#define ADDR_GATE 0x658F944
#define ADDR_WINDOW 0x171F5650
#define ADDR_WALK 0x658F8FC
#define ADDR_NCDaura 0x1D7F49C0
#define ADDR_NCDbm1 0x1D7F4A08
#define ADDR_NCDbm2 0x1D7FA50
#define ADDR_NCDbm3 0x00000020

void Start();

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ulReason, LPVOID lpReserved)
{
if (ulReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);
}

return TRUE;
}

void Start()
{
while (1)
{
if (GetKeyState(VK_F11) < 0) // Turn On AOE
{
*(DWORD*)ADDR_GM = 2;
*(DWORD*)ADDR_AOE = 100;
*(DWORD*)ADDR_RANGE = 7;
}

if (GetKeyState(VK_F12) < 0) // Turn Off AOE
{
*(DWORD*)ADDR_GM = 0;
*(DWORD*)ADDR_AOE = 0;
*(DWORD*)ADDR_RANGE = 0;
}

if (GetKeyState(VK_F9) < 0) // Turn On GATE
{
*(DWORD*)ADDR_GATE = 57;
}

if (GetKeyState(VK_F10) < 0) // Turn off GATE
{
ADDR_GATE;
}

if (GetKeyState(VK_F7) < 0) // Turn On Window and inventory
{
*(DWORD*)ADDR_WINDOW = 0 ;
*(DWORD*)ADDR_WALK = 0 ;
}

if (GetKeyState(VK_F8) < 0) // Turn On Window and inventory
{
*(DWORD*)ADDR_WINDOW = 1 ;
*(DWORD*)ADDR_WALK = 1 ;
}

if (GetKeyState(VK_F6) < 0) // Turn on
{
*(BYTE*)ADDR_NCDaura = -112;
*(BYTE*)(ADDR_NCDbm1) = -112;
*(BYTE*)(ADDR_NCDbm2) = -112;
*(BYTE*)(ADDR_NCDbm3) = -112;
}

if (GetKeyState(VK_F5) < 0) // Turn Off
{
*(BYTE*)ADDR_NCDaura = mTempVal1;
*(BYTE*)(ADDR_NCDbm1) = mTempVal1;
*(BYTE*)(ADDR_NCDbm2) = mTempVal1;
*(BYTE*)(ADDR_NCDbm3) = mTempVal1;
}

Sleep(1);
}
}
07/31/2012 08:06 lowkey04#170
Quote:
Originally Posted by lintekens02 View Post
@syndrah i think we have the same problem.. i got the aoe/gm/range working with just 1 key. eg f12, it works. but when i added another key eg f11 for combo, all wouldn't function anymore..
you're using a loop to freeze combo right? you should code it in such a way that the other hotkeys will still get detected w/in that loop. ;)

@CreatedByMe
-you need to freeze the value of nocd for it to work
-you haven't declared what mTempVal1 is
07/31/2012 08:18 CreatedByMe#171
how to freeze the value sir? and how to declare mTempVal1?

sir can u teach me how to freez the value? and how can i declare mTempVal1?

what's the problem to this sir? it wont work again


#include "stdafx.h"

#define ADDR_GATE 0x658F944
#define ADDR_NCDaura 0x1D7F49C0
#define ADDR_NCDbm1 0x1D7F4A08
#define ADDR_NCDbm2 0x1D7FA50
#define ADDR_NCDbm3 0x00000020

void Start();

BOOL APIENTRY DllMain(HMODULE hModule, DWORD ulReason, LPVOID lpReserved)
{
if (ulReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Start, 0, 0, 0);
}

return TRUE;
}

void Start()
{
while (1)
{
if (GetKeyState(VK_F8) < 0) // Turn On GATE
{
*(DWORD*)ADDR_GATE = 57;
break;
}



if (GetKeyState(VK_F9) < 0) // Turn on
{
*(BYTE*)ADDR_NCDaura = 1;
*(BYTE*)(ADDR_NCDbm1) = 1;
*(BYTE*)(ADDR_NCDbm2) = 1;
*(BYTE*)(ADDR_NCDbm3) = 1;
break;
}

Sleep(1);
}
}
07/31/2012 12:18 lowkey04#172
hmmmm. i already gave a *hint* on how to freeze a value a few posts before this. one word, loop. ;)

it's *your* code so i don't know what you want mTempVal1 to be and what value it should contain. :D

executing a break statement w/in a loop means to break out or exit the loop. in your code, pressing either f8 or f9 once will cause the program to exit the while loop.
07/31/2012 14:26 CreatedByMe#173
one more question sir.how to go back to the original value of the address?

like for example. gate hack, the value in each map is not the same.
07/31/2012 14:45 genesisVI#174
@CreatedByMe
Thats a real problem :D
07/31/2012 15:07 lowkey04#175
how to return the original value of an address?

simple. save the value before modifying it. putting it into practice/coding won't be as simple though. :D
07/31/2012 20:05 lintekens02#176
Quote:
Originally Posted by bartbilf View Post
@linktekens02
the combo addresses are a level 1 combo, you can't just code it like the gm/aoe/range addresses, which are statics, are you sure that you code it as a level 1 pointer?
i know.. i created a loop to freeze the values... i already figured out a way. i used functions to separate the codes. working just fine ^^
08/01/2012 15:21 ma6ikal#177
Very nice after reviewing my C++ programming i got it!

next step : revise it to VC++ (window based) so that some of the address values can be dynamically change like: nation (1,2,3), aoe range (because somebody complain to me a cabalrider user^^ and i admire him "TOL PAKIHINAAN NAMAN AOE MO!" that what he said when in fact i been using crckd DLL with no AOE adjustment hehe)

question: is windows based ok? envylang DLL seems ok but i think he/she have to filter values entered into text box like (accept only numeric values)

well thank you very much PCSBots (already hit thanks too ^_^)
08/02/2012 22:27 f3rryp3ll0#178
wallhack can be used as a C + +?

please respond me
thanks
08/03/2012 00:50 bartbilf#179
@f3rryp3ll0
not the public method
08/03/2012 09:15 botetebalila#180
Whew got to go back to my C++ times. Tnx TS I made it run in PH... though just the AOE and range only... Still looking for other useful options. Can someone send for Change Nation?