Code:
sub Poison()
VAR Exit=0, LastTimer, TryToPoison
while Exit<>1
UO.DeleteJournal()
UO.FindType('0x0F0E',-1,'backpack') ; bottle
If UO.GetQuantity('finditem')<10 then
UO.FindType('0x0F0E','0x0000','0x4015CFAE') ; bottle, container
wait(1000)
UO.Grab('300','finditem')
wait(100)
Endif
UO.FindType('0x0F88','0x0000','backpack') ; NS
If UO.GetQuantity('finditem')<20 then
UO.FindType('0x0F88','0x0000','0x4015CFAE'); NS, container
wait(1000)
UO.Grab('600','finditem')
wait(500)
Endif
LastTimer=UO.Timer()
UO.WaitMenu('What','(2)') ; menu
UO.UseType('0x0F88') ; NightShade
while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(500)
wend
If UO.InJournal("You put") then
wait(1000)
UO.FindType('','0x0000','0x4015CFAE') # вставить тип пойзонa
UO.MoveItem('finditem','-1','0x4015CFAE')
end if
wend
end sub