Yoko

All sides of Injection
It is currently 2026-02-19 10:08:47

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2005-01-28 10:03:31 
Offline

Joined: 2004-10-28 12:47:02
Posts: 6
У меня скрипт примерно следующего содержания
Code:
 dim tmpBags[254] 
 dim Bags[254]
 var s,z,c,n,x,y
 var i = 0

 UO.AddObject("bag",UO.GetSerial("^0x0E75"))

# Ищем все мешочки в bag и заносим в массив

 UO.findtype('0x0E76','-1','bag')
 while UO.FindCount()>0
  tmpBags[i] = UO.GetSerial("finditem")
  i = i + 1
  UO.Ignore("finditem")
  wait(100)
  UO.findtype('0x0E76','-1','bag')
 wend
 UO.IgnoreReset()
 i = i - 1

# Сортируем полученный массив по возрастанию серийника

 for s = 0 to i
  c = 0
  for z = 0 to i
   if tmpBags[s]>tmpBags[z] then
    c = c + 1
   endif
  next
  Bags[c] = tmpBags[s]
 next

# Раскладываем мешочки согласно сортировке

 for n = 0 to 254
  if Bags[n] then
   x = 28 + (n-12*int(n/12))*12
   y = 53 + int(n/12)*15
   UO.Exec("moveitem "+Bags[n]+" 1 bag "+str(x)+" "+str(y)+" 0")
   wait(1000)
  endif
 next


После логина однократный запуск этого скрипта работает нормально.
Но если запустить его еще раз то он на этапе поиска мешочков циклится с сообщением invalid object "finditem"

То есть после перемещения объектов в паке по определенным координатам эти объекты криво ищутся командой FindType


Top
   
 Post subject:
PostPosted: 2005-01-28 14:28:48 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
попробуй сделать ,resend и запустить снова


Top
   
 Post subject:
PostPosted: 2005-01-28 17:29:25 
Offline

Joined: 2004-10-28 12:47:02
Posts: 6
Edred wrote:
попробуй сделать ,resend и запустить снова


так работает


Top
   
 Post subject:
PostPosted: 2005-01-29 12:39:40 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
MARLENUS wrote:
Edred wrote:
попробуй сделать ,resend и запустить снова


так работает


Ну так вставь в начало скрипта UO.Resend()


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 6 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited