Stop using Basic potions in l1-10 scripts?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Stop using Basic potions in l1-10 scripts?

#1 Post by rock5 » Fri Feb 12, 2010 12:35 am

Because this is such long-winded post I'll start with my question:
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
DeleteItemByNameOrId is just my own function that looks for the item then deletes it.

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.
Last edited by rock5 on Sun Mar 07, 2010 9:21 pm, edited 1 time in total.
  • 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.”
          • Ronald Reagan

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: [Solved]Stop using Basic potions in l1-10 scripts?

#2 Post by rock5 » Sun Mar 07, 2010 9:17 pm

I just thought of a way to fix this.

The bot uses the consumables.xml file to decide which potion to use. So I just changed the level requirements for the potions I don't want to use to a higher value, eg 20. Now the bot thinks those potions are beyond my ability to use so never uses them.

Problem solved.
  • 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.”
          • Ronald Reagan

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Stop using Basic potions in l1-10 scripts?

#3 Post by Administrator » Mon Mar 08, 2010 2:15 am

The item mismatch notice is just to let you know that something changed in the inventory that the bot was not made aware of. This is happening because you were deleting the items without informing the inventory class to track this change. It's not important; the bot should update the information whenever it can next.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Stop using Basic potions in l1-10 scripts?

#4 Post by rock5 » Mon Mar 08, 2010 8:20 am

Administrator wrote:The item mismatch notice is just to let you know that something changed in the inventory that the bot was not made aware of. This is happening because you were deleting the items without informing the inventory class to track this change. It's not important; the bot should update the information whenever it can next.
The message gives that impression but I've had my character fight and rest and spit out these messages for easily 15 minutes before eventually starting to use the simple potions. Doing inventory:update() didn't seem to help either.

On another note I noticed that the Basic potions had a higher potency than the Simple potions which is why they are rated higher and used first. That raises the question, why do I, as a human and not a computer, consider Simple potions much better than the Basic potions? It's because over a given amount of time the simple potions can heal much more than the basic potions.

Maybe you should change your ratings to reflect how much recovery a potion can do over 1 minute? So for example;
Basic Medicine - 220 potency
Simple First Aid Potion - 80 x 4 + 8 x 30 = 560

This way heal-over-time potions will get much more priority than instant heals. Anyway, that's the way I think it should be. Of course more potions will be used but for 1-10 you usually have plenty anyway.

What do you think?
  • 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.”
          • Ronald Reagan

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Stop using Basic potions in l1-10 scripts?

#5 Post by Administrator » Mon Mar 08, 2010 11:51 am

That actually sounds like a pretty good idea. I don't think it would be too difficult to implement, either.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests