From 5b6afeafbc249ba88dcc20d1fbc98ce12418b21b Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 8 May 2007 00:10:04 +0000 Subject: Brought in TestClient code for teh fork --- ExportBot/Commands/Movement/JumpCommand.cs | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ExportBot/Commands/Movement/JumpCommand.cs (limited to 'ExportBot/Commands/Movement/JumpCommand.cs') diff --git a/ExportBot/Commands/Movement/JumpCommand.cs b/ExportBot/Commands/Movement/JumpCommand.cs new file mode 100644 index 0000000..29b11a0 --- /dev/null +++ b/ExportBot/Commands/Movement/JumpCommand.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using libsecondlife.Packets; + +namespace libsecondlife.TestClient +{ + public class JumpCommand: Command + { + public JumpCommand(TestClient testClient) + { + Name = "jump"; + Description = "Teleports to the specified height. (e.g. \"jump 1000\")"; + } + + public override string Execute(string[] args, LLUUID fromAgentID) + { + if (args.Length != 1) + return "usage: jump 1000"; + + float height = 0; + float.TryParse(args[0], out height); + + Client.Self.Teleport + ( + Client.Network.CurrentSim.Name, + new LLVector3(Client.Self.Position.X, Client.Self.Position.Y, Client.Self.Position.Z + height) + ); + + return "Jumped " + height; + } + } +} -- cgit v1.1