Alerta poucos Potions (deixe a BP com os potions aberta)


Const

PotID = 268 // Coloke aki o Id do POT
Count = 25 // quantidade
MusicPath = 'C:\Windows\Media\Notify.wav' // O Local do arquivo de som do Alerta

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 = PotID) and (Self.Containers.Container[x].Item[y].amount > Count)
then a := 1;
Sleep(10);
end;
sleep(10);
end;
sleep(10);
if a = 0 then PlaySound(MusicPath);
end;