Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-08-2004, 11:15 PM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default Fleeing MOBs

If your feeling adventurous, here's a hack to enable fleeing MOBs that uses the existing Fear spell code. The Z axis pathing isn't that great (probably very bad for dungeons).
Line numbers are approximate!


Source/zone/features.h
Line: 108
< //#define ENABLE_FEAR_PATHING 1
---
> #define ENABLE_FEAR_PATHING 1



Source/zone/mob.h
Line: 1874
< uint8 fear_state;
---
> uint8 fear_state;
> uint8 flee_state;



Source/zone/mob.h
Line: 219
< fearStateStuck
< };
---
> fearStateStuck
> };

> enum { //flee states
> fleeStateNotFleeing = 0,
> fleeStateFleeing
> };



Source/zone/mob.cpp
Line: 313
< fear_state = fearStateNotFeared;
---
> fear_state = fearStateNotFeared;
> flee_state = fleeStateNotFleeing;



Source/zone/attack.cpp
Line: 3515
< //unsigned char test[sizeof(Action_Struct)];
---
> //#ifdef ENABLE_FEAR_PATHING

> //flee if HP low
> if ((flee_state == fleeStateNotFleeing) && (GetHPRatio() <= 20))
> {
> SetFeared(other, 600 );
> flee_state = fleeStateFleeing;
> }

> //#endif

> //unsigned char test[sizeof(Action_Struct)];



MobAI.cpp
Line: 485
< if(fear_state != fearStateNotFeared) {
---
> if(fear_state != fearStateNotFeared) {

> //stop fleeing if HP recovered
> if (flee_state != fleeStateNotFleeing && GetHPRatio() > 20)
> {
> flee_state = fleeStateNotFleeing;
> fear_state = fearStateNotFeared;
> }



Isues:
-Some MOBs on the current DB have no regen therefore their HP will never recover and they will never stop fleeing.
-A high level MOB will flee from a low level PC.
-Assisted MOBs will flee.
-MOBs flee at full speed regardless of HP.
-Some MOBs should never flee.
-Z axis pathing is incorrect.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:26 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3