Thread: #bot mana
View Single Post
  #1  
Old 09-18-2009, 09:47 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default #bot mana

Line 8341 or so in bot.cpp (search for #bot camp)

Code:
c->Message(0, "#bot mana - Report targetted bot's current mana.");
Line 8361 or wherever in bot.cpp
Code:
if (!strcasecmp(sep->arg[1], "mana")) 
	{ //Shin: Mana Report
		if((c->GetTarget() == NULL) || (c->GetTarget() == c) || !c->GetTarget()->IsBot()) {
			c->Message(15, "You must target a bot!");
			return;
		}
		Bot* tBot = c->GetTarget()->CastToBot();
		tBot->Say("Medding for Mana. I have %3.1f%% of %d mana. It is: %d", tBot->GetManaRatio(), tBot->GetMaxMana(), tBot->GetMana());
	}
Guess you can go c->GetTarget()->CastToBot()->Say() instead of tBot->Say(), but, simple addition is very useful in my book!
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote