Yoko

All sides of Injection
It is currently 2025-11-06 05:02:04

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2005-07-10 13:13:31 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Скрипт просит указать контейнер с регами и бутылками.
Затем он поочередно ищит реги 5 видов, и крафтит соответствующии поушены (тотал мана, тотал стама, гх, гк и шринки).
Писался под Цитадель.

Code:
;      |----------------------|
;      |Auto Alchemy Crafter  |   
;------|ver 2.00              |------>
;      |crafted by Flake      |
;      |----------------------|

sub Alchemy_AutoCraft()

VAR Ammount, a, k
VAR Bottle = '0x0F0E'
 
Dim Reg[5] ; Реги на крафт
Reg[1] = 0x0F87  ; Глазки - тотал мана
Reg[2] = 0x0F78  ; Крылья - шринк
Reg[3] = 0x0F84  ; Гарлик - греат кюр
Reg[4] = 0x0F85  ; Гинсег - греат хил
Reg[5] = 0x0F7A  ;   БП   - тотал рефреш

Dim RFB[5]   ; Кол-во регов на 20 бутылок
RFB[1] = 120
RFB[2] = 80
RFB[3] = 120
RFB[4] = 140
RFB[5] = 100

Dim FBottle[5] ; Тип пполных бутылок
FBottle[1] = 0x0F09
FBottle[2] = 0x0F06
FBottle[3] = 0x0F07
FBottle[4] = 0x0F0C
FBottle[5] = 0x0F0B

Dim Path[5]  ; Выбор WaitMenu
Path[1] = "'What' 'total mana refresh'"
Path[2] = "'What' 'shrink'"
Path[3] = "'What' 'greater cure'"
Path[4] = "'What' 'greater heal'"
Path[5] = "'What' 'total refresh'"
 
  UO.Print( 'Укажите Крафт-Сундук!' )
  UO.Exec('addobject CraftBox')
    While UO.Targeting()
       Wait(100)
    Wend

  For a = 1 To 5
    UO.FindType( Reg[a], -1, 'CraftBox' )
      If UO.FindCount() > 0 Then
         While UO.GetQuantity('finditem') > RFB[a]
       UO.Grab( str(RFB[a]), 'finditem' )
       CheckLag()
       UO.FindType( Bottle, -1, 'CraftBox' )
         If UO.GetQuantity( 'finditem' ) > 20 Then
          UO.Grab( '20', 'finditem' )
      CheckLag()
                             
              UO.FindType( Reg[a] )
          While UO.GetQuantity( 'finditem' ) > (RFB[a] / 20) 
        UO.DeleteJournal()
        UO.Exec( 'waitmenu '+Path[a] )
                  UO.UseType( Reg[a] )
                  k = 0
               While NOT UO.InJournal( 'You put' ) AND NOT UO.InJournal( 'fail' ) AND ( k < 30 )
                 Wait(500)
                 k = k + 1
               Wend
                 Wend

         Else         
      UO.Exec( 'terminate Alchemy_AutoCraft' )
         EndIf
      
       UO.FindType( Reg[a], -1, 'CraftBox' )
          Wend
             ;----- Сбросим полные бутылки и остатоки в сундук.
            
                  UO.FindType( FBottle[a] )
            If UO.FindCount() > 0 Then
         UO.MoveItem( 'finditem', -1, 'CraftBox' )
         CheckLag()
                   EndIf
            UO.FindType( Reg[a] )
              If UO.FindCount() > 0 Then
         UO.MoveItem( 'finditem', -1, 'CraftBox' )
         CheckLag()
                    EndIf
             UO.FindType( Bottle )
               If UO.FindCount() > 0 Then
         UO.MoveItem( 'finditem', -1, 'CraftBox' )
         CheckLag()
                    EndIf
        EndIf
      
        EndIf
      EndIf
  Next
end sub


Top
   
 Post subject:
PostPosted: 2005-07-10 13:26:08 
Offline
User avatar

Joined: 2005-06-19 19:21:28
Posts: 159
а можно ли сделать, чтобы еще крафтил бутылки есликончились?


Top
   
 Post subject:
PostPosted: 2005-07-10 13:30:33 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Доделывайте под себя сами.
Я именно для поушенов писал.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB® Forum Software © phpBB Limited