Code: VAR sunduk = 'тут серийник' VAR bint = '0x0E21' VAR kolvo = 50 VAR reg1 = '0x0F7A' VAR reg2 = '0x0F88'
sub strelkaheal() ;VAR MyShield = UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) VAR UOTIMEs = 0 while not uo.dead() repeat uo.deletejournal() IF UO.COUNT( reg1 ) == 0 THEN UO.FindType( reg1, -1, Sunduk ) If UO.FindCount() == 0 Then UO.Print("REG1 not found, script terminated") return Endif UO.Grab( Str( Kolvo ), 'finditem' ) wait(500) while UO.Count( reg1 ) < Kolvo wait( 200 ) wend ENDIF IF UO.COUNT( reg2 ) == 0 THEN UO.FindType( reg2, -1, Sunduk ) If UO.FindCount() == 0 Then UO.Print("REG2 not found, script terminated") return Endif UO.Grab( Str( Kolvo ), 'finditem' ) wait(500) while UO.Count( reg2 ) < Kolvo wait( 200 ) wend ENDIF UO.WaitTargetSelf() UO.Exec("cast 'Magic Arrow'") repeat wait( 200 ) UOTIMEs = UOTIMEs + 1 until uo.injournal('The spell fizzles.') or (UOTIMEs > 20) or uo.injournal('You feel') or uo.injournal('You lack') or uo.injournal('You parry') wait( 200 ) until not uo.injournal('The spell fizzles.') UOTIMEs = 0 wait( 200 ) If uo.Life < 99 then repeat IF UO.COUNT( bint ) == 0 THEN UO.FindType( bint, -1, Sunduk ) If UO.FindCount() == 0 Then UO.Print("BINT not found, script terminated") return Endif UO.Grab( Str( Kolvo ), 'finditem' ) wait(500) while UO.Count( bint ) < Kolvo wait( 200 ) wend ENDIF uo.deletejournal() repeat UO.Exec('bandageself') repeat wait( 200 ) until uo.injournal('bloody band') or uo.injournal('but they barely') or uo.injournal('Вы хотите') wait( 200 ) until not uo.injournal('bloody band') or not uo.injournal('but they barely') or not uo.injournal('Вы хотите') wait( 200 ) until uo.Life == uo.str endif wait( 200 ) ;uo.Equipt('Lhand', MyShield) If UO.Mana < 6 Then repeat UO.UseSkill( 'Meditation' ) wait(2500) until UO.Mana == UO.Int Endif wait( 200 ) wend endsub
можете сказать тута есть ошибки или нет? чар иногда перестает брать чтолибо с сундука... =(
|