Page 1 of 1

Народ поправте скриптик!

Posted: 2005-03-20 12:19:21
by Balu
Вот часть скрипта на мининг! Нужно что бы чар копал в одной координате только определённое количество раз, а то не совсем коректно получается когда у чара скилл маловат для выкапывание высшей и средней руды он капает одну и туже точку до усёру, потому как физлит всё время! Тоесть мне нужно что бы чар после допустим 10 физлов в одной координате переходил к следующей! заранее всем спасибо!

Code: Select all

sub maning()
var  mx, my, mz, i, j, jor, ser, noto
DIM MRuna[11] ; масив айди рунок в шахты
MRuna[1]='0x412E0CB5'
MRuna[2]='0x416D6932'
MRuna[3]='0x416D6934'
MRuna[4]='0x415399B2'
MRuna[5]='0x415399B1'
MRuna[6]='0x416D6933'
MRuna[7]='0x41291BD7'
MRuna[8]='0x414608E5'
MRuna[9]='0x414608E6'
MRuna[10]='0x4152B781'
MRuna[11]='0x40019A8B'

uo.print('!!выбор кирки ')
uo.exec('addobject Shovel')
while uo.targeting()
wait(100)
wend

if Visor==1 then
uo.Exec('exec Visor')
end if

na4alo:
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-3 to mx+3
for j = my -3 to my+3
while not UO.Hidden()
UO.Warmode("0")
uo.print("Ïðÿ÷åìñÿ...")
UO.UseSkill("Hiding")
wait(4000)
wend
##UO.Print("копаем в координатах "+str(mx-i)+" "+str(my-j))
infologs()
##while not UO.InJournal("no ore here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in rock")
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("Iron Ore") and not UO.InJournal("Copper Ore") and not UO.InJournal("You have found some")
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("Shovel")
while not UO.InJournal("You put") and not UO.InJournal("heavy") 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 have found some")
wait (500)
if uo.injournal("heavy") then
##Pause()
endif
if uo.dead() then
##Pause()
endif
for jor = 0 to 9   
ser = uo.journalserial(jor)
noto = uo.getnotoriety(ser)

if noto <> 1 and noto <> 0 and not uo.injournal("elemental") then
if uo.waiting() then
uo.canceltarget()
endif
goto end
endif


next   
wend
if uo.weight > uo.str*4 then  ;Максимальный вес при котором домой
goto end
endif
wend
UO.DeleteJournal()
next
next
end:
if uo.waiting() then
uo.canceltarget()
endif
RecallRune(DRuna)
wait(5000)
while not UO.Hidden()
UO.Warmode("0")
uo.print("Ïðÿ÷åìñÿ...")
UO.UseSkill("Hiding")
wait(4000)
wend
loot()



UO.SetReceivingContainer(UnloadCont)
Wait(1000)

Wait(1000)
NRuna=NRuna+1
if NRuna>10 then
NRuna=1
endif
UO.UnSetReceivingContainer()
uo.useobject(UnloadCont)
Wait(1000)

GetRegy()
wait(1000)
EatingFood()
wait(500)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
RecallRune(MRuna[NRuna])
wait(4000)
goto na4alo
end sub

Posted: 2005-03-20 12:25:02
by Sfagnum

Code: Select all

var Poytka, qPopytok=10 ;кол-во сколько раз будет дОлбить одно место

<кусь>

for i = mx-3 to mx+3
for j = my -3 to my+3
while not UO.Hidden()
UO.Warmode("0")
uo.print("I"?y"?a*i`n~y"...")
UO.UseSkill("Hiding")
wait(4000)
wend
infologs()
Poytka = 0
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("Iron Ore") and not UO.InJournal("Copper Ore") and not UO.InJournal("You have found some") and Poytka < qPopytok
UO.DeleteJournal()
if uo.waiting() then
uo.canceltarget()
endif
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Useobject("Shovel")
while not UO.InJournal("You put") and not UO.InJournal("heavy") 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 have found some")
wait (500)
if uo.injournal("heavy") then
##Pause()
endif
if uo.dead() then
##Pause()
endif
if UO.InJournal("but fail") then
   Poytka = Poytka+1
end if
for jor = 0 to 9   
ser = uo.journalserial(jor)
noto = uo.getnotoriety(ser)

if noto <> 1 and noto <> 0 and not uo.injournal("elemental") then
if uo.waiting() then
uo.canceltarget()
endif
goto end
endif


next   
wend
if uo.weight > uo.str*4 then  ;Максимальный вес при котором домой
goto end
endif
wend
UO.DeleteJournal()
next
next

<кусь>

Posted: 2005-03-20 12:35:05
by GimFlex
опередил :cry:

Posted: 2005-03-20 12:36:20
by Balu
Спасибо огромное! всё пашет)))