servuo/Scripts/Commands/Mark.cs
TrueUO 8e0544a0aa
Cleanup (#4841)
- Removed unneeded usings
- Added recompile support for [restart <true> and console commands (save recompile, nosave recompile)

Co-authored-by: TrueUO <knight.daniel.r@gmail.com>
2020-09-07 21:33:30 -07:00

32 lines
919 B
C#

using Server.Items;
namespace Server.Commands
{
public class Mark
{
public static void Initialize()
{
CommandSystem.Register("Mark", AccessLevel.GameMaster, new CommandEventHandler(Mark_OnCommand));
}
[Usage("Mark [name]")]
[Description("Creates a marked rune at your location.")]
private static void Mark_OnCommand(CommandEventArgs e)
{
if (e.Arguments.Length <= 0)
{
e.Mobile.SendMessage("Usage: mark [RuneName]");
return;
}
var runeName = e.Arguments[0];
var rune = new RecallRune();
rune.Mark(e.Mobile);
rune.Name = rune.Description = runeName;
e.Mobile.AddToBackpack(rune);
e.Mobile.SendMessage(string.Format("Rune {0} added to your backpack.", runeName));
}
}
}