inventory:getMainHandDurability() not working since updates
Posted: Wed Aug 11, 2010 6:27 pm
I updated to the 8/10/10 RoM patch and got the newest rombot revision via SVN. Now I can't retrieve the durability of my main hand weapon.
Here's my code on leaving combat:
And here's the error message I receive on rombot:
Any ideas would be greatly appreciated. Thanks.
Here's my code on leaving combat:
Code: Select all
<onLeaveCombat>
-- Additional Lua code to execute after killing an enemy
printf("\nCurrent Stats:\n");
printf("---------------------------\n\n");
printf("Health:%s\n", player.HP);
local dura = inventory:getMainHandDurability();
printf("Weapon Durability:%s\n", dura);
if (0.55 > dura) then
player:update();
__WPL:setForcedWaypointType("TRAVEL");
loadPaths("Ystra Frostwood Cyclops Exit.xml");
__WPL:setForcedWaypointType("TRAVEL");
end;
local poti = inventory:itemTotalCount("Crystal Mana Medicine");
printf("Mana Potions:%s\n\n", poti);
if (11 > poti) then
player:update();
__WPL:setForcedWaypointType("TRAVEL");
loadPaths("Ystra Frostwood Cyclops Exit.xml");
__WPL:setForcedWaypointType("TRAVEL");
end;
</onLeaveCombat>
And here's the error message I receive on rombot:
Code: Select all
Use 8: PRIEST_CHAIN_OF_LIGH=> * Failed to cast *
Use 3: PRIEST_RISING_TIDE => Frostwood Valley Cyclops (2053/3130)
Use 3: PRIEST_RISING_TIDE => Frostwood Valley Cyclops (2053/3130)
Use 8: PRIEST_CHAIN_OF_LIGH=> Frostwood Valley Cyclops (1223/3130)
Use 3: PRIEST_RISING_TIDE => * Failed to cast *
Use 3: PRIEST_RISING_TIDE => Frostwood Valley Cyclops (917/3130)
Use 8: PRIEST_CHAIN_OF_LIGH=> * Failed to cast *
Use 3: PRIEST_RISING_TIDE => Frostwood Valley Cyclops (408/3130)
Use 6: PRIEST_REGENERATE => Frostwood Valley Cyclops (0/3130)
Fight finished. Killed 1 Frostwood Valley Cyclops. (fight #1 / runtime 0 minutes
)
Current Stats:
---------------------------
Health:831
...s of Magic/micromacro/scripts/rom/classes/player.lua:1069: Error in your prof
ile: onLeaveCombat error: ...f Magic/micromacro/scripts/rom/classes/inventory.lu
a:244: attempt to perform arithmetic on field 'MaxDurability' (a nil value)