local name = matches[2]
local ego = tonumber(matches[3])
local maxego = tonumber(matches[4])
local percent = math.floor(ego / maxego * 100)
if percent < 50 and name == target then
send("psi super mindburst " .. target)
else
send("psi super " .. tpattack .. " " .. target)
end
send("psi id " .. tpid .. " " .. target)
send("psi sub " .. tpsub .. " " .. target)
Nothing happens when I discern my target. Halp
Answers
Also note that with your current script, your "target" variable needs to be exactly the same as the person you're discerning, including capitalization. So if your target is stored as "lerad", it won't work, since my name shows up as "Lerad" in game messages. You'll need to use string.lower(matches[2]) to change it. Also note that once you do that, if you target with capitalization (like tab-completion) the same problem will happen in reverse unless you string.lower your targetting alias as well.