quinta-feira, 31 de julho de 2008

Alertwhenlowonspears

const
spear_amount = 5 //number of spears to alert at
pause_time = 10 // number of seconds pause between alerts
alert_file = 'c:\windows\media\notify.wav' // must be a wav file

begin
while not terminated do begin
UpdateWorld;
if Self.RightHand.Amount <= spear_amount then
begin
PlaySound (alert_file);
sleep(pause_time*1000);
end;
sleep(100);
end;
end;

0 Comments: