Buffing myself

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Buffing myself

#21 Post by lisa » Thu May 12, 2011 9:11 am

clear thought = 506686
unbridles enthusiasm = 506684
luck pot = 506687
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Buffing myself

#22 Post by Giram » Thu May 12, 2011 9:25 am

Got same values on userfunction. I am now fixing it. Noticed few mistakes there.

adonisz
Posts: 47
Joined: Tue Apr 26, 2011 11:05 pm

Re: Buffing myself

#23 Post by adonisz » Thu May 12, 2011 2:17 pm

ok so should I wait for your new script then?

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

Re: Buffing myself

#24 Post by Giram » Thu May 12, 2011 10:54 pm


adonisz
Posts: 47
Joined: Tue Apr 26, 2011 11:05 pm

Re: Buffing myself

#25 Post by adonisz » Sun May 15, 2011 12:12 am

Thanks for your help giram, but unfortunately even after downloading the new one and putting it into my userfunctions folder, its still making the same error..... housemaid food works great, just not the housemaid potions. is this happening to anyone else or is it just me?

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

Re: Buffing myself

#26 Post by Giram » Sun May 15, 2011 5:28 am

I don't know if buffs might have different IDs in other clients. That comes in my mind that could cause it not to work for you. Or do you have other / older useGoodie userfunction in userfunction folder thats not the new userfunction_useGoodie_universal.lua? That might mess things up.

I am using latest now and mostly use speed / luck and some food from housemaids and everythings is working perfectly. I did test every potion before releasing current one and every potion / food worked that i managed to get. There was 4 foods that i could not get to test. Did you check that names are correct ones cause i did change few names there. aggro to agro and matt2 to patt2 i think. Can't remember if it gave error if you use wrong name in it.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Buffing myself

#27 Post by lisa » Sun May 15, 2011 6:00 am

try this in your profiles onleavecombat section

Code: Select all

	<onLeaveCombat><![CDATA[

if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end  

if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end 

if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end 

	]]></onLeaveCombat>
If that doesn't work then there is a different issue.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

adonisz
Posts: 47
Joined: Tue Apr 26, 2011 11:05 pm

Re: Buffing myself

#28 Post by adonisz » Sun May 15, 2011 9:47 am

Code: Select all

    <onLeaveCombat><![CDATA[

if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end 

if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end

if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end

   ]]></onLeaveCombat>
This worked well :) thanks. So, my script looks like this

Code: Select all

<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
       useGoodie("mdmg2");
     if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end 

     if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end

     if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end 
                catchCavy();
        ]]></onLeaveCombat>
This is correct right? It will eat all the food and catch cavies since the potions work now?

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

Re: Buffing myself

#29 Post by Giram » Sun May 15, 2011 10:30 am

That looks to be correct. Only keeps me wondering what caused errors with my userfunction cause it's working for me. And you use same ids that useGoodie uses it should work. So that could be something to do with the commands i am using. Like the romscript did have possibility to fail and cause errors cause it didn't get info from client. There might be similar issue.

I did think about it if there would be multiple ids i could have entered all those to table and if one wont have info from buff it would try another one. But thats not the case in this problem. Well maybe i can get it to be more reliable someday. I also tried to do check for nil to prevent gmatch error but i couldn't even do that for some reason. I am not very skilled programmer yet :roll:

adonisz
Posts: 47
Joined: Tue Apr 26, 2011 11:05 pm

Re: Buffing myself

#30 Post by adonisz » Sun May 15, 2011 10:34 am

Ya I couldn't figure out as well, I didn't understand how useGoodie("luck"), which is essentially the same thing as typing out the buff ID and everything else, did not work. But, you did a very nice job with the script though :). Thanks for your help.

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

Re: Buffing myself

#31 Post by Giram » Sun May 15, 2011 1:20 pm

Would you like to try out this version? I removed GedIdName from table and now it will pass id number to player:hasBuff() function and that can check buffs from id. I think it was moving strings to hasBuff function and that string might need to be between apostrophes ("") to work right. I think numbers should not need to be inside apostrophes like Lisa has on her example. But i could be wrong.

I am not sure how i could include those apostrophes code. So it might should have been

Code: Select all

 player:hasBuff("""..option.buffName..""")
or

Code: Select all

player:hasBuff("\""..option.buffName.."\"")
Don't really know and i am testing this one i uploaded and seems to work same way as my previous version.
Attachments
userfunction_useGoodie_universal_altered.lua
(2.92 KiB) Downloaded 221 times

WhiteTiger
Posts: 84
Joined: Tue Jun 22, 2010 8:06 am

Re: Buffing myself

#32 Post by WhiteTiger » Sun May 15, 2011 2:33 pm

make an ingame macro for all ur buffs, with the shortest lasting buff last, and put that buff on your profile.

I got this shit for grinding clops

ingame:

Code: Select all

	if not ChkBuff("player","Turn of Luck Powder Dust") and Sol.data.items.GetTotalBagItemCount("Potion: Lucky Target") > 0 then
		UseItemByName("Potion: Lucky Target")
	elseif not ChkBuff("player","Unbridled Enthusiasm") and Sol.data.items.GetTotalBagItemCount("Potion: Unbridled Enthusiasm") > 0 then
		UseItemByName("Potion: Unbridled Enthusiasm")
	else
		CastSpellByName("Regenerate")
	end
profile:

Code: Select all

	<skills_mage>
		<skill name="PRIEST_REGENERATE"    modifier="" hotkey="VK_4" priority="90" nobuffname="White Horse" nobufftarget="player"/>
		<skill name="MAGE_FIREBALL"        modifier="" hotkey="VK_8" priority="40" />
	</skills_mage>

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Buffing myself

#33 Post by lisa » Sun May 15, 2011 9:27 pm

adonisz wrote:

Code: Select all

    <onLeaveCombat><![CDATA[

if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end 

if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end

if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end

   ]]></onLeaveCombat>
This worked well :) thanks. So, my script looks like this

Code: Select all

<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
       useGoodie("mdmg2");
     if (not player:hasBuff("506687")) then
    inventory:useItem(207203);
    end 

     if (not player:hasBuff("506686")) then
    inventory:useItem(207202);
    end

     if (not player:hasBuff("506684")) then
    inventory:useItem(207200);
    end 
                catchCavy();
        ]]></onLeaveCombat>
This is correct right? It will eat all the food and catch cavies since the potions work now?
My guess is you have a conflicting userfunction of the same name, that is why I asked you to test with that code. Check all your files in your userfunctions folder. Once you find the conflicting function then you can go back to using the goodie function =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Buffing myself

#34 Post by rock5 » Sun May 15, 2011 9:39 pm

Yes, it could be one of the older goodie function. The older functions were in files starting with "addon". The current one starts with "userfunction". If he didn't delete the older functions, they would still be there.
  • 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 22 guests