new command: RequestTeleport
This commit is contained in:
parent
b05b23c18c
commit
9a4cdda149
1 changed files with 26 additions and 0 deletions
26
Core/Commands/Movement/RequestTeleport.cs
Normal file
26
Core/Commands/Movement/RequestTeleport.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using OpenMetaverse;
|
||||
|
||||
namespace BSB.Commands.Movement
|
||||
{
|
||||
public class RequestTeleport : CoreCommand_1arg
|
||||
{
|
||||
public override string[] ArgTypes { get { return new[] { "Avatar" }; } }
|
||||
public override string[] ArgHints { get { return new[] { "Avatar UUID or Firstname Lastname" }; } }
|
||||
public override string Helpfile { get { return "Sends a teleport lure request (Move the bot to the avatar)"; } }
|
||||
|
||||
public override bool CallFunction(string[] args)
|
||||
{
|
||||
if(base.CallFunction(args) == true)
|
||||
{
|
||||
if(UUID.TryParse(args[0],out UUID avatar) == true)
|
||||
{
|
||||
bot.add_uuid_to_teleport_list(avatar);
|
||||
bot.GetClient.Self.SendTeleportLureRequest(avatar, "I would like to teleport to you");
|
||||
return true;
|
||||
}
|
||||
return Failed("Unable to process avatar on arg 1");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue