View Single Post
02-06-06, 03:43 PM   #29
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Oops sorry for late reply. A change was in progress in how events work so put off replying. If you have 1.9-beta3, all you need to do is add an else:

if (UnitCreatureType("target") == "Undead") then
EquipSet()
else
LoadSet()

end --[[Equip a set when targeting Undead.]]

EquipSet and LoadSet both check if a set is equipped before running so they're safe to run many times. If there's ever a need you can still use global variables like the older scripts did (in fact all the older ones will run without change), but the performance difference will be negligible.
  Reply With Quote