var cont='0x4003D4C0'
var ns='0x0F88'
var bottle='0x0F0E'
var colorpoison='0x0998'
var dagger='0x402348CE'
sub main()
uo.cancelmenu()
uo.automenu('What sort of potion do you want to','(last)')
uo.useobject(cont)
wait(500)
while not uo.dead()
checkns()
checkbottles()
alchemypoison()
poisondagger()
wend
endsub
Sub checkns()
uo.findtype(ns,'-1','backpack')
if uo.getquantity('finditem')<=10 then
uo.findtype(ns,'-1',cont)
if uo.findcount() then
uo.moveitem('finditem','100','backpack')
wait(500)
endif
endif
endsub
Sub checkbottles()
uo.findtype(bottle,'0x0000','backpack')
if uo.getquantity('finditem')<=10 then
uo.findtype(bottle,'-1',cont)
if uo.findcount() then
uo.moveitem('finditem','100','backpack')
wait(500)
endif
endif
endsub
Sub alchemypoison()
uo.deletejournal()
uo.usetype(ns)
repeat
Wait(50)
until UO.InJournal("You put the") OR UO.InJournal("You toss the failed")
endsub
Sub poisondagger()
UO.FindType(bottle,colorpoison,'backpack')
if uo.findcount() then
uo.deletejournal()
uo.waittargetobject(dagger,'finditem')
uo.useskill('Poisoning')
repeat
wait(50)
until UO.InJournal("You fail to apply") OR UO.InJournal("You apply the poison")
endif
end sub
Помогите разобраться... Почему скрипт работает не стабильно. Т.е. когда реги заканчиваются, он добирает их и не варит... Если кликнуть но нсу 2 раза - начинает дальше варить - снова добирает регов и встает скрипт.
var cont='0x4003D4C0'
var ns='0x0F88'
var bottle='0x0F0E'
var colorpoison='0x0998'
var dagger='0x402348CE'
var msg = 'put the|toss the failed'
var msg2 = 'You fail to apply|You apply the poison'
var LastTimer
sub main()
uo.cancelmenu()
uo.automenu('What sort of potion do you want to','(last)')
uo.useobject(cont)
wait(500)
while not uo.dead()
checkns()
checkbottles()
alchemypoison()
poisondagger()
wend
endsub
Sub checkns()
if uo.count(ns)<=10 then ; если в паке меньше или равно 10 регов - добираем
uo.findtype(ns,'-1',cont)
if uo.findcount() then
uo.moveitem('finditem','100','backpack')
wait(500)
endif
endif
endsub
Sub checkbottles()
if uo.count(bottle)<1 then ; если в паке меньше 1 бутылки - добираем
uo.findtype(bottle,'-1',cont)
if uo.findcount() then
uo.moveitem('finditem','100','backpack')
wait(500)
endif
endif
endsub
Sub alchemypoison()
UO.DeleteJournal()
LastTimer=UO.Timer()
uo.usetype(ns)
repeat
wait(100)
until UO.InJournal( msg ) or UO.Timer()>LastTimer+300
endsub
Sub poisondagger()
UO.FindType(bottle,colorpoison,'backpack')
if uo.findcount() then
uo.deletejournal()
LastTimer=UO.Timer()
uo.waittargetobject(dagger,'finditem')
uo.useskill('Poisoning')
repeat
wait(100)
until UO.InJournal(msg2) or UO.Timer()>LastTimer+300
endif
end sub
Last edited by Mirage on 2011-04-18 16:14:08, edited 2 times in total.
Поправил сообщение.
Проверь на своем шарде тип пустой бутылки и тип бутылки с ядом. Если у тебя они одинаковые (по скрипту судя одинаковые) значит должно работать.
Либо добавляй
var poison ='0x0F0A'
и исправляй
Sub poisondagger()
UO.FindType(poison,colorpoison,'backpack') ; <----poison вместо bottle
Sub alchemypoison()
UO.DeleteJournal()
LastTimer=UO.Timer()
uo.usetype(ns)
repeat
wait(100)
until UO.InJournal( msg ) or UO.Timer()>LastTimer+110
endsub
uo.automenu('What sort of potion do you want to','(last)')
варит последнее в меню зелье
легкий яд|яд|сильный яд|смертельный яд
тебе нужно либо first либо 1 ставить вместо last