using Server.Commands;
using Server.Gumps;
using Server.Mobiles;
using Server.Network;
using Server.Regions;
using System;
namespace Server.Commands
{
public class ResTele
{
public static void Initialize()
{
CommandSystem.Register("restele", AccessLevel.Player, OnReagentDamage);
}
[Usage("restele")]
[Description("restele.")]
public static void OnReagentDamage(CommandEventArgs args)
{
Mobile from = args.Mobile;
if (from is PlayerMobile)
{
PlayerMobile pm = from as PlayerMobile;
pm.CloseGump(typeof(ResTeleGump));
pm.SendGump(new ResTeleGump(pm));
}
}
}
}
namespace Server.Gumps
{
public class ResTeleGump : Gump
{
private PlayerMobile pm;
public ResTeleGump(PlayerMobile owner) : base(50, 10)
{
pm = owner;
Closable = true;
Disposable = true;
Dragable = true;
Resizable = true;
base.AddPage(0);
base.AddBackground(0x7a, 0x70, 0x156, 0x132, 0x23f0);
base.AddImageTiled(0x85, 0x7a, 0x13e, 0x11d, 0xa8e);
base.AddAlphaRegion(0x85, 0x7a, 0x13e, 0x11d);
base.AddImage(0x1b0, 70, 0x28c9);
base.AddImage(0x48, 70, 0x28c8);
base.AddImage(0xca, 0x42, 0x28d4);
base.AddLabel(0xd7, 0x80, 0x35, "Ahahaha~!");
base.AddLabel(150, 0xf5, 0x25, "You are Dead~.");
base.AddLabel(150, 0x113, 0x25, "Go Back~.");
base.AddButton(0x87, 0x13b, 0xfa5, 0xfa6, 1, GumpButtonType.Reply, 0);
base.AddLabel(0xa5, 0x13b, 0x40, "Go!!");
base.AddButton(0x87, 0x16d, 0xfa5, 0xfa6, 2, GumpButtonType.Reply, 0);
base.AddLabel(0xa5, 0x16d, 0x40, "Canal!");
}
public override void OnResponse(NetState state, RelayInfo info)
{
switch (info.ButtonID)
{
case 0:
break;
case 1:
if (pm.Alive)
{
pm.SendMessage("You are alive!");
return;
}
if (pm.Region is Jail )
{
pm.SendMessage("Can't use this system in jail!");
return;
}
if (pm.Region is GreenAcres )
{
pm.SendMessage("Can't use this system in special locations!");
return;
}
if (pm.Region is MondainRegion)
{
pm.SendMessage("Can't use this system in special locations!");
return;
}
if (pm.Criminal)
{
/*pm.Map = Map.Felucca;
pm.Location = new Point3D(0x5cb, 0x64c, 20);
return;*/
pm.Map = Map.Felucca;
pm.Location = new Point3D(2720, 2183, 0);
return;
}
if (pm.Kills >= 5)
{
/*pm.Map = Map.Felucca;
pm.Location = new Point3D(0x5cb, 0x64c, 20);
return;*/
pm.Map = Map.Felucca;
pm.Location = new Point3D(2720, 2183, 0);
return;
}
pm.Map = Map.Trammel;
pm.Location = new Point3D(3766, 1295, 0); //0x405
return;
case 2:
pm.SendMessage("You can't do that yet!");
break;
default:
return;
}
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.