Page 1 of 1
Ho to get bot to eat food?
Posted: Fri Dec 31, 2010 4:45 am
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.
Re: Ho to get bot to eat food?
Posted: Fri Dec 31, 2010 7:52 am
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
Re: Ho to get bot to eat food?
Posted: Fri Dec 31, 2010 7:54 am
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.
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
(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.
Re: Ho to get bot to eat food?
Posted: Fri Dec 31, 2010 8:41 am
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.
Re: Ho to get bot to eat food?
Posted: Fri Dec 31, 2010 9:19 am
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.
Re: Ho to get bot to eat food?
Posted: Sat Jan 01, 2011 4:37 am
by sinkadus
Thank you for letting me know
