Code
sub Poison()
var exit=0,LastTimer
var BottleType='0x0F0E' ## - Тип бутылок.
var RegType='0x0F88' ## - Тип регов.
var Chest='0x400042FC' ## - ID сундука.
var dagger='0x4000524B' ## - ID даггера
var TryToPoison=1
while exit<>1
uo.DeleteJournal()
uo.FindType(BottleType,-1,'backpack')
if uo.GetQuantity('finditem')<10 then
uo.FindType(BottleType,'0x0000',Chest)
wait(1000)
uo.Grab('500','finditem')
wait(100)
end if
uo.FindType(RegType,'0x0000','backpack')
if uo.GetQuantity('finditem')<20 then
uo.FindType(RegType,'0x0000',Chest)
wait(1000)
uo.Grab('1000','finditem')
wait(500)
end if
LastTimer=uo.Timer()
uo.WaitMenu('What','(last)')
uo.UseType(RegType)
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
if TryToPoison==1 then
repeat
uo.FindType('0x0F0E','0x0998','my')
if uo.GetQuantity('finditem')>0 then
uo.UseSkill('Poisoning')
uo.WaitTargetObject(dagger,'finditem')
wait(4000)
else
end if
end if
end if
uo.UseSkill('Spirit Speak')
wait(3000)
wend
end sub