этот метод в сложных скриптах сводит все к крэшу
есть альтернатива?
если нету то ответьте
почему этот скрипт срывается .....вроде цикл while not uo.dead
Code: sub Obkopka() uo.setglobal('obkopka','on') VAR mx, my, mz, a, b, c, d, e, finded while not uo.dead() if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then uo.usetype('0x0F08') uo.closeuo() else wait(50) endif uo.deletejournal() mx = uo.getx('self') my = uo.gety('self') mz = uo.getz('self') for a = mx-2 to mx+2 for b = my-2 to my+2 ;uo.print('!!!ÊÎÏÀÅÌ ÒÓÒ!!!>>> : '+str(mx-a)+' '+str(my-b)) d = val(uo.getglobal('place')) + 1 uo.setglobal('place', str(d)) while not uo.injournal('no ore here') and not uo.injournal('location') and not uo.injournal('far away') and not uo.injournal('in rock') and not uo.injournal('You broke') if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then uo.usetype('0x0F08') uo.closeuo() else wait(50) endif uo.deletejournal() if uo.waiting() then uo.canceltarget() else wait(50) endif uo.waittargettile('1341', str(a), str(b), str(mz)) uo.usetype('0x0E85') #òèï êèðêè# wait(500) while not uo.LastGump('replyed') if uo.LastGump('text', 0) == 'Antimacros System' then OneClick() end if wait(500) wend if uo.injournal('Success') then uo.usetype('0x0E85') uo.deletejournal() endif while not uo.injournal('You put') and not uo.injournal('location') and not uo.injournal('no ore') and not uo.injournal('but fail') and not uo.injournal('far away') and not uo.injournal('in rock') and not uo.injournal('You broke') wait(100) wend uo.setglobal('find', '1') wait(200) uo.set('finddistance', '5') uo.findtype('0x000E', '-1', '1') #òèï ýëåìåíòàëÿ# if uo.findcount() > 0 then uo.setglobal('find', '0') finded = uo.getserial('finditem') CheckingDistance(finded) uo.exec('exec KillElemental') return else uo.setglobal('find', '0') endif if val(uo.getglobal('place')) > 25 then uo.setglobal('place', '1') uo.exec('exec ChengePlace') return else wait(50) endif if uo.weight > 350 then #ìàêñèìàëüíûé âåñ# uo.setglobal('back', '1') uo.playwav("D:\downloads\peeeow.wav") else wait(50) endif wend if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then uo.usetype('0x0F08') uo.closeuo() else wait(50) endif uo.deletejournal() next next wend uo.setglobal('obkopka','off') end sub
sub ChengePlace() VAR a, b, c, d, e, f, g, h, i, j, k if val(uo.getglobal('circle')) > 3 then uo.setglobal('circle', '1') return endif if val(uo.getglobal('circle')) == 1 then if uo.getdir('self') == 3 then a = 1 else a = 2 endif for b = 1 to a uo.press(40) wait(300) next for c = 1 to 3 uo.press(34) wait(300) next for d = 1 to 2 uo.press(39) wait(300) next endif endif if val(uo.getglobal('circle')) == 2 then if uo.getdir('self') == 1 then a = 1 else a = 2 endif for e = 1 to a uo.press(39) wait(300) next for f = 1 to 3 uo.press(33) wait(300) next for g = 1 to 2 uo.press(38) wait(300) next endif if val(uo.getglobal('circle')) == 3 then if uo.getdir('self') == 7 then a = 1 else a = 2 endif for h = 1 to a uo.press(38) wait(300) next for i = 1 to 3 uo.press(36) wait(300) next for j = 1 to 2 uo.press(37) wait(300) next endif k = val(uo.getglobal('circle')) + 1 uo.setglobal('circle', str(k)) uo.exec('exec Obkopka') end sub
|