House maid potions and food

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
fethi
Posts: 2
Joined: Thu Mar 11, 2010 4:38 pm

House maid potions and food

#1 Post by fethi » Mon Dec 20, 2010 6:16 pm

We r using bot for collecting so it would be great to use speed and droprate potions of house maid. İ tried to write it as a skill but its not always working right especially when out of pot it gives error and somethimes bot disconnect or wait long after this error. So is there anyother way for it ??

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: House maid potions and food

#2 Post by Alkaiser » Mon Dec 20, 2010 6:47 pm

Someone on these forums already made a function for housemaid potions and food. I can't seem to find the post in question, so I'll post what I'm using here:

Code: Select all

-- Examples
-- useHousemaidPotions("speed");
-- useHousemaidPotions("castspeed");
-- useHousemaidPotions("frog");
-- useHousemaidPotions("luck");
-- useHousemaidPotions("MeatsauceBurrito");
-- useHousemaidPotions("caviarSandwich");
-- useHousemaidPotions("saltedFish");

function useHousemaidPotions(_potionName)

	-- [Housemaid crafting potions] --
	if _potionName == "speed" then
		local potID = 207200; -- Unbridled Enthusiasm
		local buffName = "Unbridled Enthusiasm";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			inventory:update();
			yrest(750);
		end
	end
	
	if _potionName == "castspeed" then
		local potID = 207202; -- Clear Thought
		local buffName = "Clear Thought";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			yrest(1000);
			inventory:update();
			yrest(750);
		end
	end
	
	if _potionName == "frog" then
		local potID = 207201; -- Princely Look
		local buffName = "Princely Look";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			yrest(1000);
			inventory:update();
			yrest(750);
		end
	end

	if _potionName == "luck" then
		local potID = 207203;	-- Luck Powder Dust
		local buffName = "Turn of Luck Powder Dust";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			inventory:update();
			yrest(750);
		end
	end
	
	-- [Housemaid cooking potions] --
	if _potionName == "MeatsauceBurrito" then
		local potID = 207213; -- Special Spicy Meatsauce Burrito
		local buffName = "Spicy Meatsauce Burrito";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			inventory:update();
			yrest(750);
		end
	end
	
	if _potionName == "caviarSandwich" then
		local potID = 207211;
		local buffName = "Caviar Sandwich";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			inventory:update();
			yrest(750);
		end
	end
	
	if _potionName == "saltedFish" then
		local potID = 207209;
		local buffName = "Salted Fish with Sauce";
		
		if not player:hasBuff(buffName) and inventory:itemTotalCount(potID) >= 1 then
			inventory:useItem(potID);
			inventory:update();
			yrest(750);
		end
	end
end
Save this as addon_housemaidPotions.lua and put it in the userfunctions folder.

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: House maid potions and food

#3 Post by Starrider » Wed Dec 22, 2010 6:27 am

and where to load it in the profile.xml?
onload? or after leavecombat?

Alkaiser
Posts: 222
Joined: Sat Sep 25, 2010 2:03 pm

Re: House maid potions and food

#4 Post by Alkaiser » Thu Dec 23, 2010 6:26 pm

Either would work. Leave combat would probably be better. I have them in my waypoint file, rather than my profile.

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

Re: House maid potions and food

#5 Post by Giram » Sat Jan 01, 2011 6:27 pm

My latest file for using those potions and foods.
Attachments
addon_housemaidPotions_V3.lua
(1.72 KiB) Downloaded 170 times

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

Re: House maid potions and food

#6 Post by jduartedj » Sat Jan 01, 2011 7:25 pm

You should post this under addons
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: House maid potions and food

#7 Post by rock5 » Sun Jan 02, 2011 3:20 am

jduartedj wrote:You should post this under addons
Yes, create a dedicated post for the addon in the addons section. You can even add it to the wiki repo.
  • 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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest