БС

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
vertijok
Posts: 117
Joined: 2008-09-26 17:06:16
Contact:

БС

Post by vertijok »

помогите плиз с БС не знаю почему он делает пару cutlass и потом выдает ошибку unhandled exception in parser. вот скрипт

Code: Select all

var whatwedo = '0x1440'; # ÷òî äåëàåì - ýòî cutlass
var molotok = '0x13E3'; # ìîëîòîê
var ingots = '0x1BEF'; # òèï èíãîòîâ
var forge = '0x401B8DBE'; # ôîðæ, íà êîòîðîé ïëàâèì
var num = 8; # ñêîëüêî òðàòèòñÿ íà îäèí èçäåëèé

sub smelt()
    while uo.count(whatwedo)>0
        uo.waittargettype(whatwedo);
        uo.useobject(forge);
        wait(400)
    wend
    if uo.count(ingots)<num then
        return
    endif
    blacksmith()
end sub

sub blacksmith()
    while not uo.dead()
        if UO.Count(ingots) < num  OR uo.weight > 6000 then
            smelt();
            repeat
        endif
        UO.DeleteJournal()
        if uo.count(ingots)>=num then
            UO.WaitMenu ('Blacksmithing', 'Weapons', 'Weapons','Swords & Blades','Swords & Blades', 'cutlass (8 iron ingot)')
        else
            smelt();
           repeat
        endif
       
        UO.WaitTargetType (ingots)
        UO.UseType(molotok)

        wait(6000)
       
        Until (uo.injournal("You have failed to make anything")) or (uo.injournal("Âû áûëè íå â ñîñòîÿíèè ñäåëàòü ÷òî-íèáóäü"))
            wait(2500)
        wend
       

        If UO.Count(whatwedo)>2500 then
            smelt()
        endif
       
    wend
end sub
GAUHAR
Posts: 137
Joined: 2006-11-06 21:45:23

Post by GAUHAR »

Приведенный тобой скрипт не исправляем.

Code: Select all

sub smelt() 
....
   blacksmith()
endsub

sub blacksmith()
....
   smelt();
....
   smelt();
....
   smelt()
....
endsub

(я так понимаю - это рекурсия)
И другие ошибки.
Ищи другой скрипт.
vertijok
Posts: 117
Joined: 2008-09-26 17:06:16
Contact:

Post by vertijok »

GAUHAR wrote:Приведенный тобой скрипт не исправляем.

Code: Select all

sub smelt() 
....
   blacksmith()
endsub

sub blacksmith()
....
   smelt();
....
   smelt();
....
   smelt()
....
endsub

(я так понимаю - это рекурсия)
И другие ошибки.
Ищи другой скрипт.


спс
Post Reply