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;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License