¿ï¿ÂÀ» Á¢¼ÓÇÏ°í ³ª¼ ½ÃÀÛÁöÁ¡±îÁö´Â °Ë»öÀ¸·Î ºÁ°¡¸é¼ ÀßÇÞ½À´Ï´Ù ^^
ÇÏÁö¸¸ ¿ï¿Â´ÙÀ½¹®Á¦ÀÎ ÇÛÇÁ(µµ¿ò)¶õ¿¡ havenÀ̶õ°÷À» ºê¸®Æ°À̳ª
¿©·¯µµ½ÃÁß °í¸¦¼ö ÀÕ°Ô ÇÏ´Â ½ºÅ©¸³À» ¾Ë°í ½Í½À´Ï´Ù..
¿©±â °Ë»ö¿¡¼ º¸´Ï±î.....
¾î¶»°Ô Çϸé havenÀÇ À§Ä¡¸¦ Æç·çÄ«·Î ¹Ù²Ü ¼ö ÀÖÀ»±î¿ä?
HelpGump.cs ÆÄÀÏ¿¡¼ ´ÙÀ½ ÄÚµå ºÎºÐÀ» ãÀ¸¼¼¿ä.
Code:
case 9: // Young player transport
{
if ( IsYoung( from ) )
{
if ( from.Region is Regions.Jail )
{
from.SendLocalizedMessage( 1041530, "", 0x35 ); // You'll need a better jailbreak plan then that!
}
else if ( from.Region.Name == "Haven" )
{
from.SendLocalizedMessage( 1041529 ); // You're already in Haven
}
else
{
from.Map = Map.Trammel;
from.Location = new Point3D( 3618, 2587, 0 );
}
}
break;
}
À§ ÄÚµå ºÎºÐ Áß¿¡
Code:
from.Map = Map.Trammel;
from.Location = new Point3D( 3618, 2587, 0 );
ÀÌ·± °ÍÀÌ ³ª¿À´Âµ¥ Á¦²«ÀÌ»óÇϰԽø® case 9±îÁö ÀûÇôÀÕÁö¾È¾Æ¼ ´ä´äÇÕ´Ï´Ù
³»¿ëÀº ÀÌ·¸½À´Ï´Ù
using System;
using System.Text;
using Server.Gumps;
using Server.Network;
namespace Server.Misc.TestCenter
{
public class TCHelpGump : Gump
{
public static void Initialize()
{
// Register our speech handler
EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
}
private static void EventSink_Speech( SpeechEventArgs args )
{
if ( !args.Handled && Insensitive.Equals( args.Speech, "help" ) )
{
args.Mobile.SendGump( new TCHelpGump() );
args.Handled = true;
}
}
public TCHelpGump() : base( 40, 40 )
{
AddPage( 0 );
AddBackground( 0, 0, 160, 120, 5054 );
AddButton( 10, 10, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0 );
AddLabel( 45, 10, 0x34, "RunUO.com" );
AddButton( 10, 35, 0xFB7, 0xFB9, 2, GumpButtonType.Reply, 0 );
AddLabel( 45, 35, 0x34, "List of skills" );
AddButton( 10, 60, 0xFB7, 0xFB9, 3, GumpButtonType.Reply, 0 );
AddLabel( 45, 60, 0x34, "Command list" );
AddButton( 10, 85, 0xFB1, 0xFB3, 0, GumpButtonType.Reply, 0 );
AddLabel( 45, 85, 0x34, "Close" );
}
public override void OnResponse( NetState sender, RelayInfo info )
{
switch ( info.ButtonID )
{
case 1: // RunUO.com
{
sender.LaunchBrowser( "http://www.RunUO.com" );
break;
}
case 2: // List of skills
{
string[] strings = Enum.GetNames( typeof( SkillName ) );
Array.Sort( strings );
StringBuilder sb = new StringBuilder();
if ( strings.Length > 0 )
sb.Append( strings[0] );
for ( int i = 1; i < strings.Length; ++i )
{
string v = strings[i];
if ( (sb.Length + 1 + v.Length) >= 256 )
{
sender.Send( new AsciiMessage( Server.Serial.MinusOne, -1, MessageType.Label, 0x35, 3, "System", sb.ToString() ) );
sb = new StringBuilder();
sb.Append( v );
}
else
{
sb.Append( ' ' );
sb.Append( v );
}
}
if ( sb.Length > 0 )
{
sender.Send( new AsciiMessage( Server.Serial.MinusOne, -1, MessageType.Label, 0x35, 3, "System", sb.ToString() ) );
}
break;
}
case 3: // Command list
{
sender.Mobile.SendAsciiMessage( 0x482, "The command prefix is \"{0}\"", Server.Commands.CommandPrefix );
Server.Scripts.Commands.CommandHandlers.Help_OnCommand( new CommandEventArgs( sender.Mobile, "help", "", new string[0] ) );
break;
}
}
}
}
}
case 3±îÁö ¹Û¿¡ ¾ÈÀûÇôÀճ׿© ºÐ¸íÈ÷HelpGump.cs ÀÌ ÆÄÀÏÀÌ ¸Â´Âµ¥ ¾îÂîµÈ ¿µ¹®ÀÎÁö Àß ¸ð¸£°Ù½À´Ï´Ù ²ÀÁ» ¾Ë·ÁÁÖ¼¼¿ä °¨»çÇÕ´Ï´Ù ^^
|