UseFood + useHousemaidPotions = useGoodie !!!

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

UseFood + useHousemaidPotions = useGoodie !!!

#1 Post by jduartedj » Sun Jan 16, 2011 10:55 pm

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
Attachments
addon_useGoodie.lua
V0.2: fixed an error where for non-table items the option var wasn't allocated.
(2.79 KiB) Downloaded 376 times
addon_useGoodie.lua
Version: 0.1
(2.72 KiB) Downloaded 186 times
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
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: UseFood + useHousemaidPotions = useGoodie !!!

#2 Post by Giram » Tue Jan 18, 2011 2:40 pm

I haven't tested that but can say that Pungent Vileness potion has instant cast and Scarlet something have 2 second cast i think.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: UseFood + useHousemaidPotions = useGoodie !!!

#3 Post by jduartedj » Tue Jan 18, 2011 5:03 pm

I wouldn't know never seen those pots :P
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
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: UseFood + useHousemaidPotions = useGoodie !!!

#4 Post by Giram » Tue Jan 18, 2011 5:58 pm

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.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: UseFood + useHousemaidPotions = useGoodie !!!

#5 Post by jduartedj » Tue Jan 18, 2011 8:39 pm

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?
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

j19861986
Posts: 37
Joined: Sun Jan 16, 2011 1:01 am

Re: UseFood + useHousemaidPotions = useGoodie !!!

#6 Post by j19861986 » Wed Jan 19, 2011 6:05 am

In which folder should I put in the useGoodie???
And how do I use it???

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: UseFood + useHousemaidPotions = useGoodie !!!

#7 Post by jduartedj » Wed Jan 19, 2011 7:17 am

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.
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

ramenuk
Posts: 7
Joined: Thu Nov 19, 2009 11:00 am

Re: UseFood + useHousemaidPotions = useGoodie !!!

#8 Post by ramenuk » Wed Jan 19, 2011 10:55 am

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>

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: UseFood + useHousemaidPotions = useGoodie !!!

#9 Post by Giram » Wed Jan 19, 2011 2:52 pm

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.
Attachments
addon_useGoodie.lua
(2.66 KiB) Downloaded 176 times

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: UseFood + useHousemaidPotions = useGoodie !!!

#10 Post by jduartedj » Wed Jan 19, 2011 6:41 pm

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)
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
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: UseFood + useHousemaidPotions = useGoodie !!!

#11 Post by jduartedj » Wed Jan 19, 2011 6:45 pm

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
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: UseFood + useHousemaidPotions = useGoodie !!!

#12 Post by rock5 » Wed Jan 19, 2011 7:26 pm

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.
  • 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: UseFood + useHousemaidPotions = useGoodie !!!

#13 Post by jduartedj » Thu Jan 20, 2011 11:02 am

or I'll just use

Code: Select all

while player.Casting ... 
instead ... maybe with a player:update before and 1 inside the loop....
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: UseFood + useHousemaidPotions = useGoodie !!!

#14 Post by rock5 » Thu Jan 20, 2011 11:35 am

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.
  • 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

Germangold
Posts: 276
Joined: Thu Oct 22, 2009 3:58 am

Re: UseFood + useHousemaidPotions = useGoodie !!!

#15 Post by Germangold » Sat Feb 05, 2011 6:40 pm

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...

lordmata
Posts: 18
Joined: Wed Feb 09, 2011 9:36 am

Re: UseFood + useHousemaidPotions = useGoodie !!!

#16 Post by lordmata » Wed Feb 09, 2011 10:27 am

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:

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: UseFood + useHousemaidPotions = useGoodie !!!

#17 Post by Giram » Thu Feb 10, 2011 3:50 am

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.

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: UseFood + useHousemaidPotions = useGoodie !!!

#18 Post by JackBlonder » Thu Feb 10, 2011 5:00 am

You can get the local name by

Code: Select all

buffname=RoMScript("TEXT('SysXXXXXX_name')");
XXXXXX is the ID.
Last edited by JackBlonder on Thu Feb 10, 2011 8:15 am, edited 1 time in total.

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#19 Post by rock5 » Thu Feb 10, 2011 6:40 am

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. :)
  • 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
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: UseFood + useHousemaidPotions = useGoodie !!!

#20 Post by Giram » Thu Feb 10, 2011 10:27 am

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".

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests