OpenSimMirror/tools/mass test client/Commands/Inventory/GiveAllCommand.cs

28 lines
726 B
C#
Raw Normal View History

2007-06-21 17:08:21 +00:00
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
namespace libsecondlife.TestClient
{
public class GiveAllCommand: Command
{
public GiveAllCommand(TestClient testClient)
{
Name = "giveAll";
Description = "Gives you all it's money.";
}
public override string Execute(string[] args, LLUUID fromAgentID)
{
if (fromAgentID == null)
return "Unable to send money to console. This command only works when IMed.";
int amount = Client.Self.Balance;
Client.Self.GiveMoney(fromAgentID, Client.Self.Balance, String.Empty);
return "Gave $" + amount + " to " + fromAgentID;
}
}
}