RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Mob text hue question..

Hammerhand

Knight
I've done some mobs with the "kfc say" coding & I would like each of them to have different hues for the text. Any ideas? I think it would go in here..
Code:
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (m_Talked == false)
            {
                if (m.InRange(this, 4))
                {
                    m_Talked = true;
                    SayRandom(kfcsay, this);
                    this.Move(GetDirectionTo(m.Location));
                    // Start timer to prevent spam
                    SpamTimer t = new SpamTimer();
                    t.Start();
                }
            }
        }
I can change the speech hue IN the mob itself once its spawned, but that wont last if it respawns, so I want it in the script if possible.
 

pooka01

Sorceror
I guess you could add it in the constructor?
this.SpeechHue = Utility.RandomMinMax(0, 1000);
so it's different for each.
if you add it on movement the hue will always be different, and might look weird.
 

Hammerhand

Knight
I'll try it without the random. Its separate scripts... 1 for each npc. Dont really want to confuse the players THAT much with randon text hue in ONE npc.... Trying it first in the OnMovement just to see what happens.
 

Hammerhand

Knight
And the results are in... "May we have the envelope please?" *drum roll.......* Worked great with adding into the OnMovement. Npc now has text the hue I want it. Thx Pooka01. :D
 
Top