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

Падает client.exe

тут можно задать вопрос по скриптингу
Post Reply
staslav
Neophyte
Neophyte
Posts: 17
Joined: 01.03.2013 23:27

Падает client.exe

Post by staslav »

Подскажите пожалуйста в чем может быть проблема.
Есть скрипт, ниже, когда его использую в разное время может выкинуть клиент - завершается его работа, типа непредвиденной ошибки. Пробовал на двух разных ПК.
скрипт:

Code: Select all

Program loot;
const
  forCut = $1400;     // крис
  
var
  n,t:integer;
  rsnd:integer;
  i:array[0..16] of Word;     
  Bnkont,st:Cardinal;
  {$Include 'all.inc'}  

procedure InitMulki;
  begin
  i[0]:=$0F0B;          // refresh
  i[1]:=$0F0C;          // heal potion
  i[2]:=$0F3F;          // arrows
  i[3]:=$0EED;          // gold
  i[4]:=$0E21;          // binty
  i[5]:=$1838;          // essence of firewproof
  i[6] := $0F84;        // Garlic
  i[7] := $0F85;        // Ginseng
  i[8] := $0F88;        // Nightshade
  i[9] := $0F86;        // Mandrake Roots 
  i[10] := $0F8C;       // SA
  i[11] := $0F7A;       // BP
  i[12] := $0F7B;       // BM
  i[13] := $0F8D;       // SS 
  i[14] := $1067;       // koja
  i[15] := $0F21;       // star sapfir  
  i[16] := $1078;
  end;

procedure rezka;
  begin 
  WaitTargetObject(st); 
  UseObject(FindType(forCut,backpack));  
  wait (3100);
  end;


Procedure sbor_luta;  
  begin   
  UseObject(st);
  wait (200);
  AddTosystemJournal('откріли труп');                          
  for n:=0 to Length(i)-1 do
    begin 
    t:=0; 
    If Findtype(i[n],st) <> 0 then
    while (Findtype(i[n],st) <> 0) or (t <= 3) do
      begin
      If GetDistance(st) > 1 then exit;
      AddTosystemJournal('что-то нашли забираем');                   
      Grab(FindItem,999)
      Wait(170);
      t := t+1;
      end;
    end;
  end;

Procedure sbor_s_zemli;
  begin
  for n:=0 to Length(i)-1 do
    begin
    If Findtype(i[n],ground) > 0 then
      begin
      If GetDistance(FindItem) > 2 then exit;
      AddTosystemJournal('что-то нашли поднимаем');                
      Grab(FindItem,911);
      wait (150);
      end;
    end;
  end;

Begin
  InitMulki;
  while not Dead do
  begin
  finddistance := 1; 
  findvertical := 20;
  wait (300);
  sbor_s_zemli; 
  If HP <=111 then
    begin
    If FindType(i[1],backpack) <> 0 then
      begin 
      wait(1000);
      UOSay(chr(39) + 'pc quaf heal');
      wait(5500);
      end
    else
      begin 
      wait(1000);
      UOSay(chr(39) + 'pc heal self');
      wait(5500);
      end
    end;
  If HP <=55 then
    begin
    If FindType(i[1],backpack) <> 0 then
      begin 
      wait(1000);
      UOSay(chr(39) + 'pc heal self');
      wait(5500);
      end
    else
      begin 
      wait(1000);
      UOSay(chr(39) + 'pc quaf heal');
      wait(5500);
      end
    end;
  If  FindType($2006,ground) <> st then
    begin 
    st :=  FindType($2006,ground);
    wait(200);
    rezka;
    sbor_luta;
    end;
  end;
End.
 
Post Reply