Page 1 of 2
work in progress AACastingTimeModifier I need testers
Posted: Tue Aug 05, 2003 9:02 pm
by EqMule
I dont have a char with an AA point in spell casting mastery or whatever AA reduces casting time, so I need help, can someone with that AA test this and check the return? Does it work at all?
Code: Select all
[color=red]sprintf(szTemp,"%1.2f",(FLOAT)mycasttime/1000);
}[/color] else if (!strncmp(szArg,"AAcasttime",10)) {
DWORD CharInfo = NULL;
CharInfo = (DWORD)*EQADDR_CHAR_INFO;
DWORD AAcasttime = 0;
__asm{
push ecx;
mov ecx, dword ptr [CharInfo];
push dword ptr [pSpell];
call dword ptr [EQADDR_GETAACASTINGTIMEMODIFIER];
mov [AAcasttime], eax;
pop ecx;
};
AAcasttime = pSpell->CastTime + AAcasttime;
DebugSpew("AAcasttime %d pSpell->CastTime = %d",AAcasttime,pSpell->CastTime);
sprintf(szTemp,"%1.2f",(FLOAT)AAcasttime/1000);
}[color=red] else if (!strncmp(szArg,"recoverytime",12)) {[/color]
offset is
Code: Select all
[Function Locations]
GetAACastingTimeModifier=0046E27D
Updated for new offset...
Posted: Wed Aug 06, 2003 4:13 am
by kagonis
I will test it. I have some AA that decreases the casting time of my nukes.
But I'm pretty dumb on how to add new code, so if you could tell me what files to insert the code into, and what text to search and replace? :)
Posted: Wed Aug 06, 2003 4:38 am
by EqMule
if you look at my post for the mycasttime code, you should be able to get this in. the red text is text that allready exist in your EQLib_Macroparser.cpp and there is a start and an end, find thoose places and you know where to insert this...
If nothing else works, you can contact me on MSN and I will help.
Posted: Wed Aug 06, 2003 6:08 am
by kagonis
Okay. I will compile a new MQ after patch today, when new offsets have been found. Then report back here :)
Posted: Wed Aug 06, 2003 11:32 am
by wassup
I have pretty much every AA that is of any use for my main character, and this is of great interest to me.
I will add it in and see how it goes.
Posted: Wed Aug 06, 2003 3:16 pm
by kagonis
I probably did something wrong..
Code: Select all
if not exist ".\Release/" mkdir ".\Release"
cl.exe /nologo /MT /W3 /GX /O2 /I "..\dxsdk81\include" /D "_USRDLL" /D "
EQLIB_EXPORTS" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "CINTERFACE" /
Fp".\Release\eqlib.pch" /YX /Fo".\Release\\" /Fd".\Release\\" /FD /c /Zi /Zp1 E
QLib_Commands.cpp EQLib_Hooks.cpp EQLib_Interp.cpp EQLib_MacroCommands.cpp EQLib
_MacroParser.cpp EQLib_Main.cpp EQLib_MemChecks.cpp EQLib_Mouse.cpp EQLib_Telnet
Server.cpp EQLib_Utilities.cpp PerlMod.cpp PerlModCore.cpp stdafx.cpp timers.cpp
EQLib_Commands.cpp
EQLib_Hooks.cpp
EQLib_Interp.cpp
EQLib_MacroCommands.cpp
EQLib_MacroParser.cpp
EQLib_MacroParser.cpp(4297) : error C2094: label 'EQADDR_GETAACASTINGTIMEMODIFIE
R' was undefined
EQLib_Main.cpp
EQLib_MemChecks.cpp
EQLib_Mouse.cpp
EQLib_TelnetServer.cpp
EQLib_Utilities.cpp
PerlMod.cpp
PerlModCore.cpp
stdafx.cpp
timers.cpp
NMAKE : U1077: 'cl.exe' : return code '0x2'
Stop.
Posted: Wed Aug 06, 2003 5:10 pm
by wassup
Wassup wrote:I have pretty much every AA that is of any use for my main character, and this is of great interest to me.
I will add it in and see how it goes.
Had to add in some code that was missing. I just copied and pasted, then changed FOCUS to AA in the appropriate lines.
Hopefully it works, but now just have to wait for offsets.
Not working...
Posted: Wed Aug 06, 2003 11:33 pm
by wassup
Not working with the current offsets and code, but I had to make some assumptions about some things missing that were causing compile errors.
I added some code through some guessing and it compiles, but does not work.
Posted: Thu Aug 07, 2003 4:59 am
by EqMule
ok ty for testing it, I will check what the return value is, I assume you just got 0 back? we'll have this fixed soon... if anyone has a char with AA spent on castingtime and wanna let me borrow the account for an hour or so to test, you can PM me.
Posted: Thu Aug 07, 2003 9:07 am
by wassup
Sorry, forgot to mention that.
Using
/echo $spell("Spellname",AACasttime) returned the value 0, just as you said.
BTW, to get it to compile I basically copy pasted some stuff you did with the Focus modifier so it would compile. This is everything I added:
in EQLIb_MacroParser.cpp
Code: Select all
[color=yellow]sprintf(szTemp,"%1.2f",(FLOAT)mycasttime/1000);
} [/color][color=red]else if (!strncmp(szArg,"AAcasttime",10)) {
DWORD CharInfo = NULL;
CharInfo = (DWORD)*EQADDR_CHAR_INFO;
DWORD AAcasttime = 0;
__asm{
push ecx;
mov ecx, dword ptr [CharInfo];
push dword ptr [pSpell];
call dword ptr [EQADDR_GETAACASTINGTIMEMODIFIER];
mov [AAcasttime], eax;
pop ecx;
};
AAcasttime = pSpell->CastTime + AAcasttime;
DebugSpew("AAcasttime %d pSpell->CastTime = %d",AAcasttime,pSpell->CastTime);
sprintf(szTemp,"%1.2f",(FLOAT)AAcasttime/1000);
}[/color][color=yellow] else if (!strncmp(szArg,"recoverytime",12)) [/color]{
in EQLib_Main.cpp
Code: Select all
GetPrivateProfileString("Function Locations","GetAACastingTimeModifier","0",szBuffer,MAX_STRING,ClientINI); EQADDR_GETAACASTINGTIMEMODIFIER = (DWORD)strtoul(szBuffer,NULL,16);
Code: Select all
DWORD EQADDR_GETAACASTINGTIMEMODIFIER=0;
in EQLib.h
Code: Select all
extern DWORD EQADDR_GETAACASTINGTIMEMODIFIER;
Offsets:
Code: Select all
[Function Locations]
GetAACastingTimeModifier=0046E27D
Posted: Thu Aug 07, 2003 10:18 am
by EqMule
yeah thanks for posting that, its exactly looking as what I have in my source... I need to get hold of a test char or something... Because if I dont have any AA modifire, I would assume that it indeed should return 0, but I hoped that you, who had an AA would get a different return , ah well at least it didnt crash you, and thats a good sign, I think I make the call correctly, just need to figure out where the return value ends up... in ebx maybe... I need a char with that skill, if anyone knows a expbug that grants me 15 million points, let me know and ill put it on the castingtime thing lol
Posted: Fri Aug 08, 2003 9:07 am
by wassup
Is there anything I can do to help you here EqMule? I wouldn't mind putting in some time to help you with this at all.
Maybe that map file from test would give you some ideas?
Code: Select all
int __cdecl GetSpellCastingTime(void) 00448b97 ?GetSpellCastingTime@@YAHXZ f Suite_EQ.obj 0001:00047b97
or
Code: Select all
public: int __thiscall AltAdvManager::CalculateSpellCastingMastery(class EQ_PC *) 00465b68 ?CalculateSpellCastingMastery@AltAdvManager@@QAEHPAVEQ_PC@@@Z f EQ_AltAdvManager.obj 0001:00064b68
Thanks for
Posted: Sun Aug 10, 2003 7:58 pm
by EqMule
im pretty sure the GetAACastingTimeModifier calls the CalculateSpellCastingMastery function as one of the things it does... I almost forgot about this, keep it bumped and Ill eventually get it done, I think I might have a char now I can test with...
Posted: Sun Aug 10, 2003 11:12 pm
by kaz
EQMule,
return values always go into eax register
Posted: Mon Aug 11, 2003 9:11 am
by EqMule
thanks Kaz, I had no idea, but thats good to know...
And now... Wassup, here is some code, you can lab with... this makes a call to the
Code: Select all
AltAdvManager::CalculateSpellCastingMastery(class EQ_PC *)
u posted... I get 0 as the return value, but I dont have a char to test with so... knock yourself out. At least it doesnt crash you, so Im pretty sure the call is solid...
Code: Select all
else if (!strncmp(szArg,"AAcasttime",10)) {
DWORD CharInfo = NULL;
CharInfo = (DWORD)*EQADDR_CHAR_INFO;
DWORD AltAdvManager = NULL;
AltAdvManager = (DWORD)*EQADDR_CLASSALTADVMANAGER;
DWORD AAcasttime = 0;
__asm{
push ecx;
mov ecx, dword ptr [AltAdvManager];
push CharInfo;
call dword ptr [EQADDR_CALCULATESPELLCASTINGMASTERY];
mov [AAcasttime], eax;
pop ecx;
};
DebugSpew("eax = %x",AAcasttime);
sprintf(szTemp,"%x",AAcasttime);
}
eqgame.ini (offsets are for eqgame.exe stamped Aug 06 2003)
Code: Select all
[Function Locations]
CalculateSpellCastingMastery=00462497
[Class Locations]
ClassAltAdvManager=005D93A4
You know the drill with the extern in eqlib.h and the main.cpp inireading and so on to get this to work...
and oh, I looked at GetSpellCastingTime(void) but since it takes no parameters it requires some research, maybe ill look at it someday when Im bored...
And about SpellcastingMastery... as far as I know, it only has the possibility to lower the mana cost by 5 10 or 15% so... well there is little chance of you getting a return value unless you call this during a spellcast, and the check actually goes in... complicated stuff, as I cant even prove it works... maybe SOE screwed the nice folks, that spent money in this AA... I think I will leave this thing for now... Is there any AA that actually ALWAYS lower manacost or castingtime like the focusitems does?