Page 1 of 1
народ помогите плиз тут несложно но я чот не могу разобратьс
Posted: 2007-12-14 00:40:57
by twis1
sub main()
var mani
While not uo.dead()
mani=uo.mana
uo.exec("cast 'Poison' last")
While not UO.MANA < mani
wait(100)
wend
While UO.MANA < UO.INT
uo.exec("useskill 'Meditation'")
wait(3000)
wend
wend
end sub
вот
Posted: 2007-12-14 00:41:33
by twis1
вот как добавить сюда чтобы он еше кушал
Posted: 2007-12-14 19:48:20
by CuHTpoH
Ну навял тут простенький скрипт для кушания, раудуйся )) понятия не имею работает или нет, надеюсь не бажит )))
да, не забудь настроить var-Ы в eatfood()
Code: Select all
sub main()
var mani
var timeс=15 # КОЛ-ВО МИНУТ МЕЖДУ ПРИЕМОМ ПИЩИ :)
timez=timeс*60*10
While not uo.dead()
if uo.timer()>timez+timec*60*10 then
eatfood()
timez=uo.timer()
endif
mani=uo.mana
uo.exec("cast 'Poison' last")
While not UO.MANA < mani
wait(100)
wend
While UO.MANA < UO.INT
uo.exec("useskill 'Meditation'")
wait(3000)
wend
wend
endsub
sub checklag()
if uo.waiting()>0 then
uo.canceltarget()
endif
uo.deletejournal()
uo.click('backpack')
repeat
wait(50)
until uo.injournal('backpack')
endsub
sub eatfood()
var container='ground' # откуда брать еду, я указал с земли, НЕ РЕКОМЕНДУЮ есть с земли, будет много кучек с едой, лучше указать ID мешка c едой и положить его под ноги
var food_type='0x097B' # какой тип еды есть, я указал тип - жареная рыба
var fitmessage='not like to eat more' # фраза, что присылает сервер, когда чар сыт
var found
if not container=='ground' then
uo.useobject(container)
wait(2000)
checklag()
if not uo.getserial('lastobject')==container then
uo.print('нет доступа к контейнеру')
return
endif
endif
repeat
uo.findtype(food_type,-1,container)
found=uo.findcount('finditem')
if uo.findcount('finditem')>0 then
if uo.getquantity('finditem')>34 then
uo.moveitem('finditem',35)
else
uo.moveitem('finditem',0)
endif
wait(300)
checklag()
uo.deletejournal()
repeat
uo.usetype(food_type)
wait(350)
until uo.injournal(fitmessage) or uo.count(food_type)==0
if uo.injournal(fitmessage) then
uo.print('чар сыт')
endif
repeat
uo.findtype(food_type,-1,2)
if uo.findcount('finditem')>0 then
uo.moveitem('finditem',0,container)
wait(500)
endif
until uo.findcount('finditem')==0
else
uo.print('еда не найдена')
endif
until uo.injournal(fitmessage) or found==0
endsub