Thread: Need new event
View Single Post
  #3  
Old 02-17-2004, 12:29 PM
Monrezz's Avatar
Monrezz
Dragon
 
Join Date: Mar 2003
Location: #loc
Posts: 745
Default

Done (note this is for Perl):

zone\embparser.cpp ~ Line 165:
Code:
		ExportVar(packagename.c_str(), "hp", itoa(mob->GetHP()));
		ExportVar(packagename.c_str(), "mana", itoa(mob->GetMana()));
and ~ Line 174:
Code:
		ExportVar(packagename.c_str(), "mclass", GetEQClassName(npcmob->GetClass()));
		ExportVar(packagename.c_str(), "mobhp", itoa(npcmob->GetHP()));
		ExportVar(packagename.c_str(), "mobmana", itoa(npcmob->GetMana()));
Example uses:

if($text =~ /hp/i)
{
quest::say("You have $hp hitpoints.");
}

if($text =~ /mana/i)
{
quest::say("You have $mana mana.");
}

if($text =~ /mobhp/i)
{
quest::say("I have $mobhp hitpoints.");
}

if($text =~ /mobmana/i)
{
quest::say("I have $mobmana mana.");
}

if($text =~ /mclass/i)
{
quest::say("I am a $mclass.");
}

Hope this helps.
__________________

kRPG Profile
Reply With Quote