Вот мой скрипт на мининг по РУНУО , переделанный из скипта на ламбер
Вполне работает, я на нем копаю и в шахтах и на кочках
Code: sub Metka_dereva() # Около дома копаем руду repeat uo.infotile() wait(3000) until false end sub ;*********************************************************************************** var Derevo = 0x19b9 ; это руда var Topor = 0x0e86 ; Это кирка для руды var Box = 0x401e6ec4 ; Ящик около ограды Var FileName='c:\_A\_Macr\min.txt' Var MaxWeight Var MoveDelay=1000 # Промежуток между шагами Var MoveNumber=1 # Количество шагов при смене дислокации Var Ep=0.172 # Значение ширины угла хождения при определении направления. #Если на пути встречаются сложные и широкие препятствия - увеличить. #0.172 - сбалансированный. var XN = 1117 var YN = 1462 MaxWeight= ((uo.STR*3.5)+39) var Stoplocation sub start() uo.say("BANK") UO.Exec('terminate main') uo.exec('exec main') end sub sub Main() wait(1000) uo.Targeting('self')
uo.set('norbcalc','1') uo.set('norbcheck','1') uo.set('injectecho','1')
if uo.count(Topor) < 2 then GrAxe() end if Rubit() EndSub ;--------------------------------------------- РУБИМ ----------------------------- Sub Rubit() Var Tl,T,X,Y,Z Var F var Tim var Jurn var sc var n Dim Сli[9] Сli[0]="cliloc# 0xA867" ;You can't mine... Сli[1]="cliloc# 0xAD03" ;You loosen Сli[2]="cliloc# 0xAD00" ;there no metal Сli[3]="cliloc# 0x6B31" ;backpack full Сli[4]="cliloc# 0xEE46" ;worn out tool! Сli[5]="cliloc# 0x5DE1" ;dull cuper Сli[6]="cliloc# 0x5DE6" ;agapit Сli[7]="cliloc# 0xA2DE" ;is too far away Сli[8]="cliloc# 0xACF9" ;where do you wish to dig Сli[9]="cliloc# 0xA866" ;You can't mine...
Begin: if uo.count(Topor) < 3 then GrAxe() end if uo.say("Rubim!") sc =1 Stoplocation = 0 F=File(FileName) F.Open()
Beg: Tl=safecall F.Readln() Tl=Trim(Tl) If Tl=='File read error' Then GoTo Ext EndIf T=GetNumb(Tl,0) X=GetNumb(Tl,1) Y=GetNumb(Tl,2) Z=GetNumb(Tl,3) UO.Print('GoTo next point ' + str(sc) + ' X= '+ str(X) + ' Y= '+str(Y)) sc = sc+1 if X == 0 then ; --------------- Если координаты нулевые то днлаем вывод что список кончился --- UO.Print('Spisok konchilsia nachinaem snachala !!!') main() end if gotoxy(X,Y,1) ; --------------- Ходим по деревьям по точкам из файла c тайлами ----------- if UO.Life<40 then gotoxy(3190,595,1) ; ------------- Заместо реколла бежим сами к точке сброса GrDerevo() ; Скидываем дерево wait(1000) ubili() endif
if Stoplocation == 1 then GrDerevo() GrAxe() GoTo Ext EndIf
REPEAT uo.deletejournal() UO.WaitTargetTile(Str(T),Str(X),Str(Y),Str(Z)) UO.usetype(Topor) wait(1500) Jurn=UO.Journal(0) UNTIL Jurn == Сli[0] or (UO.Weight > (MaxWeight-10)) or Jurn == Сli[2] or Jurn == Сli[7] or Jurn == Сli[9] ; If Jurn == Сli[2] or Jurn == Сli[0] or Jurn == Сli[7] or Jurn == Сli[9] then UO.Print('there no metal !!!') GoTo Beg EndIf while uo.dead() ; Если убили то бежим к точке оживления ubili() UO.Exec('terminate all') wend
If (UO.Weight > (MaxWeight-10)) or uo.count(Topor) < 1 then UO.Print('backpack full!!!') gotoxy(3190,595,1) ; ------------- Заместо реколла бежим сами к точке сброса GrDerevo() ; Скидываем дерево GrAxe() ; Берем топоры wait(1000) main() EndIf EndSub ;------------------------------------------------------------------------------------------------- Sub GetNumb(C,I) ; Процедура разборки тайлов по пробелам var J,T,K J=0 K=1 While K>0 J=J+1 If (Mid(C,J,1)==' ') Or (J>=Len(C)-1) Then If I==0 Then T=Val(Left(C,J)) Else T=GetNumb(Right(C,Len(C)-J-1),I-1) EndIf K=0 EndIf wend UO.Print(T) return T endsub ;--------------------------------------------- sub GrDerevo() ; Процедура скидывания дерева в уазаный в начале ящик repeat uo.say("BANK") wait(500) uo.findtype(Derevo) #Derevo uo.moveitem('finditem','0',Box) wait(700) until not uo.count(Derevo) end sub ;--------------------------------------------- sub GrAxe() ; Процедура взятия топоров из ящика var Mes='Contains' var Tim uo.deletejournal() uo.say('Started') wait(3000) if uo.count(Topor) < 4 then uo.findtype(Topor,'-1',Box) UO.grab('1','finditem') Wait(1200) uo.findtype(Topor,'-1',Box) UO.grab('1','finditem') wait(1000) uo.findtype(Topor,'-1',Box) UO.grab('1','finditem') wait(1000) end if end sub ; ------------------------------------------ Ходилка --------------------------------------
sub GotoXY(x,y,prec) 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 Control() var Notoriety,IsNPC,Name while not uo.dead() if uo.InJournal('',1) then IsNPC=str(uo.IsNPC(uo.JournalSerial(0))) if IsNPC == '1' then Notoriety=str(uo.GetNotoriety(uo.JournalSerial(0))) Name=uo.GetName(uo.JournalSerial(0)) UO.Print(Notoriety) if Notoriety=='6' or Notoriety=='5' or Notoriety=='4'then UO.Exec('terminate main') gotoxy(592,2141,1) ; Сматываемся к точке сброса uo.say("Guard") uo.TextOpen() uo.TextPrint('Появился грязный ПК - '+name) uo.Print('Warning PK Detected') UO.Exec('terminate all') end if end if end if #uo.DeleteJournal() wait(100) wend end sub
sub ubili() GotoXY(3268,571,1) GotoXY(3338,493,1) GotoXY(3353,289,1) GotoXY(3353,289,1) ; Слишком больше растояние не добежать за раз end sub sub ogil() GotoXY(3338,493,1) GotoXY(3268,571,1) GotoXY(3190,610,1) end sub
|