This update re-implements Advertising Helper, adds new Scripter functionality, and fixes a few annoying bugs. Enjoy.
Code:v2.5.3
Fixed Advertising Helper.
Fixed the Walker Stuck issue with Mapclicks. While it may still alert, it should also keep trying to reach the waypoint.
Added Count/Volume display to BPInfo.
Added the following Lua functionality to the Scripter:
Added the following functionality to the Map class:
Map.PickupItem(x, y, z, containerto, spotto[, count])
X, Y, Z: The ground location of the item.
Containerto: The container index to move the item to.
Spotto: the spot in the container to move the item to.
Count: An optional parameter which specifies how many on the stack to move. Defaults to all.
Returns: 1 if successful, 0 if failed.
Created the HUD class:
HUD.CreateTextDisplay(x, y, text, r, g, b)
X, Y: The screen location to place the text at.
Text: The text to display.
R, G, B: RBG Color for the text.
Returns: A HUD object representing a text display.
HUD.CreateItemDisplay(x, y, id, size, count)
X, Y: The screen location to place the text at.
ID: The item ID which will be shown.
Size: The size, in pixels, of the item (Between 20 and 64).
Count: The count state, for stackable items, to be drawn as.
Returns A HUD object representing an item display.
HUDObject:SetPosition(x, y)
X, Y: Screen location to move the HUD object to.
Functionality: Moves the HUD object to the specified location. Works for text and item displays.
HUDObject:SetText(text)
Text: The text to be shown by the HUD object.
Functionality: Updates the text being shown on a HUD object. Only works on text displays.
HUDObject:SetTextColor(r, g, b)
R, G, B: RBG Color for the text display.
Functionality: Updates the color being used on a HUD object. Only works on text displays.
HUDObject:SetItemID(id)
ID: The item ID which will be shown by the HUD object.
Functionality: Updates the ID being shown on a HUD object. Only works on item displays.
HUDObject:SetItemSize(size)
Size: The size at which the item will be drawn.
Functionality: Updates the size at which the item will be drawn by the HUD object. Only works on item displays.
HUDObject:SetItemCount(count)
Count: The count state, for stackable items, to be drawn as
Functionality: Updates the count state which will be drawn for the item by the HUD object. Only works on item displays.
Example HUD script
[highlight=lua]local HUDText = HUD.CreateTextDisplay(100, 100, "Testing", 255, 120, 120)
local HUDItem = HUD.CreateItemDisplay(100, 100, 3031, 48, 100)
local index = 1
while (true) do
wait(1000)
HUDText:SetPosition(math.random(20, 100), math.random(20, 100))
HUDText:SetText("Testing + " .. index .. " seconds")
HUDText:SetTextColor(math.random(0, 255), math.random(0, 255), math.random(0, 255))
HUDItem:SetItemID(math.random(3031, 3034))
HUDItem:SetItemSize(math.random(32, 64))
HUDItem:SetItemCount(math.random(1, 100))
index = index + 1
end[/highlight]
For download and operation instructions, refer back to this thread:
http://forums.xenobot.net/showthread.php?19