NEW FEATURE! $spell("name of spell",mycasttime)
Posted: Sun Aug 03, 2003 1:21 pm
this function gets your real casttime if you have focusitems on... it will report normal casttime if you dont have anything that will reduce the casttime...
in EQLib_MacroParser.cpp
in EQLib_Main.cpp
in EQLib.h
and finally you need a new offset in eqgame.ini
ok, I wrote this function to cut down castingtime in a certain tradeskill which requires casting... it reduces my chars castingtime alot, as a sidebonus it will give you an extra edge when timing is crucial in high end encounters.. it is GREAT!
just replace this line in your spellsub.mac
with
and you are set to go!
Can I get this tested and cvsed please?
edit 04 Aug 2003 for Wassup's fix of a VS.NET issue...
in EQLib_MacroParser.cpp
Code: Select all
[color=red]} else if (!strncmp(szArg,"casttime",8)) {
sprintf(szTemp,"%1.2f",(FLOAT)pSpell->CastTime/1000);
}[/color] else if (!strncmp(szArg,"mycasttime",10)) {
DWORD CharInfo = NULL;
CharInfo = (DWORD)*EQADDR_CHAR_INFO;
DWORD mycasttime = 0;
__asm{
push ecx;
mov ecx, dword ptr [CharInfo];
push 0;
push dword ptr [pSpell];
call dword ptr [EQADDR_GETFOCUSCASTINGTIMEMODIFIER];
mov [mycasttime], eax;
pop ecx;
};
mycasttime = pSpell->CastTime + mycasttime;
DebugSpew("mycasttime %d pSpell->CastTime = %d",mycasttime,pSpell->CastTime);
sprintf(szTemp,"%1.2f",(FLOAT)mycasttime/1000);
}[color=red] else if (!strncmp(szArg,"recoverytime",12)) {[/color] Code: Select all
DWORD EQADDR_GETFOCUSCASTINGTIMEMODIFIER=0;Code: Select all
GetPrivateProfileString("Function Locations","GetFocusCastingTimeModifier","0",szBuffer,MAX_STRING,ClientINI); EQADDR_GETFOCUSCASTINGTIMEMODIFIER = (DWORD)strtoul(szBuffer,NULL,16); Code: Select all
extern DWORD EQADDR_GETFOCUSCASTINGTIMEMODIFIER;Code: Select all
[Function Locations]
GetFocusCastingTimeModifier=0046DF33just replace this line in your spellsub.mac
Code: Select all
/varset CastTime $spell("$SpellName",casttime)Code: Select all
/varset CastTime $spell("$SpellName",mycasttime)Can I get this tested and cvsed please?
edit 04 Aug 2003 for Wassup's fix of a VS.NET issue...