Page 1 of 1

rombot usegoodies problem

Posted: Tue Jul 19, 2011 10:29 am
by niko444
i have no idea why my rombot isnt working =/ i have readed information about it but it still doesnt use lucky target potion etc.

the file is at userfunctions and its called: userfunction_useGoodie

inside the file i have text like this

function useMaidPots()
if( not player:hasBuff("Unbridled Enthusiasm") and inventory:itemTotalCount(207200) > 0 ) then
inventory:useItem(207200)
inventory:update()
yrest(500)
end
if( not player:hasBuff("Clear Thought") and inventory:itemTotalCount(207202) > 0 ) then
inventory:useItem(207202)
inventory:update()
yrest(500)
end
if( not player:hasBuff("Turn of Luck Powder Dust") and inventory:itemTotalCount(207203) > 0 ) then
inventory:useItem(207203)
inventory:update()
yrest(500)
end
end

can someone help me out why bot doesnt use them :( i would be really grateful

or could someone give me working text and correct name for the file so i can get it work ?

Re: rombot usegoodies problem

Posted: Tue Jul 19, 2011 12:26 pm
by rock5
Where did you use the function? Did none of them get used?

Re: rombot usegoodies problem

Posted: Tue Jul 19, 2011 12:57 pm
by niko444
use the function? what do you mean? :P and none of them get used :/

Re: rombot usegoodies problem

Posted: Tue Jul 19, 2011 1:03 pm
by rock5
A function needs to be used. If you don't use it it doesn't run. Typically you would check your potions after combat. So in the <onLeaveCombat> section of your profile add

Code: Select all

useMaidPots()
That will execute the code in the function.

Re: rombot usegoodies problem

Posted: Tue Jul 19, 2011 1:08 pm
by niko444
edit

Re: rombot usegoodies problem

Posted: Tue Jul 19, 2011 1:11 pm
by rock5
Profiles can be found in the "profiles" folder. You can read about how to set them up here.
http://www.solarstrike.net/wiki/index.p ... r_Profiles

Re: rombot usegoodies problem

Posted: Tue Jul 19, 2011 1:20 pm
by niko444
edit!!

OH YA!!!!!!!!!!!! now i readed again ur post and now i understand that i had to copy/paste this to my profile onleavecombat place useMaidPots()

NOW IT WORKS!! thanks rock5 ur best!