Comando 1 Posted February 23, 2018 Share Posted February 23, 2018 So i saw in Fighter Class configuration that you can add a condition of other enemies around in "X" Yards. What´s the LUA CODE of this condition? Thanks. Link to comment https://wrobot.eu/forums/topic/8725-enemy-near-x-yard-lua-code/ Share on other sites More sharing options...
Matenia 630 Posted February 23, 2018 Share Posted February 23, 2018 You can't do this in Lua. The client's Lua API doesn't have access to the game's ObjectManager. You need to use C# Comando 1 Link to comment https://wrobot.eu/forums/topic/8725-enemy-near-x-yard-lua-code/#findComment-40040 Share on other sites More sharing options...
Comando 1 Posted February 23, 2018 Author Share Posted February 23, 2018 I dont knhow how to use C# but i will figure it out. What´s the code using C#? Link to comment https://wrobot.eu/forums/topic/8725-enemy-near-x-yard-lua-code/#findComment-40042 Share on other sites More sharing options...
Matenia 630 Posted February 23, 2018 Share Posted February 23, 2018 (edited) ObjectManager.GetWoWUnitHostile().Count(o => o.IsValid && o.IsAlive && o.Guid != ObjectManager.Target.Guid && o.Position.DistanceTo(ObjectManager.Target.Position) <= 15) >= 3 Edited February 23, 2018 by Matenia Avvi 1 Link to comment https://wrobot.eu/forums/topic/8725-enemy-near-x-yard-lua-code/#findComment-40043 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now