Ho to get bot to eat food?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
sinkadus
Posts: 2
Joined: Fri Dec 31, 2010 4:38 am

Ho to get bot to eat food?

#1 Post by sinkadus »

I have search the forum and the wiki and can't find any info on how to set up the bot to use/eat food for buffs...?
Any help on this would be appreciated.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ho to get bot to eat food?

#2 Post by rock5 »

sinkadus wrote:I have search the forum and the wiki and can't find any info on how to set up the bot to use/eat food for buffs...?
Any help on this would be appreciated.
The bot it set up only to use regular consumables for hp and mp. If you want to use other food you have to use it yourself. eg. inventory:useItem(itemNameOrId). If you want to know if the buff is already applied or not you can use player:hasBuff(buffname). So it would look something like this.

Code: Select all

if not player:hasBuff(buffname) then
    inventory:useItem(itemNameOrId)
end
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Ho to get bot to eat food?

#3 Post by jduartedj »

There is no official implementation for that specific purpose, There is the inventory's useitem that allows you to use a food but for you I'll post something I had done for my own.
addon_food.lua
(589 Bytes) Downloaded 121 times
USAGE: UseFood(_foodname[,_buffname]) _foodname is the nameof the name and _buffname is to use when the buff hasn't got the same name as the food (e.g. house maid foods), note that this works for anything else
you need to use and produces a buff.

Anyway somewhere along the forum you'll also find a housemaid specific food scripts, though it hasn't been included in addons forum yet :P


(note: rock5 please move this to the addon scripts forum)
EDIT: apparently rock5 JUST beat me to it xD anyway Ignore the above line rock5 I'll create a new thread.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Ho to get bot to eat food?

#4 Post by rock5 »

jduartedj wrote:(note: rock5 please move this to the addon scripts forum)
EDIT: apparently rock5 JUST beat me to it xD anyway Ignore the above line rock5 I'll create a new thread.
Wasn't me. Must have been Administrator.
  • 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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Ho to get bot to eat food?

#5 Post by jduartedj »

rock5 wrote:
jduartedj wrote:(note: rock5 please move this to the addon scripts forum)
EDIT: apparently rock5 JUST beat me to it xD anyway Ignore the above line rock5 I'll create a new thread.
Wasn't me. Must have been Administrator.
What you quoted was ALL me! I just edited my post after.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
sinkadus
Posts: 2
Joined: Fri Dec 31, 2010 4:38 am

Re: Ho to get bot to eat food?

#6 Post by sinkadus »

Thank you for letting me know :)
Post Reply