All pastes #413692 Raw Edit

Someone

public text v1 · immutable
#413692 ·published 2007-03-28 16:54 UTC
rendered paste body
thomas_miller_AI = Mango.AIScripts.Create(thomas_miller_AI');

function thomas_miller_AI.Init(LuaAI)
	
        thomas_miller_AI.DoShout(LuaAI)
	LuaAI:SetUpdateInterval(8)

	return true
end

function thomas_miller_AI.DoShout(LuaAI)

       local time = os.time();
       local text = { MOEP , Lecki , Lutschi , BOEP };
       local randText = { }
       local highRoll , highRollerID = 0 , 1;
        for i=1, 4 do
              randText[i] = 0;
              if (text[i] > 0) then
                         randText[i] = rand_range(1,100);
              end
              if ( randText[i] > highRoll ) then
                  highRoll , highRollerID = randText[i] , i
              end
         end
         return text[highRollerID];
end	

         function thomas_miller_AI.Init(LuaAI)
         LuaAI:SetUpdateInterval(8)

         return true

end

function thomas_miller_AI.Update(LuaAI)
	
	thomas_miller_AI.DoShout(LuaAI)
end