2006-11-22 00:09:31 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.Packets;
|
|
|
|
|
|
2006-11-24 22:27:15 +00:00
|
|
|
namespace libsecondlife.TestClient
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
|
|
|
|
public class GiveAllCommand: Command
|
|
|
|
|
{
|
2006-12-21 08:53:08 +00:00
|
|
|
SecondLife Client;
|
|
|
|
|
|
|
|
|
|
public GiveAllCommand(TestClient testClient)
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
2006-12-21 08:53:08 +00:00
|
|
|
TestClient = testClient;
|
|
|
|
|
Client = (SecondLife)TestClient;
|
|
|
|
|
|
2006-11-22 00:09:31 +00:00
|
|
|
Name = "giveAll";
|
|
|
|
|
Description = "Gives you all it's money.";
|
|
|
|
|
}
|
|
|
|
|
|
2006-12-21 08:53:08 +00:00
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|