Esempio n. 1
0
        public static void RefreshSpawnerGumps(Mobile from)
        {
            if (from == null) return;

            NetState ns = from.NetState;

            if (ns != null && ns.Gumps != null)
            {

                ArrayList refresh = new ArrayList();

                foreach (Gump g in ns.Gumps)
                {

                    if (g is XmlSpawnerGump)
                    {
                        XmlSpawnerGump xg = (XmlSpawnerGump)g;

                        // clear the gump status on the spawner associated with the gump
                        if (xg.m_Spawner != null)
                        {
                            // and add the old gump to the removal list
                            refresh.Add(xg);
                        }
                    }
                }

                // close all of the currently opened spawner gumps
                from.CloseGump(typeof(XmlSpawnerGump));


                // reopen the closed gumps from the gump collection
                foreach (XmlSpawnerGump g in refresh)
                {
                    // reopen a new gump for the spawner
                    if (g.m_Spawner != null /*&& g.m_Spawner.SpawnerGump == g */)
                    {
                        // flag the current gump on the spawner as closed
                        g.m_Spawner.GumpReset = true;

                        XmlSpawnerGump xg = new XmlSpawnerGump(g.m_Spawner, g.X, g.Y, g.m_ShowGump, g.xoffset, g.page, g.Rentry);

                        from.SendGump(xg);
                    }
                }
            }
        }
Esempio n. 2
0
		public override void OnDoubleClick( Mobile from )
		{
			if( from == null || from.Deleted || from.AccessLevel < AccessLevel.GameMaster || (m_SpawnerGump != null && SomeOneHasGumpOpen) ) return;

			// flag the first person to open the spawner as the placer
			if( FirstModifiedBy == null ) FirstModifiedBy = from.Name;

			LastModifiedBy = from.Name;

			// clear any text entry books that might still be around
			DeleteTextEntryBook();

			int x = 0;
			int y = 0;
			// read the text entries for default values
			Account acct = from.Account as Account;
			if( acct != null )
			{
				XmlSpawnerDefaults.DefaultEntry defs = XmlSpawnerDefaults.GetDefaults( acct.ToString(), from.Name );
				if( defs != null )
				{
					x = defs.SpawnerGumpX;
					y = defs.SpawnerGumpY;
				}
			}

			XmlSpawnerGump g = new XmlSpawnerGump( this, x, y, 0, 0, 0 );
			from.SendGump( g );
		}
Esempio n. 3
0
        public HelpGump(XmlSpawner spawner, XmlSpawnerGump spawnergump, int X, int Y)
            : base(X, Y)
        {
            if (spawner == null || spawner.Deleted)
                return;
            m_Spawner = spawner;
            m_SpawnerGump = spawnergump;

            AddPage(0);

            int width = 370;

            AddBackground(20, 0, width, 480, 5054);

            AddPage(1);
            //AddAlphaRegion( 20, 0, 220, 554 );
            AddImageTiled(20, 0, width, 480, 0x52);
            //AddImageTiled( 24, 6, 213, 261, 0xBBC );

            AddLabel(27, 2, 0x384, "Standalone Keywords");
            AddHtml(25, 20, width - 10, 440,
                "spawntype[,arg1,arg2,...]\n" +
                "SET[,itemname or serialno][,itemtype]/property/value/...\n" +
                "SETVAR,varname/value\n" +
                "SETONMOB,mobname[,mobtype]/property/value/...\n" +
                "SETONTRIGMOB/property/value/...\n" +
                "SETONTHIS/property/value/...\n" +
                "SETONPARENT/property/value/...\n" +
                "SETONNEARBY,range,name[,type][,searchcontainers]/prop/value/prop/value...\n" +
                "SETONPETS,range/prop/value/prop/value...\n" +
                "SETONCARRIED,itemname[,itemtype][,equippedonly]/property/value/...\n" +
                "SETONSPAWN[,spawnername],subgroup/property/value/...\n" +
                "SETONSPAWNENTRY[,spawnername],entrystring/property/value/...\n" +
                "SPAWN[,spawnername],subgroup\n" +
                "DESPAWN[,spawnername],subgroup\n" +
                "{GET or RND keywords}\n" +
                "GIVE[,prob]/itemtype\n" +
                "GIVE[,prob]/&lt;itemtype/property/value...>\n" +
                "TAKE[,prob[,quantity[,true[,itemtype]]]]/itemname\n" +
                "TAKEBYTYPE[,prob[,quantity[,true]]]/itemtype\n" +
                "IF/condition/thenspawn[/elsespawn]\n" +
                "WAITUNTIL[,duration][,timeout][/condition][/spawngroup]\n" +
                "WHILE/condition/spawngroup\n" +
                "GOTO/subgroup\n" +
                "BROWSER/url\n" +
                "MUSIC,musicname[,range]\n" +
                "SOUND,value\n" +
                "EFFECT,itemid,duration[,x,y,z]\n" +
                "MEFFECT,itemid[,speed][,x,y,z][,x2,y2,z2]" +
                "RESURRECT[,range][,PETS]\n" +
                "POISON,level[,range][,playeronly]\n" +
                "DAMAGE,dmgmin,dmgmax[,range][,playeronly|mobsonly]\n" +
                "CAST,spellname[,arg] or CAST,spellnumber[,arg]\n" +
                "SENDMSG/text\n" +
                "BCAST[,hue][,font]/text\n" +
                "GUMP,title,number[,gumpconstructor]/text",
                false, true);
            AddButton(width - 30, 5, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 2);
            AddLabel(width - 38, 2, 0x384, "1");
            AddButton(width - 60, 5, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 4);

            AddPage(2);
            AddLabel(27, 2, 0x384, "Value and Itemtype Keywords");
            AddHtml(25, 20, width - 10, 440,
                "property/@value\n" +
                "ARMOR,minlevel,maxlevel\n" +
                "WEAPON,minlevel,maxlevel\n" +
                "JARMOR,minlevel,maxlevel\n" +
                "JWEAPON,minlevel,maxlevel\n" +
                "JEWELRY,minlevel,maxlevel\n" +
                "SARMOR,minlevel,maxlevel\n" +
                "SHIELD,minlevel,maxlevel\n" +
                "POTION\n" +
                "SCROLL,mincircle,maxcircle\n" +
                "NECROSCROLL,index\n" +
                "LOOT,methodname\n" +
                "LOOTPACK,loottype\n" +
                "MOB,name[,mobtype]\n" +
                "TRIGMOB\n" +
                "TAKEN\n" +
                "GIVEN\n" +
                "GET,itemname or serialno[,itemtype],property\n" +
                "GETVAR,varname\n" +
                "GETONCARRIED,itemname[,itemtype][,equippedonly],property\n" +
                "GETONNEARBY,range,name[,type][,searchcontainers],property\n" +
                "GETONMOB,mobname[,mobtype],property\n" +
                "GETONGIVEN,property\n" +
                "GETONTAKEN,property\n" +
                "GETONPARENT,property\n" +
                "GETONSPAWN[,spawnername],subgroup,property\n" +
                "GETONSPAWN[,spawnername],subgroup,COUNT\n" +
                "GETONTHIS,property\n" +
                "GETONTRIGMOB,property\n" +
                "GETONATTACH,type[,name],property\n" +
                "...&lt;ATTACHMENT,type,name,property> as GET property\n" +
                "{GET or RND keywords}\n" +
                "RND,min,max\n" +
                "RNDLIST,int1[,int2,...]\n" +
                "RNDSTRLIST,str1[,str2,...]\n" +
                "RNDBOOL\n" +
                "RANDNAME,nametype\n" +
                "PLAYERSINRANGE,range[,alive]\n" +
                "AMOUNTCARRIED,itemtype\n" +
                "OFFSET,x,y,[,z]\n" +
                "ANIMATE,action[,nframes][,nrepeat][,forward][,repeat][delay]\n" +
                "MSG[,prob]/text\n" +
                "SENDASCIIMSG[,probability][,hue][,font/text\n" +
                "SENDMSG[,probability][,hue]/text\n" +
                "SAY[,prob]/text\n" +
                "SKILL,skillname\n" +
                "TRIGSKILL,name|value|base|cap\n" +
                "MUSIC,musicname[,range]\n" +
                "SOUND,value\n" +
                "EFFECT,itemid,duration[,x,y,z]\n" +
                "MEFFECT,itemid[,speed][,x,y,z]" +
                "POISON,level[,range][,playeronly]\n" +
                "DAMAGE,dmgmin,dmgmax[,range][,playeronly|mobsonly]\n" +
                "INC,value or INC,min,max\n" +
                "MUL,value or MUL,min,max\n" +
                "ATTACH[,prob]/attachmenttype[,args]\n" +
                "ATTACH[,prob]/&lt;attachmenttype[,args]/property/value...>\n" +
                "ADD[,prob]/itemtype[,args]\n" +
                "ADD[,prob]/&lt;itemtype[,args]/property/value...>\n" +
                "DELETE\n" +
                "KILL\n" +
                "UNEQUIP,layer[,delete]\n" +
                "EQUIP[,prob]/itemtype[,args]\n" +
                "EQUIP[,prob]/&lt;itemtype[,args]/property/value...>",
                false, true);
            AddButton(width - 30, 5, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 3);
            AddLabel(width - 41, 2, 0x384, "2");
            AddButton(width - 60, 5, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 1);

            AddPage(3);
            AddLabel(27, 2, 0x384, "[ Commands");

            AddHtml(25, 20, width - 10, 440,
                "XmlAdd [-defaults]\n" +
                "XmlShow\n" +
                "XmlHide\n" +
                "XmlFind\n" +
                "AddAtt type [args]\n" +
                "GetAtt [type]\n" +
                "DelAtt [type][serialno]\n" +
                "AvailAtt\n" +
                "SmartStat [accesslevel AccessLevel]\n" +
                "OptimalSmartSpawning [maxdiff]\n" +
                "XmlSpawnerWipe [prefix]\n" +
                "XmlSpawnerWipeAll [prefix]\n" +
                "XmlSpawnerRespawn [prefix]\n" +
                "XmlSpawnerRespawnAll [prefix]\n" +
                "XmlHome [go][gump][send]\n" +
                "XmlUnLoad filename [prefix]\n" +
                "XmlLoad filename [prefix]\n" +
                "XmlLoadHere filename [prefix][-maxrange range]\n" +
                "XmlNewLoad filename [prefix]\n" +
                "XmlNewLoadHere filename [prefix][-maxrange range]\n" +
                "XmlSave filename [prefix]\n" +
                "XmlSaveAll filename [prefix]\n" +
                "XmlSaveOld filename [prefix]\n" +
                "XmlSpawnerSaveAll filename [prefix]\n" +
                "XmlImportSpawners filename\n" +
                "XmlImportMap filename\n" +
                "XmlImportMSF filename\n" +
                "XmlDefaults [defaultpropertyname value]\n" +
                "XmlGet property\n" +
                "XmlSet property value",
                false, true);

            AddButton(width - 30, 5, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 4);
            AddLabel(width - 41, 2, 0x384, "3");
            AddButton(width - 60, 5, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 2);

            AddPage(4);
            AddLabel(27, 2, 0x384, "Quest types");
            AddHtml(25, 20, width - 10, 180,
                "KILL,mobtype[,count][,proptest]\n" +
                "KILLNAMED,mobname[,type][,count][,proptest]\n" +
                "GIVE,mobname,itemtype[,count][,proptest]\n" +
                "GIVENAMED,mobname,itemname[,type][,count][,proptest]\n" +
                "COLLECT,itemtype[,count][,proptest]\n" +
                "COLLECTNAMED,itemname[,itemtype][,count][,proptest]\n" +
                "ESCORT[,mobname][,proptest]\n",
                false, true);

            AddLabel(27, 200, 0x384, "Trigger/NoTriggerOnCarried");
            AddHtml(25, 220, width - 10, 50,
                "ATTACHMENT,name,type\n" +
                "itemname[,type][,EQUIPPED][,objective#,objective#,...]\n",
                false, true);

            AddLabel(27, 300, 0x384, "GUMPITEMS");
            AddHtml(25, 320, width - 10, 150,
                "BUTTON,gumpid,x,y\n" +
                "HTML,x,y,width,height,text\n" +
                "IMAGE,gumpid,x,y[,hue]\n" +
                "IMAGETILED,gumpid,x,y,width,height\n" +
                "ITEM,itemid,x,y[,hue]\n" +
                "LABEL,x,y,labelstring[,labelcolor]\n" +
                "RADIO,gumpid1,gumpid2,x,y[,initialstate]\n" +
                "TEXTENTRY,x,y,width,height[,text][,textcolor]\n",
                false, true);

            AddButton(width - 30, 5, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 1);
            AddLabel(width - 41, 2, 0x384, "4");
            AddButton(width - 60, 5, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 3);
        }
Esempio n. 4
0
        public TextEntryGump(XmlSpawner spawner, XmlSpawnerGump spawnergump, int index, int X, int Y)
            : base(X, Y)
        {
            if (spawner == null || spawner.Deleted)
                return;
            m_Spawner = spawner;
            m_index = index;
            m_SpawnerGump = spawnergump;

            AddPage(0);

            AddBackground(20, 0, 220, 354, 5054);
            AddAlphaRegion(20, 0, 220, 354);
            AddImageTiled(23, 5, 214, 270, 0x52);
            AddImageTiled(24, 6, 213, 261, 0xBBC);

            string label = spawner.Name + " entry " + index;
            AddLabel(28, 10, 0x384, label);

            // OK button
            AddButton(25, 325, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0);
            // Close button
            AddButton(205, 325, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0);
            // Edit button
            AddButton(100, 325, 0xEF, 0xEE, 2, GumpButtonType.Reply, 0);
            string str = null;
            if (index < m_Spawner.SpawnObjects.Length)
            {
                str = (string)m_Spawner.SpawnObjects[index].TypeName;
            }
            // main text entry area
            AddTextEntry(35, 30, 200, 251, 0, 0, str);

            // editing text entry areas
            // background for text entry area
            AddImageTiled(23, 275, 214, 23, 0x52);
            AddImageTiled(24, 276, 213, 21, 0xBBC);
            AddImageTiled(23, 300, 214, 23, 0x52);
            AddImageTiled(24, 301, 213, 21, 0xBBC);

            AddTextEntry(35, 275, 200, 21, 0, 1, null);
            AddTextEntry(35, 300, 200, 21, 0, 2, null);
        }
Esempio n. 5
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (m_Spawner == null || m_Spawner.Deleted || state == null || info == null)
            {
                if (m_Spawner != null) m_Spawner.SpawnerGump = null;
                return;
            }

            // restrict access to the original creator or someone of higher access level
            //if (m_Spawner.FirstModifiedBy != null && m_Spawner.FirstModifiedBy != state.Mobile && state.Mobile.AccessLevel <= m_Spawner.FirstModifiedBy.AccessLevel)
            //return;


            // Get the current name
            TextRelay tr = info.GetTextEntry(999);
            if (tr != null)
            {
                m_Spawner.Name = tr.Text;
            }

            // update typenames of the spawn objects based upon the current text entry strings
            UpdateTypeNames(state.Mobile, info);

            // Update the creature list
            m_Spawner.SpawnObjects = CreateArray(info, state.Mobile);

            if (m_Spawner.SpawnObjects == null)
            {
                m_Spawner.SpawnerGump = null;
                return;
            }

            AllowGumpUpdate = true;

            for (int i = 0; i < m_Spawner.SpawnObjects.Length; i++)
            {
                if (page != (int)(i / MaxEntriesPerPage)) continue;

                // check the max count entry
                TextRelay temcnt = info.GetTextEntry(500 + i);
                if (temcnt != null)
                {
                    int maxval = 0;
                    try { maxval = Convert.ToInt32(temcnt.Text, 10); }
                    catch { }
                    if (maxval < 0) maxval = 0;

                    m_Spawner.SpawnObjects[i].MaxCount = maxval;
                }

                if (m_ShowGump > 0)
                {
                    // check the subgroup entry
                    TextRelay tegrp = info.GetTextEntry(600 + i);
                    if (tegrp != null)
                    {
                        int grpval = 0;
                        try { grpval = Convert.ToInt32(tegrp.Text, 10); }
                        catch { }
                        if (grpval < 0) grpval = 0;

                        m_Spawner.SpawnObjects[i].SubGroup = grpval;
                    }
                }

                if (m_ShowGump > 1)
                {
                    // note, while these values can be entered in any spawn entry, they will only be assigned to the subgroup leader
                    int subgroupindex = m_Spawner.GetCurrentSequentialSpawnIndex(m_Spawner.SpawnObjects[i].SubGroup);
                    TextRelay tegrp;

                    if (subgroupindex >= 0 && subgroupindex < m_Spawner.SpawnObjects.Length)
                    {
                        // check the reset time entry
                        tegrp = info.GetTextEntry(1000 + i);
                        if (tegrp != null && tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            double grpval = 0;
                            try { grpval = Convert.ToDouble(tegrp.Text); }
                            catch { }
                            if (grpval < 0) grpval = 0;

                            m_Spawner.SpawnObjects[i].SequentialResetTime = 0;

                            m_Spawner.SpawnObjects[subgroupindex].SequentialResetTime = grpval;
                        }
                        // check the reset to entry
                        tegrp = info.GetTextEntry(1100 + i);
                        if (tegrp != null && tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            int grpval = 0;
                            try { grpval = Convert.ToInt32(tegrp.Text, 10); }
                            catch { }
                            if (grpval < 0) grpval = 0;

                            m_Spawner.SpawnObjects[subgroupindex].SequentialResetTo = grpval;
                        }
                        // check the kills entry
                        tegrp = info.GetTextEntry(1200 + i);
                        if (tegrp != null && tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            int grpval = 0;
                            try { grpval = Convert.ToInt32(tegrp.Text, 10); }
                            catch { }
                            if (grpval < 0) grpval = 0;

                            m_Spawner.SpawnObjects[subgroupindex].KillsNeeded = grpval;
                        }

                    }

                    // check the mindelay
                    tegrp = info.GetTextEntry(1300 + i);
                    if (tegrp != null)
                    {
                        if (tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            double grpval = -1;
                            try { grpval = Convert.ToDouble(tegrp.Text); }
                            catch { }
                            if (grpval < 0) grpval = -1;

                            // if this value has changed, then update the next spawn time
                            if (grpval != m_Spawner.SpawnObjects[i].MinDelay)
                            {
                                m_Spawner.SpawnObjects[i].MinDelay = grpval;
                                m_Spawner.RefreshNextSpawnTime(m_Spawner.SpawnObjects[i]);
                            }
                        }
                        else
                        {
                            m_Spawner.SpawnObjects[i].MinDelay = -1;
                            m_Spawner.SpawnObjects[i].MaxDelay = -1;
                            m_Spawner.RefreshNextSpawnTime(m_Spawner.SpawnObjects[i]);
                        }
                    }

                    // check the maxdelay
                    tegrp = info.GetTextEntry(1400 + i);
                    if (tegrp != null)
                    {
                        if (tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            double grpval = -1;
                            try { grpval = Convert.ToDouble(tegrp.Text); }
                            catch { }
                            if (grpval < 0) grpval = -1;

                            // if this value has changed, then update the next spawn time
                            if (grpval != m_Spawner.SpawnObjects[i].MaxDelay)
                            {
                                m_Spawner.SpawnObjects[i].MaxDelay = grpval;
                                m_Spawner.RefreshNextSpawnTime(m_Spawner.SpawnObjects[i]);
                            }
                        }
                        else
                        {
                            m_Spawner.SpawnObjects[i].MinDelay = -1;
                            m_Spawner.SpawnObjects[i].MaxDelay = -1;
                            m_Spawner.RefreshNextSpawnTime(m_Spawner.SpawnObjects[i]);
                        }
                    }

                    // check the spawns per tick
                    tegrp = info.GetTextEntry(1500 + i);
                    if (tegrp != null)
                    {
                        if (tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            int grpval = 1;
                            try { grpval = int.Parse(tegrp.Text); }
                            catch { }
                            if (grpval < 0) grpval = 1;

                            // if this value has changed, then update the next spawn time
                            if (grpval != m_Spawner.SpawnObjects[i].SpawnsPerTick)
                            {
                                m_Spawner.SpawnObjects[i].SpawnsPerTick = grpval;
                            }
                        }
                        else
                        {
                            m_Spawner.SpawnObjects[i].SpawnsPerTick = 1;
                        }
                    }

                    // check the packrange
                    tegrp = info.GetTextEntry(1600 + i);
                    if (tegrp != null)
                    {
                        if (tegrp.Text != null && tegrp.Text.Length > 0)
                        {
                            int grpval = 1;
                            try { grpval = int.Parse(tegrp.Text); }
                            catch { }
                            if (grpval < 0) grpval = 1;

                            // if this value has changed, then update 
                            if (grpval != m_Spawner.SpawnObjects[i].PackRange)
                            {
                                m_Spawner.SpawnObjects[i].PackRange = grpval;
                            }
                        }
                        else
                        {
                            m_Spawner.SpawnObjects[i].PackRange = -1;
                        }
                    }
                }
            }

            // Update the maxcount
            TextRelay temax = info.GetTextEntry(300);
            if (temax != null)
            {
                int maxval = 0;
                try { maxval = Convert.ToInt32(temax.Text, 10); }
                catch { }
                if (maxval < 0) maxval = 0;
                // if the maxcount of the spawner has been altered external to the interface (e.g. via props, or by the running spawner itself
                // then that change will override the text entry
                if (m_Spawner.MaxCount == this.initial_maxcount)
                {
                    m_Spawner.MaxCount = maxval;
                }
            }

            switch (info.ButtonID)
            {
                case 0: // Close
                    {
                        // clear any text entry books
                        m_Spawner.DeleteTextEntryBook();
                        // and reset the gump status
                        m_Spawner.GumpReset = true;

                        return;
                    }
                case 1: // Help
                    {
                        //state.Mobile.SendGump( new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump));
                        state.Mobile.SendGump(new HelpGump(m_Spawner, this, this.X + 290, this.Y));
                        break;
                    }
                case 2: // Bring everything home
                    {
                        m_Spawner.BringToHome();
                        break;
                    }
                case 3: // Complete respawn
                    {
                        m_Spawner.Respawn();
                        //m_Spawner.AdvanceSequential();
                        m_Spawner.m_killcount = 0;
                        break;
                    }
                case 4: // Goto
                    {
                        state.Mobile.Location = m_Spawner.Location;
                        state.Mobile.Map = m_Spawner.Map;
                        break;
                    }
                case 200: // gump extension
                    {
                        if (this.m_ShowGump > 1)
                            state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, -1, this.xoffset, this.page));
                        else
                            state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump + 2, this.xoffset, this.page));
                        return;
                    }
                case 201: // gump text extension
                    {
                        if (this.xoffset > 0)
                            state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, 0, this.page));
                        else
                            state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, 250, this.page));
                        return;
                    }
                case 700: // Start/stop spawner
                    {
                        if (m_Spawner.Running)
                            m_Spawner.Running = false;
                        else
                            m_Spawner.Running = true;
                        break;
                    }
                case 701: // Complete reset
                    {
                        m_Spawner.Reset();
                        break;
                    }
                case 702: // Sort spawns
                    {
                        m_Spawner.SortSpawns();
                        break;
                    }
                case 900: // empty the status string
                    {
                        m_Spawner.status_str = "";
                        break;
                    }
                case 9998:  // refresh the gump
                    {
                        state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, this.xoffset, this.page));
                        return;
                    }
                case 9999:
                    {
                        // Show the props window for the spawner, as well as a new gump
                        state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, this.xoffset, this.page));
#if(NEWPROPSGUMP)
                        state.Mobile.SendGump(new XmlPropertiesGump(state.Mobile, m_Spawner));
#else
                    state.Mobile.SendGump( new PropertiesGump( state.Mobile, m_Spawner ) );
#endif
                        return;
                    }
                default:
                    {
                        // check the restrict kills flag
                        if (info.ButtonID >= 300 && info.ButtonID < 300 + MaxSpawnEntries)
                        {
                            int index = info.ButtonID - 300;
                            if (index < m_Spawner.SpawnObjects.Length)
                                m_Spawner.SpawnObjects[index].RestrictKillsToSubgroup = !m_Spawner.SpawnObjects[index].RestrictKillsToSubgroup;

                        }
                        else
                            // check the clear on advance flag
                            if (info.ButtonID >= 400 && info.ButtonID < 400 + MaxSpawnEntries)
                            {
                                int index = info.ButtonID - 400;
                                if (index < m_Spawner.SpawnObjects.Length)
                                    m_Spawner.SpawnObjects[index].ClearOnAdvance = !m_Spawner.SpawnObjects[index].ClearOnAdvance;
                            }
                            else
                                // text entry gump scroll buttons
                                if (info.ButtonID >= 800 && info.ButtonID < 800 + MaxSpawnEntries)
                                {
                                    // open the text entry gump
                                    int index = info.ButtonID - 800;
                                    // open a text entry gump
#if(BOOKTEXTENTRY)
                                    // display a new gump
                                    XmlSpawnerGump newgump = new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, this.xoffset, this.page);
                                    state.Mobile.SendGump(newgump);

                                    // is there an existing book associated with the gump?
                                    if (m_Spawner.m_TextEntryBook == null)
                                    {
                                        m_Spawner.m_TextEntryBook = new ArrayList();
                                    }

                                    object[] args = new object[6];

                                    args[0] = m_Spawner;
                                    args[1] = index;
                                    args[2] = X;
                                    args[3] = Y;
                                    args[4] = m_ShowGump;
                                    args[5] = page;

                                    XmlTextEntryBook book = new XmlTextEntryBook(0, String.Empty, m_Spawner.Name, 20, true, new XmlTextEntryBookCallback(ProcessSpawnerBookEntry), args);

                                    m_Spawner.m_TextEntryBook.Add(book);

                                    book.Title = String.Format("Entry {0}", index);
                                    book.Author = m_Spawner.Name;

                                    // fill the contents of the book with the current text entry data
                                    string text = String.Empty;
                                    if (m_Spawner.SpawnObjects != null && index < m_Spawner.SpawnObjects.Length)
                                    {
                                        text = m_Spawner.SpawnObjects[index].TypeName;
                                    }
                                    book.FillTextEntryBook(text);

                                    // put the book at the location of the player so that it can be opened, but drop it below visible range
                                    book.Visible = false;
                                    book.Movable = false;
                                    book.MoveToWorld(new Point3D(state.Mobile.Location.X, state.Mobile.Location.Y, state.Mobile.Location.Z - 100), state.Mobile.Map);

                                    // and open it
                                    book.OnDoubleClick(state.Mobile);


#else
                            state.Mobile.SendGump( new TextEntryGump(m_Spawner,this, index, this.X, this.Y));
#endif
                                    return;
                                }
                                else
                                    // goto spawn buttons
                                    if (info.ButtonID >= 1300 && info.ButtonID < 1300 + MaxSpawnEntries)
                                    {
                                        nclicks++;
                                        // find the location of the spawn at the specified index
                                        int index = info.ButtonID - 1300;
                                        if (index < m_Spawner.SpawnObjects.Length)
                                        {
                                            int scount = m_Spawner.SpawnObjects[index].SpawnedObjects.Count;
                                            if (scount > 0)
                                            {
                                                object so = m_Spawner.SpawnObjects[index].SpawnedObjects[nclicks % scount];
                                                if (ValidGotoObject(state.Mobile, so))
                                                {
                                                    IPoint3D o = so as IPoint3D;
                                                    if (o != null)
                                                    {
                                                        Map m = m_Spawner.Map;
                                                        if (o is Item)
                                                            m = ((Item)o).Map;
                                                        if (o is Mobile)
                                                            m = ((Mobile)o).Map;

                                                        state.Mobile.Location = new Point3D(o);
                                                        state.Mobile.Map = m;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    else
                                        // page buttons
                                        if (info.ButtonID >= 4000 && info.ButtonID < 4001 + (int)(MaxSpawnEntries / MaxEntriesPerPage))
                                        {
                                            // which page
                                            this.page = info.ButtonID - 4000;

                                        }
                                        else
                                            // toggle the disabled state of the entry
                                            if (info.ButtonID >= 6000 && info.ButtonID < 6000 + MaxSpawnEntries)
                                            {
                                                int index = info.ButtonID - 6000;

                                                if (index < m_Spawner.SpawnObjects.Length)
                                                {
                                                    m_Spawner.SpawnObjects[index].Disabled = !m_Spawner.SpawnObjects[index].Disabled;

                                                    // clear any current spawns on the disabled entry
                                                    if (m_Spawner.SpawnObjects[index].Disabled)
                                                        m_Spawner.RemoveSpawnObjects(m_Spawner.SpawnObjects[index]);
                                                }
                                            }
                                            else
                                                if (info.ButtonID >= 5000 && info.ButtonID < 5000 + MaxSpawnEntries)
                                                {
                                                    int i = info.ButtonID - 5000;




                                                    string categorystring = null;
                                                    string entrystring = null;

                                                    TextRelay te = info.GetTextEntry(i);

                                                    if (te != null && te.Text != null)
                                                    {
                                                        // get the string

                                                        string[] cargs = te.Text.Split(',');

                                                        // parse out any comma separated args
                                                        categorystring = cargs[0];

                                                        entrystring = te.Text;
                                                    }


                                                    if (categorystring == null || categorystring.Length == 0)
                                                    {

                                                        XmlSpawnerGump newg = new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, this.xoffset, this.page);
                                                        state.Mobile.SendGump(newg);

                                                        // if no string has been entered then just use the full categorized add gump
                                                        state.Mobile.CloseGump(typeof(Server.Gumps.XmlCategorizedAddGump));
                                                        state.Mobile.SendGump(new Server.Gumps.XmlCategorizedAddGump(state.Mobile, i, newg));
                                                    }
                                                    else
                                                    {
                                                        // use the XmlPartialCategorizedAddGump
                                                        state.Mobile.CloseGump(typeof(Server.Gumps.XmlPartialCategorizedAddGump));

                                                        //Type [] types = (Type[])XmlPartialCategorizedAddGump.Match( categorystring ).ToArray( typeof( Type ) );
                                                        ArrayList types = XmlPartialCategorizedAddGump.Match(categorystring);


                                                        XmlSpawnerGump.ReplacementEntry re = new XmlSpawnerGump.ReplacementEntry();
                                                        re.Typename = entrystring;
                                                        re.Index = i;
                                                        re.Color = 0x1436;

                                                        XmlSpawnerGump newg = new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, this.xoffset, this.page, re);

                                                        state.Mobile.SendGump(new XmlPartialCategorizedAddGump(state.Mobile, categorystring, 0, types, true, i, newg));

                                                        state.Mobile.SendGump(newg);
                                                    }

                                                    return;


                                                }
                                                else
                                                {
                                                    // up and down arrows
                                                    int buttonID = info.ButtonID - 6;
                                                    int index = buttonID / 2;
                                                    int type = buttonID % 2;

                                                    TextRelay entry = info.GetTextEntry(index);

                                                    if (entry != null && entry.Text.Length > 0)
                                                    {
                                                        string entrystr = entry.Text;

#if(BOOKTEXTENTRY)
                                                        if (index < m_Spawner.SpawnObjects.Length)
                                                        {
                                                            string str = m_Spawner.SpawnObjects[index].TypeName;

                                                            if (str != null && str.Length >= 230)
                                                                entrystr = str;
                                                        }
#endif

                                                        if (type == 0) // Add creature
                                                        {
                                                            m_Spawner.AddSpawnObject(entrystr);
                                                        }
                                                        else // Remove creatures
                                                        {
                                                            m_Spawner.DeleteSpawnObject(state.Mobile, entrystr);


                                                        }
                                                    }
                                                }
                        break;
                    }
            }
            // Create a new gump
            //m_Spawner.OnDoubleClick( state.Mobile);
            state.Mobile.SendGump(new XmlSpawnerGump(m_Spawner, this.X, this.Y, this.m_ShowGump, this.xoffset, this.page, this.Rentry));
        }
Esempio n. 6
0
        public override void OnDoubleClick(Mobile from)
        {
            if ((this is MilitarySpawner) && (from.AccessLevel == AccessLevel.Player))
            {
                from.Target = new AssignWayPointTarget(this as MilitarySpawner);
                from.SendMessage("Choose a Military WayPoint to make this spawner's initial WayPoint.");
                return;
            }

            if (from == null || from.Deleted || from.AccessLevel < AccessLevel.GameMaster || (m_SpawnerGump != null && SomeOneHasGumpOpen)) return;

            // flag the first person to open the spawner as the placer
            if (FirstModifiedBy == null) FirstModifiedBy = from.Name;

            LastModifiedBy = from.Name;

            // clear any text entry books that might still be around
            DeleteTextEntryBook();

            int x = 0;
            int y = 0;
            // read the text entries for default values
            Account acct = from.Account as Account;
            if (acct != null)
            {
                XmlSpawnerDefaults.DefaultEntry defs = XmlSpawnerDefaults.GetDefaults(acct.ToString(), from.Name);
                if (defs != null)
                {
                    x = defs.SpawnerGumpX;
                    y = defs.SpawnerGumpY;
                }
            }

            XmlSpawnerGump g = new XmlSpawnerGump(this, x, y, 0, 0, 0);
            from.SendGump(g);
        }
		public HelpGump(XmlSpawner spawner, XmlSpawnerGump spawnergump, int X, int Y)
			: base(X, Y)
		{
			if (spawner == null || spawner.Deleted)
				return;
			m_Spawner = spawner;
			m_SpawnerGump = spawnergump;

			AddPage(0);

            int width = 490;

            AddBackground(20, 0, width, 500, 5054);

			AddPage(1);
			//AddAlphaRegion( 20, 0, 220, 554 );
			AddImageTiled(20, 0, width, 480, 0x52);
			//AddImageTiled( 24, 6, 213, 261, 0xBBC );

			AddLabel(27, 2, 0x384, "Standalone Keywords NB: ( « stands for < ) ( » stands for > )");
			AddHtml(25, 20, width - 10, 440,
				"mobtype[,arg1,arg2,...]\n" +
				"SET[,itemname o seriale][,itemtype]/prop/value/...\n" +
				"SETONMOB,nomemob[,mobtype]/prop/value/...\n" +
				"SETONTHIS[,proptest]/prop/value/...\n" +
				"SETONTRIGMOB/prop/value/...\n" +
				"FOREACH,objecttype[,name][,distance]/action (KILL,DAMAGE,etc)\n" +
				"SETVAR,namevar/value\n" +
				"SETONNEARBY,distance,name[,type][,searchcontainers (true/false)]/prop/value/...\n" +
				"SETONPETS,distance[,name]/prop/value/...\n" +
				"SETONCARRIED,itemname[,itemtype][,equippedonly (true/false)]/prop/value/...\n" +
				"SETONSPAWN[,spawnername],subgroup/prop/value/...\n" +
				"SETONSPAWNENTRY[,spawnername],entrystring/prop/value/...\n" +
				"SETONPARENT/prop/value/...\n" +
				"TAKEGIVE[,quantity[,searchinbank (true/false),[type]]]/itemnametotake/GIVE/itemtypetogive\n" +
				"GIVE[,probability (0.01=1% 1=100%)]/itemtypetogive\n" +
				"GIVE[,probability (0.01=1% 1=100%)]/«itemtypedadare/proprietà/valore/...»\n" +
				"TAKE[,probability (0.01=1% 1=100%)[,quantity[,searchinbank (true/false)[,itemtype]]]]/nomeitem\n" +
				"TAKEBYTYPE[,probability (0.01=1% 1=100%)[,quantity[,searchinbank (true/false)]]]/itemtype\n" +
				"GUMP,titolo,gumptype (*)[,gumpconstructor]/text  *(0=messaggio - 1=yes/no - 2=response - 3=questgump - 4=multiple response)\n" +
				"BROWSER/url\n" +
				"SENDMSG[,color]/text\n" +
				"SENDASCIIMSG[,color][,fontnumber]/text (no accent)\n" +
				"WAITUNTIL[,duration][,timeout][/condition][/spawngroup]\n" +
				"WHILE/condition/spawngroup\n" +
				"SPAWN[,spawnername],subgroup\n" +
				"IF/condition/thenspawn[/elsespawn]\n" +
				"DESPAWN[,spawnername],subgroup\n" +
				"SPAWN[,spawnername],subgroup\n" +
				"GOTO/subgroup\n" +
				"COMMAND/command string (pay attention please!)\n" +
				"MUSIC,musicname[,distance]\n" +
				"SOUND,soundnumber\n" +
				"MEFFECT,itemid[,speed][,x,y,z][,x2,y2,z2]\n" +
				"EFFECT,itemid,duration[,x,y,z] OR EFFECT,itemid,durata[,trigmob]\n" +
				"POISON,levelname[,distance][,onlyplayers (true/false)]\n" +
				"DAMAGE,damage,phys,fire,cold,pois,energy[,distance][,onlyplayers (true/false)]\n" +
				"RESURRECT[,distance][,pets (true/false)]\n" +
				"CAST,spellnumber[,argomenti] OR CAST,spellname[,argomenti]\n" +
				"BCAST[,color][,fontnumber]/text\n" +
				"BSOUND,soundnumber",
				false, true);
			AddButton(width - 30, 480, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 2);
            AddLabel(width - 38, 478, 0x384, "1");
			AddButton(width - 60, 480, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 4);

			AddPage(2);
			AddLabel(27, 2, 0x384, "Value and Itemtype Keywords NB: ( « EQUALE TO < ) ( » EQUALS TO > )");
			AddHtml(25, 20, width - 10, 440,
				"property/@value\n\n" +
				"Special KeyWords\n" +
				"ARMOR,minlevel,maxlevel\n" +
				"WEAPON,minlevel,maxlevel\n" +
				"JARMOR,minlevel,maxlevel\n" +
				"JWEAPON,minlevel,maxlevel\n" +
				"SARMOR,minlevel,maxlevel\n" +
				"SHIELD,minlevel,maxlevel\n" +
				"JEWELRY,minlevel,maxlevel\n" +
				"ITEM,serial (to find that item)\n" +
				"SCROLL,mincircle,maxcircle\n" +
				"LOOT,methodname\n" +
				"NECROSCROLL,index\n" +
				"LOOTPACK,loottype\n" +
				"POTION\n" +
				"TAKEN (it will help you find item taken during quest, xmlspawners and such)\n" +
				"GIVEN (equal to TAKEN, but for item given)\n" +
				"MULTIADDON,filename\n\n" +
				"{the GET or RND keyword are used inside brachets}\n" +
				"RND,min,max\n" +
				"RNDBOOL\n" +
				"RNDLIST,int1[,int2,...]\n" +
				"RNDSTRLIST,str1[,str2,...]\n" +
				"MY,prop (for spawner mob)\n" +
				"GET,[itemname or serial or SETITEM(*)][,itemtype],prop (*: the setitem of spawner, it's written SETITEM, upper char!)\n" +
				"GET,[itemname or serial or SETITEM][,itemtype],«ATTACHMENT,type,name,property»\n" +
				"GETVAR,varname (XmlLocalVariable)\n" +
				"GETONMOB,mobname[,mobtype],prop\n" +
				"GETONMOB,mobname[,mobtype],«ATTACHMENT,type,nome,prop»\n" +
				"GETONCARRIED,itemname[,itemtype][,equippedonly (true/false)],prop\n" +
				"GETONCARRIED,itemname[,itemtype][,equippedonly (true/false)],«ATTACHMENT,type,nome,prop»\n" +
				"GETONTRIGMOB,prop\n" +
				"GETONTRIGMOB,«ATTACHMENT,type,name,prop»\n" +
				"GETONNEARBY,distance,name[,type][,searchcontainers (true/false)],prop\n" +
				"GETONNEARBY,distance,name[,type][,searchcontainers (true/false)],«ATTACHMENT,type,name,prop»\n" +
				"GETONPARENT,prop\n" +
				"GETONPARENT,«ATTACHMENT,type,name,prop»\n" +
				"GETONTHIS,prop\n" +
				"GETONTHIS,«ATTACHMENT,type,name,prop»\n" +
				"GETONTAKEN,prop\n" +
				"GETONTAKEN,«ATTACHMENT,type,name,prop»\n" +
				"GETONGIVEN,prop\n" +
				"GETONGIVEN,«ATTACHMENT,type,name,prop»\n" +
				"GETONSPAWN[,nomespawner],subgroup,prop\n" +
				"GETONSPAWN[,nomespawner],subgroup,COUNT (special - returns the number of objects spawned!)\n" +
				"GETONSPAWN[,spawnername],subgroup,«ATTACHMENT,type,name,prop»\n" +
				"GETFROMFILE,filename\n" +
				"GETACCOUNTTAG,tagname\n" +
				"MUL,value or MUL,min,max (fractal numbers)\n" +
				"INC,value or INC,min,max (integer numbers)\n" +
				"MOB,name[,mobtype] (search the id of a mob by name and eventually by type)\n" +
				"TRIGMOB\n" +
				"AMOUNTCARRIED,itemtype[,searchinbank (true/false)][,itemname]\n" +
				"PLAYERSINRANGE,distance\n" +
				"TRIGSKILL,name or value or base or cap\n" +
				"RANDNAME,nametype (female,male etc)\n" +
				"MUSIC,musicname[,distance]\n" +
				"SOUND,value\n" +
				"EFFECT,itemid,duration[,x,y,z]\n" +
				"BOLTEFFECT[,sound[,color]]\n" +
				"MEFFECT,itemid[,speed][,x,y,z][,x2,y2,z2]\n" +
				"PEFFECT,itemid,speed,[x,y,z]\n" +
				"POISON,level[,distance][,onlyplayers (true/false)]\n" +
				"DAMAGE,damage,phys,fire,cold,pois,energy[,distance][,onlyplayers (true/false)]\n" +
				"ADD[,probability (0.01=1% 1=100%)]/itemtype[,args]\n" +
				"ADD[,probability (0.01=1% 1=100%)]/«itemtype[,args]/prop/value...»\n" +
				"EQUIP[,probability (0.01=1% 1=100%)]/itemtype[,args]\n" +
				"EQUIP[,probability (0.01=1% 1=100%)]/«itemtype[,args]/prop/value...»\n" +
				"DELETE\n" +
				"KILL\n" +
				"UNEQUIP,layer[,delete (true/false)]\n" +
				"ATTACH[,probability (0.01=1% 1=100%)]/attachmenttype[,args]\n" +
				"ATTACH[,probability (0.01=1% 1=100%)]/«attachmenttype[,args]/prop/value...»\n" +
				"MSG[,probability (0.01=1% 1=100%)]/text\n" +
				"ASCIIMSG[,probability (0.01=1% 1=100%)][,color][,fontnumber]/text\n" +
				"SENDMSG[,probability (0.01=1% 1=100%)][,color]/text\n" +
				"SENDASCIIMSG[,probability (0.01=1% 1=100%)][,color][,fontnumber]/text\n" +
				"SAY[,probability (0.01=1% 1=100%)]/text\n" +
				"SPEECH[,probability (0.01=1% 1=100%)][,keywordnumber]\n" +
				"OFFSET,x,y,[,z]\n" +
				"ANIMATE,action[,framecount][,repeatcount][,forward true/false][,repeat true/false][,delay]\n" +
				"FACETO,x,y (turns the mobile to face in a direction by the coords given)\n" +
				"SETVALUE,nomevar,valore,durata (XmlValue)\n" +
				"FLASH,number (1 fade black - 2 fade white - 3 light flash - 4 light to black flash - 5 black flash SOLO PG)\n" +
				"PRIVMSG[,probability (0.01=1% 1=100%)][,color]/text (shows a message only to that player)\n" +
				"BCAST[,color][,font]/message\n" +
				"always...«ATTACHMENT,type,name,prop» as a property on  GET\n" +
				"SKILL,skillname\n" +
				"STEALABLE,stealable (true/false)",
				false, true);
            AddButton(width - 30, 480, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 3);
            AddLabel(width - 41, 478, 0x384, "2");
            AddButton(width - 60, 480, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 1);

			AddPage(3);
			AddLabel(27, 2, 0x384, "[ Commands");

			AddHtml(25, 20, width - 10, 440,
				"XmlAdd [-defaults]\n" +
				"XmlShow\n" +
				"XmlHide\n" +
				"XmlFind\n" +
				"AddAtt type [args]\n" +
				"GetAtt [type]\n" +
				"DelAtt [type][serialno]\n" +
				"AvailAtt\n" +
				"SmartStat [accesslevel GameMaster]\n" +
				"OptimalSmartSpawning [maxdiff]\n" +
				"XmlSpawnerWipe [prefix]\n" +
				"XmlSpawnerWipeAll [prefix]\n" +
				"XmlSpawnerRespawn [prefix]\n" +
				"XmlSpawnerRespawnAll [prefix]\n" +
				"XmlHome [go][gump][send]\n" +
				"XmlUnLoad filename [prefix]\n" +
				"XmlLoad filename [prefix]\n" +
				"XmlLoadHere filename [prefix][-maxrange range]\n" +
				"XmlNewLoad filename [prefix]\n" +
				"XmlNewLoadHere filename [prefix][-maxrange range]\n" +
				"XmlSave filename [prefix]\n" +
				"XmlSaveAll filename [prefix]\n" +
				"XmlSaveOld filename [prefix]\n" +
				"XmlSpawnerSaveAll filename [prefix]\n" +
				"XmlImportSpawners filename\n" +
				"XmlImportMap filename\n" +
				"XmlImportMSF filename\n" +
				"XmlDefaults [defaultpropertyname value]\n" +
				"XmlGet property\n" +
				"XmlSet property value",
				false, true);

            AddButton(width - 30, 480, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 4);
            AddLabel(width - 41, 478, 0x384, "3");
            AddButton(width - 60, 480, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 2);

			AddPage(4);
			AddLabel(27, 2, 0x384, "Quest types");
			AddHtml(25, 20, width - 10, 180,
				"KILL,mobtype[,count][,proptest]\n" +
				"KILLNAMED,mobname[,type][,count][,proptest]\n" +
				"GIVE,mobname,itemtype[,count][,proptest]\n" +
				"GIVENAMED,mobname,itemname[,type][,count][,proptest]\n" +
				"COLLECT,itemtype[,count][,proptest]\n" +
				"COLLECTNAMED,itemname[,itemtype][,count][,proptest]\n" +
				"ESCORT[,mobname][,proptest]\n",
				false, false);

			AddLabel(27, 200, 0x384, "Trigger/NoTriggerOnCarried");
			AddHtml(25, 220, width - 10, 50,
				"ATTACHMENT,name,type\n" +
				"itemname[,type][,EQUIPPED][,objective#,objective#,...]\n",
                false, false);

			AddLabel(27, 300, 0x384, "GUMPITEMS");
			AddHtml(25, 320, width - 10, 150,
				"BUTTON,gumpid,x,y\n" +
				"HTML,x,y,width,height,text\n" +
				"IMAGE,gumpid,x,y[,hue]\n" +
				"IMAGETILED,gumpid,x,y,width,height\n" +
				"ITEM,itemid,x,y[,hue]\n" +
				"LABEL,x,y,labelstring[,labelcolor]\n" +
				"RADIO,gumpid1,gumpid2,x,y[,initialstate]\n" +
				"TEXTENTRY,x,y,width,height[,text][,textcolor]\n",
                false, false);

            AddButton(width - 30, 480, 0x15E1, 0x15E5, 200, GumpButtonType.Page, 1);
            AddLabel(width - 41, 478, 0x384, "4");
            AddButton(width - 60, 480, 0x15E3, 0x15E7, 200, GumpButtonType.Page, 3);
		}