Jump to content

5 posts in this topic

Recommended Posts

Posted (edited)

Can you show your whole Tweak.xm? Or is that it?

 

I also made a tutorial on MSHook hacking, so you might want to check that out. And hackable functions that work with MSHook are almost always something like __ZN6AddMoneyEi not what you put.

Updated by Guest
Posted (edited)

It's something like that:

 

int (*old__ZN7profile20setArmorUpgradeLevelEiN5armor5ParamEhb)();


int $__ZN7profile20setArmorUpgradeLevelEiN5armor5ParamEhb() { 

 return 999; 

 }


%ctor { 

MSHookFunction(((int*)MSFindSymbol(NULL, "__ZN7profile6addExpEi")),(int*)$__ZN7profile6addExpEi,(int**)&old__ZN7profile6addExpEi);

}
Updated by xXtcikotciXx
Posted (edited)
void (old*_Slot_SetMaxHP) (void *self)(int i1);




void Slot_SetMaxHP (void *self)(int i1) {
return old_Slot_SetMaxHP(self, 9999);
}


%ctor {

MSHookFunction(((void*)MSFindSymbol(NULL,"__YourOriginalSymbol")),(void*)Slot_SetMaxHP,(void**)&old_SlotSetMaxHP);

}

The only thing you have to do is replace 'YourOriginalSymbol' with the one from IDA. I saw your function has an integer argument so I put it like void(argument)

Updated by castix

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines