September 3, 20178 yr I have a spell ability that I need to check for use only if the player is in a group/party. I was in a group, but the group member went offline, and my ability was still being used despite the player actually being online in game. Is there a check for this? Thanks!
September 3, 20178 yr if (Party.IsInGroup()) { // in group var partyMembers = wManager.Wow.Helpers.Party.GetParty foreach (var member in partyMembers) { // UnitIsConnected("unit") var isConnected = Lua.LuaDoString<bool>("return UnitIsConnected('" + "member.Name" + "')"); if (isConnected) { Logging.Write("Player " + member.Name + " is online."); } } } else{ // not in group } The above will check if you are in a group and then tell you whether each party member is online/not online. Edited September 15, 20178 yr by Avvi
September 6, 20178 yr Author I am not sure if it's working as intended. It even returns that I am offline, and I am clearly in game. How can I search for a player by string and through settings if they are online and in range? IE: Cast Vigilance On: ____[Player Name Here]______ I have tried different variations with the lua code provided and to no avail. Thanks!
September 15, 20178 yr Hey Apexx, I believe I had a typo in the code snippet. Please try again. with this var isConnected = Lua.LuaDoString<bool>("return UnitIsConnected('" + "member.Name" + "')");
Create an account or sign in to comment