Code: Select all
Program Healing; 
{$Include 'all.inc'} 
const 
Eat=$09bb; {тип еды}
Washbasin=$403116db; {мойка}  
bloodbandages=$0E20;  {кровавые бинты, тип}
CharHP=177; {количество здоровья у персонажа груши}
ElBow=$404aa15e; {ельвин лук}
BoxSunduk=$4037064e; {сундук для безопасного хранения ельвин лука}
var 
Str1,str2,str3,str4,str5:String; 
bandages:cardinal; 
BEGIN 
AddToSystemJournal('СКРИПТ ЗАГРУЖЕН!');
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); 
While not Dead do 
   begin 
	If Life >= CharHP then 
	begin 
		MoveItem(ElBow,1,Backpack,0,0,0);
		Wait(800);
		UseObject(ElBow); 
		Wait(3000); 
		UOSay('go');
		SetWarMode(true);
		While Life > (CharHP - 100) do Wait(100); 
	end;
	UOSay('stay');
	SetWarMode(false);
	MoveItem(ElBow,1,BoxSunduk,0,0,0);
	While HP < CharHP do 
	Begin 
		AddToSystemJournal('Лечимся');
		SetWarMode(false);
		UseObject(bandages); 
		SetWarMode(false);
		WaitTargetSelf; 
		SetWarMode(false);
		While (InJournal(str1)<0) and (InJournal(str2)<0) and (InJournal(str3)<0) and (InJournal(str4)<0) and (InJournal(str5)<0) do wait(500); 
		SetWarMode(false);
		Wait(2500); 
		SetWarMode(false);
	end; 
	Wait(100);
	SetWarMode(false);
	FindType(bloodbandages,backpack); 
	SetWarMode(false);
	if FindCount >= 1 then 
	begin 
		wait(100);
		SetWarMode(false);
		AddToSystemJournal('Начинаю мыть бинты'); 
		SetWarMode(false);
		UseObject(finditem); 
		SetWarMode(false);
		WaitForTarget(5000); 
		SetWarMode(false);
		if TargetPresent then TargetToObject(Washbasin); 
		SetWarMode(false);
		wait(100); 
		SetWarMode(false);
		AddToSystemJournal('Вымыл бинты'); 
		SetWarMode(false);
		FindType(Eat,backpack); 
		SetWarMode(false);
		if FindCount >= 1 then 
		begin 
			SetWarMode(false);
			AddToSystemJournal('кушаем'); 
			SetWarMode(false);
			UseObject(finditem);
			SetWarMode(false);
		end else 
			SetWarMode(false);
			AddToSystemJournal('нечего кушать');
	end else 
		SetWarMode(false);
		AddToSystemJournal('Нечего мыть'); 
	end; 
END.





