Yoko

All sides of Injection
It is currently 2025-11-10 14:41:03

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2006-04-15 07:16:22 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Непонятная ошибка в скрипте, перевод ее следующий: "переменная Ore не определина", иногда вылетает а иногда и нет, можно 10 раз скрипт запустить и все ок, а на 11ый выдаст такую фигню, хз что делать с этим:

Code:
sub CheckingItems()
VAR c, d
DIM Drop[6]
Drop[0] = '0x1BF5' #тип ингов#
Drop[1] = '0x0EED' #тип золота#
Drop[2] = '0x0F0E' #тип пустых бутылок#
Drop[3] = '0x1BEF' 
Drop[4] = '0x1BE9'
Drop[5] = '0x1BE3'
for var a = 0 to 5
  uo.findtype(Drop[a])
  while uo.findcount() > 0
    uo.moveitem('finditem', '-1', 'Sunduk1')
    wait(1000)
    uo.findtype(Ore[a])
  wend
next
wait(1000)
DIM Ore[4]
Ore[0] = '0x19B9' #тип 4ех и более оров#
Ore[1] = '0x19B8' #тип 3ех оров#
Ore[2] = '0x19BA' #тип 2ух оров#
Ore[3] = '0x19B7' #тип 1го ора#
for var b = 0 to 3
  uo.findtype(Ore[b])
  while uo.findcount() > 0
    uo.moveitem('finditem', '-1', 'Sunduk2')
    wait(1000)
    uo.findtype(Ore[b])
  wend
next
uo.useobject('Sunduk1')
wait(1000)
checklag()
DIM Reg[6]
Reg[0] = '0x0F7A' #Black Pearl# 
Reg[1] = '0x0F7B' #Bood Moss#   
Reg[2] = '0x0F86' #Mandrake Root#     
Reg[3] = '0x0F84' #Garlic#   
Reg[4] = '0x0F8C' #Sulphorous Ash# 
Reg[5] = '0x0F88' #Night Shade#   
for c = 0 to 5
  if uo.count(Reg[c]) < 20 then
    uo.findtype(Reg[c], '-1', 'Sunduk1')
    if uo.findcount() > 0 then
      uo.moveitem('finditem', '20')
      wait(1000)
    else
      uo.print('Нет необходимого количества регов в сундуке')
      return
    endif
  endif
next
DIM Botl[2]
Botl[0] = '0x0F09' #тип тотал манок# 
Botl[1] = '0x0F08' #тип инвизок#   
for d = 0 to 1
  if uo.count(Botl[d]) < 3 then
    uo.findtype(Botl[d], '-1', 'Sunduk1')
    if uo.findcount() > 0 then
      uo.moveitem('finditem', '3')
      wait(1000)
    else
      uo.print('Нет необходимого количества ботлов в сундуке')     
      return
    endif
  endif
next
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)
  uo.findtype('0x0E85')
wend
uo.deletejournal()
wait(100)
uo.exec('exec Teleportation')
wait(500)
end sub


Image


Top
   
PostPosted: 2006-04-15 09:18:50 
Offline

Joined: 2006-02-03 06:53:36
Posts: 64
попробуй все объявления переменных перенести в самое начало.
у тебя массив Ore используеться в самом первом цикле, хотя объявлеться после него. возможно проблема в этом


Top
   
 Post subject:
PostPosted: 2006-04-15 10:52:46 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Quote:
Code:
DIM Drop[6] 
Drop[0] = '0x1BF5' #тип ингов#
Drop[1] = '0x0EED' #тип золота#
Drop[2] = '0x0F0E' #тип пустых бутылок#
Drop[3] = '0x1BEF' 
Drop[4] = '0x1BE9'
Drop[5] = '0x1BE3'
for var a = 0 to 5
  uo.findtype(Drop[a])
  while uo.findcount() > 0
    uo.moveitem('finditem', '-1', 'Sunduk1')
    wait(1000)
    uo.findtype(Ore[a])
  wend
next


В последнем финдтайпе у тебя, я думаю, опечатка. Ты хотел наверняка искать не элемент массива Ore, а элемент массива Drop


Top
   
 Post subject:
PostPosted: 2006-04-15 13:25:40 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Quote:
В последнем финдтайпе у тебя, я думаю, опечатка. Ты хотел наверняка искать не элемент массива Ore, а элемент массива Drop


Сорри, не заметил :?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited