Yoko

All sides of Injection
It is currently 2025-12-29 22:27:08

All times are UTC+02:00




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 2005-06-04 18:00:24 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Update:
ver 1.01
Добавил проверку на кол-во сфизлившихся ингов, по совету Distruction`a. В последствии, отпала нужда в разгрузе остатка ингов.

Скрипт берет инги из контейнера, крафтит фул армор со щитом. Затем складываем армор в мешок, и скидываем мешок в контейнер с ингами.
Крафтит до тех пор, пока есть достаточно ингов на фул арм.
Настройки:
VAR ArmBag - тип мешков, которые лежат в паке чара.
VAR IngotsNeed - кол-во ингов, требуемое на крафт.

Code:
;|            |--------------------|
;|            | Full Armor Crafter |                     
;|------------| ver 1.02           |-------->
;|            | crafted by Flake   |
;|            |--------------------|


sub CraftFullArmor()

VAR IngotsNeed = '118'    ; Кол-во ингов, требуемое на крафт.
VAR ArmBag = '0x0E76'   ; Тип мешков под арм
VAR IngotsType, IngotsColor, ArmBagSer, QuantBefore, QuantFizzl, AddIngots, k, a, c

Dim Choise[7]
Choise[1] = "'Armor' 'Shields'  'Shields'  'Heater Shield'"
Choise[2] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Gorget'"
Choise[3] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Gauntlets'"
Choise[4] = "'Armor' 'Plate Mail' 'Plate Mail' 'Plate Helm'"
Choise[5] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Arms'"
Choise[6] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Legs'"
Choise[7] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail'"
 
Dim ArmPart[7]
ArmPart[1] = 0x1415 ;Platemail
ArmPart[2] = 0x1411 ;PlatemailLegs
ArmPart[3] = 0x1410 ;PlatemailArms
ArmPart[4] = 0x1414 ;PlatemailGauntlets
ArmPart[5] = 0x1412 ;PlatemailHelm
ArmPart[6] = 0x1413 ;PlatemailHelm
ArmPart[7] = 0x1B76 ;Heater

 UO.Print( 'Укажите контейнер с ингами!' )
 UO.Exec('addobject CraftBox')
   While UO.Targeting()
     Wait(100)
   Wend

 UO.Print( 'Укажите Инги для крафта!' )
 UO.Exec('addobject Ingots')
   While UO.Targeting()
     Wait(100)
   Wend

    IngotsType = UO.GetGraphic( 'Ingots' )
     IngotsColor = UO.GetColor( 'Ingots' )
   
 
   
 UO.FindType( IngotsType, IngotsColor, 'CraftBox' )
  While UO.GetQuantity( 'finditem' ) > IngotsNeed
    UO.Grab( IngotsNeed,  'finditem' )
     CheckLag()

         ;------------- Крафтим------------
     For c=1 To 7 
      Craft:
     UO.FindType( IngotsType )
       QuantBefore = UO.GetQuantity( 'finditem' )
        UO.DeleteJournal()
        UO.Exec('waitmenu '+Choise[c])
        UO.UseType( IngotsType )
         k = 0
             While NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 30 )             
           k = k + 1   
           Wait(500)
           Wend
             If UO.InJournal('fail') Then
         ;----- Физл! Добовляем нужное кол-во инго и повторяем крафт. ------
         UO.FindType( IngotsType )
           QuantFizzl = UO.GetQuantity( 'finditem' )
           AddIngots = QuantBefore - QuantFizzl
             UO.FindType( IngotsType, IngotsColor, 'CraftBox' )
           If UO.GetQuantity( 'finditem' ) > AddIngots Then
          UO.Grab( AddIngots, 'finditem' )
          CheckLag()
                   GoTo Craft
           Else
          UO.Print( 'Не достаточно ингов, завершаем крафт!' )
          UO.Exec( 'terminate CraftFullArmor' )
           EndIf         
             EndIf
     Next

               ;-----Сгружаем Арм в мешок, а затем кидаем мешок в сундук
     UO.FindType( ArmBag )
     ArmBagSer = UO.GetSerial( 'finditem' )
      For a=1 To 7
         UO.FindType( ArmPart[a] )
               If UO.FindCount() > 0 then
               UO.MoveItem( 'finditem', -1, ArmBagSer )
               CheckLag()
             EndIf
        Next
     UO.MoveItem( ArmBagSer, -1, 'CraftBox' )
     CheckLag()
     UO.FindType( IngotsType, IngotsColor, 'CraftBox' )
  Wend
end sub




Старая версия:
Настройки:
VAR ArmBag - тип мешков, которые лежат в паке чара
VAR IngotsNeed - Кол-во ингов, требуемое на крафт, с учетов физлов. Подбирать под свой скил в соответсвии с матом, из которого крафтим(если собираемся крафтить арм из выхи, то стоит поставить побольше. Если же низкий арм, то 160 хватает).

Запускаем скрипт. Указываем прицелом на контейнер с ингами, затем на сами инги.

З.Ы. Некоторые элементы позаимствовал из скрипта Distruction`a.


Code:
;|            |--------------------|
;|            | Full Armor Crafter |                     
;|------------| ver 1.00           |-------->
;|            | crafted by Flake   |
;|            |--------------------|
sub CraftFullArmor()

VAR IngotsNeed = '160'    ; Кол-во ингов, требуемое на крафт, с учетов физлов.
VAR ArmBag = '0x0E76'   ; Тип мешков под арм
VAR IngotsType, IngotsColor, ArmBagSer, k, a, c

Dim Choise[7]
Choise[1] = "'Armor' 'Shields'  'Shields'  'Heater Shield'"
Choise[2] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Gorget'"
Choise[3] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Gauntlets'"
Choise[4] = "'Armor' 'Plate Mail' 'Plate Mail' 'Plate Helm'"
Choise[5] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Arms'"
Choise[6] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail Legs'"
Choise[7] = "'Armor' 'Plate Mail' 'Plate Mail' 'Platemail'"
 
Dim ArmPart[7]
ArmPart[1] = 0x1415 ;Platemail
ArmPart[2] = 0x1411 ;PlatemailLegs
ArmPart[3] = 0x1410 ;PlatemailArms
ArmPart[4] = 0x1414 ;PlatemailGauntlets
ArmPart[5] = 0x1412 ;PlatemailHelm
ArmPart[6] = 0x1413 ;PlatemailHelm
ArmPart[7] = 0x1B76 ;Heater

 UO.Print( 'Укажите контейнер с ингами!' )
 UO.Exec('addobject CraftBox')
   While UO.Targeting()
     Wait(100)
   Wend

 UO.Print( 'Укажите Инги для крафта!' )
 UO.Exec('addobject Ingots')
   While UO.Targeting()
     Wait(100)
   Wend

    IngotsType = UO.GetGraphic( 'Ingots' )
     IngotsColor = UO.GetColor( 'Ingots' )
   
 
   
 UO.FindType( IngotsType, IngotsColor, 'CraftBox' )
  While UO.GetQuantity( 'finditem' ) > IngotsNeed
    UO.Grab( IngotsNeed,  'finditem' )
     CheckLag()

         ;------------- Крафтим------------
     For c=1 To 7   
      Craft:
        UO.DeleteJournal()
        ;UO.WaitMenu(Choise[c])
        UO.Exec('waitmenu '+Choise[c])
        UO.UseType( IngotsType )
         k = 0
             While NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 30 )             
           k = k + 1   
           Wait(500)
           Wend
             If UO.InJournal('fail') Then
               GoTo Craft
             EndIf
     Next

           ;----Скинем остаток ингов обратно в сундук ------     
     UO.FindType( IngotsType, IngotsColor )
         If UO.FindCount() > 0 Then
           UO.MoveItem( 'finditem', -1, 'CraftBox' )
            CheckLag()
       EndIf

           ;-----Сгружаем Арм в мешок, а затем кидаем мешок в сундук
     UO.FindType( ArmBag )
     ArmBagSer = UO.GetSerial( 'finditem' )
      For a=1 To 7
         UO.FindType( ArmPart[a] )
               If UO.FindCount() > 0 then
               UO.MoveItem( 'finditem', -1, ArmBagSer )
               CheckLag()
             EndIf
        Next
     UO.MoveItem( ArmBagSer, -1, 'CraftBox' )
     CheckLag()
     UO.FindType( IngotsType, IngotsColor, 'CraftBox' )
  Wend
end sub


Last edited by flake on 2005-06-10 13:29:18, edited 1 time in total.

Top
   
PostPosted: 2005-06-07 11:42:49 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
flake wrote:
VAR IngotsNeed - Кол-во ингов, требуемое на крафт, с учетов физлов.

:?

Нехорошо, ИМХО.

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2005-06-07 11:54:22 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
А что именно не хорошо?


Top
   
 Post subject:
PostPosted: 2005-06-07 17:27:13 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
flake wrote:
А что именно не хорошо?

Надо чтобы в случае физла - через гетквонти высчитывать скока физланул и брать еще, а ты как пишешь, надо брать столько, сколько надо с учетом, что как физланешь, так и не повезет. :evil:

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2005-06-07 17:36:34 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Может потом приделаю проверку.
У меня скрипт еще ни разу не сбивался из-за этого.
Физлов слишком много не бывает, насколько я заметил.


Top
   
 Post subject:
PostPosted: 2005-06-07 20:58:11 
Offline
User avatar

Joined: 2004-04-06 16:42:51
Posts: 22
Ммм, ну физлы это дело рандомное :) Вот начну в уо играться, авось тож напишу скрипт для кования фулов, или этот переделаю :)


Top
   
 Post subject:
PostPosted: 2005-06-07 22:13:22 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
У мну тоже был скрипт... Афигенный прям, даже не сбивался почти :))

Понимаешь, иногда это важно, я перковал 50к каждого метала нах в горгетки на своем... Заепся с физлами.

ЗЫ: Переписывай :!: 8)

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2005-06-09 13:20:39 
Offline

Joined: 2005-05-17 14:25:57
Posts: 3
Блин.. на дрв этот скритик чет не пашет.. В меню кидает и усё. Пытался меню заемнить и т д , несмог чет. Эх..


Top
   
 Post subject:
PostPosted: 2005-06-09 14:01:34 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
А каким образом у вас вызывается меню БСа?
У нас, как видно в скрипте, просто нужно дабл-кликнуть на инги (находясь у форжи и держа в руках молоточек).

Если так же, то проблема может быть только в менюшках.


Top
   
 Post subject:
PostPosted: 2005-06-09 14:15:01 
Offline

Joined: 2005-05-17 14:25:57
Posts: 3
Мм.. В том то и проблема , что менюшки то подходят под скрипт.. Но при загрузке скрипта , просто появл. меню и стоит , ниче крафтить не хочет.. Вот такая вот поршивая проблема. :cry:


Top
   
 Post subject:
PostPosted: 2005-06-09 14:37:14 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Так перепиши менюшки под себя, и все.


Top
   
 Post subject:
PostPosted: 2005-06-10 13:31:14 
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  [ 12 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 6 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