sub main() ; + EDIT ++++++++++++++++++ var zona = 6; ; +++++++++++++++++++++++++ var m, i, a, tr = 1 var tX = UO.GetX('self') var tY = UO.GetY('self') for i=1 to zona if tr then m = - 5 else m = 5 endif for a=1 to zona tY = tY + m GotoXY(tX,tY) if Lamber() then return 0 endif next tX = tX - 5 if tr then tr = 0 else tr = 1 endif next endsub
Sub Lamber() var X, Y, MaxRange = 3 for Y = -MaxRange to MaxRange for X = -MaxRange to MaxRange if Tree(UO.GetX()+X, UO.GetY()+Y) then repeat UO.Warmode(0) while not UO.Hidden() UO.UseSkill('Hiding') repeat wait(100) until UO.InJournal("can't seem to hide|to perform|stop trying") UO.DeleteJournal() wend wait(100) UO.WaitTargetTile(Tree(UO.GetX()+X, UO.GetY()+Y), UO.GetX()+X, UO.GetY()+Y, UO.GetZ()) UO.UseObject("_0x0F43"); <-- Axe repeat wait(100) until UO.InJournal("You put the|useable wood|You can|That is too far away|here to chop|is attacking you") || UO.Dead() if UO.InJournal("is attacking you") || UO.Weight >= 40 + UO.STR * 3.5 || UO.Dead() then UO.Sound(61) return 1 endif until UO.InJournal("here to chop|You can|That is too far away") UO.Dead() endif next next return 0 end sub
Sub Tree(X,Y) var i if UO.PrivateGetTile(X, Y, -1, 3274, 3302) then for i=3274 to 3302 if UO.PrivateGetTile(X, Y, -1, i, i) then if i==3278 || i==3279 || i==3281 || i==3282 || i==3284 || i==3285 || i==3287 || i==3289 then return 0 endif if i==3291 || i==3292 || i==3294 || i==3295 || i==3297 || i==3298 || i==3300 || i==3301 then return 0 endif return i end if next end if return 0 end sub
Sub GotoXY(x,y) var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0 for i=1 to 60 myX=UO.GetX(); myY=UO.GetY(); if LastX==myX and LastY==myY then halt=halt+1 else halt=0 end if if halt>=10 then if UO.GetDir()==1 then for z=0 to 8 UO.Press(40) next end if if UO.GetDir()==3 then for z=0 to 8 UO.Press(37) next end if if UO.GetDir()==5 then for z=0 to 8 UO.Press(38) next end if if UO.GetDir()==7 then for z=0 to 8 UO.Press(39) next end if halt=15 end if if Numb(x-myX)<=1 and Numb(y-myY)<=2 then return 1 end if if x<=myX then if y<=myY then for z=0 to 3 UO.Press(38) next else for z=0 to 3 UO.Press(37) next end if else if y<=myY then for z=0 to 3 UO.Press(39) next else for z=0 to 3 UO.Press(40) next end if end if lastX=myX lastY=myY wait(200) next return 0 end sub
Sub Numb(num) if num>=0 then return num else return num*(-1) end if end sub
В топку! У меня на стелсе, конечно, 421 строка - но там куча комментов, функций, авторес чара, разгрузка, восстановление стамины, добор топоров и прочее. Если же только саму рубку и перемещение взять - около 80 строк.
Ни один скрипт не работает? Пора обновить Инжект...
Все работает, но хочется большего? Пора переходить на стелс...
sub lumber() var f=file("C:\trees3.dat"),TreeCount=0,i dim TreeX[500],TreeY[500],TreeT[500] uo.exec('addobject axe') while uo.targeting() wait(100) wend f.open() TreeCount=safe call f.readNumber() for i=1 to TreeCount TreeT[i]=safe call f.ReadNumber() TreeX[i]=safe call f.ReadNumber() TreeY[i]=safe call f.ReadNumber() next f.close() while not uo.dead() for i=1 to TreeCount GotoXY(treex[i],treey[i]) ToHide() GetTree(str(treeT[i]),str(treeX[i]),str(TreeY[i]),str(uo.getz())) next DropLogs() wend endsub
Sub ToHide() while not UO.Hidden() uo.deletejournal() UO.UseSkill("Stealth") wait(4100) wend end sub
Sub GetTree(type,x,y,z) var ms1="logs in your pack" var ms2="logs here to chop" var ms3="log in your pack" var ms4="You hack at the tree for a while" var ms5="That is too far away" var ms6="You can't reach this" wait(200) repeat uo.deletejournal() uo.waittargettile(type,x,y,z) uo.useobject('axe') repeat wait(100) until uo.injournal(ms1) or uo.injournal(ms2) or uo.injournal(ms3) or uo.injournal(ms4) or uo.injournal(ms5) or uo.injournal(ms6) until uo.injournal(ms2) or uo.injournal(ms5) or uo.injournal(ms6) end sub
sub DropLogs() var a,Exit,Chest='0x4035FD15',Logs='0x1BDD' GotoXY(1560,2361) ToHide() uo.findtype(Logs,'-1','backpack') while uo.findcount()>0 uo.moveitem('finditem','all',Chest) wait(700) uo.findtype(Logs,'-1','backpack') wend end sub
Sub GotoXY(x,y) var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0 for i=1 to 60 myX=uo.getX(); myY=uo.getY(); if LastX==myX and LastY==myY then halt=halt+1 else halt=0 end if if halt>=10 then if uo.GetDir()==1 then for z=0 to 8 uo.Press(40) next end if if uo.GetDir()==3 then for z=0 to 8 uo.Press(37) next end if if uo.GetDir()==5 then for z=0 to 8 uo.Press(38) next end if if uo.GetDir()==7 then for z=0 to 8 uo.Press(39) next end if halt=15 end if if Numb(x-myX)<=1 and Numb(y-myY)<=2 then return 1 end if if x<=myX then if y<=myY then for z=0 to 3 uo.Press(38) next else for z=0 to 3 uo.Press(37) next end if else if y<=myY then for z=0 to 3 uo.Press(39) next else for z=0 to 3 uo.Press(40) next end if end if lastX=myX lastY=myY wait(200) next return 0 end sub
Sub Numb(num) if num>=0 then return num else return num*(-1) end if end sub
Sub CheckLag() UO.DeleteJournal() UO.Click('backpack') repeat wait(50) until UO.InJournal('backpack') end sub
omi4 wrote:Добавив еще 50-60 строк его можно научить летать (например в 200 точек), брать и сбрасывать, ресатся.
...и радостно ловить анхандлед еррор ин парсер каждые 2-3 часа...
Это про скрипт или про инжект?
В 50-60 не уложился, вышло ровно +70 строк.
Рес(пустая, незнаю под кого написать)+
Добор(включая топоры..) +
разгрузка+
Медитация+
Стелса+
Рекол+
Восстановление стамины+
Работа с банком или с сундуком(автомат)+
Кол-во рун любое, ничего прописывать не нужно.
Настроек нет. Комментариев нет, нечего коментировать.
Кол-во строк 219
А чего должно быть стыдно? Это же просто юмор такой, ты этого понять не можешь. Слишком мало тут на форуме времени пока провел. Ты посмотри кто между собой "пиписками" мерялся - сплошь одни "эксперты".
Кстати, не понимаю, почему у Омыча нет такой приписки...
Ни один скрипт не работает? Пора обновить Инжект...
Все работает, но хочется большего? Пора переходить на стелс...
sub smart_lumber() uo.addObject("hatchet") while uo.targeting() wait(100) wend repeat uo.addObject( "tree" ) while uo.targeting() wait(100) wend repeat uo.exec( "waittargettile " + uo.lasttile() ) uo.useobject( "hatchet" ) deljournal( "no logs|hack at the tree|pack" ) repeat wait(100) until uo.injournal( "no logs|hack at the tree|pack" ) until uo.injournal( "no logs" ) until false endsub
На самом деле очень удобно, когда нужно нарубить пару десятков логов, а вставать или настраивать огроменные скрипты - лениво.