Working for variables.
News variables is going to be inserted here.Working for adding more at the moment.
in embparser: Code:
ExportVar(packagename.c_str(), "name", mob->GetName()); Code:
if (mob) { |
you should not use the hps of the monster but its hpratio
=) |
just a hint imho :
setting variables gets them exported for ALL mobs, on MANY events. This can really be useless overhead. e.g. the $userid and $ugender beeing exported every EVENT_ATTACK is wasted CPU. When in need of a variable, for a specific quest or situation or mob , it's advisable to use perl calling C functions, as submitted by m0oni9 Just my 2 copper. |
per Scorpicus2k, this change will be going in: http://www.eqemulator.net/forums/viewtopic.php?t=13920
meaning that we can start calling functions from the server. IMO we should move as many of these exported variables into getVariable functions on the server as possible. This will save some overhead. Once you have the userid exported (I'm assuming this is charid?.. haven't checked), you can use that to determine player level, inventory, race, gender, etc. It just doesn't make sense to keep a lot of these variables the way they are with this new capability, so if you are thinking of adding new ones, please take a look at the perl/XS docs. The framework is now in to start adding functions. Briefly, the way I do it is:
I had plans to add some new functions (to replace hasitem, etc), and also write a little tutorial.. I'm thinking I may not get around to it before I take off to school this week, though. :cry: |
All times are GMT -4. The time now is 07:15 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.