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

Хилинг на курсе

тут можно задать вопрос по скриптингу
Post Reply
<'((><
Neophyte
Neophyte
Posts: 21
Joined: 28.09.2008 6:54

Хилинг на курсе

Post by <'((>< »

Есть скрипт, но он нехочет работать :(
Помогите кто нить плизз

Code: Select all

Program Healing; 

{$Include 'all.inc'} 

const 
Washbasin=$404A04B8;  
bloodbandages=$0E20;  
Curse=$1541;  
CharHP = 195; 

var 
Str1,str2,str3,str4,str5:String; 
bandages:cardinal; 

BEGIN 
bandages:=FindType($0E21,backpack); 
Str1:='You bandage'; 
Str2:='You put '; 
Str3:='You sucessfully '; 
Str4:='Do you '; 
Str5:='You must wait to perform another action'; 
WaitConnection(5000); 

If GetType(ObjAtLayer(ShirtLayer))=Curse then begin Unequip(ShirtLayer); Wait(1000); end; 

While not Dead do 
   begin 
   If Life>=CharHP then 
      begin 
      Equipt(ShirtLayer,Curse); 
      Wait(3000); 
      While Life>CharHP do Wait(3000); 
      Unequip(ShirtLayer); 
      end; 
While HP < CharHP do 
Begin 
UseObject(bandages); 
WaitTargetSelf; 
While (InJournal(str1)<0) and (InJournal(str2)<0) and (InJournal(str3)<0) and (InJournal(str4)<0) and (InJournal(str5)<0) do wait(500); 
Wait(2500) 
end; 
Wait(100) 
   FindType(bloodbandages,backpack); 
   if FindCount >= 1 then 
     begin 
       wait(100); 
   AddToSystemJournal('Начинаю мыть бинты'); 
   UseObject(finditem); 
   WaitForTarget(5000); 
   if TargetPresent then TargetToObject(Washbasin); 
      wait(100); 
   AddToSystemJournal('Вымыл бинты'); 
     end 
   else 
AddToSystemJournal('Нечего мыть'); 
end; 
END.
Beren
Novice
Novice
Posts: 108
Joined: 08.09.2008 1:07

Post by Beren »

Code: Select all

Program Healing; 
var 
  RealHP:integer; 
  heal_msg,heal_msg_exit:string;
  
Const
 clean_bandages = $0E21;//бинты 
 bloody_bandages =$0E20;// кровавые бинты 
 a_wash_basin =$1008;//чашка для мытья бинтов
 type_of_weapons =$1438;// проклятый молоток
 heal_1='You can''t use another bandage yet!';
 heal_2='You put the bloody bandage in your pack.';
 heal_3='You apply the bandages, but they barely help.';
 heal_4='You must wait to perform another action';


{$Include 'all.inc'} 

procedure Wait_Target(time_ms:Cardinal);
var
 TempTime,SumTime:Cardinal;
begin
 SumTime:=0;
 repeat
  checksave;
  TempTime:=Timer;
  SumTime:=SumTime+(Timer-TempTime);
 until ((targetpresent) or (dead) or (not connected) or (SumTime>time_ms));
end;

procedure Wash;
begin
 UseObject(FindType(bloody_bandages,Backpack));
 wait_target(5000);
 WaitTargetObject(FindType(a_wash_basin,Backpack));
end;

procedure Heal; 
var 
 ctime : TDateTime;  
begin 
 repeat
  AddToSystemJournal('Лечим');
  ctime := Now; 
  checksave;
  UseObject(FindType(clean_bandages,Backpack));
  wait_target(10000);
  WaitTargetObject(Self);
  repeat
   wait(100);
   checksave;
  until (((InJournalBetweenTimes(heal_msg, ctime, Now))<>-1) or dead or (not connected) or (HP=STR)); 
  wait(250);
 until (((InJournalBetweenTimes(heal_msg_exit, ctime, Now))<>-1) or dead or (not connected) or (HP=STR));
Wash;
end;

Begin 
Disarm;
heal_msg:=heal_1+'|'+heal_2+'|'+heal_3+'|'+heal_4;
heal_msg_exit:=heal_2;
SetARStatus(true); 
clearjournal; 
while not Dead do 
 begin 
  if Connected then 
  begin 
   wait(500);
   RealHP:=HP;
   Equipt(LhandLayer,type_of_weapons);
   AddToSystemJournal('Одели молоток');
   repeat
    CheckSave;
	wait(250);
   until ((HP<=(realHP-1)) or (not connected) or dead);
   //Disarm;
   heal;   
  end;    
 end; 
End.
<'((><
Neophyte
Neophyte
Posts: 21
Joined: 28.09.2008 6:54

Post by <'((>< »

Code: Select all

7:27:31 [Dark Nikole]: Одели молоток
7:27:38 [Dark Nikole]: Лечим
7:27:39 [Dark Nikole]: UseObject error: Object not finded.
И все, стоит глухо...
<'((><
Neophyte
Neophyte
Posts: 21
Joined: 28.09.2008 6:54

Post by <'((>< »

Все! Спасибо! Я разобралась)
Post Reply