Yoko

All sides of Injection
It is currently 2024-03-28 11:02:47

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2006-08-19 09:20:31 
Offline
User avatar

Joined: 2006-08-05 14:09:06
Posts: 270
За основу взят скрипт Edred на торчи.

Code:
; Bowcraft. v.1.03b (c) Edred 
sub bowcraft()
VAR Sunduk = '0x402EA196' ;ид сундука
VAR Logi = '0x1BDD' ; тип логов
VAR Torch = '0x0F64' ; тип торчей
VAR Kolvo = 1 ; сколько брать логов
VAR k = 0, j, dagger
dagger = UO.ObjAtLayer( 'Rhand' )
UO.SetGlobal( 'instrtype', UO.GetGraphic( dagger ) )
While TRUE
UO.FindType( Logi, -1, Sunduk ) ; ищем логи
If UO.FindCount() == 0 Then
UO.Print("Logs not found, script terminated")
return
else
j = UO.GetQuantity( 'finditem' )
If j > Kolvo Then
UO.Print( 'I can use ' + str( j ) + ' logs' )
else
UO.Print( "I can't use " + str( j ) + " logs" )
return
Endif
Endif
If Kolvo == 1 Then
; v. 1.03
UO.Grab( '3', 'finditem' )
wait(500)
UO.FindType( Logi )
UO.MoveItem( 'finditem', '2', Sunduk )
wait(500)
Else
UO.Grab( Str( Kolvo ), 'finditem' )
wait(500)
Endif
while UO.Count( Logi ) < Kolvo
wait(100)
wend
If CheckInstr() == 0 Then
UO.Print("You don't have daggers!" )
return
Endif
UO.DeleteJournal()
UO.CancelMenu()
UO.AutoMenu ( 'What do you want to carve','Oak Items' )
UO.AutoMenu ( 'Oak Items', 'torch (1 Oak log)' )
UO.WaitTargetType( Logi )
UO.UseObject( dagger )
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( Torch ) > 0 then
UO.FindType( Torch, -1, -1 )
UO.MoveItem( 'finditem', 0, Sunduk )
wait(500)
while UO.Count( Torch ) > 0
wait(100)
wend
UO.Print( 'Torch moved' )
Endif
Wend
end sub

Sub CheckInstr()
; проверка на наличие дагера
VAR typ = UO.GetGlobal( 'instrtype' )
VAR cur = UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) )
If typ == cur Then
return 1
Endif
UO.FindType( typ )
If UO.FindCount() == 0 Then
return 0
Endif
UO.Equip( 'RHand' , 'finditem' )
wait(1000)
return 1
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 19 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