Originally Posted by
sinbad20069
local target = UnitExists("target")
if target ~= nil then
CastSpellByID(585,"mouseover")
return true
else
return false
end
...ok i need help with this, trying to write my own script.(new character{Priest})..so far no luck...anyway it work sorta...my issues is that it doesn't autocast at the begining when i right click to a target! It work only after i hit that specific button for that spell 'smite' or when the enemy targeting at me....i am new at this and i appreciated if some one can help me out..TY!
Change UnitExists("Target") to UnitExists("Mouseover"). That should fix your problem. And maybe add in UnitCanAttack("Player","Mouseover") somewhere in there to make sure the Mouseover target is a enemy and not a player, so it wont spam shit all over the screen.
For example:
Code:
local hasTarget = UnitExists("Mouseover")
local Enemy = UnitCanAttack("Player","Mouseover")
local inCombat = UnitAffectingCombat("Player")
if hasTarget and Enemy and inCombat then
CastSpellByName(tostring(GetSpellInfo(585)),"Mouseover")
end
P.S. Maybe also add in a check to see if the Mouseover doesn't already have your DoT on the target if it is in fact a DoT (since were talking about Priest here).
Code:
local hasDoT = UnitDebuffID(dotIDhere,"Mouseover","Player")
Or something like that, I've really never used the player tag.