- NG Phorum http://www.ng-phorum.pun.pl/index.php - Skrypty http://www.ng-phorum.pun.pl/viewforum.php?id=9 - Gdy na ekranie pojawi się scarab http://www.ng-phorum.pun.pl/viewtopic.php?id=13 |
Admin - 2009-05-02 10:04:04 |
Komputer będzie alarmował, jeśli pojawi się Scarab na ekranie. Kod:function IsCreatureVisible(Name: string): boolean; var x: integer; begin Result := False; for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if Creatures.Creature[x].Name = Name then begin if Creatures.Creature[x].Visible then begin Result := True; Exit; end; end; end; end; begin while not Terminated do begin UpdateWorld; if IsCreatureVisible('Scarab') then PlaySound('c:\windows\media\notify.wav'); Sleep(1000); end; end;[/hide] |