EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Feature Requests (https://www.eqemulator.org/forums/forumdisplay.php?f=612)
-   -   Request/Question - always aggros npc (https://www.eqemulator.org/forums/showthread.php?t=41234)

Coenxai 04-14-2017 12:41 AM

Quote:

Originally Posted by ChaosSlayerZ (Post 254214)
I am not exactly sure what BT_Undead is? and how its different from just Undead?

BT is just BodyType -- so when I said BT_Undead, I'm basically just saying undead.

You can set up multiple factions to function differently. For instance, here are some factions that I use:

Undead KoS (-32000)
Undead KoS Assist (-32000, assist other undead in trouble)
Undead (0, won't attack, yay!)
Undead Assist (0, won't attack, yay! assist other undead in trouble)
NonNec KoS (undead that's KoS to everyone except necromancers)

That code I mentioned will only take the KoS conned mobs and make them attack higher level players if they exceed the undead threshold. Make sense?
Code:

RULE_INT(Aggro, UndeadLevelAggro, 6)
(GetBodyType() == BT_Undead && MyLevel >= RuleI(Aggro, UndeadLevelAggro))


ChaosSlayerZ 04-14-2017 01:02 AM

OK I see, yeah by Undead I always refer to the body type and not faction, since faction can be anything and can have any type of mobs of it ;)


Basically what I am saying that body type of a mob should be irrelevant to the rule.
If mob is KOS (by faction) and has the Always Aggro FLAG - it always aggros.

So it can be NON Undead and always aggro
Or it can Undead and don't aggro (because of level difference)

Just to be clear ;)

Coenxai 04-14-2017 01:27 AM

It will always aggro if it is threatenly or scowl, bodytype has nothing to do with it -- the ONLY exception is if it ISN'T KoS

Did you want ALWAYS_AGGRO to apply to indifferent (ally, etc.) mobs too?

ChaosSlayerZ 04-14-2017 01:54 AM

Quote:

Originally Posted by Coenxai (Post 254218)
It will always aggro if it is threatenly or scowl, bodytype has nothing to do with it -- the ONLY exception is if it ISN'T KoS

Did you want ALWAYS_AGGRO to apply to indifferent (ally, etc.) mobs too?


OK, I am sorry if I confusing you ;)

So let go over this again.
Normally, if we have a normal mob, that belongs to some faction and your faction is BAD (KOS or so) it will aggro. Unless you are much higher level than him.

Now, the FLAG that we are discussing should allow this mob to aggro (because of my BAD faction) even if it is out of level.

This FLAG should work instead of "Low INT" system that we currently have, because using INT stat for this is kind of stupid.

Thats what I am trying to say =)

Undead were only mentioned because it is USUALLY the type of mobs on LIVE that aggros out of level.

Obviously if mob is NOT KOS, it has no reason to aggro (unless I attack it)

But what will happen if mob is out of level range, my faction is good, BUT I attacked its friend? Normally mob will not assist because I am out of level, but mob with this FLAG should still assist because it sort of "fearless"


Sorry again if I am giving you a headache, I just want to make sure you getting me right ;)

Coenxai 04-14-2017 03:24 AM

Okay, let me try this again.

If it has the ALWAYS_AGGRO special ability. It will *ALWAYS* aggro if it's KoS. It doesn't matter the body type, level, intelligence, etc. It WILL aggro if this is set in my code.

Now, assisting (or yelling for help) is different, and it will require an additional change.

Code:

aggro.cpp

void EntityList::AIYellForHelp(Mob* sender, Mob* attacker)

  ...

                //if they are in range, make sure we are not green...
                        //then jump in if they are our friend
                        if(mob->GetSpecialAbility(ALWAYS_ASSIST) || mob->GetLevel() >= 50 || attacker->GetLevelCon(mob->GetLevel()) != CON_GREEN)

Code:

common.h

        PROX_AGGRO = 45,
        ALWAYS_AGGRO = 46,
        ALWAYS_ASSIST = 47,
        MAX_SPECIAL_ATTACK = 48

TO RECAP:

If a mob is set to (46) and it's KoS. It will ALWAYS ATTACK REGARDLESS OF ANYTHING.

If a mob is set to (47). It will ALWAYS ASSIST ITS FACTION REGARDLESS OF ANYTHING.

If it's set to both 46 and 47 it will always do both.

ChaosSlayerZ 04-14-2017 10:05 AM

Awesome ;)
Thank You so much!

Coenxai 04-14-2017 02:50 PM

No problem

ChaosSlayerZ 02-01-2019 05:07 PM

BUMP!

Begging the devs to implement this into official code instead of Level or INT setting.

jmac 03-17-2019 07:33 AM

I just set all rats in misty to faction 1291 kos aggressive and they agro (lvl 1) on my lvl 70

ChaosSlayerZ 03-17-2019 11:00 AM

Quote:

Originally Posted by jmac (Post 261919)
I just set all rats in misty to faction 1291 kos aggressive and they agro (lvl 1) on my lvl 70

Thats NOT why they aggro.


All times are GMT -4. The time now is 04:04 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.