Jump to content
  • 0

[Help] Make a MOB Vs MOB fight.


Question

Posted

I wanna make this:

 

Player pawn a mob with duble clicking in a X Item (i have solved this part).

 

Now i will like to know if for example in "NPCAIDATA" i see there is a celd for "Clan" and "Enemy Clan" so based on this i can make a MOB Enemie of the other Clan fight against each other in this way?

 

PD: The idea is when a player get an item can spawn a MOB and this MOB help him in a fight versus a hard MOB, now the question is the Helping MOB will really help the player i mean who will attack first the helper mob the player or the enemie Clan Mob? Thx in advance for who can help me.

8 answers to this question

Recommended Posts

  • 0
Posted

or make L2Guard and L2Monster

 

And make L2Guard hit L2Monster

 

Maybe it will work fine :d

 

The only thing is i need make the MOBS agro, the only way for the Guard attack them if they are passive will not attack i think.

 

# ---------------------------------------------------------------------------

# Guards

# ---------------------------------------------------------------------------

# True - Allows guards to attack aggressive mobs within range.

# Default: False

GuardAttackAggroMob = False

  • 0
Posted

Easiest mean is to add hate on the first monster who hit you.

 

So basically you have to :

- check if it's a L2Monster (if blabla instanceof L2MonsterInstance)

- add hate if you're under attack

- once added hate, mustn't add hate anew else it will switch of target anytime lol. (if aggro >0) return;

 

If it's not already made I invite you to make a new instance with a proper IA. L2PokemonInstance, lol. You could develop this IA like that.

 

-----

 

If I understand the subject well, basically you spawn a monster, and you want let his IA make all the work, without player possibility to use commands ? Basically, you could use this "summon" with summon interface. I remember some "funny" summons, such as gargoyle and malruk soldier on Interlude. So it could be possible with an interface. If you don't want, well, I answered higher.

  • 0
Posted

Easiest mean is to add hate on the first monster who hit you.

 

So basically you have to :

- check if it's a L2Monster (if blabla instanceof L2MonsterInstance)

- add hate if you're under attack

- once added hate, mustn't add hate anew else it will switch of target anytime lol. (if aggro >0) return;

 

If it's not already made I invite you to make a new instance with a proper IA. L2PokemonInstance, lol. You could develop this IA like that.

 

-----

 

If I understand the subject well, basically you spawn a monster, and you want let his IA make all the work, without player possibility to use commands ? Basically, you could use this "summon" with summon interface. I remember some "funny" summons, such as gargoyle and malruk soldier on Interlude. So it could be possible with an interface. If you don't want, well, I answered higher.

 

I don't wanna commands. The situation should be like this:

 

For ex, a player teleport to a special location and there are a mini raid boss, so the player make Double Click in a item and spawn a "Helper" Mob who will hit the Raid Boss to, so this will be Player+Helper Mob Vs Raid.

 

My first idea was: Now i will like to know if for example in "NPCAIDATA" i see there is a celd for "Clan" and "Enemy Clan" so based on this i can make a MOB Enemie of the other Clan fight against each other in this way?

But i wonder if the Mob HLPER spawned will hit the Raid or will start hiting the Playerlol, maybe I can Put AGRESSION like you say on the Raid so i think when he land that skill this will affect the HELPER MOB since he will be from a enemie FACTION, i don't try this yet.

  • 0
Posted

Create new item handler for this item which should spawn moob.

 

By using your/this npc knownlist, check if his knownlist contains your raid boss (by taking his ID for example)

 

And if it contains, make your "helper" to attack this boss (with hate or smth)

  • 0
Posted

I explained higher, make the mob aggro when the monster hits you.

 

About faction/enemy clan, you have to code it aswell, by default it checks only player vs mob statut.

 

Another thing to check is the "social" way of a mob... As you know, 2 mobs from same faction will help each other, so basically you can code the reverse, 2 mobs from X and Y factions fight each other (AI intention_attack + aggro stuff else one hit and you pickup aggro).

  • 0
Posted

I explained higher, make the mob aggro when the monster hits you.

 

About faction/enemy clan, you have to code it aswell, by default it checks only player vs mob statut.

 

Another thing to check is the "social" way of a mob... As you know, 2 mobs from same faction will help each other, so basically you can code the reverse, 2 mobs from X and Y factions fight each other (AI intention_attack + aggro stuff else one hit and you pickup aggro).

 

Well right now i make like this: in NPCAIDATA i put MOBS "ISCHAOS" 1 (this is like when you have Karma but for mobs), so later i make the MOB HELPER TYPE "L2GUARD", so of this way i don't have the risk the mob will attack the Player who spawn him, for now is working.

 

About the FACTION, where is? i search in NPCAIDATA and normal NPC tables but didn't see it.

  • 0
Posted

"faction" is interlude naming for "enemy clan".

 

Normally some mobs got same "faction", the "social aggro" engine is build on that. If you hit a mob which is in a faction, and if another mob of same faction see you hitting his friend, he goes to help him attacking you.

 

As you seems to use Freya, I can't really help you on this point, it's not in "my top 5 refactors" atm :D.

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...