Yoko

All sides of Injection
It is currently 2025-12-19 22:57:57

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2005-06-06 20:01:21 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
Вот я написал пару скриптов, ни один из них не работает 2 раза на одну сессию УО :). Вопрос в том, это забыл что-то я, или глючит инжект?

Code:
sub CountItems() ### Подсчет всех вещей в мешке (и в кучках)
var Pack='0x407A7B99'
var Sum=0
UO.Ignorereset()
UO.FindType(-1,-1,Pack)
while UO.FindCount()
Sum=Sum+UO.GetQuantity('finditem')
UO.Ignore('finditem')
UO.FindType(-1,-1,Pack)
wend
UO.Print('---- '+str(Sum)+' -----')
UO.Ignorereset()
end sub


Code:
sub SortBag() ### Выравнивает все предметы в паке построчно
  var ID='0x407A7B99'
  var left,ix,iy
  UO.Ignorereset()
  UO.FindType(-1,-1,ID)
  left=UO.FindCount()
  for ix=20 to 200 step 20
    for iy=20 to 100 step 20
      UO.MoveItem('finditem',0,ID,ix,iy,UO.GetZ('finditem'))
      UO.Ignore('finditem')
      left=left-1
      if (left<=0) then
        return
      end if
      UO.FindType(-1,-1,ID)
    next
  next
  UO.Ignorereset()
end sub


Если мой метод в инжекте будет виснуть все время, просьба предложить другую рабочуу реализацию.


Top
   
 Post subject:
PostPosted: 2005-06-06 23:44:21 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Попробуй поставить все эти -1 в кавычки. То есть '-1'. Ну и 0 в мувитем, и координаты строками тоже надо передавать.


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 5 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