Thread Tools Display Modes
09-12-06, 02:27 PM   #1
goldentale
A Defias Bandit
Join Date: Dec 2005
Posts: 3
Smile Can someone please help me fix this targetting /script

Code:
/script TargetNearestEnemy(); if UnitExists("target") and not UnitIsDeadOrGhost("target") then mob = UnitName("target"); if (string.find(mob,"Legio")) and UnitHealth("target") >= 99 then CastSpellByName("Earth Shock(Rank 1)"); else ClearTarget(); end end
I am not getting any error however it isn't targetting anything either that I've seen. I saw this particular macro / script posted back in May and would like to get a fix for it, to help us out in bwl.



Thanks

Last edited by goldentale : 09-12-06 at 02:30 PM.
  Reply With Quote
09-12-06, 03:57 PM   #2
sid67
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 78
Try replacing (string.find(mob,"Legio")) with (string.find(mob,"Legio(.+)"))
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Can someone please help me fix this targetting /script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off