Originally Posted by merlight
It seems kick by name expects raw character name, with gender markup. If that's true, you might have to look the "pretty" name up yourself:
Lua Code:
SLASH_COMMANDS["/tntkick"] = function(name) local lcname = zo_strlower(zo_strtrim(name)) for i = 1, GetGroupSize() do local unitTag = GetGroupUnitTagByIndex(i) if unitTag and not IsUnitGroupLeader(unitTag) then --local rawCharacterName = GetRawUnitName(unitTag) local characterName = GetUnitName(unitTag) if lcname == zo_strlower(characterName) then GroupKick(unitTag) break end end end end
Btw there's builtin /invite that does the same thing as yours. But no /kick counterpart.
|
This looks interesting, I will try it. There is so much to learn, so I appreciate the help.