View Single Post
06-17-05, 11:57 AM   #5
Coskesh
A Deviate Faerie Dragon
Join Date: Jun 2005
Posts: 11
Hmmm, I move the slash command handler to the top, and renamed my function. Works good now.


Code:
function HunterAttack_OnLoad()
	SlashCmdList["HUNTERATTACK"] = HunterAttack_SlashHandler;
	SLASH_HUNTERATTACK1 = "/hunterattack";
	SLASH_HUNTERATTACK2 = "/hatt";
end

function HunterAttack_SlashHandler()

		if (IsActionInRange(55)==1) and (IsActionInRange(50)==0) then -- in range for range attack?
			RangedAttack()
		elseif (IsActionInRange(50)==1) then 
			MeleeAttack()
		end
end

Thanks for all the feedback!
  Reply With Quote