Yoko

All sides of Injection
It is currently 2025-11-10 18:01:25

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Хелп
PostPosted: 2006-04-12 18:52:55 
Offline

Joined: 2005-09-29 01:19:27
Posts: 14
Люди помогите мне в такой проблеме вот пример
Code:
sub Collect()
        var id_raw,i
uo.Print("Starting harvesting.");
UO.FindType('0x0C76', '-1', "ground")
for i = 1 to uo.findcount()
id_raw = UO.GetSerial("finditem")
uo.useobject(id_raw)
wait(5000)
uo.ignore(id_raw)
next
end sub


Вот он находит например 10 итемов ,и он один и тот же юзает ,вместо того чтоб поочереди от одного до 10...
Подскажите в чем праблема


Top
   
 Post subject:
PostPosted: 2006-04-12 19:38:44 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
В скрипте uo.findtype юзается 1 раз, тк он идет перед 'for ***', в указатель "finditem" записывается последний обьект, скрипт его и юзает, твой скрипт надо править, ща поем займусь, если мя кто нить не опередит.


Top
   
 Post subject: Re: Хелп
PostPosted: 2006-04-12 19:48:42 
Offline

Joined: 2006-02-03 06:53:36
Posts: 64
у тебя findType вызываеться только 1 раз до цикла. а внутри цикла используеться один и тотже объект, найденный еще до цикла.

Code:
sub Collect() 
    var id_raw,i
    uo.Print("Starting harvesting.");
    UO.FindType('0x0C76', '-1', "ground")
    for i = 1 to uo.findcount()
        UO.FindType('0x0C76', '-1', "ground")
        id_raw = UO.GetSerial("finditem")
        uo.useobject(id_raw)
        wait(5000)
        uo.ignore(id_raw)
    next
end sub


Top
   
 Post subject:
PostPosted: 2006-04-12 19:55:11 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Quote:
у тебя findType вызываеться только 1 раз до цикла. а внутри цикла используеться один и тотже объект, найденный еще до цикла.


Повторение - мать учения :)


Top
   
 Post subject:
PostPosted: 2006-04-12 19:56:43 
Offline

Joined: 2005-09-29 01:19:27
Posts: 14
Большое спасибо


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 3 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