Does anyone know of a good reliable way of stopping the bot from using Basic Potions?
Now for the long-winded part:
I've noticed, while watching my l1-10 scripts running, that using the Basic Potions can be lethal. Doesn't happen often but it happens. This is because during the full 60 second cool-down the bot can't use any other 60s potion and wont use any heal-over-time potion. And a lot can happen in 60s.
The ideal solution is for the devs to program the bot to know how to use both cool-down potions at the same time. Until that happens, I've been trying to stop the bot from using the Basic potions altogether with little success.
What I did was to have the bot discard any Basic potions after each fight like this;
Code: Select all
-- Delete 1 minute potions
if (inventory:getItemCount(200151) and inventory:getItemCount(200151)>0) or (inventory:getItemCount(200152) and inventory:getItemCount(200152)>0) then
inventory:update()
DeleteItemByNameOrId("Basic Medicine")
DeleteItemByNameOrId("Basic Spirit Potion")
inventory:update()
end
It seems to work OK but sometimes the bot tries to use a basic potion anyway and I get a yellow message in the micromacro screen that says something like: NOTICE: Item mismatch (Basic Spirit Potion); updating item info (don't panic). This gets repeated 20 or more times.
If I'm out of combat then the character stands there until it gets resolved, eventually using a Simple potion, which is OK but time consuming. But if this happens during combat he most certainly dies, especially as I noticed that it stops casting flame as well.