This is a great How-To


Only problem is that Lua doesn't have regular expressions. They look like REs to a layman, but... real regular expressions are one heck of a lot more powerful (and more complex). Jae 15:01, 22 Dec 2005 (EST)

how do i use this in TBC2? Edit

/script if (string.find(UnitName("target"),"Bob")~=nil) then CastSpellByName("Hunter's Mark") else ClearTarget() end

now,can not work in TBC2,how do i get this function in TBC by string Pattern ?


I don't know when this was asked; however, CastSpellByName is a protected function and cannot be used in this manner except to activate tracking abilities and open crafting frames. Posted by: EGingell (T|C|F) on 01:38, May 26, 2010 (UTC)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.