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
Ironman
Posts: 5
Joined: Thu Feb 06, 2014 5:48 pm

Re: useGoodie

#61 Post by Ironman » Sat Jun 21, 2014 4:12 pm

HUm, I anderstand what you are saying
I had probably a typo in my file because after the modification I made regarding your first message, after specifying SPECIAL_TYPES_PHYSICAL
the bot was sending me "Count not apply spell food buff as you do not have any spell food!"
So I have thought that there was a problem on this part of the script and I saw the:

Code: Select all

 if (foodType) then
line only and not the second one

Code: Select all

 if (foodType == SPECIAL_TYPES_SPELL) then
because it was missing (in my file)

I have modified it again regardingly (hoping not missing an "end" or so) and it's still working for SPECIAL_TYPES_PHYSICAL, can't test magical at the moment

thanks for the explaination of using both food types :)

(and a big thanks for your patience regarding noobs/code intolerant like me and for your amazing ROMbot and to BlubBlab for the Awesome HPrecorder ^^ I'm starting to enjoy doing xml files with it)
Attachments
userfunction_useGoodie_universal.lua
Last update with food
(10.74 KiB) Downloaded 149 times

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

Re: useGoodie

#62 Post by rock5 » Sat Jun 21, 2014 11:26 pm

Looks like you still haven't got it. The else removel idea was to be able to use patt and critp both. I believe your changes don't do that. Looks like the ifs elseifs and ends are misaligned. Also if you use ifs with no elses to use all the foods then the message "you do not have any physical food" will require a separate variable to implement. If we remove that message it could be as easy as this

Code: Select all

	if (foodType) then 
		if (foodType == SPECIAL_TYPES_SPELL) then 
            useGoodie("matt3");
            useGoodie("mdmg2");
            useGoodie("matt");
            useGoodie("mdmg");
		elseif (foodType == SPECIAL_TYPES_PHYSICAL) then
            useGoodie("patt3");
            useGoodie("patt2");
            useGoodie("critp");
            useGoodie("pdmg");
		else
         printf("An invalid food type was specified for the buffUp function, should be physical/spell (1 and 2 respectively)\n");
		end;
	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

Ironman
Posts: 5
Joined: Thu Feb 06, 2014 5:48 pm

Re: useGoodie

#63 Post by Ironman » Sun Jun 22, 2014 9:51 am

Indeed, the file is not altered to use both food, but it is normal here, I just post a modified version able to use food for the others users, because it wasn't working as intented :)

(I will change it from time to time for my use with yours recommandations :) )

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests