EVENT_HP
Here's an example on how you can use it :
Code:
sub EVENT_SPAWN setnexthpevent(hp) is a command to fix at which hp ratio of the npc the next HP_EVENT will be triggered, in the example it is 80% and there is 2 variables : $hpevent and $hpratio $hpevent identifies the event to implement this you have to change all this : in mob.h : in the class Mob, just before the protected word : ~line 623 : Code:
// HP Event Code:
// HP Event in the constructor : ~line 320 add this before the end '}' : Code:
//HP Event in the function : void Mob::CreateHPPacket(APPLAYER* app, bool sendself) where you see : Quote:
Quote:
at the end of the file add this : Quote:
at the end of the function : void Parser::ExCommands(string command, string parms, int argnums, int32 npcid, Mob* other, Mob* mob ) ~ line 1257 after : Code:
else if (!strcmp(strlwr(command),"rebind")) { Code:
// HP Event now in embparser.cpp : in the function : void PerlembParser::Event(int event, int32 npcid, const char * data, Mob* npcmob, Mob* mob) ~ line 271 after the case EVENT_SIGNAL for example : add this : Code:
// HP_Event in function : void PerlembParser::map_funs(void) const add this after scop2k global commands ~line 440: Code:
// HP Event add this at the end : Quote:
|
forgot the initialisation in mob.cpp ' s constructor line 318
nexthpevent = 0; |
looks to be correct, id do it but ive been having some problems with my compiler. could you maybe send me binaries with your functions enabled?
|
did someone try it ???
|
ill try it as soon as i get my world codes the way i want them hehehe. for some reason im getting that item bug and im at still running 5.6 :(
|
I know the post is almost a month old but has it been added to any of the more recent source releases?
|
not added =)
|
I tested this and the events themselves seem to work fine, but if I use a quest::spawn() inside any of the events I get a casttoclient mob error maybe 15 times at which point the zone crashes. Any ideas if I'm doing something wrong or if it's the code? I can still use quest::spawn outside of the Hp events and it works.
|
no idea, for me it is working
only bug i have is when I give a spawn event script to a monster that i spawned with quest::spawn |
All times are GMT -4. The time now is 11:12 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.