2007-04-28 20:54:02 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
2008-07-21 21:12:59 +00:00
|
|
|
using OpenMetaverse;
|
|
|
|
|
using OpenMetaverse.Packets;
|
2007-04-28 20:54:02 +00:00
|
|
|
|
2008-07-21 21:12:59 +00:00
|
|
|
namespace OpenMetaverse.TestClient
|
2007-04-28 20:54:02 +00:00
|
|
|
{
|
|
|
|
|
public class GiveAllCommand: Command
|
|
|
|
|
{
|
|
|
|
|
public GiveAllCommand(TestClient testClient)
|
|
|
|
|
{
|
|
|
|
|
Name = "giveAll";
|
|
|
|
|
Description = "Gives you all it's money.";
|
2008-07-25 08:55:36 +00:00
|
|
|
Category = CommandCategory.Other;
|
2007-04-28 20:54:02 +00:00
|
|
|
}
|
|
|
|
|
|
2008-07-25 05:15:05 +00:00
|
|
|
public override string Execute(string[] args, UUID fromAgentID)
|
2007-04-28 20:54:02 +00:00
|
|
|
{
|
2008-07-25 05:15:05 +00:00
|
|
|
if (fromAgentID == UUID.Zero)
|
2007-04-28 20:54:02 +00:00
|
|
|
return "Unable to send money to console. This command only works when IMed.";
|
|
|
|
|
|
|
|
|
|
int amount = Client.Self.Balance;
|
2007-09-05 01:21:36 +00:00
|
|
|
Client.Self.GiveAvatarMoney(fromAgentID, Client.Self.Balance, "TestClient.GiveAll");
|
2007-04-28 20:54:02 +00:00
|
|
|
return "Gave $" + amount + " to " + fromAgentID;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|