Code: Select all
sub Alchemy()
VAR Sunduk=0x40869B5A ;ID Сундука
VAR Dagger=0x40F0937F ;ID Оружия которое травим
VAR Exit=0, LastTimer, TryToPoison
while Exit<>1
UO.DeleteJournal()
UO.FindType('0x0F0E',-1,'backpack') ;
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x0F0E','0x0000',Sunduk)
wait(1000)
UO.Grab('300','finditem')
wait(1000)
Endif
UO.FindType('0x0F88','0x0000','backpack')
If UO.GetQuantity('finditem')<20 then
UO.FindType('0x0F88','0x0000',Sunduk)
wait(1000)
UO.Grab('1000','finditem')
wait(6000)
Endif
LastTimer=UO.Timer()
UO.WaitMenu('What','(2)') ; (1) Lesser Poison (2)Poison (3) Great Poison
UO.UseType(0x0F88)
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(500)
wend
If UO.InJournal("You toss the failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer+100
Else
TryToPoison=1
repeat
UO.FindType('0x0F0A','0x0000','my')
If UO.GetQuantity('finditem')>0 then
UO.WaitTargetObject(dagger,'finditem')
UO.UseSkill('Poisoning')
wait(6000)
if uo.injournal('You fail')then
Healing()
end if
Else
TryToPoison=0
Endif
until TryToPoison==0
EndIf
UO.DeleteJournal()
UO.UseSkill('Spirit')
repeat
wait(100)
until uo.injournal('You establish') or uo.injournal('You fail')
wend
end sub
sub Healing()
UO.Exec("bandageself")
wait(3000)
cheklag()
end sub
sub cheklag()
uo.deletejournal()
uo.click('backpack')
repeat
wait(10)
until uo.InJournal("backpack")
end sub
sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.Exec('terminate Alchemy')
wait(1000)
UO.Exec('exec Alchemy')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub
sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub
sub tinker()
VAR Sunduk = '0x40869B5A' ; Сундук с ингами
VAR Ingi = '0x1BEF' ; тип ингов
VAR Instrum = '0x1EBC' ; тип инструмента
VAR Bottle = '0x0F0E' ; тип бутылок
VAR Kolvo = 200 ; по сколько ингов берем
VAR k = 0
While TRUE
UO.FindType( Ingi, -1, Sunduk ) ; ищем инги в сундуке
If UO.FindCount() == 0 Then
UO.Print("Iron Ingots not found, script terminated")
return
Endif
UO.Grab( Str( Kolvo ), 'finditem' )
wait( 2000 )
While UO.Count( Ingi ) > 0
; Ïîêà â ïàêå åñòü èíãè
UO.Print('Ostalos ' + Str( UO.Count( Ingi ) ) + ' ingots' )
UO.DeleteJournal()
UO.CancelMenu()
UO.WaitMenu ('Tinkering', 'Tools', 'Tools', 'empty bottle' )
UO.UseType( Instrum )
k = 0
while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 30 )
k = k + 1
wait(500)
wend
if UO.Count( Bottle ) > 0 then
UO.FindType( Bottle, -1, -1 )
UO.MoveItem( 'finditem', 0, Sunduk )
wait( 1000 )
UO.Print( 'Bottle moved' )
end if
Wend
Wend
end sub