Yoko

All sides of Injection
It is currently 2024-03-29 03:59:37

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2013-09-23 11:19:33 
Offline

Joined: 2006-11-15 18:45:31
Posts: 27
Location: in Moscow (west)
Скрипт по идеи должен наполнять флягу водой, потом поливать и удобрять, и так по очереди каждое дерево, но при запуске скрипта пишет-

Auto target cancelled
No item found

Где тут ошибка?

Code:
sub bonsay()
   DIM DEREVO[2]   
      DEREVO[0] = '0x4025A750' 
      DEREVO[1] = '0x4016EB3B' 
   VAR poilka   = '0x4003D00E' # Поилка
   VAR Fertile_Dirt = '0x0F81'  # Плодородная грязь.
   VAR Flask        = '0x182A'  # Фляга с водой.
   VAR Flask_empty  = '0x182D'  # Пустая фляга.
   VAR i
   repeat
      for i = 0 to 1 
         UO.FindType(Flask)               
         if UO.FindCount() == 0 then       
            UO.FindType(Flask_empty)   
            if UO.FindCount() > 0 then     
               UO.WaitTargetObject(poilka)
               UO.UseObject('fainditem')   
             else
               UO.Print("У тебя нет бутылок для воды.")
               UO.Print("Скрипт выключен.")
               return
            endif
            UO.FindType(Flask)
         endif
         UO.FindType(Fertile_Dirt)         
         if UO.FindCount() == 0 then       
            UO.Print("У тебя нет удобрения.") 
            UO.Print("Скрипт выключен.")
            return
         endif
         UO.DeleteJournal()     
         UO.UseObject(DEREVO[i]) 
         repeat               
            wait(200)         
         until UO.InJournal("Try to look after your bonsay better")
         
         if UO.InJournal("Try to look after your bonsay better") then 
            UO.DeleteJournal()
            UO.WaitTargetObject(DEREVO[i]) 
            UO.UseType(Flask)               
            repeat                         
               wait(200)
            until UO.InJournal("Your bonsay looks") or UO.InJournal("There is no need to use")
            UO.DeleteJournal()
            UO.WaitTargetObject(DEREVO[i]) 
            UO.UseType(Fertile_Dirt)       
            repeat                         
               wait(200)
            until UO.InJournal("Your bonsay looks") or UO.InJournal("There is no need to use")
         endif
   
      next
     
      wait(20000)   
   until UO.Dead()
endsub


Top
   
PostPosted: 2013-09-23 11:48:54 
Offline
User avatar

Joined: 2012-12-31 00:17:09
Posts: 93
Quote:
UO.UseObject('fainditem')

лишняя буква, как минимум


Top
   
PostPosted: 2013-09-23 18:39:00 
Offline

Joined: 2006-11-15 18:45:31
Posts: 27
Location: in Moscow (west)
Исправил, пишет-No item found. Никак не хочет наполнять флягу.


Top
   
PostPosted: 2013-09-24 21:38:26 
Offline

Joined: 2006-11-15 18:45:31
Posts: 27
Location: in Moscow (west)
Разобрался. Все работает.
А как сделать, чтобы скрипт выполнял действия по кругу по очереди, сначала по кругу поливал деревья , а потом, по очереди удобрял ?


Top
   
PostPosted: 2013-09-25 01:58:49 
Offline

Joined: 2006-11-15 18:45:31
Posts: 27
Location: in Moscow (west)
Все допер, оф топ.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited