Попробуй этот, руну к дому забивай напротив входа в дом.
Code: ############################################ #_Mining for DRW v1.2_###_Crafted by Sanch_# ############################################
sub Mining() VAR a = 1 # 0 <=> используемые объекты указаны # 1 <=> используемые объекты не указаны # uo.setglobal('recal', '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 return endif uo.exec('exec CheckingItems') end sub
sub CheckingItems() VAR b 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]) < 20 then uo.findtype(Reg[b], '-1', 'Sunduk1') if uo.findcount() > 0 then uo.moveitem('finditem', '20') wait(1000) checklag() else uo.print('Нет необходимого количества регов в сундуке') return endif endif next uo.findtype('0x0E85') #тип кирки# if uo.findcount() < 1 uo.findtype('0x0E85', '-1', 'Sunduk1') if uo.findcount() > 0 then uo.moveitem('finditem', '1') else uo.print('Нет кирки в сундуке') return endif wait(1000) checklag() endif if val(uo.getglobal('back')) == 0 then uo.exec('exec Teleportation') endif end sub
sub Teleportation() VAR a, b, c VAR d = uo.getx('self') repeat while uo.mana < 20 uo.exec('warmode 0') uo.useskill('Meditation') wait(1000) wend a = 0 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 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')) > 3 then uo.setglobal('recal', '1') endif if val(uo.getglobal('back')) == 0 then uo.exec('exec CheckingPlayers') 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 uo.set('finddistance', '15') uo.findtype(Chars[a], '-1', '1') if uo.findcount() > 0 then uo.exec('terminate Teleportation') uo.exec('terminate Obkopka') uo.exec('exec Teleportation') return else wait(500) endif next wend end sub
sub Obkopka() VAR mx, my, mz, a, b, c while not uo.dead() uo.deletejournal() mx = uo.getx('self') my = uo.gety('self') mz = uo.getz('self') for a = mx-4 to mx+4 for b = my-4 to my+4 while not uo.Hidden() c = 0 uo.exec('warmode 0') uo.useskill('Hiding') repeat wait(100) c = c + 1 until uo.Hidden() or c > 40 wend uo.print('!!!КОПАЕМ ТУТ!!!>>> : '+str(mx-a)+' '+str(my-b)) while not uo.injournal('no ore here') and not uo.injournal('location') and not uo.injournal('far away') and not uo.injournal('in rock') 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') wait(100) wend if uo.weight > 600 then #максимальный вес# uo.setglobal('back', '1') uo.exec('terminate CheckingPlayers') GoHome() CheckingItems() Teleportation() uo.exec('exec CheckingPlayers') else wait(50) endif wend uo.deletejournal() next next wend 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.exec('warmode 0') a = uo.getx('self') repeat while uo.mana < 20 uo.warmode('0') uo.useskill('Meditation') wait(1000) wend 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.') uo.opendoor() for c = 1 to 6 uo.press(33) wait(300) next uo.opendoor() wait(500) uo.press(33) wait(500) 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
|