-
althalos
- Posts: 19
- Joined: Thu Feb 04, 2010 10:20 am
#1
Post
by althalos » 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:
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)
Any ideas would be greatly appreciated. Thanks.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Wed Aug 11, 2010 11:53 pm
althalos wrote: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:
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)
Any ideas would be greatly appreciated. Thanks.
I don't see any mention of MaxDurability in CItem:update(). I think it's just a value they missed in the new inventory system. I suspect Voidmain will fix it soon after seeing this post.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
VoidMain
- Posts: 187
- Joined: Wed Apr 21, 2010 12:21 pm
#3
Post
by VoidMain » Thu Aug 12, 2010 7:40 am
Fixed now, update from SVN.
-
althalos
- Posts: 19
- Joined: Thu Feb 04, 2010 10:20 am
#4
Post
by althalos » Thu Aug 12, 2010 4:37 pm
Much appreciated. Works beautifully.
-
salient
- Posts: 15
- Joined: Thu May 06, 2010 12:47 am
#5
Post
by salient » Sat Aug 14, 2010 10:29 am
The mainhand durability seems to be returning as a ##.###### string instead of the 0.####### that it used to. I fixed the problem by changing the flag in my profile to flip at 90 instead of 0.9
Just throwing that out there for anyone else who runs into this change and isn't sure what happened.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests