Yoko

All sides of Injection
It is currently 2025-11-08 13:25:27

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2005-01-11 21:17:25 
Offline

Joined: 2005-01-10 16:31:08
Posts: 2
я очень долго и упорно здесь искал не навороченый(нет функции портала домой по рунам ,от пк не убегает) скрипт на мининг и всетаки нашел вот он:

var x,y,i,j,k,l,mx,my
sub main()
x=val(uo.GetX())
y=val(uo.GetY())
for i=-4 to 4
for j=-4 to 4
mining(x,y,i,j)
next
next
end sub

sub mining(x,y,k,l)
var t=0
mx=x+k
my=y+l
uo.deletejournal()
uo.waittargettile(-1,str(mx),str(my),-1)
uo.exec("usetype 0x0e85")
t=uo.timer()
repeat
wait(500)
until (t+100<uo.timer()) or uo.injournal("You put") or uo.injournal("You loosen") or uo.injournal("There is") or uo.injournal("too far") or uo.injournal("no line of")
if uo.injournal("There is") or uo.injournal("too far") or uo.injournal("Copper") or uo.injournal("Tin") or uo.injournal("no line of") then
return 0
else
mining(x,y,k,l)
endif
end sub

но он пишет ошибку на 28 строке : Invalid in number of arguments
можеш плиз глянуть што не так ,,, буду очень очень благодарен,

я обитаю на дрв скрипт(по крайней мере я так думаю) выполняет функцию копания и больше ничего,

заранее благодарен,


Top
   
PostPosted: 2005-01-11 21:25:20 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
Хороший макрос )))


Last edited by 666Man666 on 2005-01-11 23:21:24, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2005-01-11 22:20:08 
Offline
User avatar

Joined: 2004-09-07 18:05:04
Posts: 25
Location: Latvija
:)

_________________
Image
В передаче "За стеклом" стекло поменяли на лупу. Теперь думают как назвать передачу


Top
   
PostPosted: 2005-01-12 00:20:46 
Offline
User avatar

Joined: 2004-11-02 23:52:47
Posts: 86
BUGIMAN wrote:
но он пишет ошибку на 28 строке : Invalid in number of arguments
можеш плиз глянуть што не так ,,, буду очень очень благодарен,

Не, а 28 строчку мы сами должны выичитывать? =)
"Очень долго искал" Сколько месяцев, или лет? Бедолага... =((( :D


Top
   
 Post subject:
PostPosted: 2005-01-12 00:28:04 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
uo.waittargettile(-1,str(mx),str(my),-1)

Вот эта строка не будет работать точно. Синтаксис команды смотри здесь:
http://yoko.netroof.net/help/help.php?l ... targettile


Top
   
 Post subject:
PostPosted: 2005-01-12 00:31:17 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Покопался по сусекам и откопал свой древний-древний простенький скриптец:

Code:
; Mining around char's
;
sub minround()
VAR Kirka = '0x0E85'   ; Тип Кирки
VAR MaxVes = 550   ; Максимальный вес, подымаемый чаром минус 10-15 стоунов
VAR TileNum = '1339'   ; Тайл пола пещеры (наиболее распространенный тип)
VAR x, y, t, k
VAR MaxTime = 100   ; измеряется в 1/10 сек.
VAR ms1 = "There is no ore here to mine"
VAR ms2 = "You can't use"
VAR ms3 = "You put the"
VAR ms4 = "You loosen some rocks"
VAR ms5 = "You are too far away"
VAR ms6 = "Try mining in rock"
VAR ms7 = "You can't see that"
for y=-2 to 2
   for x=-2 to 2
      k = 0
      repeat
         UO.DeleteJournal()
         t = UO.Timer()
         k = k + 1
         UO.CancelTarget()
         wait(300)
         UO.WaitTargetTile( TileNum, STR( UO.GetX() + x ), STR( UO.GetY() + y ), 0)
         UO.UseType( Kirka )
         repeat
            wait(300)
         until UO.InJournal(ms1) OR UO.InJournal(ms2) OR UO.InJournal(ms3) OR UO.InJournal(ms4) OR UO.InJournal(ms5) OR UO.InJournal(ms6) OR UO.InJournal(ms7) OR ((t + MaxTime) < UO.Timer())
         If UO.Weight > MaxVes Then
            ; Вес превышен!
            UO.Print(" Overweight!" )
            return
         Endif
      until ( NOT UO.InJournal(ms4) AND NOT UO.InJournal(ms3) OR (k > 10) )
   next
next
endsub


Top
   
 Post subject:
PostPosted: 2005-01-13 07:16:07 
Offline

Joined: 2005-01-10 16:31:08
Posts: 2
БОЛЬШОЕ СПАСИБО ВСЕМ КТО ПОМОГ


Top
   
 Post subject:
PostPosted: 2005-01-15 09:19:01 
Offline
User avatar

Joined: 2004-07-10 00:38:43
Posts: 203
Location: From DrW
Ещё проще :D
Code:
sub coords() 
UO.DeleteJournal()
var x, y, i, tmp, msg
start:
for y= -2 to 2
for x=-2 to 2
tmp:
UO.Exec ("waittargettile "+" 1343 "+STR(UO.GEtx()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0E85")
i=0
msg = UO.Weight
while i< 50
if UO.InJournal("There is no ore here to mine.") then
i=200
UO.DeleteJournal()
endif
wait(500)
if UO.InJournal("You loosen some rocks but fail to find any useable ore.") then
i=200
UO.DeleteJournal()
endif
if UO.InJournal("You must wait to perform another action") then
i=200
UO.DeleteJournal()
goto tmp
endif
wait(500)
if UO.Weight <> msg then
msg = 0
goto tmp
endif
wend
next
next
goto start
end sub
sub main()
coords()


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