Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Hungry

тут можно задать вопрос по скриптингу
Post Reply
Star4ce
Posts: 8
Joined: 13.03.2005 7:04
Contact:

Hungry

Post by Star4ce »

Code: Select all

program hungry; 
var hungry : Integer; 
Begin 
 hungry := 1;
 while hungry = 1 do
  begin
   ClearJournal;
   UOSay('.hungry')
    while not injournal('You') do wait(100);
    if not InJournal('stuffed') then
     begin
        UseObject('$7F7F8655');
        wait(1000);
     end;
    else hungry := 0;
  end;
ClearJournal;
End.
неработает NOT. чем заменить?
Miralex
Developer
Developer
Posts: 656
Joined: 11.03.2005 19:12
Contact:

Post by Miralex »

InJournal() возвращает индекс строки. Если строка не найдена то получишь -1.

поэтому if not (InJournal >= 0)
или же if InJournal = -1
Dani
Neophyte
Neophyte
Posts: 30
Joined: 17.03.2005 15:43
Contact:

Post by Dani »

while not injournal('You') >= 0 do wait(100);
if not InJournal('stuffed') >= 0 then
так вот типо
Post Reply