Page 1 of 2
Buffing myself
Posted: Sun May 08, 2011 10:41 am
by adonisz
Hey all,
So, I'm trying to put into my profile.xml all the buffs I need before engaging in combat and I have a micro key at 8 of all the buffs I need that I set in the interface settings in the game. What and where do I have to type in the profile.xml to automatically press 8 before engaging in combat? and how to make the character to check whether he has the buffs or not?
Thanks so much in advance
Re: Buffing myself
Posted: Sun May 08, 2011 11:10 am
by lisa
The bot is set up to automatically check for buffs, all you need to do is add the skills into your profile.
If you have skills not already included in the skills.xml then post the skills with as much detail as you can and it can be added in.
Re: Buffing myself
Posted: Sun May 08, 2011 12:27 pm
by adonisz
I did it like this, but it doesn't work. Is this the correct way for buffs?
<skills_priest>
<skill name="PRIEST_SOUL_SOURCE" modifier="" hotkey="VK_4" priority="110" inbattle="true" hpper="15" />
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="VK_7" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="VK_2" priority="100" hpper="50" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="VK_6" priority="90" hpper="85" />
<skill name="PRIEST_RISING_TIDE" modifier="" hotkey="VK_3" priority="80" />
<skill name="MAGE_FIREBALL" modifier="" hotkey="VK_8" priority="70" />
<skill name="PRIEST_WAVE_ARMOR" modifier="" hotkey="VK_5" priority="40" inbattle="true" />
<skill name="PRIEST_GRACE_OF_LIFE" modifier="" hotkey="VK_9" priority="20" />
<!--skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" /> -->
<!--skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_F" priority="20" rebuffcut="60" inbattle="false" /> -->
Re: Buffing myself
Posted: Sun May 08, 2011 3:46 pm
by Questionmark
Try this. Looking at your code I understand you don't want to execute Soul Bond en Magic Barrier? Just put "--" infront of code if you want the bot to ignore it.
Code: Select all
<skills_priest>
<skill name="PRIEST_SOUL_SOURCE" modifier="" hotkey="VK_4" priority="110" inbattle="true" hpper="15" />
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="VK_7" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="VK_2" priority="100" hpper="50" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="VK_6" priority="90" hpper="85" />
<skill name="PRIEST_RISING_TIDE" modifier="" hotkey="VK_3" priority="80" />
<skill name="MAGE_FIREBALL" modifier="" hotkey="VK_8" priority="70" />
<skill name="PRIEST_WAVE_ARMOR" modifier="" hotkey="VK_5" priority="40" inbattle="true" />
<skill name="PRIEST_GRACE_OF_LIFE" modifier="" hotkey="VK_9" priority="20" />
-- <skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" />
-- <skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_F" priority="20" rebuffcut="60" inbattle="false" />
</skills_priest>
Re: Buffing myself
Posted: Sun May 08, 2011 4:09 pm
by adonisz
Oh that's what that means.
Re: Buffing myself
Posted: Sun May 08, 2011 4:20 pm
by Questionmark
You can do that using the option for talking to NPC's (numpad 5), followed by the choice option (numpad 6). Check the waypoint subforum for examples.
Re: Buffing myself
Posted: Sun May 08, 2011 4:24 pm
by adonisz
Oh I just figured out what I'm having problem with.
I have this micro button at 9 that has all the buffs I need before engaging in fight and I'm trying to put it into my profile.xml, but what would be the skill name? Would it be called macro or micro?
Re: Buffing myself
Posted: Sun May 08, 2011 8:24 pm
by rock5
For xml files comments are done like this
So to comment out a skill it would look like this
Code: Select all
<!--skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" /-->
I think this would cause an error
Code: Select all
-- <skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" />
Of course where there is lua code like in the "on events" you can use '--' to comment.
adonisz wrote:Oh I just figured out what I'm having problem with.
I have this micro button at 9 that has all the buffs I need before engaging in fight and I'm trying to put it into my profile.xml, but what would be the skill name? Would it be called macro or micro?
If you have the buffs added to your profile properly then you wouldn't use your custom macro. The bot can't control the buffs if you are applying them with a custom macro.
Re: Buffing myself
Posted: Sun May 08, 2011 8:27 pm
by lisa
This is my priests profile skills
Code: Select all
<skills_priest>
<skill name="PRIEST_SOUL_SOURCE" modifier="" hotkey="VK_4" priority="110" inbattle="true" hpper="15" />
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="VK_V" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="VK_J" priority="100" hpper="50" />
<skill name="PRIEST_HEAL" modifier="" hotkey="VK_3" priority="100" hpper="20" />
<skill name="PRIEST_GROUP_HEAL" modifier="" hotkey="VK_5" priority="100" hpper="30" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="VK_2" priority="90" hpper="80" />
<skill name="PRIEST_WAVE_ARMOR" modifier="" hotkey="VK_7" priority="40" inbattle="true" />
<skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_9" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_AMPLIFIED_ATTACK" hotkey="VK_6" priority="20" rebuffcut="60" inbattle="false" />
<skill name="PRIEST_GRACE_OF_LIFE" hotkey="VK_8" priority="20" rebuffcut="60" inbattle="false" />
<!--skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" /> -->
</skills_priest>
It isn't for low lvles, if you are a low level then using the wave armor will run you out of mana quickly.
Re: Buffing myself
Posted: Sun May 08, 2011 9:00 pm
by adonisz
oh ok thx guys, i guess i have to do it manually then.
it works when I do it like that, I just have to put in all the different keys for different skills then.
Thanks for all your help

Re: Buffing myself
Posted: Sun May 08, 2011 9:14 pm
by lisa
Having a macro for self buffing is just very inificient is all, you arn't checking if you have the buff or not and I assume you used things like
Code: Select all
/Script CastSpellByName("Grace of Life");
/wait 2
/Script CastSpellByName("Amplified Attack");
/wait 1
which keeps trying to use the skills regardless of what else is actually happening to your character at the time and therefore it might not get all the buffs if you are being attacked and try to use attack skills. Using the bot buff system works and it works very well =)
Re: Buffing myself
Posted: Sun May 08, 2011 10:51 pm
by rock5
adonisz wrote: I just have to put in all the different keys for different skills then.
You can also use hotkey="MACRO" then you don't need to set up the hotkeys. It uses the skill names in skills_local.xml.
Re: Buffing myself
Posted: Mon May 09, 2011 1:11 am
by adonisz
yay "macro" did its job

. Thanks for all the help guys I really appreciate.
I might need to ask a lot more since I'm going to start writing scripts for instances, from FA to clops

. Thank you again

Re: Buffing myself
Posted: Tue May 10, 2011 12:06 am
by adonisz
Sorry guys I just had a problem.
I didn't have the enthusiasm potion for speed and I ran the bot when my profile was like this
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
useGoodie("mdmg2");
useGoodie("casting");
useGoodie("luck");
useGoodie("speed");
]]></onLeaveCombat>
The bot had this error: ...scripts/rom/classes/player.lua:1254:Error in your profile: onleaveCombat error: ...erek/Desktop/micromacro/scripts/Rom/classes/pawn.lua:537: bad argument #1 to 'gmatch' (string expected, got nil)
Is this because I put speed in my profile when I didn't have the potion? Isnt it supposed to skip the potion that I don't have?
Could you tell me what I'm doing wrong? Thanks in advance
Re: Buffing myself
Posted: Tue May 10, 2011 12:45 am
by lisa
Re: Buffing myself
Posted: Thu May 12, 2011 12:13 am
by adonisz
Darn.... I think I am very slow in learning things?
I read what lisa posted like 5 times and I still cannot find a solution to my problem... The post only says that there might be a problem with the script, but I have no idea.. My food from my housemaid works great, but when I put in the potions from housemaids, it gives me the error. Is there a way to fix this? Sorry I'm a really slow learner...

Re: Buffing myself
Posted: Thu May 12, 2011 12:33 am
by lisa
adonisz wrote:Darn.... I think I am very slow in learning things?
I read what lisa posted like 5 times and I still cannot find a solution to my problem... The post only says that there might be a problem with the script, but I have no idea.. My food from my housemaid works great, but when I put in the potions from housemaids, it gives me the error. Is there a way to fix this? Sorry I'm a really slow learner...

What I meant was to post your question about the userfunction on the topic created for the userfunction, you will get responses from the person who actually created it or someone who uses it, I personally haven't used it so in order to help I would need to go through all of the code and learn what makes it tick in order to troubleshoot your problem.
Re: Buffing myself
Posted: Thu May 12, 2011 12:45 am
by Giram
adonisz wrote:Sorry guys I just had a problem.
I didn't have the enthusiasm potion for speed and I ran the bot when my profile was like this
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
useGoodie("mdmg2");
useGoodie("casting");
useGoodie("luck");
useGoodie("speed");
]]></onLeaveCombat>
The bot had this error: ...scripts/rom/classes/player.lua:1254:Error in your profile: onleaveCombat error: ...erek/Desktop/micromacro/scripts/Rom/classes/pawn.lua:537: bad argument #1 to 'gmatch' (string expected, got nil)
Is this because I put speed in my profile when I didn't have the potion? Isnt it supposed to skip the potion that I don't have?
Could you tell me what I'm doing wrong? Thanks in advance
If you don't have potion it should skip it cause there is check for it. I think gmatch error is only caused by wrong buff id in code but i think i haven't got errors with speed potions. If you are using latest useGoodie userfunction can you try 1 line at time to see what line really gives that error? Then i could check new id for it.
Re: Buffing myself
Posted: Thu May 12, 2011 3:08 am
by adonisz
I tried it and it was bundled enthusiasm and clear thought. What should I fix?
Re: Buffing myself
Posted: Thu May 12, 2011 3:40 am
by Giram
Well on userfunction there is itemTable and it contains info about those items.
Code: Select all
speed = {ID = 207200, buffName = GetIdName(506684), castTime = 0},
casting = {ID = 207202, buffName = GetIdName(506686), castTime = 0}, -- Clear Thought
GetIdName() function gets buff names from client with ID. Then those are wrong. You could search those with itempreview addon or try script below when you have that speed and casting buff on. This will be written in game chat. It will print id's for buffs. If those are different that on userfuntion then it will give that gmatch error.
Code: Select all
/script i=1 while UnitBuff("player",i) ~= nil do nn,__,__,ii = UnitBuff("player",i) SendSystemChat(nn..", "..ii) i = i+1 end
I am now at work so will test that later when i get home.