Yoko
http://forum.yoko.com.ua/

не выполняет как надо
http://forum.yoko.com.ua/viewtopic.php?f=20&t=17115
Page 1 of 1

Author:  dubd [ 2012-11-29 22:31:19 ]
Post subject:  не выполняет как надо

помогите пожалуйста, вот скрипт на закупку. Герой когда выложит всё в сундук стоит ждёт определённое время. После того как оно закончитца, он не реколитца, а начинает делать закупки у сундука.
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

Author:  ZeroDX [ 2012-11-29 23:18:03 ]
Post subject:  Re: не выполняет как надо

что за шард?

Author:  dubd [ 2012-11-29 23:47:13 ]
Post subject:  Re: не выполняет как надо

русский хороший

Author:  ZeroDX [ 2012-11-29 23:49:24 ]
Post subject:  Re: не выполняет как надо

попробуй запусти такое, потом попробуй свой скрипт
Code:
sub main()
    uo.set('norbcheck', '1')
    uo.set('norbcalc', '1')
endsub

Author:  dubd [ 2012-11-30 00:19:05 ]
Post subject:  Re: не выполняет как надо

блин, чет не очень помогло :oops: может в другом trabla?

Author:  dubd [ 2012-11-30 14:09:01 ]
Post subject:  Re: не выполняет как надо

вроде как теперь летает!
скажите пожалуйста, как сделать, чтобы когда герой выгрузил купленное он по новой а не на последнюю рунку в рунбуке летел?

Author:  ZeroDX [ 2012-11-30 14:39:28 ]
Post subject:  Re: не выполняет как надо

потерял строку
Code:
sub loot()
между этими двумя
Code:
end sub







wait(1000)


По задумке, летает разгружаться после того, как наберёт 210 веса. Исправить можно тут, поставив большее значение
Code:
if uo.weight > 210 then 

Author:  dubd [ 2012-11-30 14:52:46 ]
Post subject:  Re: не выполняет как надо

вот эта строчка. ZeroDX спс! Ну надо тип, чтобы када он выгрузился, чтобы как и при старте скрипта летел на вторую рунку. а он летит на предпоследнюю откуда отреколился. Как сделать чтобы когда отгрузился летел на вторую?
Code:
sub Loot()
var Wtime = 1
while not UO.Hidden()
UO.Warmode("0")
UO.UseSkill("Stealth")
wait(4000)
wend

var i
dim fastloot[17]
fastloot[0]=0x0EFA ; Runebook
fastloot[1]=0x0EFA ; Spellbook
fastloot[2]=0x0E9B ; a mortar and pestle
fastloot[3]=0x0F51 ; dagger
fastloot[4]=0x0E76 ; a bag
fastloot[5]=0x0E20 ; bloody bandages
fastloot[6]=0x0E21 ; clean bandages
fastloot[7]=0x1008 ; Basin
fastloot[8]=0x176A ; Keys
fastloot[9]=0x0F9E ; Scisors
fastloot[10]=0x0EED ; GP
fastloot[11]=0x0000
fastloot[12]=0x0000
fastloot[13]=0x0000
fastloot[14]=0x0000
fastloot[15]=0x0000
fastloot[16]=0x0000

wait(1000)
UO.UseObject('Sunduk')
wait(1000)
UO.UseObject('StoreBAG')
wait(1000)

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

Author:  ZeroDX [ 2012-11-30 16:39:38 ]
Post subject:  Re: не выполняет как надо

найди в начале такой блок
Code:
if uo.weight > 210 then   
RunebookRecalla(1)
Loot()
endif
и допиши его до
Code:
if uo.weight > 210 then   
RunebookRecalla(1)
Loot()
n = 2
endif

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/