Alerta ao acabar Food.

Const
FoodID = 1111 // Coloque aki o ID do food
MusicPath = 'C:\Windows\Media\Notify.wav' // This is the main alert of windows.

while not terminated do
begin
UpdateWorld;
a:=0;
For x:= 0 to Self.Containers.Count - 1 do
begin
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if Self.Containers.Container[x].Item[y].ID = FoodID
then a := 1;
Sleep(100);
end;
sleep(100);
end;
sleep(100);
if a = 0 then PlaySound(MusicPath);
end;

Pesquisar no site

By Chuck Norriz © 2009 Todos os direitos reservados.