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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...