Page 1 of 3

UseFood + useHousemaidPotions = useGoodie !!!

Posted: Sun Jan 16, 2011 10:55 pm
by jduartedj
So Like I told Giram I am here suggesting a merger between our 2 addons to submit for approval to add to the bot.

So the attached file will contain my suggestion called

Code: Select all

useGoodie(item[,buff]) 
I also improved the housemaid foods/pots table but I might be missing information relative to the items with "--guessed" as comment.

This function will use any food/pot from the table or use ANY item called item with a buff of the same name or a buff called buff.

Feel free to take a look and comment, specially Giram and the develpers.

also I used this reference for some stuff: http://www.theromwiki.com/Housekeeper_Guide

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Tue Jan 18, 2011 2:40 pm
by Giram
I haven't tested that but can say that Pungent Vileness potion has instant cast and Scarlet something have 2 second cast i think.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Tue Jan 18, 2011 5:03 pm
by jduartedj
I wouldn't know never seen those pots :P

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Tue Jan 18, 2011 5:58 pm
by Giram
I think i started getting those after lvl 80 but i don't use those much. Scarlet love is sometimes usefull for me. But mostly i just use speed, luck and foods.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Tue Jan 18, 2011 8:39 pm
by jduartedj
Giram wrote:I think i started getting those after lvl 80
Well if you look at my table you'll coments indicating when do you start getting what, could you test them properly when you get them next time, so I can add reliable info on the table? The buffs are probably different! About the rest what do you think?

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 6:05 am
by j19861986
In which folder should I put in the useGoodie???
And how do I use it???

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 7:17 am
by jduartedj
like any user function put it under rom/userfunctions. the usage is useGoodie(item[,buff]) just like it is described in the first post. for item you can use the actual item name or a table value for the housemaid's pots/food like "speed" (uses Unbridled Enthusiasm). The buff argument is optional (thus the brackets).

This has not been released yet as it is being discussed still, but feel free to test and report.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 10:55 am
by ramenuk
Works well so far, i use it in my profile like this

<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
useGoodie("pdmg","Salted Fish with Sauce");
useGoodie("speed","Unbridled Enthusiasm");
lootBodies();
]]></onLeaveCombat>

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 2:52 pm
by Giram
I have tried with few housemaid items and seems to work just fine.

I found few bugs from there that i fixed. Missing 1 letter from maid food and changed cast time for scarlet love and remove few guessed comments so you see what i changed.

Seems that its not required to set buff name to all. What items requires two arguments when using that function? Other items that are not housemaid stuff?

This works but havents tested these using item name + buff name. Is buff name even required if we can use items using item id Or was it item name or both?

Code: Select all

useGoodie("patt3");
I am just trying to make this clear to me cause it's little above my coding skills.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 6:41 pm
by jduartedj
I should have given examples. The idea is to support ANY item that as a buff, but housemaid items are tabled so you only need the short name!
So

Code: Select all

useGoodie("speed")
is good enough but if you want to use another item you can use

Code: Select all

useGoodie("item") if the item has the same buffname as the itemname
, or use

Code: Select all

useGoodie("item","buff") only if you have an item with a buff diferent from its own name.
The purpose it to make it as easy and wide as possible. Examples of other items that may use this are mounts and transformation potions.

oh and yes you can use the ID also

Code: Select all

useGoodie(120556)

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 6:45 pm
by jduartedj
For best support I also suggest adding a third and also optional argument

Code: Select all

 useGoodie(item,buff,castTime) 
so for mounts f/e you can manually indicate the castTime! ofc for people who only want housemaids they can still use just

Code: Select all

useGoodie("speed")
f/e

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Jan 19, 2011 7:26 pm
by rock5
You could probably replace

Code: Select all

      if option.castTime > 0 then
         yrest(option.castTime);
      end
with

Code: Select all

      repeat
         yrest(200)
         player:update()
      until player.Casting == false
That way you could probably do away with the castime altogether. Of course instant items will wait a minimum of 200ms but, lets face it, instant things still take some time so it's not a bad thing.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Thu Jan 20, 2011 11:02 am
by jduartedj
or I'll just use

Code: Select all

while player.Casting ... 
instead ... maybe with a player:update before and 1 inside the loop....

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Thu Jan 20, 2011 11:35 am
by rock5
jduartedj wrote:or I'll just use

Code: Select all

while player.Casting ... 
instead ... maybe with a player:update before and 1 inside the loop....
I'd worry about going too fast and maybe getting past the loop before it registers that it's casting.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Sat Feb 05, 2011 6:40 pm
by Germangold
I am playing on a german client version and changed follwoing housemaid buffs

Code: Select all

	--lvl 31+
		 casting = {ID = 207202, buffName = "Klarer Gedanke", castTime = 0},
		--lvl 41+
		 luck = {ID = 207203, buffName = "Gl\129ckspuderstaub", castTime = 0},

 mdmg2 = {ID = 207214, buffName = "Sumpf-Speise", castTime = 0}, 


1. buffing those item works fine, but unfortunaltely after earch fight it cast luck power and so on...

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Wed Feb 09, 2011 10:27 am
by lordmata
i got the same problem, cause i can't find any other place to put my lucky target except OnLeaveCombat and then every time you leave combat you end up with loosing a potion.... anyway to prevent this? :roll:

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Thu Feb 10, 2011 3:50 am
by Giram
Buff names are in english so if your client is not in english then it thinks that you don't have that buff and uses potion. I don't know if it would be possible to make it somehow universal that it would not require english client. One option would be to write buff names in all languages.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Thu Feb 10, 2011 5:00 am
by JackBlonder
You can get the local name by

Code: Select all

buffname=RoMScript("TEXT('SysXXXXXX_name')");
XXXXXX is the ID.

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Thu Feb 10, 2011 6:40 am
by rock5
JackBlonder wrote:You can get the local name by

Code: Select all

questname=RoMScript("TEXT('SysXXXXXX_name')");
XXXXXX is the ID.
I was just about to suggest that. :)

Re: UseFood + useHousemaidPotions = useGoodie !!!

Posted: Thu Feb 10, 2011 10:27 am
by Giram
I started trying using that

Code: Select all

RoMScript("TEXT('SysXXXXXX_name')");
but it's not same as the buff name. Like speed potion. Buff name is "Unbridled Enthusiasm" and RoMScript prints "Potion: Unbridled Enthusiasm".