помогите пожалуйста, вот скрипт на закупку. Герой когда выложит всё в сундук стоит ждёт определённое время. После того как оно закончитца, он не реколитца, а начинает делать закупки у сундука.
Code:
Начинаем делать закупки!
Подскажите как сделать чтобы он реколился?
Code:
sub Start()########################################## Стартер
uo.set('buydelay','5000')
UO.Set('finddistance',9)
var n = 2
var maxN = 10
var numer = 1
var maxnumer = 1
UO.Print("Поехали по магазинам.")
wait(2000)
repeat
if uo.weight > 210 then
RunebookRecalla(1)
Loot()
endif
if CheckStam==1 then
While UO.Stamina < 60
uo.Print("Low Stamina")
wait(2000)
wend
end if
if numer == 1 then
uo.Print('Реколимся Рунбука № 1, рунка № '+str(n))
RunebookRecalla(n)
end if
n = n + 1
if n == maxN then
n = 2
numer = numer + 1
if numer == maxnumer then
numer = 1
end if
end if
BuyPRG()
until uo.dead()
end sub
Sub RunebookRecalla(n) ########################################## Бука 1
var OldX, OldY, time
OldX=uo.GetX()
OldY=uo.GetY()
repeat
uo.Exec('warmode 0')
uo.UseObject('RuneB1')
If UO.GetDistance('finditem')<=2 then
UO.Print("Закупаю....")
wait(1000)
uo.Buy(BuyListName,UO.GetName('finditem'))
wait(1000)
CheckLag()
uo.say(uo.GetName('finditem')+ " bye")
else
UO.Print(uo.GetName('finditem')+ " заныкался!, В &@$#% его.")
end if
uo.ignore('finditem')
end if
until uo.FindCount()==0
next
######################
end sub
wait(1000)
UO.UseObject('Sunduk')
wait(1000)
UO.UseObject('StoreBAG')
wait(1000)
for i=0 to 10
repeat
uo.findtype(fastloot[i],-1,'backpack')
if uo.findcount()>0 then
wait(500)
uo.ignore('finditem')
endif
until uo.findcount()==0
next
repeat
uo.findtype(-1,-1,'backpack')
uo.SetReceivingContainer('StoreBAG')
if uo.findcount()>0 then
CheckLag()
uo.grab('all','finditem')
wait(500)
endif
until uo.findcount()==0
uo.ignorereset()
uo.UnSetReceivingContainer()
UO.Print('Ждем '+str(Whtime)+ ' секунд.')
Wtime = Whtime
wait(1000)
while Wtime > 0
wait(1000)
Wtime = Wtime - 1
UO.Print('Осталось '+str(Wtime)+ ' секунд.')
wend
if Wtime == 0 then
Wtime = Whtime
end if
end sub