не выполняет как надо

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
dubd
Posts: 249
Joined: 2012-07-27 23:43:14

не выполняет как надо

Post by dubd »

помогите пожалуйста, вот скрипт на закупку. Герой когда выложит всё в сундук стоит ждёт определённое время. После того как оно закончитца, он не реколитца, а начинает делать закупки у сундука.

Code: Select all

Начинаем делать закупки!

Подскажите как сделать чтобы он реколился?

Code: Select all

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
Last edited by dubd on 2012-11-30 22:12:51, edited 2 times in total.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: не выполняет как надо

Post by ZeroDX »

что за шард?
dubd
Posts: 249
Joined: 2012-07-27 23:43:14

Re: не выполняет как надо

Post by dubd »

русский хороший
Last edited by dubd on 2012-12-01 00:37:00, edited 1 time in total.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: не выполняет как надо

Post by ZeroDX »

попробуй запусти такое, потом попробуй свой скрипт

Code: Select all

sub main()
    uo.set('norbcheck', '1')
    uo.set('norbcalc', '1')
endsub
dubd
Posts: 249
Joined: 2012-07-27 23:43:14

Re: не выполняет как надо

Post by dubd »

блин, чет не очень помогло :oops: может в другом trabla?
dubd
Posts: 249
Joined: 2012-07-27 23:43:14

Re: не выполняет как надо

Post by dubd »

вроде как теперь летает!
скажите пожалуйста, как сделать, чтобы когда герой выгрузил купленное он по новой а не на последнюю рунку в рунбуке летел?
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: не выполняет как надо

Post by ZeroDX »

потерял строку

Code: Select all

sub loot()
между этими двумя

Code: Select all

end sub







wait(1000)


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

Code: Select all

if uo.weight > 210 then 
dubd
Posts: 249
Joined: 2012-07-27 23:43:14

Re: не выполняет как надо

Post by dubd »

вот эта строчка. ZeroDX спс! Ну надо тип, чтобы када он выгрузился, чтобы как и при старте скрипта летел на вторую рунку. а он летит на предпоследнюю откуда отреколился. Как сделать чтобы когда отгрузился летел на вторую?

Code: Select all

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
Last edited by dubd on 2012-11-30 22:12:19, edited 1 time in total.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: не выполняет как надо

Post by ZeroDX »

найди в начале такой блок

Code: Select all

if uo.weight > 210 then   
RunebookRecalla(1)
Loot()
endif
и допиши его до

Code: Select all

if uo.weight > 210 then   
RunebookRecalla(1)
Loot()
n = 2
endif
Post Reply