I am curious. Has anyone ever made an unbeatable AI in UO that can counter nearly any attack thrown at it by any player, or group of players? What is the most challenging foe to date anyone has ever seen in the game?
 
though id like to see what people come up with, a simple mob with
hits = maxhits;
in Onthink would be unbeatable :)

on a more serious note, i made some AI improvements to necromages in adventures (on server, not in package yet). I really wish there were some good AI scripts out there - people have been very secretive with their AI algos.
 
I'm wondering if there is any AI that can sniff you out with detect hidden, hide and stealth away themselves, use a myriad of spells in appropriate manners, teleport away or heck even recall away and maybe even actively track you down over long distances, maybe even use summoned pets to attack, too. The possibilities are endless.
 
I came across an interesting monster - not unbeatable, but had a clever mechanism that made it much harder than most. It was mounted, and could pursue at very high speed. I think it also had a very broad range and long range of perception. This made it difficult for my typical Archer's hit and run tactic. Combine that with one that can counter a strong pet, and has high resists, and it would be formidable indeed.
 
I'm wondering if there is any AI that can sniff you out with detect hidden, hide and stealth away themselves, use a myriad of spells in appropriate manners, teleport away or heck even recall away and maybe even actively track you down over long distances, maybe even use summoned pets to attack, too. The possibilities are endless.
If you are a good coder you could make an AI like this.
 
download the adventures package, try 1v1 against an honorae. it changes AI based on a number of factorsm including what the player is holding, weapon used, etc. took me 20+ hours to get the algo right. I didnt want them to be overly OP. it works well.

I also added some routines to my pvm red pks in the server (not in package yet). they throw pots, call others nearby (no more luring 1 then luring another etc), bandage heal, teleport to the player if an archer, etc.

i just started dabbling in AI and its really fun.... and everything i do is freely available for others to improve (and hopefully post so i can improve my scripts!)
 
Well, technically you can write an AI to do any number of things...which could be considered cheating. It's all about game balance. At some point, I'm going to put together an AI that uses many player tactics. It won't be unbeatable...but hopefully it will be like facing another player.
 
Put "HKGangSpawn" on a spawner and it will spawn a gang of pkers that

what they do:

- target a player from 200 tiles away (adjustable).

- Hunt you down if you try to hide

- loot player corpse

- stay near corpse for set amount of time for chance of a rez kill

- eventually attempt to return back home (or find new target)

- Players gain Justice points for killing them

spawns a leader (warrior type)

and a chance for warrior or mage types up to 4 members

My additions to this:

Warrior types can self heal with bandages

Mage types can now use detect hidden (scripted with reveal spell animation)
to find stealthing players trying to evade.


i didnt make this but i did tweak to run for publish 54 and running. not sure about newer publishes

Original link:
 

Attachments

  • hkgang.rar
    8.5 KB · Views: 22
Last edited:
Nice, Billy :)

You can borrow Peerless AI too.
Mephitis' "grab" will get players that are hidden too.
Careful though, as it has a range and will grab anything
inside that range, regardless if you used LOSblockers or not. ;)
Do not inherit from that mob though, actually grab the code form the script.
Otherwise you are adding another BaseChampion, instead of a regular critter.

Mephitis has an OnThink method:
C#:
public override void OnThink()
        {
            base.OnThink();

            if ( Combatant != null && m_NextWeb < DateTime.Now )
                DoWebAttack();
        }

Then a bit further down is the whole region for the web attack:

C#:
#region Web Attack
        private DateTime m_NextWeb;

        public void DoWebAttack()
        {
            List<Mobile> targets = new List<Mobile>();

            foreach (Mobile m in GetMobilesInRange(RangePerception))
                if (CanBeHarmful(m) && m.Player && !InRange(m, 1) && !m.Paralyzed)
                    targets.Add(m);

            if (targets.Count > 0)
            {
                Mobile target = targets[Utility.Random(targets.Count)];
                TimeSpan delay = TimeSpan.FromSeconds(GetDistanceToSqrt(target) / 15.0);
                Effects.SendMovingEffect(this, target, 0x10D2, 20, 1, false, false);
                Timer.DelayCall<Mobile>(delay, new TimerStateCallback<Mobile>(Entangle), target);
            }

            m_NextWeb = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 15));
        }

        public void Entangle( Mobile m )
        {
            Point3D p = Location;

            if ( SpellHelper.FindValidSpawnLocation( Map, ref p, true ) )
            {
                TimeSpan delay = TimeSpan.FromSeconds( Utility.RandomMinMax( 3, 6 ) );
                m.MoveToWorld( p, Map );
                m.Freeze( delay );
                m.SendLocalizedMessage( 1042555 ); // You become entangled in the spider web.

                SpiderWeb web = new SpiderWeb( delay );
                p.Z += 2;
                web.MoveToWorld( p, Map );

                Combatant = m;
            }
        }

        private class SpiderWeb : Static
        {
            public SpiderWeb( TimeSpan delay ) : base( 0x10D2 )
            {
                Timer.DelayCall( delay, new TimerCallback( Delete ) );
            }

            public SpiderWeb( Serial serial ) : base( serial )
            {
            }

            public override void Serialize( GenericWriter writer )
            {
                base.Serialize( writer );

                writer.WriteEncodedInt( 0 ); // version
            }

            public override void Deserialize( GenericReader reader )
            {
                base.Deserialize( reader );

                int version = reader.ReadEncodedInt();

                Delete();
            }
        }
        #endregion

Looking at any BaseChampion, you will see sections like this and in most cases,
you can just copy the entire section of code and put it into a new mob without issue.
Peerless than spawn helpers will have a designated area in which the helpers will spawn,
so adapt that you work within the area the boss will be spawned in.
 
Last edited:
I've revamped mephitis/neira/rikktor and my favorite, baraccoon in adventures. they all have completely new behavior. Baraccoon is a trucky little dude to spot now... i actually delete/recreate the mob so the player loses the health bar LOL. Anyways, anything in adventures is open source, just want some type of credit given in the code //taken from ultima adventures by Final Twist or such.
 
Back