Не могу разобраться со скриптом на мининг. Собственно есть сам скрипт:
Code: sub Mining() VAR a = 0 # 0 <=> используемые объекты указаны # 1 <=> используемые объекты не указаны # uo.setglobal('recal', '1') #отвечает за телепортацию по шахтам# uo.setglobal('place', '1') #отвечает за перемещение чара по шахте# uo.setglobal('circle', '1') #отвечает за телепортацию в следующую шахту при обходе полного круга# uo.setglobal('back', '0') #отвечает за синхронизацию возвращения на место копки после сгрузки# if a == 1 then uo.print('Укажите сундук с регами, кирками, инвизками, манками') uo.exec('addobject Sunduk1') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите сундук для руды') uo.exec('addobject Sunduk2') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну к дому') uo.exec('addobject Home') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 1') uo.exec('addobject mine1') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 2') uo.exec('addobject mine2') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 3') uo.exec('addobject mine3') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 4') uo.exec('addobject mine4') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 5') uo.exec('addobject mine5') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 6') uo.exec('addobject mine6') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 7') uo.exec('addobject mine7') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 8') uo.exec('addobject mine8') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 9') uo.exec('addobject mine9') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 10') uo.exec('addobject mine10') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 11') uo.exec('addobject mine11') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 12') uo.exec('addobject mine12') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 13') uo.exec('addobject mine13') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 14') uo.exec('addobject mine14') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 15') uo.exec('addobject mine15') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 16') uo.exec('addobject mine16') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 17') uo.exec('addobject mine17') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 18') uo.exec('addobject mine18') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 19') uo.exec('addobject mine19') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 20') uo.exec('addobject mine20') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 21') uo.exec('addobject mine21') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 22') uo.exec('addobject mine22') while uo.targeting() wait(100) wend wait(1000) uo.print('Укажите руну в шахту 23') uo.exec('addobject mine23') while uo.targeting() wait(100) wend return endif uo.exec('exec CheckingItems') end sub
sub CheckingItems() VAR b uo.findtype('0x0F0E') #тип пустых бутылок# if uo.findcount() > 0 then uo.moveitem('finditem', '-1', 'Sunduk1') wait(1000) checklag() endif DIM Ore[4] Ore[0] = '0x19B9' #тип 4ех и более оров# Ore[1] = '0x19B8' #тип 3ех оров# Ore[2] = '0x19BA' #тип 2ух оров# Ore[3] = '0x19B7' #тип 1го ора# for var a = 0 to 3 uo.findtype(Ore[a]) while uo.findcount() > 0 uo.moveitem('finditem', '-1', 'Sunduk2') wait(1000) checklag() uo.findtype(Ore[a]) wend next uo.useobject('Sunduk1') wait(1000) checklag() DIM Reg[3] Reg[0] = '0x0F7A' #Black Pearl# Reg[1] = '0x0F7B' #Bood Moss# Reg[2] = '0x0F86' #Mandrake Root# for b = 0 to 2 if uo.count(Reg[b]) < 50 then uo.findtype(Reg[b], '-1', 'Sunduk1') if uo.findcount() > 0 then uo.moveitem('finditem', '50') wait(1000) checklag() else uo.print('Нет необходимого количества регов в сундуке') return endif endif next if uo.count('0x0F08') < 5 then #тип инвизок# uo.findtype('0x0F08', '-1', 'Sunduk1') if uo.findcount() > 0 then uo.moveitem('finditem', '5') wait(1000) checklag() else uo.print('Нет необходимого количества инвизок в сундуке') ;return endif endif uo.findtype('0x0E85') #тип кирок# while uo.findcount() < 7 uo.findtype('0x0E85', '-1', 'Sunduk1') if uo.findcount() > 0 then uo.moveitem('finditem', '1') else uo.print('Нет необходимого количества кирок в сундуке') return endif wait(1000) checklag() uo.findtype('0x0E85') wend if val(uo.getglobal('back')) == 1 then wait(50) else uo.exec('exec Teleportation') endif end sub
sub Teleportation() VAR a, b, c VAR d = uo.getx('self') repeat while uo.mana < 11 uo.warmode('0') uo.useskill('Meditation') wait(1000) wend a = 0 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 val(uo.getglobal('recal')) == 1 then uo.waittargetobject('mine1') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 2 then uo.waittargetobject('mine2') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 3 then uo.waittargetobject('mine3') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 4 then uo.waittargetobject('mine4') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 5 then uo.waittargetobject('mine5') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 6 then uo.waittargetobject('mine6') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 7 then uo.waittargetobject('mine7') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 8 then uo.waittargetobject('mine8') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 9 then uo.waittargetobject('mine9') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 10 then uo.waittargetobject('mine10') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 10 then uo.waittargetobject('mine10') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 11 then uo.waittargetobject('mine11') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 12 then uo.waittargetobject('mine12') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 13 then uo.waittargetobject('mine13') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 14 then uo.waittargetobject('mine14') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 15 then uo.waittargetobject('mine15') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 16 then uo.waittargetobject('mine16') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 17 then uo.waittargetobject('mine17') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 18 then uo.waittargetobject('mine18') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 20 then uo.waittargetobject('mine20') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 21 then uo.waittargetobject('mine21') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 22 then uo.waittargetobject('mine22') uo.cast('Recall') else wait(50) endif if val(uo.getglobal('recal')) == 23 then uo.waittargetobject('mine23') uo.cast('Recall') else wait(50) endif repeat wait(100) a = a + 1 until a > 35 or d <> uo.getx('self') or uo.injournal('The spell fizzles.') wait(500) until not uo.injournal('The spell fizzles.') b = val(uo.getglobal('recal')) + 1 uo.setglobal('recal', str(b)) if val(uo.getglobal('recal')) > 23 then uo.setglobal('recal', '1') endif uo.set('finddistance', '7') uo.findtype('0x000E', '-1', '1') #тип элементаля# if uo.findcount() > 0 then uo.usetype('0x0F08') uo.exec('exec Teleportation') return endif if val(uo.getglobal('back')) == 0 then uo.exec('exec CheckingPlayers') uo.setglobal('place', '1') uo.setglobal('circle', '1') uo.exec('exec Obkopka') else uo.setglobal('back', '0') endif end sub
sub CheckingPlayers() VAR a, b uo.ignore('self', 'on') DIM Chars[2] Chars[0] = '0x0190' #тип игрока мужского пола# Chars[1] = '0x0191' #тип игрока женского пола# while not uo.dead() for a = 0 to 1 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 while val(uo.getglobal('find')) == 1 wait(50) wend uo.set('finddistance', '15') uo.findtype(Chars[a], '-1', '1') if uo.findcount() > 0 then uo.usetype('0x0F08') uo.exec('terminate Teleportation') uo.exec('terminate Obkopka') uo.exec('terminate ChengePlace') uo.exec('exec Teleportation') return else wait(500) endif next wend end sub
sub Obkopka() VAR mx, my, mz, a, b, c, d, e, f 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 while not uo.Hidden() c = 0 uo.warmode('0') uo.useskill('Stealth') repeat wait(100) c = c + 1 until uo.Hidden() or c > 40 wend 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') #тип кирки# 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(500) wend uo.setglobal('find', '1') wait(200) uo.set('finddistance', '7') uo.findtype('0x000E', '-1', '1') #тип элементаля# if uo.findcount() > 0 then uo.setglobal('find', '0') uo.usetype('0x0F08') uo.exec('exec Teleportation') uo.exec('terminate CheckingPlayers') 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 > 600 then #максимальный вес# uo.setglobal('back', '1') uo.exec('terminate CheckingPlayers') GoHome() CheckingItems() Teleportation() Back() uo.exec('exec CheckingPlayers') 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 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') uo.exec('terminate CheckingPlayers') uo.exec('exec Teleportation') 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
sub checklag() uo.click('backpack') while not uo.injournal('backpack') wait(100) wend uo.deletejournal('backpack') end sub
sub GoHome() VAR a, b, c, d, e uo.warmode('0') a = uo.getx('self') repeat while uo.mana < 11 uo.warmode('0') uo.useskill('Meditation') wait(1000) 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 b = 0 uo.deletejournal() uo.waittargetobject('Home') uo.cast('Recall') repeat wait(100) b = b + 1 until b > 35 or a <> uo.getx('self') or uo.injournal('The spell fizzles.') until not uo.injournal('The spell fizzles.') for c = 1 to 6 uo.press(33) wait(300) next uo.opendoor() wait(500) uo.press(33) wait(300) uo.opendoor() for d = 1 to 6 uo.press(33) wait(300) next e = val(uo.getglobal('recal')) - 1 uo.setglobal('recal', str(e)) end sub
sub Back() VAR a, b, c, d, e, f, g, h, i, j if val(uo.getglobal('circle')) > 1 then if uo.getdir('self') == 3 then f = 1 else f = 2 endif for a = 1 to f uo.press(40) wait(300) next for b = 1 to 3 uo.press(34) wait(300) next for c = 1 to 2 uo.press(39) wait(300) next endif endif if val(uo.getglobal('circle')) > 2 then if uo.getdir('self') == 1 then f = 1 else f = 2 endif for d = 1 to f uo.press(39) wait(300) next for e = 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 f = 1 else f = 2 endif for h = 1 to f 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 end sub
sub TestPlace() VAR a, b, c, d, e, f, g, h, i for a = 1 to 2 uo.press(40) wait(300) next for b = 1 to 3 uo.press(34) wait(300) next for c = 1 to 3 uo.press(39) wait(300) next for d = 1 to 3 uo.press(33) wait(300) next for e = 1 to 3 uo.press(38) wait(300) next for f = 1 to 3 uo.press(36) wait(300) next for g = 1 to 3 uo.press(37) wait(300) next for h = 1 to 3 uo.press(35) wait(300) next for i = 1 to 2 uo.press(40) wait(300) next end sub
и есть антимакрос:
Code: sub aams() var gumpid=0 var buttonid=0 var buttontext var i=18,j,rand
dim reindex[8] reindex[0]=11 reindex[1]=12 reindex[2]=13 reindex[3]=10 reindex[4]=16 reindex[5]=14 reindex[6]=17 reindex[7]=15
for j=1 to 2 rand=uo.random(10)*100 wait(100) wait(500+rand) if uo.LastGump('text',4)<>"0" then i=19 endif GumpID =val(Mid(uo.LastGump('command',i),16,4)) ButtonID=reindex[GumpID-2225] ButtonText=uo.LastGump('command', ButtonID) uo.LClick(Val(Mid(ButtonText,7,3)),Val(Mid(ButtonText,11,3))) next wait(500) endsub
sub AntiMacro() while not uo.Dead() if not uo.LastGump('replyed') then if uo.LastGump('text', 0) == 'Antimacros System' then aams() end if endif wait(500) wend
end sub
И сам Вопрос куда вставить антимакрос что бы он работал не 1 раз а постоянно кагда вылазила табличка. Еще 1 вопрос в скрипте вписано что бы он реколился от ПК, а он это не делает что не правильно (исправьте плиз). И когда вылазиет антимакрос он его вводит правильно и стоит не копает приходится 2 раза кликать на кирку и такая же история когда он реколится в другую шахту. Плиз помогите...
|