Yoko

All sides of Injection
It is currently 2025-10-28 17:08:14

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Майнинг
PostPosted: 2006-07-18 18:10:12 
Offline

Joined: 2006-07-07 09:06:14
Posts: 7
вот скрипт на майнинг с ходилкой, но чего то не могу настроить... когда должен начинать копаь пишет "ю кент си таргет"
Code:
sub MiningForeva()

var Pickaxe="0x0E85"
var container="0x40028AF8"


uo.exec('exec Hiding')


begin:


enter()
gotoxy(3255,2221,1)
mine()
leave()

gruz()

enter()
gotoxy(3255,2214,1)
mine()
leave()

gruz()

enter()
gotoxy(3255,2207,1)
mine()
leave()

gruz()

enter()
gotoxy(3255,2200,1)
mine()
leave()

gruz()

enter()
gotoxy(3250,2200,1)
mine()
leave()

gruz()

enter()
gotoxy(3250,2207,1)
mine()
leave()

gruz()

enter()
gotoxy(3250,2214,1)
mine()
leave()

gruz()

enter()
gotoxy(3250,2221,1)
mine()
leave()

gruz()

enter()
gotoxy(3250,2196,1)
mine()
leave()

gruz()

enter()
gotoxy(3243,2214,1)
mine()
leave()

gruz()

enter()
gotoxy(3244,2222,1)
mine()
leave()

gruz()

enter()
gotoxy(3259,2221,1)
mine()
leave()








goto begin

end sub

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



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

sub mine()
var MaxVes=300 ##- 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
while not UO.Hidden()
   UO.Warmode("0")
   uo.print("????????...")
   UO.UseSkill("Hiding")
   wait(6000)
   wend
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[6]
  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<x then
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<y then
#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(3291,2266,1)
gotoxy(3288,2267,1)
gotoxy(3284,2253,1)
gotoxy(3264,2235,1)
gotoxy(3264,2215,1)
end sub

sub leave()
gotoxy(3264,2215,1)
gotoxy(3264,2235,1)
gotoxy(3284,2253,1)
gotoxy(3288,2267,1)
gotoxy(3291,2266,1)
end sub



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




sub hgb()




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

gruz()

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

##########################################
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

Sub Hiding()
var i=1
repeat
for i=1 to 8
if not uo.hidden() then
UO.UseSkill("Hiding")
UO.DeleteJournal()
Repeat
Wait(10)
Until UO.InJournal("You have hidden yourself well") or UO.InJournal("You can't seem to hide here.")
end if
next
for i=1 to 8
wait(200)
if not uo.hidden() then
UO.UseSkill("Hiding")
UO.DeleteJournal()
Repeat
Wait(10)
Until UO.InJournal("You have hidden yourself well") or UO.InJournal("You can't seem to hide here.")
end if
next
Wait(100)
until UO.Dead()
end sub


Last edited by euphoria on 2006-07-18 19:11:16, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2006-07-18 18:25:14 
Offline
Expert!
User avatar

Joined: 2005-01-15 19:15:05
Posts: 791
Location: Dragon World
Тип кирки проверь, может флипнутая.

_________________
Image


Top
   
 Post subject:
PostPosted: 2006-07-18 18:40:29 
Offline
User avatar

Joined: 2006-07-17 16:22:48
Posts: 30
Думаю врядли из-за типа кирки, тогда бы писало No Item Found или чото подобное, а тут будто чар или не доходит то точки призначения, либо он пытается копать дето в левом месте. Ошибка по-моему дето в этом районе:
Code:
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+y),"0")

Попробуй кароче взять uo.infotile() с точки, где копать и первую цифру впиши на место "1341", может поможет :roll:

_________________
Image


Top
   
 Post subject:
PostPosted: 2006-07-18 18:49:04 
Offline

Joined: 2006-07-07 09:06:14
Posts: 7
ShadowX wrote:
Думаю врядли из-за типа кирки, тогда бы писало No Item Found или чото подобное, а тут будто чар или не доходит то точки призначения, либо он пытается копать дето в левом месте. Ошибка по-моему дето в этом районе:
Code:
UO.WaitTargetTile("1341",STR(UO.GetX()+x),STR(UO.GetY()+y),"0")

Попробуй кароче взять uo.infotile() с точки, где копать и первую цифру впиши на место "1341", может поможет :roll:

я тоже думаю что в этом проблема. но как ни странно в 1 шахте ,infotile в разных клетках выдает разные тайлы...


Top
   
 Post subject:
PostPosted: 2006-07-18 18:56:54 
Offline
User avatar

Joined: 2006-07-17 16:22:48
Posts: 30
Тогда может быть проблема в последней координате Z, может шахта горбатая? :D

_________________
Image


Top
   
 Post subject:
PostPosted: 2006-07-19 17:16:18 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
1339 попробуй

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-07-19 22:11:45 
Offline
User avatar

Joined: 2006-07-17 16:22:48
Posts: 30
Если на каждом тайле выдает новую графику, то переделай скрипт, чтобы собирал тайлы в файл из которого потом будет в будущем читаться все координаты и графика. А то такой скрипт как у тебя он ненадежен и занимает больше места, можно хорошо подрезать, сделав так как я посоветовал. Так работают практически все скрипты :D

_________________
Image


Top
   
 Post subject:
PostPosted: 2006-07-27 15:33:24 
Offline
User avatar

Joined: 2006-07-27 14:58:24
Posts: 6
А я думаю что если ненайду я скрипт ГОТОВЫЙ то срехнусь :roll:


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited