Скрипт на БС, нужна подсказка!

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
Murderbot
Posts: 6
Joined: 2008-10-02 15:54:27

Скрипт на БС, нужна подсказка!

Post by Murderbot »

Скрипт следующий:

Code: Select all

sub Blacksmithy() 
VAR Exit = 0, k, bag
VAR color = '' ;Цвет крафта
VAR item = '0x1b73'  ;Крафт
VAR chesttoput = '0x40022f3a'               ;Яшики
VAR chestwithbags = '0x40022f3a'            ;Яшики   
VAR chestwithings = '0x40022f3a'            ;Яшики

uo.Deletejournal()
uo.useobject(chesttoput)
checklag()
uo.useobject(chestwithbags)
checklag()
uo.useobject(chestwithings)
checklag()
while Exit<>1
If uo.injournal('World Save') then
wait(5000)
end if

While not UO.Hidden()
uo.warmode(0)
UO.UseSkill('Hiding')
Wait(4000)
Wend

check:
uo.DeleteJournal()
uo.findtype('0x0e76', -1 , chesttoput )         ;Мешки
if uo.findcount() then
del('255|bag')
uo.click('finditem')
repeat
wait(100)
until uo.injournal('bag')
if uo.injournal('255') then
uo.ignore('finditem')
goto check
else
bag = uo.getserial('finditem')
end if
else
uo.findtype('0x0e76', -1 , chestwithbags )
bag = uo.getserial('finditem')
checklag()
end if

find:
uo.findtype( item , color ,'backpack')           ;Кдиаем крафт в мешок
If UO.FindCount() Then
UO.moveitem('finditem', 0 , bag )
checklag()
goto find
end if

If UO.Count('0x1bef') < 50 then          ;Минимальное кол-во материала
UO.FindType('0x1bef', color , chestwithings )                                 <<<<< ВОТ ТУТА ВРОДЕ ПРОБЛЕМКА!!!
If uo.FindCount() == 0 then
return
end if
UO.moveitem('finditem','100','backpack')
checklag()
end if
Del('You put|fail|World Save')
uo.FindType('0x1bef', color ,'backpack')   
checklag()
uo.recall(uo.GetSerial('finditem'), 3 )
k = 0
while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND ( k < 30 )
k = k + 1
wait(500)
  wend
 wend 
end sub

Sub checklag()
del('backpack')
uo.click('backpack')
repeat
wait(50)
until uo.injournal('backpack')
del('backpack')
end sub

Sub del(msg)
while uo.injournal(msg)
uo.setJournalLine(uo.injournal(msg)-1,"Is Empty!")
wend
end sub


Вначале пролетает сообщение Invalid object, но делать щиты он все-таки стартует. Затем после 1 фейла он начинает спамить БСингом, что сжирает все инготы из-за Fail'ов. Подскажите пожалуйста, в чем проблема данного скрипта?
Post Reply