- Joined
- Oct 29, 2007
- Messages
- 1,267
- Reaction score
- 1,284
Nothing super special.. this is a simple work (very ugly code) made by me on assembler inline, but maybe some person like use, not problems with stack because I don't touch none register from main on this code. This is the most correct way to use assembler inline with the main.exe (Offsets for 1.03.13 JPN).
Some screenshots:
.cpp file
PS: To make calc for every added sword you only must apply ItemId formula or more simple
for example for Sword custom with Index: 130 (in decimal) = 82 (in hexadecimal).
Then:
CMP wItem, 0x82 // Sword Index: 130
Very Simple !
Some screenshots:
.cpp file
Code:
WORD wItem = 0;[COLOR=#000000]
[/COLOR]DWORD ReturnOffset = 0x0059685C;
DWORD AllowTextOffset = 0x00596866;
[COLOR=#000000]
[/COLOR]void __declspec(naked) BladesWizardryDmg()
{
_asm
{
MOV wItem, CX
// ---
CMP wItem, 0x15 // Dark Reign Blade
JE AllowText
CMP wItem, 0x1D // Rune Sacred Blade
JE AllowText
// ---
JMP ReturnLoad
// ---
AllowText:
JMP AllowTextOffset
// ---
ReturnLoad:
JMP ReturnOffset
}
}
void cSpecialItemsTextHook()
{
Utils.SetRange((LPVOID)0x00596856, 6, ASM::NOP);
Utils.SetJmp((LPVOID)0x00596856, BladesWizardryDmg);
}
PS: To make calc for every added sword you only must apply ItemId formula or more simple
for example for Sword custom with Index: 130 (in decimal) = 82 (in hexadecimal).
Then:
CMP wItem, 0x82 // Sword Index: 130
Very Simple !
Attachments
You must be registered for see attachments list