Page 1 of 1

Скрипт на хавчик сбивается при лагах.

Posted: 2004-12-11 13:50:45
by Balu
короче сбивается скрипт при лагах, когда чар берёт еду или кладёт обратно в сундук. Такое впечатление, что хавчик не успевает падать в пак и он начинает другое действие которое сбивает таргет! подскажите куда вставить задержку ли проверку на лаги?



Code: Select all

sub ToEat() 
uo.SetReceivingContainer('backpack')
uo.FindType(TypeFood,'-1',Chest)
uo.Grab('50','finditem')
wait(500)
repeat
uo.UseType(TypeFood)
wait(1000)
until uo.InJournal('You are simply too full to eat any more!')
uo.UnsetReceivingContainer()
end sub

sub DropFood()
if uo.Waiting() then
uo.CancelTarget()
end if
var f,Exit
dim Food[1]
Food[0]=TypeFood
uo.SetReceivingContainer(Chest)
wait(500)
for f=0 to 0
Exit=0
repeat
uo.FindType(Food[f])
if uo.GetQuantity('finditem')>0 then
uo.Grab('0','finditem')
wait(1500)
else
Exit=1
end if
until Exit==1
next
uo.UnSetReceivingContainer(Chest)
end sub

Posted: 2004-12-11 13:54:49
by BETEPAH
Добавь в скрипт перед дропом и Юзом хавки Саваджевский Чеклаг


Code: Select all

 

sub ToEat()
uo.SetReceivingContainer('backpack')
uo.FindType(TypeFood,'-1',Chest)
uo.Grab('50','finditem')
wait(500)
repeat
uo.UseType(TypeFood)
CheckLag()
wait(1000)
until uo.InJournal('You are simply too full to eat any more!')
uo.UnsetReceivingContainer()
end sub

sub DropFood()
if uo.Waiting() then
uo.CancelTarget()
end if
var f,Exit
dim Food[1]
Food[0]=TypeFood
uo.SetReceivingContainer(Chest)
wait(500)
for f=0 to 0
Exit=0
repeat
uo.FindType(Food[f])
CheckLag()
if uo.GetQuantity('finditem')>0 then
uo.Grab('0','finditem')
wait(1500)
else
Exit=1
end if
until Exit==1
next
uo.UnSetReceivingContainer(Chest)
end sub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub