Хил + проверка

Ask for help

Moderators: Murderator+, Murderator

Post Reply
Shadowdancer
Posts: 96
Joined: 2005-08-25 23:35:29

Хил + проверка

Post by Shadowdancer »

Здраствуйте, помогите пожалуйста добавить что бы брал из сундука чистые бинты когда в паке допустим будет 100 и ложил все грязные в этот же сундук!

Code: Select all

sub heal()    
VAR X=0 
repeat 
   if uo.life < uo.str then   ;;; healing 
   while uo.life < uo.str 
      uo.exec("bandageself")
      wait (300)
      uo.usetype("0x1B76") # ùèò
      uo.deletejournal() 
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely")or uo.injournal("You put")or uo.injournal("You fail") or uo.injournal("mummy") or uo.injournal("target info")) 
         wait(300) 
         X=X+1 
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then 
            wait(500) 
         endif 
      wend 
   X=0 
   wend 
      uo.deletejournal() 
      
   endif 
wait(100) 
until uo.dead() 
end sub 
GambiT
Posts: 59
Joined: 2008-01-26 22:35:57

Post by GambiT »

попробуй так ...
сначала надо указать будет контейнер где чистые бинты

Code: Select all


sub heal()    
VAR X=0 
var count

uo.print('Выберите контейнер с бинтами')
	uo.exec('addobject Cont') 
		while uo.targeting() 
		wait(100) 
		wend 

repeat 
   if uo.life < uo.str then   ;;; healing 
   while uo.life < uo.str 
      uo.exec("bandageself") 
      wait (300) 
      uo.usetype("0x1B76") # ùèò 
      uo.deletejournal() 
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely")or uo.injournal("You put")or uo.injournal("You fail") or uo.injournal("mummy") or uo.injournal("target info")) 
         wait(300) 
         X=X+1 
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then 
            wait(500) 
         endif 
      wend 
   X=0 
   wend 
      uo.deletejournal() 
      
   endif 
wait(100) 

###########################################

count=uo.count('0x0E21')
        if count < 100 then
                   uo.setreceivingcontainer('Cont')   
                   uo.findtype('0x0E20')   
                   wait(1000) 
                   uo.grab('0','finditem')   #### скидывем в контейнер кровавые бинты
                   wait(1000)    

                   uo.unsetreceivingcontainer()  
	                uo.findtype('0x0E21',-1,'Cont') 
	                wait(1000) 
	                uo.grab('500','finditem')    ## берем 500 чистых
                                wait(1000)
         endif

###########################################
 
until uo.dead() 
end sub

Last edited by GambiT on 2008-02-26 10:03:52, edited 1 time in total.
Shadowdancer
Posts: 96
Joined: 2005-08-25 23:35:29

Post by Shadowdancer »

GambiT wrote:попробуй так ...
сначала надо указать будет контейнер где чистые бинты

Code: Select all


sub heal()    
VAR X=0 
var count

uo.print(Выберите контейнер с бинтами) 
	uo.exec('addobject Cont') 
		while uo.targeting() 
		wait(100) 
		wend 

repeat 
   if uo.life < uo.str then   ;;; healing 
   while uo.life < uo.str 
      uo.exec("bandageself") 
      wait (300) 
      uo.usetype("0x1B76") # ùèò 
      uo.deletejournal() 
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely")or uo.injournal("You put")or uo.injournal("You fail") or uo.injournal("mummy") or uo.injournal("target info")) 
         wait(300) 
         X=X+1 
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then 
            wait(500) 
         endif 
      wend 
   X=0 
   wend 
      uo.deletejournal() 
      
   endif 
wait(100) 

###########################################

count=uo.count('0x0E21')
        if count < 100 then
                   uo.setreceivingcontainer('Cont')   
                   uo.findtype('0x0E20')   
                   wait(1000) 
                   uo.grab('0','finditem')   #### скидывем в контейнер кровавые бинты
                   wait(1000)    

                   uo.unsetreceivingcontainer()  
	                uo.findtype('0x0E21',-1,'Cont') 
	                wait(1000) 
	                uo.grab('500','finditem')    ## берем 500 чистых
                                wait(1000)
         endif

###########################################
 
until uo.dead() 
end sub


uo.print(Выберите контейнер с бинтами) ТУТ ВЫбило ошибку!
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Post by Kynep »

Shadowdancer wrote:
GambiT wrote:попробуй так ...
сначала надо указать будет контейнер где чистые бинты
uo.print(Выберите контейнер с бинтами) ТУТ ВЫбило ошибку!

Ох ужос какой.... А нафига тебе их скидывать? Помыть ни судьба? А по теме в кавычки поставь текст в скобках.
Shadowdancer
Posts: 96
Joined: 2005-08-25 23:35:29

Post by Shadowdancer »

Нечем мыть нада в сундук скидывать :)
GambiT
Posts: 59
Joined: 2008-01-26 22:35:57

Post by GambiT »

сори ступил забыл кавычки поставить ;)

Code: Select all

uo.print('Выберите контейнер с бинтами')
Shadowdancer
Posts: 96
Joined: 2005-08-25 23:35:29

Post by Shadowdancer »

пасибки, вроде все работает!
GambiT
Posts: 59
Joined: 2008-01-26 22:35:57

Post by GambiT »

да не за что ;)
обращайся ;) помогу чем смогу ;)
Post Reply