Бс.

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
klonuk
Posts: 145
Joined: 2006-05-23 11:48:22
Contact:

Бс.

Post by klonuk »

Code: Select all

sub BS2222() 
VAR meshok='0x0E76' 
Var Type='0x1BEF' 
Var Color='0x0000' 
VAR meshok2
var a=0
VAR sunduk='0x40009AD8'
var sunduk2='0x40009ED6'


UO.UnSetCatchBag(sunduk2) 
wait(300) 
UO.FindType( 'meshok', '-1', 'sunduk2') 
   UO.Grab('1','finditem')
   meshok2=UO.GetSerial('finditem') 
a=0 
UO.SetCatchBag(meshok2) 
wait(1000) 
UO.MoveItem( 'finditem', '1', 'sunduk2' )

repeat 
repeat
 if UO.Count(Type,Color)<20 then 
        cheklag() 
        UO.FindType(Type,Color,'sunduk') 
        UO.Grab('300','finditem') 
        wait(2000) 
  else
           uo.Print('Èíãè êîí÷èëèñü') 
           wait(1000)
           Paused()
 endif
cheklag() 
UO.FindType(Type, Color, 2) 
uo.exec("recall finditem 3") 
wait(1500) 
UO.LClick(492,455) 
wait(1500) 
UO.LClick(492,455) 
UO.DeleteJournal() 
while not (UO.InJournal("You put") or UO.InJournal("You have failed")) 
wait(300) 
wend 
if UO.InJournal("You put") then
   a=a+1
endif

wait(1000) 
cheklag()
 UO.FindType('0x1B73')

if UO.FindCount() > 0  then
   UO.MoveItem( 'finditem', '1', 'meshok2' )
   wait(1000) 
endif
 
if a==200 then
 Dobor()
endif

until uo.Dead() 
end sub 

sub Dobor()
VAR meshok='0x0E76'
VAR meshok2
var sunduk2='0x40009ED6 '

UO.UnSetCatchBag() 
wait(300) 
UO.FindType( meshok, -1, sunduk2 ) 
   UO.Grab('finditem') 
UO.SetCatchBag(meshok2) 
wait(1000) 
UO.MoveItem( 'finditem', '1', 'sunduk2' )

end sub


Написал скрипт.
Моя задача.
1.берет мешок дает ему имя кидает обрано в сундук
2.кует и кидает в этот мешок
3.когда итемов болше 200 берет еше 1 дает имя и по кругу
Запуталься ,скрипт не работает творит все что угодно кроме того что надо, прошу помощи чайник уже просто не варит....Ошибки прошу обьяснить я на чинающий скриптер чтобы их не допускать в будуещем. :roll:
klonuk
Posts: 145
Joined: 2006-05-23 11:48:22
Contact:

Post by klonuk »

Ну профи откликнетесь ... не охота забрасывать скрипт.
klonuk
Posts: 145
Joined: 2006-05-23 11:48:22
Contact:

Post by klonuk »

Грин хоть ты помаги ведь это по твоей части олдп =)) и дк
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

sub BS2222() 
VAR meshok='0x0E76' 
Var Type='0x1BEF' 
Var Color='0x0000' 
VAR meshok2 
var a=0 
VAR sunduk='0x40009AD8' 
var sunduk2='0x40009ED6' 


UO.UnSetCatchBag() 
wait(300) 
UO.FindType( meshok, '-1', sunduk2) 
   UO.Grab('1','finditem') 
   meshok2=UO.GetSerial('finditem') 
a=0 
UO.SetCatchBag(meshok2) 
wait(1000) 
UO.MoveItem( 'finditem', '1', 'sunduk2' ) 

repeat 
repeat 
 if UO.Count(Type,Color)<20 then 
        cheklag() 
        UO.FindType(Type,Color,sunduk) 
        UO.Grab('300','finditem') 
        wait(2000) 
  else 
           uo.Print('Eiae eii?eeenu') 
           wait(1000) 
           Paused() 
 endif 
cheklag() 
UO.FindType(Type, Color) 
uo.recall('finditem', 3) 
wait(1500) 
UO.LClick(492,455) 
wait(1500) 
UO.LClick(492,455) 
UO.DeleteJournal() 
while not (UO.InJournal("You put") or UO.InJournal("You have failed")) 
wait(300) 
wend 
if UO.InJournal("You put") then 
   a=a+1 
endif 

wait(1000) 
cheklag() 
 UO.FindType('0x1B73') 

if UO.FindCount() > 0  then 
   UO.MoveItem( 'finditem', '1', meshok2) 
   wait(1000) 
endif 
  
if a==200 then 
 Dobor() 
endif 

until uo.Dead() 
end sub 

sub Dobor() 
VAR meshok='0x0E76' 
VAR meshok2 
var sunduk2='0x40009ED6 ' 

UO.UnSetCatchBag() 
wait(300) 
UO.FindType( meshok, -1, sunduk2 ) 
   UO.Grab('finditem') 
UO.SetCatchBag(meshok2) 
wait(1000) 
UO.MoveItem( 'finditem', '1', sunduk2) 

end sub
klonuk
Posts: 145
Joined: 2006-05-23 11:48:22
Contact:

Post by klonuk »

респект....... скрипт настроин работает на ура.... осталось чуток изменений
Post Reply