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

Help me)

тут можно задать вопрос по скриптингу
Post Reply
pr0Zak
Novice
Novice
Posts: 77
Joined: 15.09.2009 1:11
Location: Age of Power
Contact:

Help me)

Post by pr0Zak »

Собственно хотел узнать чего не происходит завершение процедуры?)

Code: Select all

const 
Msg1 = 'Annoy someone else!'; 


var 
tmptime : TDateTime;

Procedure Bolt;
Begin
  repeat
if (Life < MaxLife) then UOSay('GUARDS'); 
if WarMode then SetWarMode(false);
if targetpresent then CancelTarget;
  FindDistance := 1;
  tmptime := Now;
  if FindType($0190, ground) > 0 then 
  begin 
    UseSkill('Begging'); 
    wait(500); 
    WaitTargetObject(FindType($0190, ground));
  end; 
  if FindType($0191, ground) > 0 then 
  begin 
    UseSkill('Begging'); 
    wait(500); 
    WaitTargetObject(FindType($0191, ground));
  end;
  until InJournalBetweenTimes(Msg1, tmptime, Now)<>-1;
End;
Фраза неоднократно вылетает, а процедура все ровно остается в цикле!!
WladL
Apprentice
Apprentice
Posts: 240
Joined: 27.07.2009 17:21
Location: DRW
Contact:

Post by WladL »

1)Может фраза неверно записана. Сократи как можно короче - "Annoy"
2) сделай задержку поболе, а то получается каждые 0.5сек скилл юзаешь

или вообще вот так

Code: Select all

const 
Msg1 = 'Annoy'; 


var 
tmptime : TDateTime; 

Procedure Bolt; 
Begin 
  repeat 
if (Life < MaxLife) then UOSay('GUARDS'); 
if WarMode then SetWarMode(false); 
if targetpresent then CancelTarget; 
  FindDistance := 1; 
  tmptime := Now; 
  if FindType($0190, ground) > 0 then 
  begin 
    UseSkill('Begging'); 
    wait(500); 
    WaitTargetObject(FindType($0190, ground)); 
  end; 
  if FindType($0191, ground) > 0 then 
  begin 
    UseSkill('Begging'); 
    wait(500); 
    WaitTargetObject(FindType($0191, ground)); 
  end; 
  repeat
    wait(500);
  until (InJournalBetweenTimes(Msg1, tmptime, Now)<>-1) OR dead; 
until dead;
End;
pr0Zak
Novice
Novice
Posts: 77
Joined: 15.09.2009 1:11
Location: Age of Power
Contact:

Post by pr0Zak »

Спс действительно на да было просто фразу сократить))
Post Reply