Page 1 of 1

I don't get it...driving me crazy

Posted: Mon Jun 16, 2003 4:22 pm
by Amadeus
This is officially driving me mad. I added a little block in EQLib_MacroParser.cpp that looks like this:

(note: Bolded is new code, nonbolded is old code already there)

Code: Select all

						// $char(id)
						} else if (!strncmp("char(id)",szVar,8)) {
							CHAR szTemp[MAX_STRING] = {0};
							i+=7;
							itoa(pChar->SpawnID,szTemp,10);
							strcat(szOutput,szTemp);
							j+=strlen(szTemp);

[b]						// $char(DAR)
						} else if (!strncmp("char(DAR)",szVar,9)) {
							CHAR szTemp[MAX_STRING] = {0};
							i+=8;
							for ( int l=0; l <= 14; l++ )
								k += pCharInfo->Buff[l].DamageAbsorbRemaining;
							itoa(k,szTemp,10);
							strcat(szOutput,szTemp);
							j+=strlen(szTemp);[/b]

						// $char(x)
						} else if (!strncmp("char(x)",szVar,7)) {
							CHAR szTemp[MAX_STRING] = {0};
							i+=6;
							sprintf(szTemp,"%1.2f",pChar->X);
							strcat(szOutput,szTemp);
							j+=strlen(szTemp);
so..then I go and type '/echo $char(DAR)' ...and I get
[MacroQuest] @char(DAR)
as if the thing doesn't exist at all! ...grrrrr

Posted: Mon Jun 16, 2003 5:08 pm
by dont_know_at_all
At the top: _strlwr(szVar);

Change your string to "char(dar)"...

Posted: Mon Jun 16, 2003 11:18 pm
by icon
Whoa now THAT would be useful!

Damage Absorb Remaining... kick ass! Will that be included in the latest CVS anytime soon?

- Icon

Posted: Tue Jun 17, 2003 12:08 am
by Amadeus
It's incoming ..hehe

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:20 pm
by xyilla

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:21 pm
by xyilla

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:22 pm
by xyilla

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:24 pm
by xyilla

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:26 pm
by xyilla

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:27 pm
by xyilla

Re: I don't get it...driving me crazy

Posted: Wed Jan 21, 2026 9:28 pm
by xyilla