Code: Select all
Program Inscription; 
{$Include 'all.inc'} 
var 
k:integer;  
const 
// TypeC='lt'; 
// TypeC='fs'; 
TypeC='gh';
// TypeC='eb'; 
// TypeC='mr'; 
// Реги 
BPreg=$0F7A; 
BMreg=$0F7B; 
GAreg=$0F84; 
GSreg=$0F85; 
MRreg=$0F86; 
NSreg=$0F88; 
SAreg=$0F8C; 
SSreg=$0F8D; 
procedure getitems(item:cardinal); 
   // процедура берет из контейнера 100 шт указанного предмета 
   begin 
      if (count(item)=0) then 
      begin 
         findType(item,$5EC684C7); 
         if (FindCount > 0) then 
         begin 
            k := FindQuantity; 
            Grab(finditem,100)
            wait(1000); 
            case item of 
             //  BPreg : addtosystemjournal('взял 100 BP из ' + inttostr(k)); 
             //  BMreg : addtosystemjournal('взял 100 BM из ' + inttostr(k)); 
               GAreg : addtosystemjournal('взял 100 GA из ' + inttostr(k)); 
               GSreg : addtosystemjournal('взял 100 GS из ' + inttostr(k)); 
               MRreg : addtosystemjournal('взял 100 MR из ' + inttostr(k)); 
             //  NSreg : addtosystemjournal('взял 100 NS из ' + inttostr(k)); 
             //  SAreg : addtosystemjournal('взял 100 SA из ' + inttostr(k)); 
               SSreg : addtosystemjournal('взял 100 SS из ' + inttostr(k)); 
            end; 
         end 
         else addtosystemjournal('Мало!!!'); 
      end; 
   end; 
procedure Cast2; 
   begin 
       case TypeC of 
         'gh' :    begin getitems(GAreg); getitems(SSreg); getitems(MRreg); getitems(GSreg); end; 
         'lt' :    begin getitems(BPreg); getitems(MRreg); getitems(SAreg); end; 
         'fs' :    begin getitems(SSreg); getitems(SAreg); end; 
         'mr' :    begin getitems(GAreg); getitems(MRreg); getitems(SSreg); end; 
	 'eb' :    begin getitems(NSreg); getitems(BPreg); end; 
      end;
    end; 
procedure pucovka; 
begin 
If (Mana>=16) then 
		begin 
		   UseObject($5EC684C7)	
		   UseObject(FindType($0E34,$5EC684C7));
		   wait(1000) ;
		   Waitmenu('Select a circle to inscribe', 'Circle 4 spells')
		   wait(1000) 
		   Waitmenu('Select a spell to inscribe', 'Greater Heal')	
		   end
end;
Begin 
   Uosay ('.macro on')
   i:=0;	
   repeat
   Cast2;
	begin
	  wait(200); 
	  pucovka; 
	      begin 
		While (Mana<Int) do begin Useskill('Meditation'); wait(5100);end;
	  pucovka;
       i:=i+1;
	  end;
     end
until (i=1000000)
End.
