If still referencing
Timber Worg is afflicted by Spell Vulnerability
I figured out that by adding
%s%a* into my code below:
Code:
function myString_findPattern(text, pattern, start)
return string.sub(text, string.find(text, pattern, start))
end
local targetName = myString_findPattern(arg1, "%a*%s%a*")
...I can now include the "white space" and the next word, returning "Timber Worg" for example.
This brings about a different situation. The new code returns two words...indifferent if its the targets name or not. So when a player target's name is referenced, instead of "Timber Worg," after this change has been made, it would make targetname = "You are" or "Soandso is" for example (because it pulls the first two words).
So if i were attacking Majordomo Executus it would return his full name
If I were attacking another player, it would return "Soandso is"
and if I were attacking Wing Commander Duffy, it would just return "Wing Commander"