Yoko

All sides of Injection
It is currently 2024-03-29 12:03:16

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2009-08-07 17:39:37 
Offline

Joined: 2009-08-07 17:32:20
Posts: 3
Вот столкнулся с проблемой: есть куча шафтов и перьев, а хотелось бы сделать из них стрелы... Пробовал пользоваться скриптом:

Code:
##################################################################### 
; Bowcraft2. v.1.04b (c) Edred
;
; Чар берет из сундука шафты и перья, крафтит из них стрелы и
; складывает эти стрелы в этот же сундук.
; Если шафты или перья закончились - выход.
;
sub bowcraft2()
   VAR Sunduk = '0x4044FB80'       ; Сериал сундука
   VAR Shafts = '0x1BD4'          ; Тип шафтов
   VAR Feather = '0x1BD1'         ; Тип перьев
   VAR Arrows = '0x0F3F'         ; Тип стрел
   VAR Kolvo = 1               ; Брать шафтов для одного крафта
   VAR k = 0, j
      UO.SetGlobal( 'TimeProcess', str( UO.Timer() ) )
   UO.CancelMenu()
   UO.AutoMenu ('Select arrow type', 'arrow' )
   While TRUE
      EatChar( Sunduk, 2, 1, 120 )
      If UO.Count( Shafts ) == 0 Then
         UO.FindType( Shafts, -1, Sunduk )
         If UO.FindCount() == 0 Then
            UO.Print("Shafts not found, script terminated")
            return
         Endif
         UO.Grab( Str( Kolvo ), 'finditem' )
         wait(500)
         while UO.Count( Shafts ) < Kolvo
            wait(100)
         wend
         CheckLag()
      Endif
      If UO.Count( Feather ) == 0 Then       
         UO.FindType( Feather, -1, Sunduk )
         If UO.FindCount() == 0 Then
            UO.Print("Feather not found, script terminated")
            return
         Endif
         UO.Grab( Str( Kolvo ), 'finditem' )
         wait(500)
         while UO.Count( Feather ) < Kolvo
            wait(100)
         wend
         CheckLag()
      Endif
      UO.DeleteJournal()
      UO.UseType( Shafts )
      k = 0
      while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 50 )
         k = k + 1
         wait(300)
      wend
      If UO.Count( Arrows ) > 0 then
         UO.FindType( Arrows, -1, -1 )
         UO.MoveItem( 'finditem', 0, Sunduk )
         wait(500)
         while UO.Count( Arrows ) > 0
            wait(100)
         wend
         UO.Print( 'Arrows moved' )
      Endif
   Wend
end sub

Естественно все значения (ИД сундука, тип шафтов и проч) подправил, но вот проблема, выдает ошибку:
Line 100 function not found - EATCHAR
Помоги нубу =) Скажите, как дописать этот скрипт или дайте новый (поиск юзал!). Прошу учесть, что в скриптостроении я полный 0, поэтому, если поправите это скрипт, то дайте пожалуйста код и фрагмент, куда его вписывать. Заранее спс.


Top
   
 Post subject:
PostPosted: 2009-08-07 17:41:12 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Удали эту строку

Code:
      EatChar( Sunduk, 2, 1, 120 )


либо найди на форуме одноимённый скрипт и вставь в том же файле ниже.


Top
   
 Post subject:
PostPosted: 2009-08-07 17:54:32 
Offline

Joined: 2009-08-07 17:32:20
Posts: 3
Удалил. Тогда делает от 0 до 2 стрел и пишет одну из двух ошибок:
Line 124 function not found - CHECKLAG
Line 111 function not found - CHECKLAG


Top
   
 Post subject:
PostPosted: 2009-08-07 18:28:06 
Offline

Joined: 2009-08-07 17:32:20
Posts: 3
Не поверите! Просто удалил строки 111 и 124 и вуаля... работает!


Top
   
 Post subject:
PostPosted: 2009-08-07 19:09:25 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Трудно поверить :lol:

PS без чеклагов может глючить. Не все лучше удалять :roll:

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject:
PostPosted: 2009-08-07 23:54:22 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
VAR Chest='0x4033008D' ; ИД сундука где все
VAR TFeather='0x1BD1'
VAR TArrow='0x0F3F'
VAR TShaft='0x1BD4' ; Тип шафтов
sub Bowcrafting_arrows()
   uo.useobject(Chest)
   wait(200)
   while 1
     uo.findtype(TShaft,-1,Chest)
     if uo.findcount() then
       uo.moveitem('finditem',1,'backpack')
     else
       return
    endif
     wait(300)
     uo.findtype(TFeather,-1,Chest)
     if uo.findcount() then
       uo.moveitem('finditem',1,'backpack')
     else
       return
     endif
     wait(300)
     uo.usetype(TFeather)
     uo.waitmenu('Select arrow type','arrow')
     wait(3100)
     uo.findtype(TArrow,-1,'backpack')
     if uo.getquantity('finditem')>25 then
       uo.moveitem('finditem',0,Chest)
       wait(1000)
     endif
   wend
end sub

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
PostPosted: 2015-05-10 08:34:16 
Offline
User avatar

Joined: 2006-05-23 08:24:24
Posts: 58
Location: Moldova
Можна узнати пачиму всиоранво он делаит все стрелы сразу, мне нада штоб он делал по аднои


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

All times are UTC+02:00


Who is online

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