Jump to content

Question

Posted

Anybody can tips me some description for AI parameters of NPCs? Currently GF server.

 

At first, me interest what is it this a param for NPC in ai.obj:

myself.p_state != 3

This uses in this timer:

  EventHandler TIMER_FIRED_EX( timer_id )
  {
    if( timer_id == 2001 )
    {
      if( gg::GetAbnormalLevel( myself.sm, myself::Skill_GetAbnormalType( SelfBuff ) ) <= 0 && myself.p_state != 3 )
      {
        if( myself::Skill_GetConsumeMP( SelfBuff ) < myself.sm.mp &&
            myself::Skill_GetConsumeHP( SelfBuff ) < myself.sm.hp &&
            myself::Skill_InReuseDelay( SelfBuff ) == @FALSE )
        {
          myself::AddUseSkillDesire( myself.sm, SelfBuff, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000 );
        }
      }
      myself::AddTimerEx( 2001, 10000 );
    }
    if( timer_id == 2002 )
    {
      if( myself::Skill_GetConsumeMP( SelfBuff ) < myself.sm.mp &&
          myself::Skill_GetConsumeHP( SelfBuff ) < myself.sm.hp &&
          myself::Skill_InReuseDelay( SelfBuff ) == @FALSE )
      {
        myself::AddUseSkillDesire( myself.sm, SelfBuff, @ST_HEAL, @AMT_MOVE_TO_TARGET, 1000000 );
      }
    }
    super;
  }

 

If someone have a link for description of other params thanks in advance.

1 answer to this question

Recommended Posts

  • 1
Posted

Hi, it's about what's the NPC is doing:

 

PSTATE_IDLE=0
PSTATE_MOVE_AROUND=1
PSTATE_DO_NOTHING=2
PSTATE_ATTACK=3
PSTATE_CHASE=4
PSTATE_FLEE=5
PSTATE_GET_ITEM=6
PSTATE_FOLLOW=7
PSTATE_DECAYING=8
PSTATE_MOVE_TO_WAY_POINT=9
PSTATE_USE_SKILL=10
PSTATE_MOVE_TO=11
PSTATE_EFFECT_ACTION=12
PSTATE_EFFECT_ACTION2=13
PSTATE_PET_DEFAULT=14
PSTATE_MOVE_TO_TARGET=15
PSTATE_MOVE_SUPERPOINT=16
PSTATE_MOVE_FREEWAY=17

  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock