diff --git a/BetterSecondbot/WikiMake/wikimake.cs b/BetterSecondbot/WikiMake/wikimake.cs
index f33bcc4..7e4383c 100644
--- a/BetterSecondbot/WikiMake/wikimake.cs
+++ b/BetterSecondbot/WikiMake/wikimake.cs
@@ -476,7 +476,12 @@ namespace BetterSecondBot.WikiMake
sb.Append(".html'>");
sb.Append(c);
sb.Append("
");
- sb.Append((args-1).ToString());
+ int argcount = args - 1;
+ if(argcount < 0)
+ {
+ argcount = 0;
+ }
+ sb.Append(argcount.ToString());
sb.Append(" | ");
}
sb.Append("");
diff --git a/Core/Commands/Inventory.cs b/Core/Commands/Inventory.cs
index 2c787d1..e8db20a 100644
--- a/Core/Commands/Inventory.cs
+++ b/Core/Commands/Inventory.cs
@@ -17,7 +17,9 @@ namespace BetterSecondBot.HttpService
public HTTP_Inventory(SecondBot mainbot, TokenStorage setuptokens) : base(mainbot, setuptokens) { }
[About("rezs the item at the bots current location")]
- [ReturnHints("True|False")]
+ [ReturnHints("UUID of rezzed item")]
+ [ReturnHints("Invaild item UUID")]
+ [ReturnHints("Unable to find item")]
[ArgHints("item", "URLARG", "UUID of item to rez")]
[Route(HttpVerbs.Get, "/RezObject/{item}/{token}")]
public object RezObject(string item, string token)
@@ -26,7 +28,17 @@ namespace BetterSecondBot.HttpService
{
return Failure("Token not accepted");
}
- return Failure("Broken awaiting repairs");
+ if (UUID.TryParse(item, out UUID targetitem) == true)
+ {
+ return Failure("Invaild item UUID");
+ }
+ InventoryItem itm = bot.GetClient.Inventory.FetchItem(targetitem, bot.GetClient.Self.AgentID, (5 * 1000));
+ if (itm == null)
+ {
+ return Failure("Unable to find item");
+ }
+ UUID rezedobject = bot.GetClient.Inventory.RequestRezFromInventory(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimRotation, bot.GetClient.Self.RelativePosition, itm);
+ return BasicReply(rezedobject.ToString());
}