Скрипт на майнинг (какая то сранная ошибка )

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
agny
Posts: 4
Joined: 2006-07-21 04:28:22

Скрипт на майнинг (какая то сранная ошибка )

Post by agny »

Code: Select all

 sub MiningForeva()


uo.exec('exec Hidding')

uo.print('!!viberi kirku!! ')
uo.exec('addobject Pickaxe')
while uo.targeting()
wait(100)
wend

uo.print('!!viberi sunduk!! ')
uo.exec('addobject container')
while uo.targeting()
wait(100)
wend

begin:


enter()
gotoxy(1698,2975,3)
mine()
leave()

gruz()

enter()
gotoxy(1698,2972,3)
mine()
leave()

gruz()

enter()
gotoxy(1698,2969,3)
mine()
leave()

gruz()

enter()
gotoxy(1698,2966,3)
mine()
leave()

gruz()

enter()
gotoxy(1698,2963,3)
mine()
leave()

gruz()

enter()
gotoxy(1698,2960,3)
mine()
leave()

gruz()

enter()
gotoxy(31700,2958,3)
mine()
leave()

gruz()

enter()
gotoxy(1702,2960,3)
mine()
leave()

gruz()

enter()
gotoxy(1703,2963,3)
mine()
leave()

gruz()

enter()
gotoxy(1703,2966,3)
mine()
leave()

gruz()

enter()
gotoxy(1703,2969,3)
mine()
leave()

gruz()

enter()
gotoxy(1703,2972,3)
mine()
leave()

gruz()

enter()
gotoxy(1703,2976,3)
mine()
leave()

gruz()

enter()
gotoxy(1703,2980,3)
mine()
leave()

gruz()

enter()
gotoxy(1690,2978,3)
mine()
leave()

gruz()

enter()
gotoxy(1687,2975,3)
mine()
leave()

gruz()

enter()
gotoxy(1685,2968,3)
mine()
leave()

gruz()

enter()
gotoxy(1682,2968,3)
mine()
leave()

gruz()

enter()
gotoxy(1679,2968,3)
mine()
leave()

gruz()

enter()
gotoxy(1676,2968,3)
mine()
leave()

gruz()

enter()
gotoxy(1675,2971,3)
mine()
leave()

gruz()

enter()
gotoxy(1677,2974,3)
mine()
leave()

gruz()

enter()
gotoxy(1676,2977,3)
mine()
leave()

gruz()

enter()
gotoxy(1676,2980,3)
mine()
leave()

gruz()

enter()
gotoxy(1676,2984,3)
mine()
leave()

gruz()



goto begin

end sub

########################################################



sub Hidding()
ggg:
while not UO.Hidden()
UO.Warmode("0")
uo.print("Ammie Lee(C)2006")
UO.UseSkill("Hiding")
wait(4000)
wend
goto ggg
end sub


sub mine()
var MaxVes=250 ##- miksimalniy ves - nabrav ego 4ar razgru}I{aets9.
wait(1000)
until uo.hidden()
var y, x, i
for x=-2 to 2
for y=-2 to 2
try:
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+y),"0")
UO.Useobject('Pickaxe')
i=0


while i< 100
if UO.InJournal("but fail") then
wait (1000)
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("You put") then
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("стоющего") then
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("You must wait to perform another action") then
wait (100)
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("nothing here") or UO.InJournal("Try mining") then
wait (100)
i=200
UO.DeleteJournal()
endif
if UO.InJournal("location") or uo.InJournal("in rock") then
wait (100)
i=200
UO.DeleteJournal()
endif
wait (500)
i=i+1
wend


if uo.weight>=MaxVes then
wait (1000)
goto nex0
UO.DeleteJournal()
endif
next
next
nex0:
end sub


sub gruz()
UO.SetReceivingContainer('container')
var i, k

DIM Loot[7]
Loot[0]=0x19b9
Loot[1]=0x19b7
Loot[2]=0x19b8
Loot[3]=0x19ba
Loot[4]=0x0F8c
Loot[5]=0x0F26
Loot[6]=0x0F29


For i=0 to 6
k=0
repeat
UO.FindType(loot[i])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
k=1
endif
until k==1
Next
end sub

##############################################################


sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
uo.print(">")
uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if

ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:

mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if

if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if

if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my #UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub


###############################################################


sub enter()
gotoxy(1705,3030,3)
gotoxy(1705,3017,3)
gotoxy(1705,3011,3)
gotoxy(1696,3002,3)
gotoxy(1694,3000,3)
gotoxy(1694,2992,3)
gotoxy(1694,2984,3)
gotoxy(1697,2980,3)
gotoxy(1697,2976,3)
gotoxy(1697,2971,3)
end sub

sub leave()
gotoxy(1697,2971,3)
gotoxy(1697,2976,3)
gotoxy(1697,2980,3)
gotoxy(1694,2984,3)
gotoxy(1694,2992,3)
gotoxy(1694,3000,3)
gotoxy(1696,3002,3)
gotoxy(1705,3011,3)
gotoxy(1705,3017,3)
gotoxy(1705,3030,3)
end sub



########################################




sub hgb()




gotoxy(2351,811,1)
gotoxy(2351,839,1)
gotoxy(2362,849,1)
gotoxy(2351,866,1)

gruz()

gotoxy(2362,849,1)
gotoxy(2351,839,1)
gotoxy(2351,811,1)

##########################################
end sub

sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
;UO.Exec('terminate all')
;UO.Exec('exec autoload')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub

sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub
 

мож я чего то не правильно вставил :( ? Но выдаёт такую ошибку при попытке запустить его..
Unhandled exception in parcer
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

гдето нехватает
end if
wend
until
next
agny
Posts: 4
Joined: 2006-07-21 04:28:22

Post by agny »

а не мог бы помочь в поиске пропущенного, а то я уже 6 раз перепроверил...
Mihail
Expert!
Posts: 548
Joined: 2005-05-20 20:30:10
Contact:

Post by Mihail »

тут как-то выкладывали скрипт модуль в котором отмечались разными цветами открытые\закрытые тэги
1a2a3a4a5a6a
Posts: 173
Joined: 2006-02-10 13:26:37

Post by 1a2a3a4a5a6a »

Code: Select all

enter() 
gotoxy(31700,2958,3)
mine()
leave()

:shock:
Shard: Dragon World
agny
Posts: 4
Joined: 2006-07-21 04:28:22

Post by agny »

to 1a2a3a4a5a6a И чего ты этим хочеш сказать??


а по поводу скрипта...там ошибка вот где

Code: Select all

sub mine() 
var MaxVes=250 ##- miksimalniy ves - nabrav ego 4ar razgru}I{aets9.
wait(1000)
until uo.hidden()
var y, x, i

там где until
Ex-Brodyaga
Junior Expert
Posts: 150
Joined: 2004-04-12 20:26:41

Post by Ex-Brodyaga »

agny wrote:to 1a2a3a4a5a6a И чего ты этим хочеш сказать??
там где until


Он хотел сказать, что у тебя координата 5-ти значная
no_t1m3
Posts: 4
Joined: 2006-08-08 10:35:09

Post by no_t1m3 »

ja pomogu

sub main()
var x,y,where_x,where_y,waits, coords , resources_count, times_dig=0, ore='0x19b9',goldsand='0x0eed', fishstake='0x097b',pickaxe='0x0e85',hammerpick='0x
#wait(1000)
#until uo.hidden

143c', shovel='0x0f39', dagger='0x0f51',clay='0x1be9'
while uo.weight<60000
x=-2
while x<=2
y=-2
while y<=2
while not UO.Hidden()
UO.Warmode("0")
uo.print("no_t1m3@mail.ru (c)2006")
UO.UseSkill("Hiding")
wait(6000)
wend
where_x=uo.getx()
where_y=uo.gety()
resources_count=uo.count(ore)+uo.count(goldsand)+uo.count(clay)
coords="waittargettile "+"0 "+str(where_x+x)+" "+str(where_y+y)+" 0"
uo.exec(coords)
if uo.count(pickaxe)>0 then
uo.usetype(pickaxe)
else
if uo.count(hammerpick)>0 then
uo.usetype(hammerpick)
else
if uo.count(shovel)>0 then
uo.usetype(shovel)
else
while (uo.count(pickaxe)+ uo.count(shovel)+uo.count(hammerpick)<1)
uo.waittargettype(dagger)
uo.useskill('Arms Lore')
wait(10000)
wend
endif
endif
endif
###uo.print(coords); - for debug - prints calculated coordinates in command line
waits=0
repeat
wait(1000)
waits=waits+1
until resources_count<>(uo.count(ore)+uo.count(goldsand)+uo.count(clay)) or waits>6
if (uo.count(ore)+uo.count(goldsand)+uo.count(clay))==resources_count then
y=y+1
endif
times_dig=times_dig+1
if times_dig>20 then
if uo.count(fishstake)>0 then
uo.usetype(fishstake)
endif
times_dig=0
endif
wend
x=x+1
wend
wend
end sub
agny
Posts: 4
Joined: 2006-07-21 04:28:22

Post by agny »

спасибо
Post Reply