Yoko

All sides of Injection
It is currently 2025-10-19 01:41:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Дроп сена
PostPosted: 2009-06-01 13:48:53 
Offline

Joined: 2008-03-16 12:36:48
Posts: 70
Пожалуйста помогите с скриптом. Скрипт должен если в паке есть сено дропать его под ноги чара, а если пак пустой о по нажатию этой же кнопочки чар лутит сено обратно.
Вот что я накропал

Quote:
sub seno()

var i,Exit
DIM seno[3]
seno[0]=0x0F36 ;
seno[1]=0x100C ;
seno[2]=0x100D ;
For i=0 to 2
Exit=0
uo.FindType(seno[i],'-1','backpack')
if uo.FindCount() then
uo.drophere('finditem')
else
UO.Set("finddistance","3")
for i=0 to 2
Exit=0
UO.FindType(seno[i],'ground')
if uo.findcount() then
UO.Grab('-1','finditem')
endif
endif
next
endsub


Но при запуске скрипта сено просто перемещается в паке чара с места на место и все. Кто может, укажите на ошибки



Top
   
 Post subject: Re: Дроп сена
PostPosted: 2009-06-01 14:53:54 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Code:
sub seno()
   var i
     UO.Set("finddistance","3")
 DIM seno[3]
       seno[0]='0x0F36' ;
       seno[1]='0x100C' ;
       seno[2]='0x100D' ;
      For i=0 to 2
        uo.FindType(seno[i],'-1','backpack')
        if uo.FindCount() then
         UO.MoveItem('finditem',0,'ground')
       else
       UO.FindType(seno[i],'ground')
       if uo.findcount() then
        UO.MoveItem('finditem',0,'backpack')
       endif
  endif
  next
endsub

Должно работать. Граб и дроп устаревшие команды.


Top
   
 Post subject:
PostPosted: 2009-06-01 15:06:21 
Offline

Joined: 2008-03-16 12:36:48
Posts: 70
Quote:
sub seno()
var i
UO.Set("finddistance","3")
DIM seno[3]
seno[0]='0x0F36' ;
seno[1]='0x100C' ;
seno[2]='0x100D' ;
For i=0 to 2
uo.FindType(seno[i],'-1','backpack')
if uo.FindCount() then
UO.MoveItem('finditem',0,'ground')
else
UO.FindType(seno[i],'-1','ground')
if uo.findcount() then
UO.MoveItem('finditem',0,'backpack')
endif
endif
next
endsub


вот так все заработало,огромное спасибо


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited