diff --git a/Core/Commands/Movement/Fly.cs b/Core/Commands/Movement/Fly.cs new file mode 100644 index 0000000..bfb7898 --- /dev/null +++ b/Core/Commands/Movement/Fly.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenMetaverse; +namespace BSB.Commands.Movement +{ + public class Fly : CoreCommand_1arg + { + public override string[] ArgTypes { get { return new[] { "True|False" }; } } + public override string[] ArgHints { get { return new[] { "Should the bot be flying" }; } } + public override string Helpfile { get { return "Makes the bot fly (or not)"; } } + public override bool CallFunction(string[] args) + { + if (base.CallFunction(args) == true) + { + if (bool.TryParse(args[0], out bool status) == true) + { + bot.GetClient.Self.Movement.Fly = status; + bot.GetClient.Self.Movement.SendUpdate(); + return true; + } + else + { + return Failed("Unable to process rotation"); + } + } + return false; + } + } + +}