This time ill post it in the right forum >,>
Core: ArcEmu R 3236
Lua Engine: LuaHypArc
My code almost works, except for the fact that when you stand near one of the npc's, then go ~ 300 yards or so away and stand next to the other one, the core console goes berserk spamming Out of Memory. Im guessing its because I have a bad range checker, and is there a more efficient way i could do it? lua pref... i know abit of C++ but when i try read whats in the core - my head spins xD
Anyways heres the code that works, but sends the core crazy -
Heres what i mean by "Sends the core crazy":Code:function Peacekeeper_On(Unit, Event) local plrs = Unit:GetInRangePlayers() for k, v in pairs(plrs) do if Unit:GetDistanceYards(v) < 10 then v:FlagFFA(false) end end RegisterTimedEvent("Peacekeeper_On", 1000, 0, Unit) end RegisterUnitEvent(59951, 18, "Peacekeeper_On") function Warbringer_On(Unit, Event) local plrs = Unit:GetInRangePlayers() for k, v in pairs(plrs) do if Unit:GetDistanceYards(v) < 10 then v:FlagFFA(true) end end RegisterTimedEvent("Warbringer_On", 1000, 0, Unit) end RegisterUnitEvent(59952, 18, "Warbringer_On")
http://www.netherfoam.envisageart.co...h%20memory.png
Cant just ignore it - Not when you cant read anything the core is outputting & it sends a few of my cores through the roof (an I7, so i have plenty of processor but why waste it?)