All pastes #413713 Raw Edit

Miscellany

public text v1 · immutable
#413713 ·published 2007-03-28 17:07 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 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
              LuaAI:DoSay([i], 0)
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