Page 1 of 1

how to buff at pullonly ?

Posted: Sat Jan 26, 2013 6:59 am
by Micke
Hi guys,

i would like to use a buff like MAGE_ELEMENTAL_CATALYST as first cast when the fight Begins, but only then. with maxuse=1 it can happen, that cooldown will end during the fight, and the buff will be fired at the end of the fight.

the way

Code: Select all

<skill name="MAGE_ELEMENTAL_CATALYST"	hotkey="MACRO" priority="100" pullonly="true" />
doesnt work,i suppose cause its a buff. alternative to say "cast this if target has 100% hp" seems also not possible.

how would u configure this ?

thnx in advance
Micke

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 7:29 am
by rock5
you could set

Code: Select all

inbattle="true"
on the skill but I believe that means it wont cast until in battle. So it wont cast at the start of the battle. The problem is there is no "infighting" option to mean use the skill when in a fight even if the battle hasn't begun yet. That's probably something we need. For instance Rogue Premeditation needs to be used at the start of a battle but before the battle has begun. I fixed it by setting the target as "enemy" and using inbattle="false". But of course it is really a buff. You try the same thing with this skill. Try changing the skill in the skill database skills.xml to

Code: Select all

	<skill name="MAGE_ELEMENTAL_CATALYST" id="490238" range="200" cooldown="300" type="buff" target="enemy" />
Wait that's missing the buffname. Should be

Code: Select all

	<skill name="MAGE_ELEMENTAL_CATALYST" id="490238" buffname="500339" range="200" cooldown="300" type="buff" target="enemy" />

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 11:43 am
by Micke
hi Rock,

thnx, good idea, but it doesnt work, i mean the bot doesnt buff. i set also type="damage", but without influence.
mhmm .....

ah ok, i try the second codeline.

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 12:32 pm
by Micke
using your 2nd line bot is buffing, but after the opening blast. cause iam testing with small mobs its also the end of the fight ^^
mhmm ok, not the way iam looking for.

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 12:36 pm
by rock5
Make sure it has the highest priority and the range matches your longest range skill. Mage has a few skills that have a range of 225 so try changing the range to 225.

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 12:50 pm
by BlubBlab
I don't know if this what you want but you can buff yourself when you know the bossfight start very soon like this I have these from Lisa`s finaldod.xml:

Code: Select all

<onload>

	

function bossbuff()
	if player.Class1 == 2 and player.Class2 == 7 then
		inventory:useItem(204462)
		yrest(5000)
		inventory:useItem(204463)
		yrest(5000)
		player:cast("WARDEN_SAVAGE_POWER")
		player:cast("SCOUT_ARROW_OF_ESSENCE")
	end
	if player.Class1 == 4 then -- mage
		--player:cast("MAGE_ENERGY_INFLUX")
		player:cast("MAGE_INTENSIFICATION")
		
		player:cast("MAGE_ELEMENTAL_CATALYST")
	end
end
</onload>

use bossbuff() in the WP in the front of the boss, to make sure you have the right target you can do something like :

Code: Select all

local okander = player:findNearestNameOrId("103857")
player:target(okander)  
The bot will attack this target then.

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 7:11 pm
by alf90
I want to do the same but with a warrior mage:

play guitar=not working
Arcane Potion=working
Elemental Catalysis and go=no working
<onload>



function bossbuff()
if player.Class1 == 2 and player.Class2 == 7 then
inventory:useItem(204462)
yrest(5000)
inventory:useItem(204463)
yrest(5000)
player:cast("WARDEN_SAVAGE_POWER")
player:cast("SCOUT_ARROW_OF_ESSENCE")
end
if player.Class1 == 4 then -- mage for mage warrior. that code is ???
--player:cast("MAGE_ENERGY_INFLUX")
player:cast("MAGE_INTENSIFICATION")

player:cast("MAGE_ELEMENTAL_CATALYST")
end
end
</onload>

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 7:36 pm
by lisa
player.Class1 is your current main class
player.Class2 is your current second class
so a W/M would be

Code: Select all

player.Class1 == CLASS_WARRIOR and player.Class2 == CLASS_MAGE
I used the numbers in that code you posted because I know what the numbers mean.

Code: Select all

CLASS_WARRIOR = 1
CLASS_SCOUT = 2
CLASS_ROGUE = 3
CLASS_MAGE = 4
CLASS_PRIEST = 5
CLASS_KNIGHT = 6
CLASS_WARDEN = 7
CLASS_DRUID = 8
CLASS_WARLOCK = 9
CLASS_CHAMPION = 10

Re: how to buff at pullonly ?

Posted: Sat Jan 26, 2013 8:35 pm
by alf90
thank you very much.
was mage warrior,sorry
thank's for the list

to see if I can work at once. and who plays the guitar and pull catalysis
okander kills without guitar or catalysis. but better ensure
Sometimes the bot goes crazy and takes much. okander then jump and dead

damn translator xdddd :D

Re: how to buff at pullonly ?

Posted: Sun Jan 27, 2013 4:30 pm
by BlubBlab
What you need is this : http://www.solarstrike.net/phpBB3/viewt ... don#p42908
Even it not work infinity its help my bot survive 2 hours with it(at some point the game became too lagy so the bot can't react in time I think), I'm running without break DoD easy theoretically I could run "normal" if my catalysis is ready hadn't time for the code.

By the way as WARRIOR/MAGE you would be much stronger....

Re: how to buff at pullonly ?

Posted: Tue Jan 29, 2013 1:20 am
by Micke
Hi,

@Rock, u were right, works, thnx ^^ ! i tried to use your recommended itempreview to get the buffname#, but seems iam to stupid - is it still useable for that ?

@blublab - the Problem is to find a wellpointed Trigger to call i.e. the bossfunction, i am looking for this Trigger/Event.
didnt knew the onPreSkillCast, thnx, but its to unspecific to use it as "onPreStartCombat" event, cause it also firing on common autobuffs and so on.

best regards
Micke

Re: how to buff at pullonly ?

Posted: Tue Jan 29, 2013 5:15 am
by rock5
Micke wrote:@Rock, u were right, works, thnx ^^ ! i tried to use your recommended itempreview to get the buffname#, but seems iam to stupid - is it still useable for that ?
Yes. Install the addon, open it and click "Import". That will take awhile but you only need to do it once (and maybe after major patches). When it's finished, type the buff name in the top left box and it should list the matches. The buff will be the one with the tooltip that is the same as the buffs tooltip, except it will also have the date it was updated and the Id.

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 6:49 am
by Micke
waited till the import finished 3 times, but filter skill ist empty and self skill has only 2 entries ....
so i still dont use how to get the buffname :-( :-)

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 7:55 am
by rock5
Are you saying the list is empty even before you type the name? If so, the addon is not working. Or are you saying the list is empty after you type the buff name? If so, it's possible the buff doesn't have a properly defined name or it's not what you think it is.
Here is what it should look like after you have done the import
RAScrnShot_20130201_233554.jpg
And here is the list after typing the buff name showing the skill tooltip and the buff tooltip.
RAScrnShot_20130201_233803.jpg
There is also the macro, I wrote a long time ago, you can use to print your buffs. Put this in a macro and run it after applying the buff.

Code: Select all

/script i=1 while UnitBuff( "player", i) ~= nil do name, __, __, ID = UnitBuff( "player", i) SendSystemChat(name.." "..ID) i = i + 1 end
It will print your buffs names and ids in the chat box.

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 9:14 am
by Micke
hey rock,
thnx for having such abundance of patience with me - addon is working. my mistake was - clicked at the dropdown "skill", after that the panel show nothing.
filter == "any Quality" includes what iam looking for , dont ask why i didn't, sorry.

ive found small error to:

Code: Select all

<skill name="MAGE_INTENSIFICATION" id="490225"   --> should be id="497976" 
now it works fine ;-) , thnx a lot.

if anyone else is interested in selfbuffing bot before fight starts, here a 2nd sample. i added range and the buffname

Code: Select all

<skill name="MAGE_INTENSIFICATION" id="497976" cooldown="120" type="buff" target="enemy" buffname="490225" range="225" />

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 9:44 am
by Micke
the weakness of this workaround is still, that if cooldown of the buffs ends close to the end of the fight, the buffs will be fired without use.
to solve that i cant use pullonly="true", because with that tag buff again wont be fired.

to use bufffood onBeforeFightBegins - is there a Workaround too ^^ ?

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 12:28 pm
by rock5
Micke wrote:if anyone else is interested in selfbuffing bot before fight starts, here a 2nd sample. i added range and the buffname

Code: Select all

<skill name="MAGE_INTENSIFICATION" id="497976" cooldown="120" type="buff" target="enemy" buffname="490225" range="225" />
So for you 490225 and 497976 have different names? It should be no problem to update to the newer id.

I can make the changes you suggested except 490225 is a skill id not a buff id. It might work if if the name is the same (because that is how the bot works, it compares the name) but still, technically speaking the id of the buff is 620177.

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 7:57 pm
by lisa
was 497986 a typo?

Code: Select all

Command> print(GetIdName(490225))
Intensification
Command> print(GetIdName(497976))
Intensification
Command> print(GetIdName(620177))
Intensification
Command> print(GetIdName(497986))
Black Pepper Pork

Re: how to buff at pullonly ?

Posted: Fri Feb 01, 2013 11:21 pm
by rock5
:) Yes. As you can see I did put the right id in the skill, though.