Passive Monster

You are here:
← All Topics
Version: 2019.200 Requirements:uMMORPG3d, ToolsScript Define:_IMMONPCRESTRICTIONS
Core Changes:YesTutorial Video:No

Description

Passive Monster gives your monsters more flavor, you can setup completely passive monsters. Which will run on being attacked or on a percentage of health missing. Or you can setup an afraid monster and tell it at what percentage of health it will run away from combat.


Core Changes

  1. [Required] Open the following script Monster.cs. See Changes...

    Locate this line:
    private string UpdateServer_IDLE()

    Inside that section locate this:

    if(EventSkillRequest())

    Add this above it:

    if(EventRunaway()) { return Runaway(); }
  2. [Required] Open the following script Monster.cs. See Changes...

    Locate this line:

    private string UpdateServer_MOVING()

    Inside that section locate this:

    if(EventTargetTooFarToFollow())

    Add this above it:

    if(EventRunaway()) { return Runaway(); }
  3. [Required] Open the following script Monster.cs. See Changes...

    Locate this line:

    private string UpdateServer_CASTING()

    Inside that section locate this:

    if(EventSkillFinished())

    Add this above it:

    if(EventRunaway()) { return Runaway(); }
  4. [Required] Open the following script Monster.cs. See Changes...

    Locate this line:

    private string UpdateServer_DEAD()

    Inside that section locate this:

    if(EventDied())

    Add this below it:

    if(EventRunaway()) { return Runaway(); }
  5. [Required] Open the following script Monster.cs. See Changes...

    Locate this line:
    private override void OnAggro(Entity entity)

    Inside that section locate this:

    Utils.InvokeMany(typeof(Monster), this, "OnAggro_", entity);

    Add this above it:

    if(HealthPercent() < healthThreshold && isAfraid) target = null;
  6. [Required] Open the following script Monster.cs. See Changes...

    Locate this line:
    public override bool CanAttack(Entity entity)
    {
    return base.CanAttack(entity) &&
    (entity is Player ||
    entity is Pet ||
    entity is Mount);
    }

    Modify to match:

    public override bool CanAttack(Entity entity)
    {
    return base.CanAttack(entity) &&
    (entity is Player ||
    entity is Pet ||
    entity is Mount) &&
    !isPassive;
    }

Installation

  1. [Required] Apply the core changes.

Screenshot

Support the IndieMMO Team Today!

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.