AdamD

Member
I really should learn the proper terms for coding lol

But I have the old special AI package from runuo, which gives mobiles extra abilities, like area lighting, earthquake, multi fireball attack etc.

The problem is, I want a specific monster to have multi fireball and area gas attack, which works, but I don't want it targetting monsters of the same type, but I don't know what to change, or add, to the targetting section of code, which is:

public override void BreathStart( Mobile target )
{
base.BreathStart( target ); //tiramos un firebreath al objetivo original.

if( !DoesMultiFirebreathing || Utility.RandomDouble() > MultiFirebreathingChance )
return;

List<Mobile> posibleTgts = new List<Mobile>();

foreach( Mobile m in target.Map.GetMobilesInRange( target.Location, BreathMaxRange ) )
if (m != null && !m.Deleted && m != target && m.Alive && !m.IsDeadBondedPet &&
( m.AccessLevel < AccessLevel.Counselor || CanSee( m ) ) && CanBeHarmful( m ))
posibleTgts.Add( m );

I know it's that last part which deals with what NOT to target, but I can't work out what to put in there.
Any suggestions?
 
Last edited:
if you add like this code, it will not be happen.
try like this

foreach( Mobile m in target.Map.GetMobilesInRange( target.Location, BreathMaxRange ) ) {
if (m != null && !m.Deleted && m != target && m.Alive && !m.IsDeadBondedPet &&
( m.AccessLevel < AccessLevel.Counselor || CanSee( m ) ) && CanBeHarmful( m )) {
if ( !( m is ~~~~ ) ) {
posibleTgts.Add( m );
}
}
}


~~~~ is your monster type
 

Active Shards

  • Unchained
    Custom (Classic)
    • Players
    • 142 Online
    • 273 Peak
  • UO Eventine
    Custom (Classic)
    • Players
    • 88 Online
    • 137 Peak
  • The Crossroads
    Mondain's Legacy
    • Players
    • 86 Online
    • 190 Peak
  • Insane UO
    Endless Journey
    • Players
    • 83 Online
    • 105 Peak
  • UO: New Renaissance
    Custom (Classic)
    • Players
    • 31 Online
    • 85 Peak
  • CALYPSO
    Custom (Modern)
    • Players
    • 22 Online
    • 30 Peak
  • Arth
    Custom (Modern)
    • Players
    • 22 Online
    • 34 Peak
  • UO Enigma
    Custom (Modern)
    • Players
    • 20 Online
    • 172 Peak
  • Heritage
    New Legacy
    • Players
    • 19 Online
    • 41 Peak
  • UO Phoenix
    Custom (Classic)
    • Players
    • 19 Online
    • 48 Peak

Donations

Total amount
$0.00
Goal
$500.00
Back