Oddly, I couldn't find the last inverse function. Oh well, here's what I got anyway.
Only open the spoilers if you're comfortable reading code, kthx.
These should be good for HP Washing
DecHPVal
Code:signed int __cdecl DecHPVal(__int32 a1) { __int32 v1; // eax@1 signed int v3; // [sp-4h] [bp-8h]@7 v1 = a1 % 1000 / 100; if ( !v1 ) //If you're a beginner return 12; if ( v1 == 1 ) //Warrior return 54; if ( v1 == 2 ) //Mage { if ( a1 / 100 == 32 ) //More specifically, Battlemage { v3 = 24; } else { if ( a1 / 100 != 22 && a1 != 2001 ) // If not Evan v3 = 10; else v3 = 16; / Evan } return v3; } if ( v1 <= 2 ) // Legends, resistance basic classes that are leftover return 0; if ( v1 <= 4 ) //Thieves and Bowmen return 20; if ( v1 != 5 ) //Anything else that hasn't been covered yet gets a 0 return 0; return 42; //Pirates }
DecMPVal
Code:__int32 __cdecl DecMPVal(__int32 a1) { __int32 v1; // eax@1 __int32 result; // eax@7 v1 = a1 % 1000 / 100; if ( v1 ) //If not a beginner class { if ( v1 == 1 ) //If you're a warrior { result = 4; } else { if ( v1 == 2 ) //Mage { result = 3 * _ZtlSecureFuse( (*TSingleton_CWvsContext___ms_pInstance + 8392), *(*TSingleton_CWvsContext___ms_pInstance + 8400)) / 40 + 30; } else { if ( v1 > 2 ) //If a bowman, thief, or pirate { if ( v1 <= 4 ) //If a bowman or thief return 12; if ( v1 == 5 ) //If a pirate return 16; } result = 0; } } } else { result = 8; //Anything not covered } return result; }
IncHPVal
Code:signed int __cdecl IncHPVal(__int32 a1) { __int32 v1; // eax@1 signed int v3; // [sp-4h] [bp-8h]@7 v1 = a1 % 1000 / 100; if ( !v1 ) //Beginner return 8; if ( v1 == 1 ) //Warrior return 20; if ( v1 == 2 ) //Mage { if ( a1 / 100 != 32 ) //If not a battlemage { if ( a1 / 100 != 22 && a1 != 2001 ) //If not an Evan v3 = 6; else //If you're an Evan v3 = 12; return v3; } return 20; //Battlemage } if ( v1 <= 2 ) //All other beginner classes return 0; if ( v1 <= 4 ) //Thieves and Bowmen return 16; if ( v1 != 5 ) //Anything else not yet covered return 0; return 18; //Pirates }
Bookmarks