Yoko

All sides of Injection
It is currently 2025-11-12 17:03:54

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Стопки вещей!
PostPosted: 2006-05-01 00:09:07 
Offline

Joined: 2006-04-08 10:42:58
Posts: 3
Люди подскажите плизз как сделать стопки через инжу например из роб,шапок и тд?


Top
   
 Post subject:
PostPosted: 2006-05-01 05:52:16 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Могу ошибаться, но командой:

Code:
uo.MoveItem(item,'quantity','container','x','y','z')


x,y,z-координаты точки в контейнере,в которую переместятся вещи в заданном кол-ве.


Top
   
 Post subject:
PostPosted: 2006-05-01 12:08:44 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
В команде UO.MoveItem использовать стопку как приемный контейнер. Тогда новая вещь "прикучкуется".

Вообще, посмотри как это реализовано в моих скриптах, топик "Наследство от Эдреда". Например, в этом скрипте:

Code:
#####################################################################
sub AutoMove()
; Автоматическое перекладывание предметов одного типа и цвета из одного
; контейнера в другой. Поддержка двух режимов - драга на стопку и драга
; на контейнер.
; v.1.04b (c) Edred
   VAR MyPause = 600
   VAR Type1, Color1, s, n, SerStopka, SumCol = 0
   UO.Print( 'Select sending container' )
   UO.Exec('addobject TmpCont1')
   While UO.Targeting()
      Wait(100)
   Wend
   UO.Print( 'Select targeting container' )
   UO.Exec('addobject TmpCont2')
   While UO.Targeting()
      Wait(100)
   Wend
   UO.Print( 'Select type for move' )
   UO.Exec('addobject TmpObj1')
   While UO.Targeting()
      Wait(100)
   Wend
   Type1 = UO.GetGraphic( 'TmpObj1' )
   Color1 = UO.GetColor( 'TmpObj1' )
   While UO.Targeting()
      Wait(100)
   Wend
   s = ''
   s = UO.asmInputString("Задайте размер порции:","500")
   If s == '' Then
      UO.Print( 'Invalid count of objects!' )
      return
   Endif
   VAR ToDo = UO.asmInputList("Выберите способ:","'Драг в стопку';'Драг на контейнер'")
   SerStopka = UO.GetSerial( 'TmpCont2' )
   n = val( s )
   If n < 0 OR n > 20000 Then
      UO.Print( 'Invalid count of objects!' )
      return
   Endif
   repeat
      If ToDo == 1 Then
         UO.FindType( Type1, Color1, 'TmpCont2' )
         If UO.FindCount() > 0 Then
            SerStopka = UO.GetSerial( 'finditem' )
         Else
            SerStopka = UO.GetSerial( 'TmpCont2' )
         Endif
      Endif
      UO.FindType( Type1, Color1, 'TmpCont1' )
      If UO.FindCount() > 0 Then
         If UO.GetQuantity( 'finditem' ) < n Then
            SumCol = SumCol + UO.GetQuantity( 'finditem' )
         Else
            SumCol = SumCol + n
         Endif
         UO.MoveItem( 'finditem', str(n), SerStopka )
         Wait( MyPause )
         CheckLag()
         UO.Print( 'I moved ' + str(SumCol) + ' items' )
      Else
         UO.Print( 'Automove finished' )
         Return
      Endif
   until False
endsub


Top
   
 Post subject:
PostPosted: 2006-05-01 18:35:58 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Edred wrote:
В команде UO.MoveItem использовать стопку как приемный контейнер. Тогда новая вещь "прикучкуется".

Вообще, посмотри как это реализовано в моих скриптах, топик "Наследство от Эдреда". Например, в этом скрипте:

Code:
#####################################################################
sub AutoMove()
; Автоматическое перекладывание предметов одного типа и цвета из одного
; контейнера в другой. Поддержка двух режимов - драга на стопку и драга
; на контейнер.
; v.1.04b (c) Edred
   VAR MyPause = 600
   VAR Type1, Color1, s, n, SerStopka, SumCol = 0
   UO.Print( 'Select sending container' )
   UO.Exec('addobject TmpCont1')
   While UO.Targeting()
      Wait(100)
   Wend
   UO.Print( 'Select targeting container' )
   UO.Exec('addobject TmpCont2')
   While UO.Targeting()
      Wait(100)
   Wend
   UO.Print( 'Select type for move' )
   UO.Exec('addobject TmpObj1')
   While UO.Targeting()
      Wait(100)
   Wend
   Type1 = UO.GetGraphic( 'TmpObj1' )
   Color1 = UO.GetColor( 'TmpObj1' )
   While UO.Targeting()
      Wait(100)
   Wend
   s = ''
   s = UO.asmInputString("Задайте размер порции:","500")
   If s == '' Then
      UO.Print( 'Invalid count of objects!' )
      return
   Endif
   VAR ToDo = UO.asmInputList("Выберите способ:","'Драг в стопку';'Драг на контейнер'")
   SerStopka = UO.GetSerial( 'TmpCont2' )
   n = val( s )
   If n < 0 OR n > 20000 Then
      UO.Print( 'Invalid count of objects!' )
      return
   Endif
   repeat
      If ToDo == 1 Then
         UO.FindType( Type1, Color1, 'TmpCont2' )
         If UO.FindCount() > 0 Then
            SerStopka = UO.GetSerial( 'finditem' )
         Else
            SerStopka = UO.GetSerial( 'TmpCont2' )
         Endif
      Endif
      UO.FindType( Type1, Color1, 'TmpCont1' )
      If UO.FindCount() > 0 Then
         If UO.GetQuantity( 'finditem' ) < n Then
            SumCol = SumCol + UO.GetQuantity( 'finditem' )
         Else
            SumCol = SumCol + n
         Endif
         UO.MoveItem( 'finditem', str(n), SerStopka )
         Wait( MyPause )
         CheckLag()
         UO.Print( 'I moved ' + str(SumCol) + ' items' )
      Else
         UO.Print( 'Automove finished' )
         Return
      Endif
   until False
endsub


у парня первый пост, и наверно он даже не смыслит ничего а ты ему такой скрипт на голову.


Top
   
 Post subject:
PostPosted: 2006-05-01 23:23:23 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Дык берет этот скрипт и использует. Он очень удобный и ничего в нем править не надо. Единственное - скрипт требует АСМ, но любой версии.


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 1 guest


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