-- CORE Common Module local U = require "scriptbank\\utillib" local module_core = {} function module_core.getplayerdist( e ) if g_PlayerHealth <= 0 then return 99999 end return GetPlayerDistance( e ) end function module_core.countaiaroundplayer() local aiCount = 0 for k, v in pairs( U.ClosestEntities() ) do if ai_bot_state[ k ] ~= nil then aiCount = aiCount + 1 end end return aiCount end function module_core.debug( e, AIObjNo, PlayerDist, combattype ) if ai_bot_state ~= nil then if ai_bot_state[e] ~= nil then local AH = 0 if ai_bot_angryhurt[ e ] ~= nil then AH = 1 end PromptLocal ( e, "H=" .. g_Entity[e].health .. " CT=" .. combattype .. " STATE=" .. ai_bot_state[ e ] .. "(" .. ai_state_debug[ 1 + ai_bot_state[ e ] ] .. ") SUB=" .. ai_bot_substate[ e ] .. " DIST=" .. PlayerDist .. " AVOID=" .. g_Entity[ e ].avoid .. " VIS=" .. g_Entity[ e ].plrvisible .. " COVER=" .. ai_bot_coverindex[ e ] .. "(" .. AICoverGetIfUsed( ai_bot_coverindex[ e ] ) .. ")" .. " AH=" .. AH .. " SP=" .. ai_bot_gofast[ e ] ) else PromptLocal ( e, "No ai_bot_state[e]" ) end else PromptLocal ( e, "No ai_bot_state" ) end end return module_core