I want to make custom XMLQuestNPCs as welcome guides and I want the clothing and the hue to match the title I give them.

I have this so far:
AddItem(new Platechest());

I know that is right, so where would I add the hue property?
 
Something like that should do it for you
Code:
Platechest plate = new Platechest();
plate.Hue = 123;
AddItem(plate);
 
You should do this instead:

Code:
PlateChest chest = new PlateChest();

chest.Hue = 712;
// Add whatever other properties you wish here.

AddItem(chest);
 
You know, you could add the clothing and hue for each of your QuestNPCs right on the entry line for that mob, right?
Code:
XmlQuestNPC,1/Name/Fred/Str/100/EQUIP/PlateChest

NOTE: NPCs fall under the same game rules that players do, i.e. they can't wear plate if they aren't strong enough, so in the above example, I bumped up the NPCs strength so he could equip plate.
 
I tried, for whatever reason it was not working.
If the NPCs are spawning with clothing already (all of them do), you'll have to UNEQUIP each item first, then EQUIP the new items. So:
Code:
XmlQuestNPC,1/Name/Fred/Str/100/UNEQUIP/Torso/EQUIP/PlateChest
 
OK, I have the following code worked out for my welcome people, if I can make one I can make them all. I would like to make custom gumps using gump studio just for my welcome area to add a sense of customization. I tried using xmlquestnakednpc.cs for my base, but for some reason it only equips the hat, cape, and boots. I looked over the code and see no errors, after I corrected a couple, it seems to be right. Here is the code on that:
Code:
xmlquestnakedsnpc/0/cantwalk/true/direction/south/name/The Ranger Riverfox, The Master of Adventure/EQUIP/featheredhat/EQUIP/furcape/EQUIP/furboots/EQUIP/yumi/EQUIP/<rangergorget/hue/80>EQUIP/<rangerchest/hue/80>/EQUIP/<rangerarms/hue/80>/EQUIP/<rangerlegs/hue/80>/EQUIP/<rangergloves/hue/80>

Why? I don't know, it sounds like a good idea.

I need help with how would I add the command to have the gump come up on saying a command, such as "adventure", "magic", etc. And would I need to put this in the script itself or could I use xmlspawner.

Here is the code for what I have so far:
Code:
using System;
using System.Data;
using System.IO;
using System.Collections;
using Server;
using Server.Items;
using Server.Network;
using Server.Gumps;
using Server.Targeting;
using System.Reflection;
using Server.Commands;
using CPA = Server.CommandPropertyAttribute;
using System.Xml;
using Server.Spells;
using System.Text;
using Server.Accounting;
using System.Diagnostics;



namespace Server.Mobiles
{
    public class RangerRiverFox : TalkingBaseCreature
    {

        [Constructable]
        public RangerRiverFox() : this(-1)
        {
        }

        [Constructable]
        public RangerRiverFox(int gender) : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.8, 3.0 )
        {
            SetStr( 10, 30 );
            SetDex( 10, 30 );
            SetInt( 10, 30 );

            Fame = 50;
            Karma = 50;

            CanHearGhosts = true;

            SpeechHue = Utility.RandomDyedHue();
            Title = string.Empty;
            Hue = Utility.RandomSkinHue();
           
            switch(gender)
            {
                case -1: this.Female = Utility.RandomBool(); break;
                case 0: this.Female = false; break;
                case 1: this.Female = true; break;
            }

            if ( this.Female)
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName( "female" );
                Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2045, 0x204A, 0x2046 , 0x2049 ) );
                hair.Hue = Utility.RandomHairHue();
                hair.Layer = Layer.Hair;
                hair.Movable = false;
                AddItem( hair );
                    FeatheredHat head = new FeatheredHat();
                        head.Hue = 80;
                        AddItem( head );
                    RangerChest chest = new RangerChest();
                        chest.Hue = 80;
                        AddItem( chest );
                    RangerGorget neck = new RangerGorget();
                        neck.Hue = 80;
                        AddItem( neck );
                    RangerArms arms = new RangerArms();
                        arms.Hue = 80;
                        AddItem( arms );
                    RangerGloves glove = new RangerGloves();
                        glove.Hue = 80;
                        AddItem( glove );
                    RangerLegs leg = new RangerLegs();
                        leg.Hue = 80;
                        AddItem( leg );
                    FurCape back = new FurCape();
                    AddItem( back );
                    AddItem( new Yumi() );
                    AddItem( new FurBoots() );
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName( "male" );
                Item hair = new Item( Utility.RandomList( 0x203B, 0x203C, 0x203D, 0x2044, 0x2045, 0x2047, 0x2048 ) );
                hair.Hue = Utility.RandomHairHue();
                hair.Layer = Layer.Hair;
                hair.Movable = false;
                AddItem( hair );
                Item beard = new Item( Utility.RandomList( 0x0000, 0x203E, 0x203F, 0x2040, 0x2041, 0x2067, 0x2068, 0x2069 ) );
                beard.Hue = hair.Hue;
                beard.Layer = Layer.FacialHair;
                beard.Movable = false;
                AddItem( beard );
                    FeatheredHat head = new FeatheredHat();
                        head.Hue = 80;
                        AddItem( head );
                    RangerChest chest = new RangerChest();
                        chest.Hue = 80;
                        AddItem( chest );
                    RangerGorget neck = new RangerGorget();
                        neck.Hue = 80;
                        AddItem( neck );
                    RangerArms arms = new RangerArms();
                        arms.Hue = 80;
                        AddItem( arms );
                    RangerGloves glove = new RangerGloves();
                        glove.Hue = 80;
                        AddItem( glove );
                    RangerLegs leg = new RangerLegs();
                        leg.Hue = 80;
                        AddItem( leg );
                    FurCape back = new FurCape();
                        back.Hue = 85;
                    AddItem( back );
                    AddItem( new Yumi() );
                    AddItem( new FurBoots() );
              }

           Container pack = new Backpack();


            pack.Movable = false;

            AddItem( pack );
        }

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

       

        private static int GetRandomHue()
        {
            switch ( Utility.Random( 6 ) )
            {
                default:
                case 0: return 0;
                case 1: return Utility.RandomBlueHue();
                case 2: return Utility.RandomGreenHue();
                case 3: return Utility.RandomRedHue();
                case 4: return Utility.RandomYellowHue();
                case 5: return Utility.RandomNeutralHue();
            }
        }


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

            writer.Write( (int) 0 ); // version

        }

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

            int version = reader.ReadInt();

        }
    }
}
 
You could use an Xmlspawner set to a SpeechTrigger within a certain ProximityRange and "build" the gump right on the spawner.
If you're unfamiliar with the gump types:

Gump,0 = A gump with just a "Done" button and whatever text you add.
Gump,1 = A gump with Yes/No buttons and whatever text you add.
Gump,2 = A gump with a Textbox for players to type in and Okay button with whatever text you add.
Gump,3 = A gump with "I Accept!" button and "No thanks, I decline" button with whatever text you add.
Gump,4 = A gump with 2 custom answer buttons with whatever text you add.
Gump,5 = A gump that is totally blank with no text.
Gump,6 = A gump with the NPC's name, a blue line at the top and an "Okay" button with no text.
 
You could use an Xmlspawner set to a SpeechTrigger within a certain ProximityRange and "build" the gump right on the spawner.
If you're unfamiliar with the gump types:

Gump,0 = A gump with just a "Done" button and whatever text you add.
Gump,1 = A gump with Yes/No buttons and whatever text you add.
Gump,2 = A gump with a Textbox for players to type in and Okay button with whatever text you add.
Gump,3 = A gump with "I Accept!" button and "No thanks, I decline" button with whatever text you add.
Gump,4 = A gump with 2 custom answer buttons with whatever text you add.
Gump,5 = A gump that is totally blank with no text.
Gump,6 = A gump with the NPC's name, a blue line at the top and an "Okay" button with no text.

There is a gump 6?
Didn't know that. Now I do.

EDIT---------------------------------------
How do I add text to Gump 6?
 
Last edited:
Some of those gumps were designed to be static it seems. I have not used Gump 6 myself successfully, I have only used 0-4. If you can't edit them like you do the other gumps (0-4), then it's just a static gump. I seem to recall not being able to edit Gump 6 once, so I switched to one of the lower ones.
 
Back