Need some coding guru help

Junior Spellweaver
Joined
Sep 6, 2006
Messages
102
Reaction score
59
Hello,

I would ask an coding guru for little help. xd
So here my problem. I'm using DragoN addons everything fine there. Also i use kosp. When i load custom kosp script my mainsvrt.exe crash.
If dragon_addons.dll not loaded with mainsvrt everything ok. Kosp custom script is about deactivate rebirths during castle war. Its patching mainsvrt.exe memory guess

function RebirthOn(p)
Notice("Rebirths now deactivaded.")
WriteMemoryByte("0x41FFA0",194)
WriteMemoryByte("0x41FFA1",4)
WriteMemoryByte("0x41FFA2",0)
end

function RebirthOff(p)
Notice("Rebirths reactivated.")
WriteMemoryByte("0x41FFA0",85)
WriteMemoryByte("0x41FFA1",139)
WriteMemoryByte("0x41FFA2",236)
end

First one working like it should(i cant use rb). But second after /suicide when rb is used mainsvrt.exe crashing. I think because of that "bless" few seconds from dragon addons after you use rb. Thats why memory write for 2nd script is not correct.(i think) I don't have a clue how to find these WriteMemoryBytes could someone help me to fix it? I want these scripts running well with dragon_addons.dll

Thank you.
 
Try opening them in IDA pro, you can see the functons in there :)

Marvel - Need some coding guru help - RaGEZONE Forums


WriteMemoryByte("0x41FFA0",85)
Does nothing more as to write "85" to adr:0x41FFA0 ... Anyways, if the normal rb use is working with thedragons dll but isn't after you turned them off and on again with the script, just check the numbers on adr:0x41FFA0,0x41FFA1,0x41FFA2 , Type: BYTE/Char(dunno what you'll use) then compare the values to these ones:
WriteMemoryByte("0x41FFA0",85)
WriteMemoryByte("0x41FFA1",139)
WriteMemoryByte("0x41FFA2",236)(These few should be the original ones, so before you activate the script, check them!)
if they match, idk what's wrong, if not , change them.
 
Upvote 0
Yup. Thanks, that was easy with your help.

Notice("Rebirths reactivated.")
WriteMemoryByte("0x41FFA0",233)
WriteMemoryByte("0x41FFA1",43)
WriteMemoryByte("0x41FFA2",186)
end
 
Upvote 0
Back