Kod:
/*
Coder: FataLErroR
Mail: Darklegenduo@hotmail.com
*/
using System;
using Server;
using Server.Gumps;
using Server.Mobiles;
namespace Server.Gumps
{
public class GmToolBarGump : Gump
{
public static void Initialize()
{
Commands.Register("GmTool", AccessLevel.Counselor, new CommandEventHandler(GmTool_OnCommand));
EventSink.Login += new LoginEventHandler(EventSink_Login);
}
[Usage("GmTool")]
public static void GmTool_OnCommand(CommandEventArgs e)
{
PlayerMobile m_PlayerMobile = e.Mobile as PlayerMobile;
m_PlayerMobile.SendGump(new GmToolBarGump());
}
public static void EventSink_Login(LoginEventArgs args)
{
PlayerMobile m_PlayerMobile = args.Mobile as PlayerMobile;
if (m_PlayerMobile.AccessLevel >= AccessLevel.Counselor)
m_PlayerMobile.SendGump(new GmToolBarGump());
}
public GmToolBarGump()
: base( 0, 0 )
{
this.Closable=true;
this.Disposable=true;
this.Dragable=true;
this.Resizable=false;
this.AddPage(0);
this.AddBackground(12, 12, 513, 41, 9270);
this.AddLabel(44, 23, 58, @"Close");
this.AddLabel(130, 23, 58, @"M Delete");
this.AddLabel(235, 23, 58, @"Props");
this.AddLabel(320, 23, 58, @"Hide");
this.AddLabel(394, 23, 58, @"Unhide");
this.AddButton(23, 25, 55, 55, (int)Buttons.MTELE, GumpButtonType.Reply, 0);
this.AddButton(109, 24, 55, 55, (int)Buttons.DELETE, GumpButtonType.Reply, 0);
this.AddButton(212, 24, 55, 55, (int)Buttons.props, GumpButtonType.Reply, 0);
this.AddButton(296, 24, 55, 55, (int)Buttons.hide, GumpButtonType.Reply, 0);
this.AddButton(372, 23, 55, 55, (int)Buttons.unhide, GumpButtonType.Reply, 0);
this.AddButton(445, 23, 55, 55, (int)Buttons.Button1, GumpButtonType.Reply, 0);
this.AddLabel(465, 23, 58, @"M Tele");
}
public enum Buttons
{
MTELE,
DELETE,
props,
hide,
unhide,
Button1,
}
public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
{
base.OnResponse(sender, info);
PlayerMobile m_PlayerMobile = sender.Mobile as PlayerMobile;
string m_Prefix = Commands.CommandPrefix;
if (m_PlayerMobile.AccessLevel >= AccessLevel.GameMaster)
{
switch (info.ButtonID)
{
case 0:
{
m_PlayerMobile.SendMessage(58, " By FataLErroR");
break;
}
case 1:
if (m_PlayerMobile.Hidden)
{
m_PlayerMobile.SendMessage(63, "[M Tele");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}m tele", m_Prefix));
}
else
{
m_PlayerMobile.SendMessage(63, "[M Delete");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}m delete", m_Prefix));
}
break;
case 2:
{
m_PlayerMobile.SendMessage(63, "[Props");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}Props", m_Prefix));
break;
}
case 3:
{
m_PlayerMobile.SendMessage(63, "[Self Hide");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}Self Hide", m_Prefix));
break;
}
case 4:
{
m_PlayerMobile.SendMessage(63, "[Self Unhide");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}Self Unhide", m_Prefix));
break;
}
case 5:
{
m_PlayerMobile.SendMessage(63, "[M Tele");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}M Tele", m_Prefix));
break;
}
}
}
}
}
}
Coder: FataLErroR
Mail: Darklegenduo@hotmail.com
*/
using System;
using Server;
using Server.Gumps;
using Server.Mobiles;
namespace Server.Gumps
{
public class GmToolBarGump : Gump
{
public static void Initialize()
{
Commands.Register("GmTool", AccessLevel.Counselor, new CommandEventHandler(GmTool_OnCommand));
EventSink.Login += new LoginEventHandler(EventSink_Login);
}
[Usage("GmTool")]
public static void GmTool_OnCommand(CommandEventArgs e)
{
PlayerMobile m_PlayerMobile = e.Mobile as PlayerMobile;
m_PlayerMobile.SendGump(new GmToolBarGump());
}
public static void EventSink_Login(LoginEventArgs args)
{
PlayerMobile m_PlayerMobile = args.Mobile as PlayerMobile;
if (m_PlayerMobile.AccessLevel >= AccessLevel.Counselor)
m_PlayerMobile.SendGump(new GmToolBarGump());
}
public GmToolBarGump()
: base( 0, 0 )
{
this.Closable=true;
this.Disposable=true;
this.Dragable=true;
this.Resizable=false;
this.AddPage(0);
this.AddBackground(12, 12, 513, 41, 9270);
this.AddLabel(44, 23, 58, @"Close");
this.AddLabel(130, 23, 58, @"M Delete");
this.AddLabel(235, 23, 58, @"Props");
this.AddLabel(320, 23, 58, @"Hide");
this.AddLabel(394, 23, 58, @"Unhide");
this.AddButton(23, 25, 55, 55, (int)Buttons.MTELE, GumpButtonType.Reply, 0);
this.AddButton(109, 24, 55, 55, (int)Buttons.DELETE, GumpButtonType.Reply, 0);
this.AddButton(212, 24, 55, 55, (int)Buttons.props, GumpButtonType.Reply, 0);
this.AddButton(296, 24, 55, 55, (int)Buttons.hide, GumpButtonType.Reply, 0);
this.AddButton(372, 23, 55, 55, (int)Buttons.unhide, GumpButtonType.Reply, 0);
this.AddButton(445, 23, 55, 55, (int)Buttons.Button1, GumpButtonType.Reply, 0);
this.AddLabel(465, 23, 58, @"M Tele");
}
public enum Buttons
{
MTELE,
DELETE,
props,
hide,
unhide,
Button1,
}
public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
{
base.OnResponse(sender, info);
PlayerMobile m_PlayerMobile = sender.Mobile as PlayerMobile;
string m_Prefix = Commands.CommandPrefix;
if (m_PlayerMobile.AccessLevel >= AccessLevel.GameMaster)
{
switch (info.ButtonID)
{
case 0:
{
m_PlayerMobile.SendMessage(58, " By FataLErroR");
break;
}
case 1:
if (m_PlayerMobile.Hidden)
{
m_PlayerMobile.SendMessage(63, "[M Tele");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}m tele", m_Prefix));
}
else
{
m_PlayerMobile.SendMessage(63, "[M Delete");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}m delete", m_Prefix));
}
break;
case 2:
{
m_PlayerMobile.SendMessage(63, "[Props");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}Props", m_Prefix));
break;
}
case 3:
{
m_PlayerMobile.SendMessage(63, "[Self Hide");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}Self Hide", m_Prefix));
break;
}
case 4:
{
m_PlayerMobile.SendMessage(63, "[Self Unhide");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}Self Unhide", m_Prefix));
break;
}
case 5:
{
m_PlayerMobile.SendMessage(63, "[M Tele");
m_PlayerMobile.SendGump(new GmToolBarGump());
Commands.Handle(m_PlayerMobile, String.Format("{0}M Tele", m_Prefix));
break;
}
}
}
}
}
}
Yorumlar
Henüz yorum yapılmamıştır.
|
OylamalarOylama :![]()
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış
Oylar: 0 |
Benzer Sayfalar
| Sayfalar | Yorumlar | Gönderen | Tarih |
| Travel Tool | 0 | TheRaskol | 06-09-2009 |
| Gm Tool Script | 0 | TheRaskol | 30-08-2009 |
| House Placement Tool | 0 | TheRaskol | 02-08-2009 |
| Game Master Tool | 0 | TheRaskol | 29-07-2009 |
| Mul Tool | 0 | TheRaskol | 27-07-2009 |







