Yoko

All sides of Injection
It is currently 2025-10-19 18:20:33

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2008-10-02 15:57:17 
Offline

Joined: 2008-10-02 15:54:27
Posts: 6
Собственно попытался соединить пару скриптов на мининг, дабы сделать тот который подойдет к моему шарду (Oldparadise).
Получилось следующее:

Code:
sub mine() 
var x, y, i, tmp, inside, goto_x, st, first
st=0
first=UO.GetX()

start:
inside=0
for y=-2 to 2
for x=-2 to 2

try:
UO.Exec ("waittargettile "+" 1340 "+STR(UO.GEtX()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0E85")
i=0
while i< 100
if UO.InJournal("You loosen some rocks but fail to find any useable ore") then
wait (1000)
i=200
UO.DeleteJournal()
goto try
endif

if UO.InJournal("Try mining elsewhere") then
i=200
UO.DeleteJournal()
endif

if UO.InJournal("You cant mine in this Region.") then
i=200
UO.DeleteJournal()
endif

if UO.InJournal("You must wait to perform another action") then
wait (1000)
i=200
UO.DeleteJournal()
goto try
endif

if uo.InJournal("till") then 
wait(1000)
i=200
UO.DeleteJournal()
goto try
endif 

if uo.InJournal("Elemental") or uo.InJournal("is attacking you") then
killelem()
wait(1000) 
i=200
UO.DeleteJournal()
goto try
endif 

if UO.InJournal("There is nothing here to mine for")  then
wait (1000)
i=200
UO.DeleteJournal()
endif

if UO.InJournal("You have no line of sight to that location") then
wait (1000)
i=200
UO.DeleteJournal()
endif

if UO.InJournal("You stop Mining") then
i=200
UO.DeleteJournal()
endif

if UO.InJournal("That is too far away.") then
i=200
UO.DeleteJournal()
endif

wait (500)

i=i+1


if uo.weight > 700 then
goto end
endif
wend
UO.DeleteJournal()
next
next
goto mine

if st == 0 then
goto_x=UO.GetX()+5
while inside < 10
while UO.GetX() < goto_x
UO.Press (39, 1, 500)
inside=0
wend

while UO.GetX() > goto_x
UO.Press (37, 1, 500)
inside=0
wend
inside=inside+1
wait (300)
wend
st=1
goto start
endif

if st == 1 then
while inside < 10
while UO.GetX() < first
UO.Press (39, 1, 500)
inside=0
wend

while UO.GetX() > first
UO.Press (37, 1, 500)
inside=0
wend

inside=inside+1
wait (300)
wend
st=0
endif

end:
if uo.waiting() then
uo.canceltarget()
endif
uo.recall("0x4009A550, 0x0002") ; домой
wait(10000)
 
wait(3000)
wend

reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.recall("0x4009A550, 0x0009") ; в шахту
mx = UO.GetX("self")
my = UO.GetY("self")
wait(10000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then ; здесь не могу подогнать под свои переменные
goto reccal
endif
goto mine
end sub

sub loot()
if uo.waiting() then
uo.canceltarget()
endif
VAR a,Exit
VAR UnloadCont='0x400E6C37' ; сундук 
DIM Ore[5]
Ore[0]=0x19B9 ; 4 and more ore
Ore[1]=0x19B7 ; 1 ore
Ore[2]=0x19BA ; 2 ore
Ore[3]=0x19B8 ; 3 ore
UO.SetReceivingContainer(UnloadCont)
wait(500)
For a=0 to 3
Exit=0
repeat
UO.FindType(Ore[a])
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
end sub


Постоянно выдает ошибки, не могу запустить, а т.к. в инжекте разбираюсь не очень хорошо - не могу исправить.
После добавления новых функций типа end:, reccall:, выдает ошибку о том, что не понимает, что такое start;...

Подскажите пожалуйста, что надо исправить в скрипте. Заранее спасибо :)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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:  
Powered by phpBB® Forum Software © phpBB Limited