Mine
public text v1 · immutablefunction TEST_Threat_AI.DoCastRandomChance(LuaAI, target, chance, spellID)
local letsDoSpell = rand_range(1,100)
if (letsDoSpell >= (100 - chance) ) then
if( spellID > 0 ) then
LuaAI:DoCast(target, spellID);
end
end
end