Hi

Can someone help me with create the Character creation Gump? I'm really poor with using gump studio that is a reason why i asking for help...

First Page
Race selection with small charater description about selected race + selcet male or female

Human,
Elf,
Drow,
Dwarf,
Orc,
Halfling

Seconf Page
Hair & beard selection & skin hue selection of course with custom starting place for all races

thx for help

Greetings
 
Last edited:
i make a test gump for the race choice and try to add this gumop to welcometimer.cs because i want to make the race choice on the first start but i got a error..
Code:
using System;
using Server;
using Server.Gumps;
using Server.Custom;

namespace Server.Misc
{
    /// <summary>
    /// This timer spouts some welcome messages to a user at a set interval. It is used on character creation and login.
    /// </summary>
    public class WelcomeTimer : Timer
    {
        private static readonly string[] m_Messages = (TestCenter.Enabled ? new string[]
        {
            "Welcome to this test shard.  You are able to customize your character's stats and skills at anytime to anything you wish.  To see the commands to do this just say 'help'.",
            "You will find a bank check worth 1,000,000 gold in your bank!",
            "A spellbook and a bag of reagents has been placed into your bank box.",
            "Various tools have been placed into your bank.",
            "Various raw materials like ingots, logs, feathers, hides, bottles, etc, have been placed into your bank.",
            "5 unmarked recall runes, 5 Felucca moonstones and 5 Trammel moonstones have been placed into your bank box.",
            "One of each level of treasure map has been placed in your bank box.",
            "You will find 9000 silver pieces deposited into your bank box.  Spend it as you see fit and enjoy yourself!",
            "You will find 9000 gold pieces deposited into your bank box.  Spend it as you see fit and enjoy yourself!",
            "A bag of PowerScrolls has been placed in your bank box."
        } : new string[]
            { //Yes, this message is a pathetic message, It's suggested that you change it.
                "Welcome to this shard.",
                "Please enjoy your stay."
            });
        private readonly Mobile m_Mobile;
        private readonly int m_Count;
        private int m_State;
        public WelcomeTimer(Mobile m)
            : this(m, m_Messages.Length)
        {
        }

        public WelcomeTimer(Mobile m, int count)
            : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(10.0))
        {
            this.m_Mobile = m;
            this.m_Count = count;
        }

        protected override void OnTick()
        {
       
            if ( this.m_State <= 0 )
                //m_Mobile.SendGump(new ClassGump( ClassPage ) );
                this.m_Mobile.SendGump(new RaceChoiceGump());
           
            if (this.m_State < this.m_Count)
                this.m_Mobile.SendMessage(0x35, m_Messages[this.m_State++]);

            if (this.m_State == this.m_Count)
                this.Stop();
        }
    }
}

and i got this error :

Errors:
+ Misc/WelcomeTimer.cs:
CS0246: Line 50: The type or namespace name 'RaceChoiceGump' could not be fo
und (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

What i'm doing wrong?
 
You could post your RaceChoiceGump, but I am guessing that the namespace is not included in this script. So, for example, this script is in namespace "Server.Misc", but what namespace is your gump in? I did start working on one, but it was more complicated than I thought, so I didn't get very far. I was thinking about reviving some old gump art that is still attached to the client.
 
Code:
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Items;
using Server.Mobiles;

namespace Scripts.RaceGump
{
	public class RaceChoiceGump : Gump
	{			
		public RaceChoiceGump() : base( 0, 0 )
		{
			this.Closable = false;
			this.Disposable = true;
			this.Dragable = true;
			this.Resizable = false;

			this.AddPage( 0 );
			this.AddBackground( 28, 9, 385, 458, 9270 );
			this.AddImage( 30, 19, 5557, 0 );
			this.AddButton( 80, 140, 55, 56, (int)Buttons.Button1, GumpButtonType.Reply, 0 );
			this.AddButton( 80, 180, 55, 56, (int)Buttons.Button2, GumpButtonType.Reply, 0 );
			this.AddButton( 80, 220, 55, 56, (int)Buttons.Button3, GumpButtonType.Reply, 0 );
			this.AddButton( 80, 260, 55, 56, (int)Buttons.Button4, GumpButtonType.Reply, 0 );
			this.AddButton( 80, 300, 55, 56, (int)Buttons.Button5, GumpButtonType.Reply, 0 );
			this.AddButton( 80, 340, 55, 56, (int)Buttons.Button6, GumpButtonType.Reply, 0 );
			this.AddLabel( 125, 69, 36, @"Dark Aether Races" );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			this.AddLabel( 100, 140, 0, @"Dwarf" );
			this.AddLabel( 100, 170, 0, @"Elf" );
			this.AddLabel( 100, 220, 0, @"Human" );
			this.AddLabel( 100, 260, 0, @"Drow" );
			this.AddLabel( 100, 300, 0, @"Frost Elf" );
			this.AddLabel( 100, 340, 0, @"Orc" );			
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		}
			
		public enum Buttons
		{
			Close,
			Button1,
			Button2,
			Button3,
			Button4,
			Button5,
			Button6,
			Button7,
			Button8,
		}
			
		public override void OnResponse( NetState sender, RelayInfo info )
		{
			Mobile m = sender.Mobile;
			
			if ( m == null )
				return;
			switch ( info.ButtonID )
			{
				case 0:
				{
					m.SendMessage( 0x26, "You do not have to choose a race..." );
					return;
				}
				case 1:
				{
					m.SendMessage( 0x26, "You have Chosen the path of the dwarf. May you ever mine strong ore, and all your ale be strong!" );
					m.Hue = 1719;
					m.Title = "the Dwarf";
					break;
				}

				case 2:
				{
					m.SendMessage( 0x26, "You have chosen the path of an elf. May your Arrows fly true and Corellon smile upon you." );
					m.Hue = 576;
					m.Title = "the Elf";
					break;
				}
				
				case 3:
				{
					m.SendMessage( 0x26, "You have chosen the path of a Human. Be ever adventerous and live your life to the fullest." );
					m.Title = "the Human";
					break;
				}
			
				case 4:
				{
					m.SendMessage( 0x26, "You have chosen the dark road of a drow. May your blades be swift and your poisons deadly" );
					m.Hue = 1109;
					m.Title = "the Drow";
					m.Karma = -1000;
					break;
					}
				case 5:
				{
					m.SendMessage( 0x26, "You have chosen the path of a Frost Elf. May your Spells never fail and your reagents be plentiful!" );
					m.Hue = 1364;
					m.Title = "the Frost Elf";
					break;
				}

				case 6:
				{
					m.SendMessage( 0x26, "You have taken the savage path of an Orc. May the pillaging go well and the loot plentiful." );
					m.Hue =  1427;
					m.Title = "the Orc";
					m.Karma = -1000;
					break;
				}
			
			}
		}
	}
}
 
Best thing would be to change this one from

namespace Scripts.RaceGump

to

namespace Server.Gumps
 
ok now i make other gumps for the system but i got another error. Make script to change the hair style. Server compile this good but when i finish restyling the hair server make crash. I chceck the script & when i of that lines :
Code:
//if ( m_From is PlayerMobile )
//            {
//              PlayerMobile pm = (PlayerMobile)m_From;
//              pm.SetHairMods( -1, -1 ); // clear any hairmods (disguise kit, incognito)
//            }
                                            
//              m_From.HairItemID = itemID;

Server do not crash but the hair are not changed. There is my hair restyling gump script :
Code:
using System;
using Server.Mobiles;
using Server.Network;
using Server.Gumps;
namespace Server.Gumps
{
    public class HairRestylingGump : Gump
    {
        private Mobile m_From;
        public HairRestylingGump()
            : base(0, 0)
        {
            Closable=false;
            Disposable=false;
            Dragable=false;
            Resizable=false;
            AddPage(0);
        
            AddBackground( 100, 10, 400, 385, 0xA28 );
            AddHtml( 100, 25, 400, 35, @"Hair Restyling Menu", (bool)true, (bool)true);
            AddButton( 175, 340, 0xFA5, 0xFA7, 0x0, GumpButtonType.Reply, 0 ); // CANCEL
            AddHtml( 210, 342, 90, 35, @"HAIRSTYLE SELECTION MENU", (bool)true, (bool)true); // <CENTER>HAIRSTYLE SELECTION MENU</center>
            AddBackground( 220, 60, 50, 50, 0xA3C );
            AddBackground( 220, 115, 50, 50, 0xA3C );
            AddBackground( 220, 170, 50, 50, 0xA3C );
            AddBackground( 220, 225, 50, 50, 0xA3C );
            AddBackground( 425, 60, 50, 50, 0xA3C );
            AddBackground( 425, 115, 50, 50, 0xA3C );
            AddBackground( 425, 170, 50, 50, 0xA3C );
            AddBackground( 425, 225, 50, 50, 0xA3C );
            AddBackground( 425, 280, 50, 50, 0xA3C );
            AddHtmlLocalized( 150, 75, 80, 35, 1011052, false, false ); // Short
            AddHtmlLocalized( 150, 130, 80, 35, 1011053, false, false ); // Long
            AddHtmlLocalized( 150, 185, 80, 35, 1011054, false, false ); // Ponytail
            AddHtmlLocalized( 150, 240, 80, 35, 1011055, false, false ); // Mohawk
            AddHtmlLocalized( 355, 75, 80, 35, 1011047, false, false ); // Pageboy
            AddHtmlLocalized( 355, 130, 80, 35, 1011048, false, false ); // Receding
            AddHtmlLocalized( 355, 185, 80, 35, 1011049, false, false ); // 2-tails
            AddHtmlLocalized( 355, 240, 80, 35, 1011050, false, false ); // Topknot
            AddHtmlLocalized( 355, 295, 80, 35, 1011064, false, false ); // Bald
            AddImage( 153, 20, 0xC60C );
            AddImage( 153, 65, 0xED24 );
            AddImage( 153, 120, 0xED1E );
            AddImage( 153, 185, 0xC60F );
            AddImage( 358, 18, 0xED26 );
            AddImage( 358, 75, 0xEDE5 );
            AddImage( 358, 120, 0xED23 );
            AddImage( 362, 190, 0xED29 );
            AddButton( 118, 73, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
            AddButton( 118, 128, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
            AddButton( 118, 183, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0 );
            AddButton( 118, 238, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 );
            AddButton( 323, 73, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 );
            AddButton( 323, 128, 0xFA5, 0xFA7, 7, GumpButtonType.Reply, 0 );
            AddButton( 323, 183, 0xFA5, 0xFA7, 8, GumpButtonType.Reply, 0 );
            AddButton( 323, 238, 0xFA5, 0xFA7, 9, GumpButtonType.Reply, 0 );
            AddButton( 323, 292, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
        
            if ( info.ButtonID > 0 )
            {
              int itemID = 0;
            switch (info.ButtonID)
            {
                case 2: itemID = 0x203B;    break;
                case 3: itemID = 0x203C;    break;
                case 4: itemID = 0x203D;    break;
                case 5: itemID = 0x2044;    break;
                case 6: itemID = 0x2045;    break;
                case 7: itemID = m_From.Female ?  0x2046 : 0x2048;    break;
                case 8: itemID = 0x2049;    break;
                case 9: itemID = 0x204A;    break;
            }
                    
            if ( m_From is PlayerMobile )
            {
              PlayerMobile pm = (PlayerMobile)m_From;
              pm.SetHairMods( -1, -1 ); // clear any hairmods (disguise kit, incognito)
            }
                                            
              m_From.HairItemID = itemID;
            
            }
        }
  
  }
}

and there is the crash report :
Operating System: Microsoft Windows NT 5.1.2600 Dodatek Service Pack 3
.NET Framework: 4.0.30319.1022
Time: 2015-04-12 18:36:52
Mobiles: 27
Items: 451
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Gumps.HairRestylingGump.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc) in f:\JustUO\Server\Network\PacketHandlers.cs:line 1377
at Server.Network.MessagePump.HandleReceive(NetState ns) in f:\JustUO\Server\Network\MessagePump.cs:line 197
at Server.Network.MessagePump.Slice() in f:\JustUO\Server\Network\MessagePump.cs:line 131
at Server.Core.Main(String[] args) in f:\JustUO\Server\Main.cs:line 639

Clients:
- Count: 1
+ 127.0.0.1: (account = admin) (mobile = 0x13 'xxx')
 
Last edited:
Code:
 if ( m_From is PlayerMobile )

            {
              PlayerMobile pm = (PlayerMobile)m_From;
              pm.SetHairMods( -1, -1 ); // clear any hairmods (disguise kit, incognito)
              pm.HairItemID = itemID;
            }
 
Back