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
JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: UseFood + useHousemaidPotions = useGoodie !!!

#21 Post by JackBlonder » Thu Feb 10, 2011 11:25 am

Did you use the potion id? This would explain the result.

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#22 Post by Giram » Thu Feb 10, 2011 11:36 am

Yes. Do i need to use buff id or what?

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#23 Post by JackBlonder » Thu Feb 10, 2011 11:44 am

Of course.
TEXT('SysXXXXXX_name') returns the string of id XXXXXX.
If you want the name of your buff you have to use the id of your buff.

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#24 Post by Giram » Thu Feb 10, 2011 1:51 pm

I managed to get id from few buff. Is there there other place to find buff id than UnitBuff function?

But i need little help with this one. I don't totally understand those variables in jduartedj code or how that works. I tried this but not sure if i did that right and I don't know where that should romscript should be placed.

Code: Select all

speed = {ID = 207200, buffName = 506684, castTime = 0}
option.buffName = RoMScript("TEXT('Sys"..option.buffName.."_name')")

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#25 Post by JackBlonder » Thu Feb 10, 2011 3:15 pm

I didn't look into his code yet but I think instead of

Code: Select all

luck = {ID = 207203, buffName = "Gl\129ckspuderstaub", castTime = 0}
you could use

Code: Select all

luck = {ID = 207203, buffName = RoMScript("TEXT('SysXXXXXX_name'), castTime = 0}
You can get IDs from the game's data.fdb file (extract it,find string_xx.db).

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#26 Post by Giram » Thu Feb 10, 2011 3:42 pm

Code: Select all

speed = {ID = 207200, buffName = RoMScript("TEXT('Sys506684_name')"), castTime = 0}, -- Unbridled Enthusiasm
That is not working. I get error: script\bot.lua:32: ...:/pelit/Runes Of Magic/micromacro/scripts/macros.lua:85: Macro number needs to be between 1 and 49.

Also i get same error if i use variable on table. I think it might be missing some brackets or some other character.

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#27 Post by rock5 » Thu Feb 10, 2011 7:10 pm

Use this to get all buff ids of current buffs/

Code: Select all

/script i=1 while UnitBuff("player",i) ~= nil do nn,__,__,ii = UnitBuff("player",i) SendSystemChat(nn..", "..ii) i = i+1 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: UseFood + useHousemaidPotions = useGoodie !!!

#28 Post by rock5 » Thu Feb 10, 2011 7:17 pm

Giram wrote:That is not working. I get error: script\bot.lua:32: ...:/pelit/Runes Of Magic/micromacro/scripts/macros.lua:85: Macro number needs to be between 1 and 49.
That sounds like 1 of my error messages from macro.lua. I don't know how that got triggered. Do other RoMScript commands work? Did you move your macros around or something?
  • 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 !!!

#29 Post by Giram » Fri Feb 11, 2011 2:08 am

Other romscripts does work but that error came when i placed romscript inside table. Didn't do anything with macros.

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#30 Post by rock5 » Fri Feb 11, 2011 4:11 am

I know what the problem is. That variable, itemTable, is declared outside of any function so it gets run when the file gets loaded. The usersfunctions get loaded before the macros are defined so the RoMScipt doesn't work.

Try putting it in the function with a check to make it run only once

Code: Select all

function useGoodie(_itemName,_buffName) --ofc I came up with a silly name
	itemTable = itemTable or {
		 ...
		 speed = {ID = 207200, buffName = RoMScript("TEXT('Sys506684_name')"), castTime = 0}, -- Unbridled Enthusiasm
		 ...
	}
-- the rest if the function
end
Then you should have no problem.

Mind you, another better way to get the buff name from the id is

Code: Select all

GetIdName(buffid)
this doesn't use RoMScript but instead uses the memorytables so it's a lot faster.
  • 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 !!!

#31 Post by Giram » Fri Feb 11, 2011 7:19 am

I think i got it working. I got all potion id's so i hope there is not problem using those but i am missing some food buff id's.

Code: Select all

--lvl 1-20
pdmg = {ID = 207209, buffName = "Salted Fish with Sauce", castTime = 0},
mdmg = {ID = 207210, buffName = "Smoked Bacon with Herbs", castTime = 0},
--lvl 21-40
critp = {ID = 207211, buffName = "Caviar Sandwich", castTime = 0},
matt = {ID = 207212, buffName = "Deluxe Seafood", castTime = 0}, --guessed
--lvl 81-100        
patt3 = {ID = 207215, buffName = "Unimaginable Salad", castTime = 0}, 
matt3 = {ID = 207216, buffName = "Cheese Fishcake", castTime = 0} --guessed
So if someone has these foods and could use this script below for example to get id and post it so i can add it.

Code: Select all

/script i=1 while UnitBuff("player",i) ~= nil do nn,__,__,ii = UnitBuff("player",i) SendSystemChat(nn..", "..ii) i = i+1 end
This version should work for all languages.
Attachments
addon_useGoodie_universal.lua
Beta version of universal useGoodie
(2.86 KiB) Downloaded 159 times

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#32 Post by rock5 » Fri Feb 11, 2011 8:35 am

You could probably use ItemPreview addon for good guesses at those buff names.

Example: I looked up Caviar Sandwich and got 4 likely results. Only one of them had an id close to those other foods. That's 506675.

Hope that helps.
  • 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 !!!

#33 Post by Giram » Wed Feb 16, 2011 9:29 am

I changed rest buff names with buff id's and uploaded new version of it.
Attachments
addon_useGoodie_universal.lua
(3.04 KiB) Downloaded 175 times

User avatar
Rom Botter
Posts: 85
Joined: Wed Jul 21, 2010 11:05 am
Location: Holland

Re: UseFood + useHousemaidPotions = useGoodie !!!

#34 Post by Rom Botter » Mon Feb 28, 2011 8:21 am

wow, so much work on a user function...

i always just assign a skill i never use to my hotkey, change cooldown to cooldown of potion, and let the bot use that tweaked skill as a potion :)

but then again, i dont use that many potions :P
I think people need to be educated on the fact the marijuana is NOT a drug... marijuana is a plant and an herb, GOD put it here... if GOD put it here, what gives the GOVERNMENT the right to say GOD is WRONG??? ~ Willie Nelson

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: UseFood + useHousemaidPotions = useGoodie !!!

#35 Post by nokirk » Thu Apr 21, 2011 9:14 am

doesn't work for me unfortunately.

Called it with

Code: Select all

useGoodie(speed);
in the <onLeaveCombat> section, but I always get the same error
.../Documents/micromacro/scripts/rom/classes/player.lua:1254: Fehler im Profile
bei der Zeitpunktverarbeiten: onLeaveCombat error ...ipts/rom/userfunctions/addo
n_useGoodie_universal.lua:51: attempt to index local 'option' (a nil value)
any idea?

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#36 Post by rock5 » Thu Apr 21, 2011 9:54 am

It would have to be

Code: Select all

useGoodie("speed");
wouldn't it?
  • 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

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: UseFood + useHousemaidPotions = useGoodie !!!

#37 Post by nokirk » Thu Apr 21, 2011 5:47 pm

rock5 wrote:It would have to be

Code: Select all

useGoodie("speed");
wouldn't it?
yes, thank you.

Now it keeps throwing the potions, so the buff doesn't get recognised. I guess I'll just go for Rom Botters idea misusing a skill and increase the cooldown accordingly :D

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#38 Post by rock5 » Thu Apr 21, 2011 11:01 pm

What do you mean, it keeps 'throwing' the potion?

If it's not recognising the buff you could try a more manual approach,

Code: Select all

useGoodie(207200, "Unbridled Enthusiasm")
Note: That's the english name for the buff. It would have to be in your own language.
  • 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 !!!

#39 Post by Giram » Fri Apr 22, 2011 6:12 am

nokirk wrote: Now it keeps throwing the potions, so the buff doesn't get recognised. I guess I'll just go for Rom Botters idea misusing a skill and increase the cooldown accordingly :D
Are you using latest function i did? Not the one on the first page. I tried to make it work for all by not using buff names but it would get those names from client so it would work for all languages.

I have been using that everytime i need to use housemaid stuff. I haven't got much feedback from players who don't use english client so i don't know how it works for others.

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

Re: UseFood + useHousemaidPotions = useGoodie !!!

#40 Post by rock5 » Fri Apr 22, 2011 6:36 am

Why didn't you update the first post?

And why don't you add this to the repository?
  • 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: No registered users and 9 guests