Page 1 of 1

перекладка

Posted: 2007-06-25 14:53:52
by XpyCmuK
Вот кусок скрипта от мининга взятый на этом форуме

Code: Select all

sub CheckingItems() 
VAR b
uo.findtype('0x0F0E') #тип пустых бутылок#
if uo.findcount() > 0 then
  uo.moveitem('finditem', '-1', 'Sunduk1')
  wait(1000)
  checklag()
endif
DIM Ore[4]
Ore[0] = '0x19B9' #тип 4ех и более оров#
Ore[1] = '0x19B8' #тип 3ех оров#
Ore[2] = '0x19BA' #тип 2ух оров#
Ore[3] = '0x19B7' #тип 1го ора#
for var a = 0 to 3
  uo.findtype(Ore[a])
  while uo.findcount() > 0
    uo.moveitem('finditem', '-1', 'Sunduk2')
    wait(1000)
    checklag()
    uo.findtype(Ore[a])
  wend
next
uo.useobject('Sunduk1')
wait(1000)
checklag()
DIM Reg[3]
Reg[0] = '0x0F7A' #Black Pearl# 
Reg[1] = '0x0F7B' #Bood Moss#   
Reg[2] = '0x0F86' #Mandrake Root#         
for b = 0 to 2
  if uo.count(Reg[b]) < 50 then
    uo.findtype(Reg[b], '-1', 'Sunduk1')
    if uo.findcount() > 0 then
      uo.moveitem('finditem', '50')
      wait(1000)
      checklag()
    else
      uo.print('Нет необходимого количества регов в сундуке')
      return
    endif
  endif
next
if uo.count('0x0F08') < 5 then #тип инвизок#
  uo.findtype('0x0F08', '-1', 'Sunduk1')
  if uo.findcount() > 0 then
    uo.moveitem('finditem', '5')
    wait(1000)
    checklag()
  else
    uo.print('Нет необходимого количества инвизок в сундуке')     
    ;return
  endif
endif
uo.findtype('0x0E85') #тип кирок#
while uo.findcount() < 7
  uo.findtype('0x0E85', '-1', 'Sunduk1')
  if uo.findcount() > 0 then
    uo.moveitem('finditem', '1')
  else
    uo.print('Нет необходимого количества кирок в сундуке')
    return
  endif
  wait(1000)
  checklag()
  uo.findtype('0x0E85')
wend
if val(uo.getglobal('back')) == 1 then
  wait(50)
else
  uo.exec('exec Teleportation')
endif
end sub


Он не хочет никак скидывать руду в сумку , скинет одну кучку и зависает! Помогите кто знает в чем проблема.

Posted: 2007-06-25 15:11:30
by Greidon[Gods]
Юзай эту

Code: Select all

sub loot() 
uo.UseSkill('Stealth')
wait(3000)
begin:
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x402374BC' ; ID sunduka
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub

Posted: 2007-06-25 15:24:43
by XpyCmuK
не, мне твоя не подходит (

Posted: 2007-06-25 15:27:17
by Greidon[Gods]
XpyCmuK wrote:не, мне твоя не подходит (

Не подходит тем, что не берет гриды и т.д?

Posted: 2007-06-25 15:48:19
by XpyCmuK
Greidon[Gods] wrote:
XpyCmuK wrote:не, мне твоя не подходит (

Не подходит тем, что не берет гриды и т.д?


Да =( а переделать мне знаний не хватит

Posted: 2007-06-25 15:53:54
by Greidon[Gods]
Попробуй так :roll:

Code: Select all

sub loot() 
uo.UseSkill('Stealth')
wait(3000)
begin:
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x402374BC' ; ID sunduka
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
wend
next
uo.useobject('Sunduk1')
wait(1000)
checklag()
DIM Reg[3]
Reg[0] = '0x0F7A' #Black Pearl# 
Reg[1] = '0x0F7B' #Bood Moss#   
Reg[2] = '0x0F86' #Mandrake Root#         
for b = 0 to 2
  if uo.count(Reg[b]) < 50 then
    uo.findtype(Reg[b], '-1', 'Sunduk1')
    if uo.findcount() > 0 then
      uo.moveitem('finditem', '50')
      wait(1000)
      checklag()
    else
      uo.print('Нет необходимого количества регов в сундуке')
      return
    endif
  endif
next
if uo.count('0x0F08') < 5 then #тип инвизок#
  uo.findtype('0x0F08', '-1', 'Sunduk1')
  if uo.findcount() > 0 then
    uo.moveitem('finditem', '5')
    wait(1000)
    checklag()
  else
    uo.print('Нет необходимого количества инвизок в сундуке')     
    ;return
  endif
endif
uo.findtype('0x0E85') #тип кирок#
while uo.findcount() < 7
  uo.findtype('0x0E85', '-1', 'Sunduk1')
  if uo.findcount() > 0 then
    uo.moveitem('finditem', '1')
  else
    uo.print('Нет необходимого количества кирок в сундуке')
    return
  endif
  wait(1000)
  checklag()
  uo.findtype('0x0E85')
wend
if val(uo.getglobal('back')) == 1 then
  wait(50)
else
  uo.exec('exec Teleportation')
endif
end sub

Posted: 2007-06-25 16:13:24
by XpyCmuK
Line 40 ошибка

Posted: 2007-06-25 16:15:09
by Greidon[Gods]
XpyCmuK wrote:Line 40 ошибка

Копирни полность строку

Posted: 2007-06-25 16:33:41
by XpyCmuK

Code: Select all

if uo.count(Reg[b]) < 50 then

Posted: 2007-06-25 22:22:52
by Ururu
попробуй перед условием вначале поискать итем =)