Log in

View Full Version : Kingdoms of Amalur +2 unfinished trainer source



kingadent
05-02-2013, 10:16 PM
I quit trainers, got boring, only did it to learn stuff anyway.

Here's my first cave's source, it's for Kingdoms of Amalur, right now it's just OneHitKill and InfHealth, both work perfect though.

I'm using a different engine, as you can see, you get the concept though.


#include "common.h"

bool OneHitKo = false;
bool HooksSet = false;
bool InfHealth = false;


VOID __declspec(naked) CheckHP(VOID)
{
DWORD Ptr1;


__asm
{
mr Ptr1,r6
}


__asm{


}


DWORD Ptr2;


__asm
{
mr Ptr2,r9
}


if( InfHealth == TRUE && Ptr1 != 0x00)
{


int XValue = 999;
__asm
{


stw XValue,48h(r31)


}


}else{
if( InfHealth == FALSE )
{


__asm{
stw r11,48h(r31)
}


}


}


if( OneHitKo == TRUE && Ptr2 == 0x0000000000B60B60 )
{
int ZValue = 0;
__asm
{
stw ZValue,48h(r31)



}


}else{
if( OneHitKo == FALSE )
{
__asm{
stw r11,48h(r31)
}
}




}




__asm{

lis r11,0x8253
ori r11,r11,0x0E64
mtctr r11
bctr
}
}
VOID SetHooks()
{




DWORD IHealth[4];
patchInJump( (PDWORD)IHealth, (DWORD)CheckHP, FALSE );

DoCave(0x82530E4C, &IHealth[0], 4);
DoCave(0x82530E50, &IHealth[1], 4);
DoCave(0x82530E54, &IHealth[2], 4);
DoCave(0x82530E58, &IHealth[3], 4);


HooksSet = true;
}


VOID ShowTrainerMain()
{

Prompt = XShowMessageBoxUI(0, L"Kingdoms of Amalur", L"View Codes: DPAD-DOWN(x4)\r\nCreated by Kingadent\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_PASSCODEMODE, &g_mb_result, &g_xol);

if( HooksSet == false )
{
SetHooks();
}




}




VOID TrainerLoaded()
{

Prompt = XShowMessageBoxUI(0, L"Kingdoms of Amalur", L"Trainer Loaded!\r\nYou may now start your game\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);


}


VOID ProcessButtonPress( MESSAGEBOX_RESULT g_mb_result )
{

if( g_mb_result.rgwPasscode[0] == DPAD_DOWN && g_mb_result.rgwPasscode[1] == DPAD_DOWN && g_mb_result.rgwPasscode[2] == DPAD_DOWN && g_mb_result.rgwPasscode[3] == DPAD_DOWN )
{
Sleep(500);
XShowMessageBoxUI(0, L"Viewing All Codes", L"Inf Health Y(x4)\r\nEasy Kills DPAD-UP(x4)", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);


memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
Prompt = 0x9999;


}


if( g_mb_result.rgwPasscode[0] == Y_BUTTON && g_mb_result.rgwPasscode[1] == Y_BUTTON && g_mb_result.rgwPasscode[2] == Y_BUTTON && g_mb_result.rgwPasscode[3] == Y_BUTTON )
{
Sleep(500);

if( InfHealth == TRUE )
{
XShowMessageBoxUI(0, L"Cheat Disabled Successfully", L"Inf Health - Disabled\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
InfHealth = FALSE;
PulseController();
}else{
XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"Inf Health - Enabled\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
InfHealth = TRUE;
PulseController();
}
memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
Prompt = 0x9999;


}


if( g_mb_result.rgwPasscode[0] == DPAD_UP && g_mb_result.rgwPasscode[1] == DPAD_UP && g_mb_result.rgwPasscode[2] == DPAD_UP && g_mb_result.rgwPasscode[3] == DPAD_UP )
{
Sleep(500);

if( OneHitKo == TRUE )
{
XShowMessageBoxUI(0, L"Cheat Disabled Successfully", L"Easy AI Kills - Disabled\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
OneHitKo = FALSE;
PulseController();
}else{
XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"Easy AI Kills - Enabled\r\nDescription: **MAY BE BUGGY**.", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
OneHitKo = TRUE;
PulseController();
}


memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
Prompt = 0x9999;
}

}

I wanna thank Renegade, my mentor, for being a dick when i asked for help, to get me to figure them out myself, that really helped you magnificent bastard.
And i want to thank GoldZ, even though he is now a rival, he was a friend sometime in the past.

Renegade
05-02-2013, 10:26 PM
I quit trainers, got boring, only did it to learn stuff anyway.

Here's my first cave's source, it's for Kingdoms of Amalur, right now it's just OneHitKill and InfHealth, both work perfect though.

I'm using a different engine, as you can see, you get the concept though.


#include "common.h"

bool OneHitKo = false;
bool HooksSet = false;
bool InfHealth = false;


VOID __declspec(naked) CheckHP(VOID)
{
DWORD Ptr1;


__asm
{
mr Ptr1,r6
}


__asm{


}


DWORD Ptr2;


__asm
{
mr Ptr2,r9
}


if( InfHealth == TRUE && Ptr1 != 0x00)
{


int XValue = 999;
__asm
{


stw XValue,48h(r31)


}


}else{
if( InfHealth == FALSE )
{


__asm{
stw r11,48h(r31)
}


}


}


if( OneHitKo == TRUE && Ptr2 == 0x0000000000B60B60 )
{
int ZValue = 0;
__asm
{
stw ZValue,48h(r31)



}


}else{
if( OneHitKo == FALSE )
{
__asm{
stw r11,48h(r31)
}
}




}




__asm{

lis r11,0x8253
ori r11,r11,0x0E64
mtctr r11
bctr
}
}
VOID SetHooks()
{




DWORD IHealth[4];
patchInJump( (PDWORD)IHealth, (DWORD)CheckHP, FALSE );

DoCave(0x82530E4C, &IHealth[0], 4);
DoCave(0x82530E50, &IHealth[1], 4);
DoCave(0x82530E54, &IHealth[2], 4);
DoCave(0x82530E58, &IHealth[3], 4);


HooksSet = true;
}


VOID ShowTrainerMain()
{

Prompt = XShowMessageBoxUI(0, L"Kingdoms of Amalur", L"View Codes: DPAD-DOWN(x4)\r\nCreated by Kingadent\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_PASSCODEMODE, &g_mb_result, &g_xol);

if( HooksSet == false )
{
SetHooks();
}




}




VOID TrainerLoaded()
{

Prompt = XShowMessageBoxUI(0, L"Kingdoms of Amalur", L"Trainer Loaded!\r\nYou may now start your game\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);


}


VOID ProcessButtonPress( MESSAGEBOX_RESULT g_mb_result )
{

if( g_mb_result.rgwPasscode[0] == DPAD_DOWN && g_mb_result.rgwPasscode[1] == DPAD_DOWN && g_mb_result.rgwPasscode[2] == DPAD_DOWN && g_mb_result.rgwPasscode[3] == DPAD_DOWN )
{
Sleep(500);
XShowMessageBoxUI(0, L"Viewing All Codes", L"Inf Health Y(x4)\r\nEasy Kills DPAD-UP(x4)", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);


memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
Prompt = 0x9999;


}


if( g_mb_result.rgwPasscode[0] == Y_BUTTON && g_mb_result.rgwPasscode[1] == Y_BUTTON && g_mb_result.rgwPasscode[2] == Y_BUTTON && g_mb_result.rgwPasscode[3] == Y_BUTTON )
{
Sleep(500);

if( InfHealth == TRUE )
{
XShowMessageBoxUI(0, L"Cheat Disabled Successfully", L"Inf Health - Disabled\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
InfHealth = FALSE;
PulseController();
}else{
XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"Inf Health - Enabled\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
InfHealth = TRUE;
PulseController();
}
memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
Prompt = 0x9999;


}


if( g_mb_result.rgwPasscode[0] == DPAD_UP && g_mb_result.rgwPasscode[1] == DPAD_UP && g_mb_result.rgwPasscode[2] == DPAD_UP && g_mb_result.rgwPasscode[3] == DPAD_UP )
{
Sleep(500);

if( OneHitKo == TRUE )
{
XShowMessageBoxUI(0, L"Cheat Disabled Successfully", L"Easy AI Kills - Disabled\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
OneHitKo = FALSE;
PulseController();
}else{
XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"Easy AI Kills - Enabled\r\nDescription: **MAY BE BUGGY**.", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
OneHitKo = TRUE;
PulseController();
}


memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
Prompt = 0x9999;
}

}

I wanna thank Renegade, my mentor, for being a dick when i asked for help, to get me to figure them out myself, that really helped you magnificent bastard.
And i want to thank GoldZ, even though he is now a rival, he was a friend sometime in the past.It's not that I didn't help. I just didn't wanna give you straight answers. You don't learn that way. Hence why I had to make you do your homework. But it seems my egg has become a chicken. Well down my Padawan.

kingadent
05-02-2013, 10:28 PM
Which came first the chicken or the egg?

In all seriousness, thanks, i mean it, and if anyone still doubts my coding and trainer making skills, step up and PM me.

Renegade
05-02-2013, 10:47 PM
Which came first the chicken or the egg?

In all seriousness, thanks, i mean it, and if anyone still doubts my coding and trainer making skills, step up and PM me.It's debatable but personally. I think Science created the chicken first.

No problem man. Just glad I was a mentor to you :)

macelosnp
05-02-2013, 11:01 PM
Which came first the chicken or the egg?
LOL

Awesome work
thank you very much for share

kingadent
05-02-2013, 11:21 PM
Thanks marcelo, i do try, i had trouble learning when nobody would help, nobody to hold my hand to learn and all that, i don't want anyone dealing with that again, so this is my gift so to speak, to the scene, a lot of people know how to cave, but they keep it to themselves.

macelosnp
05-02-2013, 11:27 PM
Thanks marcelo, i do try, i had trouble learning when nobody would help, nobody to hold my hand to learn and all that, i don't want anyone dealing with that again, so this is my gift so to speak, to the scene, a lot of people know how to cave, but they keep it to themselves.

yes, these people do not teach because they do not want competitors

GoldZ
05-03-2013, 06:34 AM
good job fella :) , and macelosnp, its not about competition, i just believe people should learn themselves by research. i was never taught caves, i just carried on learning and picked it up. none of it is hard, and anyone with enough patience and will can do it no problem :)

you will never learn properly with someone hand feeding you :)

kingadent
05-03-2013, 03:27 PM
good job fella :) , and macelosnp, its not about competition, i just believe people should learn themselves by research. i was never taught caves, i just carried on learning and picked it up. none of it is hard, and anyone with enough patience and will can do it no problem :)

you will never learn properly with someone hand feeding you :)Patience is key, i had to wait months to fully grasp caves, asking a lot of people, some who would reply, some who would give me hints that weren't actually useful, it was painful, i don't want anyone to go through that.

But i agree on never learning properly if someone held your hand, however you have to give them a start somewhere, i don't believe in keeping info, it's selfish, i've come to hate the scene because of this, i refuse to make people suffer because i'm selfish.

Serious_M
05-04-2013, 11:25 AM
great share kingadent for those who found this usefull

Alestra
05-15-2013, 01:03 AM
You should finish and release this. Shame to give in to boredom.

thegutta
05-15-2013, 01:36 AM
Great job kingadent keep it up :)

CloudStrife7x
05-15-2013, 01:49 AM
good work on this trainer kingadent, i wish i could use trainers lmao

kingadent
05-16-2013, 12:39 AM
You should finish and release this. Shame to give in to boredom.I just might do this as a side project, since i'm working on something much more important.

darksoulzero
05-30-2013, 07:03 AM
I just might do this as a side project, since i'm working on something much more important.

Hey man, how did you learn caves? Are there tutorials out there somewhere? I'm interested in learning. Also, why did you post the source?

kingadent
06-02-2013, 07:28 PM
Hey man, how did you learn caves? Are there tutorials out there somewhere? I'm interested in learning. Also, why did you post the source?
Persistence and research and a very good friend gave me the push i needed, no tutorials that i know of, and as a few people know i'm basically not here until mid June, so i decided fuck it, and released the source.

I MIGHT be able to mentor people who are already capable, i don't believe in hand-holding, so i'll just say it, if you're a complete noob, i won't be teaching you, i don't have the time or energy.
If you PM me, i'll "test" you, i don't like sounding like an expert or an ass, but seeing how the scene are all selfish dick bags, i'm fine with being someone who helps.

optantic
06-02-2013, 09:36 PM
Hey man, how did you learn caves? Are there tutorials out there somewhere? I'm interested in learning. Also, why did you post the source?
http://www.360haven.com/forums/threads/22309-%5Btutorial%5D-compare-registers-codecaves-codecave-sample-included/

kingadent
06-02-2013, 10:32 PM
No offense Optantic, but doing a cave with endel's is idiocy, not only is it overly complex for no reason, but it's about as advanced as XPP.I wouldn't recommend it. Ever.

optantic
06-03-2013, 12:16 AM
No offense Optantic, but doing a cave with endel's is idiocy, not only is it overly complex for no reason, but it's about as advanced as XPP.I wouldn't recommend it. Ever.
What do you mean? Codecave function is the same on any trainer engine, endel, xpg, xyz.
personally, endel is most easiest to code and easiest learn from


In terms of simplicity or idiocy, it depends on your knowledge
This


DWORD Ptr1, Ptr2;

__asm
{
mr Ptr1,r6
mr Ptr2,r9
}

Is just the same as this:



DWORD Ptr1;


__asm
{
mr Ptr1,r6
}


__asm{


}


DWORD Ptr2;


__asm
{
mr Ptr2,r9
}


endel is recommended for newbies.

kingadent
06-03-2013, 12:11 PM
Except in XPG's engine and XYZ's, you don't have to add anything in the main.cpp or the kernel.h, and if someone's a newbie they shouldn't try to make a cave, ever hooked wrong? Well if you did you should know it can lead to some nasty bugs.

optantic
06-03-2013, 08:44 PM
Except in XPG's engine and XYZ's, you don't have to add anything in the main.cpp or the kernel.h, and if someone's a newbie they shouldn't try to make a cave, ever hooked wrong? Well if you did you should know it can lead to some nasty bugs.

You don't have to add anything to main.cpp or kernel.h in those two trainer engines because it's already pre-made before it got released
Since, it's not pre-made in endel engine, that's why there's the tutorial on how to add cave function to it.
Even if one fails to fully follow the instructions on how to add the codings to main.cpp or kernel.h, there won't be any bugs in the trainer because VS will not allow the trainer to be build.

To be honest, all 3 trainer engines are written in C++ or C? So any functions in endel engine can be added to the X** engine and any functions in X** engine can be added to endel engine. IMAO, endel is the easiest to use because for a C,C++ dummy like me, I really don't have a clue on how to built any kind of trainer (cave or not) using the X** engines, but on endel engine it's as easy to built as 1 2 3.

kingadent
06-04-2013, 10:30 AM
Except VS won't bug out if the hook is wrong, it doesn't know if it's wrong.
And seeing how Deadly's engine is older than Endel's and still has more features while stock, it shows me it's better.

And i would be happy to teach anyone to use a different engine than Endel's, i have used Endel's before, and once you go Deadly you don't go back :P

I'm sorry if i seem hostile or anything, i just love a good debate, i appreciate everything you and the other trainer makers do, you provide us with trainers for every game we like, so thank you.

optantic
06-04-2013, 08:26 PM
Yes, we might have different opinions. But, it's all for good intentions :)
The users will decide which one they want to use.

michaelxan
03-22-2015, 05:58 PM
wow thanks for this

michaelxan
03-22-2015, 11:28 PM
can I download it, thanks

Sephiroth
03-23-2015, 12:55 AM
can I download it, thanks

It's a trainer source. There is nothing to download lol.

vwan
04-16-2015, 07:28 AM
thank alots of

nebursaga
04-16-2015, 09:23 PM
Wow men it´s a great work, thanks for share.

kravis
01-28-2017, 07:16 PM
where is zip ?

aildorock
04-05-2018, 07:36 PM
WOOOWWW! THANKS A LOT

- - - Updated - - -

GOOD WORK!

Nordin2
04-19-2018, 08:37 AM
thanks a lot