Page 1 of 1

skill triggering ?

Posted: Thu Jul 09, 2009 5:19 pm
by botlover
i was wondering if it was possible to make some kind of skill triggering macro ?

i mean in the way " if spell on target "Open Flank" true, then cast "Thundering"
this way it would be possible to make a good cast chain, instead of random pushing buttons or hopping that the priority works out.

also, this would also make the bot more human like, since it wouldn't try to cast a spell with the requirements not fullfilled.


thanks in advance :)

Re: skill triggering ?

Posted: Thu Jul 09, 2009 9:38 pm
by Administrator
Again, this is done in macros. Actually, I suggest you make an addon. Here's some old addon code I used.

Put this in: Runes of Magic/Interface/Addons/myAddon/functions.lua

Code: Select all

-- Returns true if the unit has a buff with the given name, otherwise false
function UnitHasBuff(unit, buffname)
	for i = 1,20 do
		if( UnitBuff(unit, i) == buffname ) then
			return true;
		end
	end

	return false;
end

-- Returns true if the unit has a debuff with the given name, otherwise false
function UnitHasDebuff(unit, buffname)
	for i = 1,20 do
		if( UnitDebuff(unit, i) == buffname ) then
			return true;
		end
	end

	return false;
end
Put this in: Runes of Magic/Interface/Addons/myAddon/myAddon.toc

Code: Select all

functions.lua
Now, you can make a macro (pseudo-code; The debuff and skill names probably don't make sense):

Code: Select all

/script if( UnitHasDebuff("target", "Weakness") ) then CastSpellByName("Thundering"); else CastSpellByName("Weak Shot"); end;

Re: skill triggering ?

Posted: Fri Jul 10, 2009 3:18 am
by 3cmSailorfuku
Use Uberflex AutoCombat Addon, it features what you want.