Мининг... - Опять?СНОВА!
Moderators: Murderator+, Murderator
Мининг... - Опять?СНОВА!
Всем доброго времени суток. Вот я гамлю в уо уже больше 2 лет. Прокачал крафтовые скилы.... скриптов было много, в том числе и от сюда, но..... встала необходимость постоять в шахте (не вип. у меня есть випка, и к ней отличный скрипт) и покапать.... и о ужас... нету нормального скрипта. Я сразу сюда... Тема "Добывающие скрипты" - "Миниг" - 5 или 7 скриптов.... ни один не подходит.... либо для 3-4 шахт либо для випки....... ПОИСК - результатов как ни странно не дал... Да, есть скрипты но либо с ошибками, либо нужно делать глобальные изменения......
Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!
Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!
Re: Мининг... - Опять?СНОВА!
ваша Дикость... не тупи.DIKIY wrote:Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!
из своего скрипта на Випку выдерни соответствующую процедуру и фсё.
Re: Мининг... - Опять?СНОВА!
Sfagnum wrote:ваша Дикость... не тупи.DIKIY wrote:Большая просьба выложить скрипт.... Чар стоит в шахте и копает вокруг себя на расстоянии 3 клеток. по достижении веса - скрипт останавливается.... не надо ни реколов, ни выгрузки.... Обычная простенькая копалка, думаю она будет полезна не только мне. Спасибо!
из своего скрипта на Випку выдерни соответствующую процедуру и фсё.
Сфаг.... ну я же писал... не умею я так глубоко модернезировать... я пока так и сделал но он вываливается с ошибками, т.е. нужно следить постоянно ))) Поэтому и прошу )
Держи лентяй
в копает лопатой. найдёшь... переделывай под кирку
в копает лопатой. найдёшь... переделывай под кирку
Code: Select all
sub Dig()
var mx = UO.GetX("self"), my = UO.GetY("self"), mz = UO.GetZ("self"),TileNum='1339', t=0
var i,j,s
tohide()
if UO.Dead() then
return
end if
if UO.ContainerOf('objTools') <> UO.GetSerial('backpack') then
if findShovel() == 0 then
return
end if
end if
for i = -4 to 4
for j = -4 to 4
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock")
tohide()
CheckLag()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.UseObject('objTools')
s = 0
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("OOPS") and not UO.InJournal("attacking you") and s < 500
wait(500)
s = s + 1
wend
if UO.InJournal("but fail") then
wait(1000)
end if
wend
UO.DeleteJournal()
next
next
return 1
end sub
Sub findShovel()
var tShovel
UO.UseObject('backpack')
if UO.Count('0x0F3A') > 0 then
tShovel='0x0F3A'
else
tShovel='0x0F39'
end if
if UO.Count(tShovel) > 0 then
UO.FindType(tShovel,'-1','backpack')
UO.AddObject('objTools','finditem')
else
UO.Print('чего то лопаты нет...')
return 0
end if
return 1
end sub
Sub tohide()
while NOT UO.Hidden() and not UO.Dead()
UO.DeleteJournal()
UO.Warmode('0')
UO.UseSkill('Hiding')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied') or UO.Dead()
wend
end sub
Sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(50)
until UO.InJournal('backpack')
end sub
Last edited by Sfagnum on 2005-05-04 15:52:42, edited 1 time in total.
-
Destruction
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
DIKIY wrote:Sfagnum wrote:Держи лентяй
в копает лопатой. найдёшь... переделывай под кирку
Спасибо, сёдня проверю.....
Большая просьба модераторов выложить этот скрипт в соответствующий раздел!
Только по итогам теста!
ПС: мб топик, а не раздел?
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Destruction wrote:DIKIY wrote:Sfagnum wrote:Держи лентяй
в копает лопатой. найдёшь... переделывай под кирку
Спасибо, сёдня проверю.....
Большая просьба модераторов выложить этот скрипт в соответствующий раздел!
Только по итогам теста!
ПС: мб топик, а не раздел?
Да, в топик. Скрипт нуждается в доработке.
1. Нужно добавить в переменнтые tShovel.
2. Как только чар попадает на клетку, где отсутствует руда - скрипт останавливается
Вот готовый проверянный мною скрипт!
всё исправил!
Code: Select all
;******************************************
;*** MINING From DIKIY,SAVAGE & SFAGNUM ***
;******************************************
; Чар копает киркой вокруг себя стоя в хайде на 4 клетки.
; при достижении максимального веса описанного в переменной "maxweight=XXX" - скрипт
; переходит к плавилке, плавит всю выкопанную руду по 1 штучке. Затем остановка.
; Предназначен для копки в шахте минока - для Нубов для прокачки мининга :o)
sub Dig()
var mx = UO.GetX("self"), my = UO.GetY("self"), mz = UO.GetZ("self"),TileNum='1339', t=0
var i,j,s ,maxweight=150
tohide()
if UO.Dead() then
return
end if
if UO.ContainerOf('objTools') <> UO.GetSerial('backpack') then
if findShovel() == 0 then
return
end if
end if
repeat
for i = -4 to 4
for j = -4 to 4
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no ore here") and not UO.InJournal("Try mining") and not UO.InJournal("You can't")and not uo.injournal("is nothing")and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock")
tohide()
CheckLag()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.UseObject('objTools')
s = 0
while not UO.InJournal("You put") and not UO.InJournal("Try mining") and not UO.InJournal("You can't") and not UO.InJournal("location") and not uo.injournal("is nothing") 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("OOPS") and not UO.InJournal("attacking you") and s < 500
wait(500)
s = s + 1
wend
if UO.Weight>=maxweight then
smelt()
endif
if UO.InJournal("but fail") then
wait(1000)
end if
wend
UO.DeleteJournal()
next
next
until false
return 1
end sub
Sub findShovel()
var tShovel
UO.UseObject('backpack')
if UO.Count('0x0E85') > 0 then
tShovel='0x0E85'
else
tShovel='0x0F39'
end if
if UO.Count(tShovel) > 0 then
UO.FindType(tShovel,'-1','backpack')
UO.AddObject('objTools','finditem')
else
UO.Print('чего то лопаты нет...')
return 0
end if
return 1
end sub
Sub tohide()
while NOT UO.Hidden() and not UO.Dead()
UO.DeleteJournal()
UO.Warmode('0')
UO.UseSkill('Hiding')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied') or UO.Dead()
wend
end sub
Sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(50)
until UO.InJournal('backpack')
end sub
sub smelt()
walkn(2573,475,"") ; Координаты плавилки
var ore1 = 0x19B7 #Type 1 рудинки
var ore2 = 0x19BA #Type 2 рудинок
var ore3 = 0x19B8 #Type 3 рудинок
var ore4 = 0x19B9 #Type 4 рудинок или более
var delay = 1200 #Задержка на кидание шмота из бекпака
var lasttimer
ore2:
uo.findtype(ore2)
if uo.findcount() > 0 then
UO.Drop('0',0,0,0,'finditem')
wait(delay)
goto ore2
endif
ore3:
uo.findtype(ore3)
if uo.findcount() > 0 then
UO.Drop('0',0,0,0,'finditem')
wait(delay)
goto ore3
endif
ore4:
uo.findtype(ore4)
if uo.findcount() > 0 then
UO.Drop('0',0,0,0,'finditem')
wait(delay)
goto ore4
endif
repeat
uo.findtype(ore4, "-1", "ground")
if uo.findcount() == 0 then
goto ore4_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore4, "-1", "ground")
until uo.findcount() == 0
ore4_end:
repeat
uo.findtype(ore3, "-1", "ground")
if uo.findcount() == 0 then
goto ore3_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore3, "-1", "ground")
until uo.findcount() == 0
ore3_end:
repeat
uo.findtype(ore2, "-1", "ground")
if uo.findcount() == 0 then
goto ore2_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore2, "-1", "ground")
until uo.findcount() == 0
ore2_end:
repeat
uo.findtype(ore1, "-1", "ground")
if uo.findcount() == 0 then
goto ore1_end
endif
uo.grab("1","finditem")
lasttimer = uo.timer()
repeat
wait(300)
uo.findtype(ore1)
until uo.findcount() > 0 or uo.timer()>lasttimer+500
uo.usetype(ore1)
uo.findtype(ore1, "-1", "ground")
until uo.findcount() == 0
ore1_end:
terminate()
endsub
#======================================thx to SavageV==========
# WalkN(X,Y,Serial) - char is walking by dX and dY step
# sub using Home, End, PgUp, PgDown keys
# d'not rebind this key from default action!
# serial - Serial of target or "" - string
# walkwait - delay after keypress
# Example:
# WalkN(2080,2113,'') - go to coordinates
# WalkN(0,0,'0x12345678') - go to target position
#--------------------------------------------------------------
sub WalkN(x,y,Target)
VAR i,StepSucess
VAR dx,dy,Exit=0
While Exit<>1
If Target<>"" Then
dx=UO.GetX(Target)-UO.GetX()
dy=UO.GetY(Target)-UO.GetY()
If UO.GetDistance(Target)<2 Then
Exit=1
Endif
Else
dx=x-UO.GetX()
dy=y-UO.GetY()
If dx==0 AND dy==0 Then
Exit=1
Endif
Endif
If dx<>0 AND dy<>0 Then
If dx>0 AND dy>0 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
Endif
If dx>0 AND dy<0 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
If dx<0 AND dy>0 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
If dx<0 AND dy<0 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
Endif
Endif
If dx<>0 AND dy==0 Then
If dx>0 Then
StepSucess=Go(2,34,300) ;E - PgDown
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
If dx<0 Then
StepSucess=Go(6,36,300) ;W - Home
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
Endif
If dx==0 AND dy<>0 Then
If dy>0 Then
StepSucess=Go(4,35,300) ;S - End
If StepSucess==-1 Then
StepSucess=Go(3,40,300) ;SE - DownArrow
If StepSucess==-1 Then
StepSucess=Go(5,37,300) ;SW - LeftArrow
Endif
Endif
Endif
If dy<0 Then
StepSucess=Go(0,33,300) ;N - PgUp
If StepSucess==-1 Then
StepSucess=Go(7,38,300) ;WN - UpArrow
If StepSucess==-1 Then
StepSucess=Go(1,39,300) ;NE - RightArrow
Endif
Endif
Endif
Endif
Wend
end sub
sub Go(dir,key,walkwait)
VAR x,y
x=UO.GetX()
y=UO.GetY()
while UO.GetDir()<>dir
UO.Press(key)
wait(walkwait)
If UO.GetDir()<>dir Then
CheckLag()
Endif
wend
UO.Press(key)
wait(walkwait)
If x==UO.GetX() AND y==UO.GetY() Then
CheckLag()
Endif
If x==UO.GetX() AND y==UO.GetY() Then
return -1
Else
return 1
Endif
end sub
#####################
# ОСТАНОВКА СКРИПТА #
#####################
sub terminate()
var Time
Time = Time()
UO.Print("!!Скрипт ОСТАНОВЛЕН!!")
UO.TextPrint('Скрипт ОСТАНОВЛЕН: '+Time)
uo.TextPrint('ИТОГ КОПКИ:')
uo.TextPrint('ВСЕГО РУДЫ - '+str(uo.Count('0x19B9')+uo.Count('0x19B7')+uo.Count('0x19BA'))+' шт.')
uo.TextPrint('Из неё Айрона - '+str(uo.Count('0x19B9','0x0000'))+' шт.')
uo.TextPrint('Остальная руда - '+str(uo.Count('0x19B9')+uo.Count('0x19B7')+uo.Count('0x19BA')-uo.Count('0x19B9','0x0000'))+' шт.')
UO.UseSkill("Stealth")
uo.concolor('0x002b')
wait(4000)
uo.exec("terminate all")
end sub
sub time()
var hh,mm,ss,hms,t=str(UO.Time())
if len(t)<=2 then
hh="0"
mm="0"
ss=t
endif
if len(t)==3 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-1)
endif
if len(t)==4 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-2)
endif
if len(t)==5 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-1)
ss=right(t,len(t)-3)
endif
if len(t)==6 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-2)
ss=right(t,len(t)-4)
endif
return hh+":"+mm+":"+ss
end sub
всё исправил!
Last edited by DIKIY on 2005-05-05 09:41:42, edited 4 times in total.