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

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

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

Post by Amadeus » Mon Jun 16, 2003 4:22 pm

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

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Jun 16, 2003 5:08 pm

At the top: _strlwr(szVar);

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

icon
Official loudmouth
Official loudmouth
Posts: 158
Joined: Fri Jun 14, 2002 2:59 pm
Location: ...
Contact:

Post by icon » Mon Jun 16, 2003 11:18 pm

Whoa now THAT would be useful!

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

- Icon
In memory of [b][color=darkblue]MasTerKeyZ[/b][/color].

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Tue Jun 17, 2003 12:08 am

It's incoming ..hehe