Page 1 of 1

Rev 571 changelog

Posted: Sun Feb 06, 2011 1:32 am
by rock5
Another large commit. Well not so large this time but I'm posting a changelog just the same.
  • EggPet class:
    • Ratio option now uses materials in inventory instead of pet craft levels. This means if you set EGGPET_CRAFT_RATIO to 2:1:0 then it will craft so that you end up with twice as much ore than wood in your inventory, ignoring herbs. It includes processed materials so green ore would count as 2 and blue ore would counts as 12 etc.
    • Can now use same pet for both crafting and assisting. If you set both the assist and craft pet to the same pet then it will craft when you have tools and assist when you don't. If you buy some tools it will switch back to crafting.
    • player:merchant() now only buy pet tools if the corresponding ratio setting is not 0. So if you set EGGPET_CRAFT_RATIO to 2:1:0 then it will only attempt to buy hoes and hatchets at the amounts specified by the shopping options.
  • When starting the bot, if you move before selecting a waypoint file from the list, it will now correctly find nearest waypoint. Previously it would run back to where you were standing when you started the bot.
  • Autosell now only gets the tooltip for items that need it (weapons and armor). This saves time as only weapons and armor have durability and stats.
  • Fixed RoMScript() so it should always succeed (no more 'compare to nil' errors). Even if the game freezes for 10s it should still succeed. You shouldn't need to use my 'repeat' trick anymore to make sure you get a value.
Please report any bugs for this revision here.

Re: Rev 571 changelog

Posted: Sun Feb 06, 2011 8:24 am
by mike
getMainHandDurability() returns incorrect percentage value for items with a maximum durability value less than 100. In inventory.lua, self.EquipSlots[ _slot ].MaxDurability returns 100 for an item of 80/80 durability. getMainHandDurability() therefore returns the item as being at 80% instead of 100%.

Re: Rev 571 changelog

Posted: Sun Feb 06, 2011 10:15 am
by rock5
mike wrote:getMainHandDurability() returns incorrect percentage value for items with a maximum durability value less than 100. In inventory.lua, self.EquipSlots[ _slot ].MaxDurability returns 100 for an item of 80/80 durability. getMainHandDurability() therefore returns the item as being at 80% instead of 100%.
This has nothing to do with the topic "Rev 571". In future, please start a new thread.

I tested it out:
inventory.EquipSlots[16].Durability gave 72.98
inventory.EquipSlots[16].MaxDurability gave 73 and
inventory:getMainHandDurability() gave 99.9726

So it worked for me.