Page 4 of 4

Re: useGoodie

Posted: Sat Jun 21, 2014 4:12 pm
by Ironman
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)

Re: useGoodie

Posted: Sat Jun 21, 2014 11:26 pm
by rock5
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;

Re: useGoodie

Posted: Sun Jun 22, 2014 9:51 am
by Ironman
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 :) )