Yoko

All sides of Injection
It is currently 2026-01-18 13:26:25

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2005-04-20 11:21:07 
Offline

Joined: 2005-04-04 20:45:29
Posts: 25
Он чёт у меня останавлевается посьле того как сделал несколько реколов!
Code:

#####################################################################
; Inscription2. v.1.05b (c) Edred
;
; Áåðåì èç ñóíäóêà blank scroll, blood pearl, black moss, mandrake root
; êðàôòèì èç íèõ ñêðîëë Recall (ñ ïîâòîðàìè â ñëó÷àå ôèçëîâ),
; ïîòîì ñêèäûâàåì ãîòîâûé ñêðîëë â òîò æå ñóíäóê.
; Åñëè ÷òî-ëèáî êîí÷èëîñü - âûõîä.

sub inscript2()
   VAR Sunduk = '0x40017C34'       ; Ñåðèàë ñóíäóêà ñ áëàíêñêðîëëàìè è ðåãàìè
   VAR Blank = '0x0E34'          ; Òèï áëàíê ñêðîëëà
   VAR Arrow = '0x1F4C'         ; Òèï ñêðîëëîâ Recall
   VAR Reg1 = '0x0F86'            ; mandrake root
   VAR Reg2 = '0x0F7A'            ; black pearl
   VAR Reg3 = '0x0F7B'            ; blood moss
   VAR Fizzle = 'You fail to inscribe the scroll'
   VAR Success = 'You put the'
   VAR k
;      UO.SetGlobal( 'TimeProcess', str( UO.Timer() ) )
   UO.CancelMenu()
   UO.AutoMenu( 'Spell Circles', 'Fourth Circle' )
   UO.AutoMenu( 'Spell Circle 4', 'Recall' )
   UO.UseObject( Sunduk )
   wait(1000)
   While UO.SkillVal( 'Inscription' ) < 1000
      ; áåðåì áëàíê ñêðîëëû
;      EatChar( Sunduk, 2, 1, 120 )
      If UO.Count( Blank ) == 0 Then
         UO.FindType( Blank, -1, Sunduk )
         If UO.FindCount() == 0 Then
            UO.Print( 'Blank Scroll not found. Script terminated' )
            return
         Endif
         If UO.GetQuantity( 'finditem' ) < 100 Then
            UO.Grab( '0', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Blank ) > 0
            CheckLag()
         Else
            UO.Grab( '100', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Blank ) == 100
            CheckLag()
         Endif
      Endif
      ; áåðåì mandrake root
      If UO.Count( Reg1 ) == 0 Then
         UO.FindType( Reg1, -1, Sunduk )
         If UO.FindCount() == 0 Then
            UO.Print( 'Mandrake Root not found. Script terminated' )
            return
         Endif
         If UO.GetQuantity( 'finditem' ) < 100 Then
            UO.Grab( '0', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Reg1 ) > 0
            CheckLag()
         Else
            UO.Grab( '100', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Reg1 ) == 100
            CheckLag()
         Endif
      Endif
      ; áåðåì black pearl
      If UO.Count( Reg2 ) == 0 Then
         UO.FindType( Reg2, -1, Sunduk )
         If UO.FindCount() == 0 Then
            UO.Print( 'Black Pearls not found. Script terminated' )
            return
         Endif
         If UO.GetQuantity( 'finditem' ) < 100 Then
            UO.Grab( '0', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Reg2 ) > 0
            CheckLag()
         Else
            UO.Grab( '100', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Reg2 ) == 100
            CheckLag()
         Endif
      Endif
      ; áåðåì blood moss
      If UO.Count( Reg3 ) == 0 Then
         UO.FindType( Reg3, -1, Sunduk )
         If UO.FindCount() == 0 Then
            UO.Print( 'Blood Moss not found. Script terminated' )
            return
         Endif
         If UO.GetQuantity( 'finditem' ) < 100 Then
            UO.Grab( '0', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Reg3 ) > 0
            CheckLag()
         Else
            UO.Grab( '100', 'finditem' )
            repeat
               wait(100)
            until UO.Count( Reg3 ) == 100
            CheckLag()
         Endif
      Endif
      repeat
         DeleteJournal( Fizzle )
         DeleteJournal( Success )
         UO.UseType( Blank )
         k = 0
         repeat
            k = k + 1
            wait(100)
         until UO.InJournal( Fizzle ) OR UO.InJournal( Success ) OR UO.Count( Blank ) == 0 OR UO.Count( Reg1 ) == 0 OR UO.Count( Reg2 ) == 0 OR k > 600
         If UO.Mana < 10 Then
            repeat
               UO.UseSkill( 'Meditation' )
               wait(2000)
            until UO.Mana == UO.Int
         Endif
      Until UO.Count( Blank ) == 0 OR UO.Count( Reg1 ) == 0 OR UO.Count( Reg2 ) == 0
      While UO.Count( Arrow ) > 0
         UO.FindType( Arrow )
         If UO.FindCount() > 0 Then
            UO.MoveItem( 'finditem', 0, Sunduk )
            wait(1000)
            CheckLag()
         Endif
      Wend
   Wend
   UO.CancelMenu()
endsub

#####################################################################
Sub CheckLag()
   DeleteJournal( 'backpack' )
   UO.Click( 'backpack' )
   repeat
      wait(100)
   until UO.InJournal( 'backpack' )
   return
end sub

#####################################################################
Sub DeleteJournal( string1 )
   VAR nom = UO.InJournal( string1 )
   If nom > 0 Then
      UO.SetJournalLine( Nom - 1, 'string replaced' )
      DeleteJournal( string1 )
   Endif
endsub



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

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:  
Powered by phpBB® Forum Software © phpBB Limited