FacetCommand.cs
- Code: Select all
/// <Summary>
/// Original Command by Rylock Released on 18/06/2004
/// For RunUO RC0. This command now supports Tokuno
/// as of 20/05/2005 Modification by Greystar
/// as of 24/08/2007 Modification by SiENcE for SunUO support
/// </summary>
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Items;
namespace Server.Scripts.Commands
{
public class FacetCommand
{
public static void Initialize()
{
Server.Commands.Register( "Facet", AccessLevel.Counselor, new CommandEventHandler( Facet_OnCommand ) );
}
public static void Facet_OnCommand( CommandEventArgs e )
{
Mobile m = e.Mobile;
m.SendGump( new FacetGump( m ) );
}
}
public class FacetGump : Gump
{
private Mobile m_Owner;
public Mobile Owner{ get{ return m_Owner; } set{ m_Owner = value; } }
public FacetGump(Mobile owner) : base( 10, 10 )
{
owner.CloseGump( typeof( FacetGump ) );
int gumpX = 0; int gumpY = 0;
m_Owner = owner;
Closable=true;
Disposable=true;
Dragable=true;
Resizable=false;
AddPage(0);
AddBackground(222, 114, 100, 172, 9200);
AddButton(231, 124, 2714, 2714, 1, GumpButtonType.Reply, 0);
AddButton(231, 156, 2714, 2714, 2, GumpButtonType.Reply, 0);
AddButton(231, 189, 2714, 2714, 3, GumpButtonType.Reply, 0);
AddButton(231, 225, 2714, 2714, 4, GumpButtonType.Reply, 0);
AddButton(231, 257, 2714, 2714, 5, GumpButtonType.Reply, 0);
AddLabel(258, 124, 55, @"Felucca");
AddLabel(258, 156, 55, @"Trammel");
AddLabel(258, 192, 55, @"Ilshenar");
AddLabel(258, 226, 55, @"Malas");
AddLabel(258, 258, 55, @"Tokuno");
}
public override void OnResponse( NetState state, RelayInfo info )
{
Mobile from = state.Mobile;
switch( info.ButtonID )
{
case 1:
CityInfo city = new CityInfo( "Britain", "Town Center", 1475, 1645, 20 );
from.MoveToWorld( city.Location, Map.Felucca );
break;
case 2:
CityInfo city1 = new CityInfo( "Britain", "Town Center", 1475, 1645, 20 );
from.MoveToWorld( city1.Location, Map.Trammel );
break;
case 3:
CityInfo city2 = new CityInfo( "Lakeshire", "Town Center", 1203, 1124, -25 );
from.MoveToWorld( city2.Location, Map.Ilshenar );
break;
case 4:
CityInfo city3 = new CityInfo( "Luna", "Town Center", 989, 519, -50 );
from.MoveToWorld( city3.Location, Map.Malas );
break;
case 5:
CityInfo city4 = new CityInfo( "Zento", "Town Center", 738, 1248, 30 );
from.MoveToWorld( city4.Location, Map.Tokuno );
break;
}
}
}
}
