Nice job @ Marc. I was playing around with it and added this since I usually make a mage character. Feel free to add the code to your table if you want.
If anyone else wants to just add it to the table they downloaded, just start CE and the game up as usual. In the CE interface press the Memory View button. Then select from the menu Tools->Auto Assemble. Then copy and paste the code below and then select File->Assign to Current Cheat Table. Then just rename the entry to something like "No Spell Cost". Have fun.
No Spell Cost:
Code: Select all
{ Game : div.exe
Version:
Date : 2019-12-27
This just nops out the subtraction of the spell cost.
}
[ENABLE]
alloc(OrigBytes,3)
registersymbol(OrigBytes)
aobscanmodule(NoSpellCost,div.exe,29 48 08 83 7C 24 34 00) // should be unique
registersymbol(NoSpellCost)
OrigBytes:
readmem(NoSpellCost,3)
NoSpellCost:
db 90 90 90
[DISABLE]
NoSpellCost:
readmem(OrigBytes,3)
unregistersymbol(OrigBytes)
unregistersymbol(NoSpellCost)
dealloc(OrigBytes)
{
// ORIGINAL CODE - INJECTION POINT: "div.exe"+21F5B
"div.exe"+21F31: 8B 02 - mov eax,[edx]
"div.exe"+21F33: 83 4A 04 01 - or dword ptr [edx+04],01
"div.exe"+21F37: F6 80 20 02 00 00 40 - test byte ptr [eax+00000220],40
"div.exe"+21F3E: 74 1E - je div.exe+21F5E
"div.exe"+21F40: 83 7C 24 30 00 - cmp dword ptr [esp+30],00
"div.exe"+21F45: 75 17 - jne div.exe+21F5E
"div.exe"+21F47: 8B 0D 38 8C 65 00 - mov ecx,[div.exe+258C38]
"div.exe"+21F4D: 8B B4 24 AC 11 00 00 - mov esi,[esp+000011AC]
"div.exe"+21F54: 8B 4C B1 28 - mov ecx,[ecx+esi*4+28]
"div.exe"+21F58: 8B 40 2C - mov eax,[eax+2C]
// ---------- INJECTING HERE ----------
"div.exe"+21F5B: 29 48 08 - sub [eax+08],ecx
"div.exe"+21F5E: 83 7C 24 34 00 - cmp dword ptr [esp+34],00
// ---------- DONE INJECTING ----------
"div.exe"+21F63: 0F 84 8D 01 00 00 - je div.exe+220F6
"div.exe"+21F69: 8B 32 - mov esi,[edx]
"div.exe"+21F6B: 80 BE 18 02 00 00 01 - cmp byte ptr [esi+00000218],01
"div.exe"+21F72: 0F 85 7E 01 00 00 - jne div.exe+220F6
"div.exe"+21F78: 8B 86 E4 02 00 00 - mov eax,[esi+000002E4]
"div.exe"+21F7E: 85 C0 - test eax,eax
"div.exe"+21F80: 0F 84 70 01 00 00 - je div.exe+220F6
"div.exe"+21F86: 8B 54 24 28 - mov edx,[esp+28]
"div.exe"+21F8A: 8D 4A 01 - lea ecx,[edx+01]
"div.exe"+21F8D: 8D 3C CD 00 00 00 00 - lea edi,[ecx*8+00000000]
}