My script should put the runes dropping in Sascilia mini game into the guild bank. Guild bank has been opened before starting this script.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
function MGbuildItemTableOfType(nameOfType)
local result = {};
local count = 1;
inventory:update()
for i, item in pairs(inventory.BagSlot) do
if item.Id ~= 0 then
if item:isType(nameOfType) then
result[count]=item;
count = count + 1;
end
end
end
return result;
end
runes = MGbuildItemTableOfType("Runes");
for j, item in pairs(runes) do
print("moving "..GetIdName(item.Id).." to guildbank");
item:moveTo("guildbank");
end
</onLoad>
</waypoints>
Code: Select all
MACRO Test: ok
Ranged skill found: MAGE_LIGHTNING
[DEBUG] CPU Frequency 2550.371
Loaded waypoint path x.xml
No return path with default naming x_return.xml found.
We use the normal waypoint path x.xml now.
moving Passion I to guildbank
Did not find any crashed game clients.
2:45pm - ...rogram Files/micromacro/scripts/rom/classes/item.lua:355: attempt to
index local 'toItem' (a nil value)