Target Variables
I wanted people to have a change to test these before i put them in the code. Heres some more Variables!
$hpp - Returns the HitPoints Numerical Perecent of the Mob $engaged - Returns 1 if the mob is Engaged (Attacking) $hastarget - Returns 1 if the mob has a Target $target[isclient] - Returns 1 if our target IS a Client (Player) $target[accountid] - Returns Account Id if mob's target is a Client $target[accountname] - Returns Account Name if mob's target is a client $target[charid] - Returns CharacterID if mob's target is a client $target[userid] - Returns UserID if mob's target is a client $target[guildrank] - Returns Guild Rank if mob's target is a client $target[status] - Returns Status if mob's target is a client $target[isnpc] - Returns 1 if mob's target is an NPC $target[name] - Returns the Name of the mob's target $target[race] - Returns the Race of the mob's target $target[class] - Returns the Class of the mob's target $target[level] - Returns the Level of the mob's target $target[hpp] - Returns the HitPoint Percent of the mob's target Here is the Code: Code:
EmbParser.cpp in PerlembParser::Event Under packagename = GetPkgPrefix(npcid); Add: Code:
sub EVENT_SPAWN |
Any chance you could look at changing these into C functions? As long as there is some sort of mob ID that can be used to look things up from the server it should be pretty doable. Also, a lot of those itoa() conversions, etc, could be done away with. Would save lots of overhead.
BTW, there is a typo in the below code: ExportVar(packagename.c_str(), "taget[hpp]", itoa(target->GetHPRatio())); |
yup, this is gonna look like a bump to m0oni's post :)
If you can give it a try, accessing EMU variables from perl just takes you to declare prototype in a *.xs source file, then you call for that function in the quest as you need, instead of processing all ExportVars for each event. Also, maybe i missed something, but is this is Perl, $target[xxx] just thrills me (means you exported the xxx as a constant to qstnnn:: package :?) take a look there : http://www.eqemulator.net/forums/viewtopic.php?t=12393 |
All times are GMT -4. The time now is 04:58 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.