/mana not working?

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

Moderator: MacroQuest Developers

Nesu
orc pawn
orc pawn
Posts: 10
Joined: Tue Mar 11, 2003 11:12 am

/mana not working?

Post by Nesu » Thu Apr 17, 2003 3:48 pm

In the latest release it looks as if the /mana command is no longer available. Was that intentional?

Anyway, I added the command back in as it is one that I use a lot. I shall post the code if anyone shows interest.

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

Post by Amadeus » Thu Apr 17, 2003 6:03 pm

I think it was an actual macro before put in the ini file, though I have forgotten the syntax.

Please post what you use though.

Nesu
orc pawn
orc pawn
Posts: 10
Joined: Tue Mar 11, 2003 11:12 am

Post by Nesu » Thu Apr 17, 2003 6:26 pm

Add this function to eqlib.cpp

Code: Select all

// ***************************************************************************
// Function:    Mana
// Description: Our '/Mana' command
// Usage:       /Mana
// ***************************************************************************
VOID Mana()
{
	PCHARINFO pCharInfo = GetCharInfo();
	DWORD dwMaxMana = GetMaxMana();
	char szMsg[MAX_STRING];

	if(dwMaxMana && pCharInfo)
	{
		sprintf (szMsg, "Current Mana - %d Max Mana - %d", pCharInfo->Mana, dwMaxMana);
		WriteChatColor(szMsg, USERCOLOR_DEFAULT);
	}
}
Add this in TakeControlofCommandList to eqlib.cpp

Code: Select all

{"/mana",		"Mana"},
right above

Code: Select all

{NULL,			NULL}
Add this to MQ.h

Code: Select all

extern "C" EQLIB_API VOID  Mana();
I had just really gotten used to being able to do /mana to see what my mana was. :)

Hope that helps.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Thu Apr 17, 2003 6:59 pm

Salutations,
LOL! Do this ingame with the line:

Code: Select all

/alias /mana Current Mana - $char(mana,cur) Max Mana - $char(mana,max)
then you can use /mana

Clawed
a ghoul
a ghoul
Posts: 105
Joined: Mon Jan 20, 2003 6:17 am

Post by Clawed » Thu Apr 17, 2003 7:11 pm

Check your config.ini, make sure you've renamed config.ini.dist to config.ini. This, as released on CVS and in the earlier ZIP release, includes the /mana command.
Clawed

Nesu
orc pawn
orc pawn
Posts: 10
Joined: Tue Mar 11, 2003 11:12 am

Post by Nesu » Thu Apr 17, 2003 7:11 pm

Ahhh...I had never set that alias up before and /mana always worked until the most recent code changes.

Thanks for the tip :oops: