Yoko
http://forum.yoko.com.ua/

Мужики помагите с реконнектором.)
http://forum.yoko.com.ua/viewtopic.php?f=20&t=12641
Page 1 of 1

Author:  No***Name [ 2007-10-19 23:59:48 ]
Post subject:  Мужики помагите с реконнектором.)

Вот скрипт
Code:
sub mining() 
var mx, my, mz, i, j
var ismining, ixx, isheavy
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")

uo.setcatchbag('0x400FDED9')

While not UO.Dead()
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+2
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
ismining = 1
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 ismining

UO.DeleteJournal()
hide()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype('0x0F39')
ixx = 0
ismining=1
while not UO.InJournal("You put") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("far away") and not UO.InJournal("in rock") and ixx <= 100
wait (100)
ixx = ixx + 1
wend
while UO.InJournal("but fail")
Wait (100)
UO.DeleteJournal()
wend



#if uo.injournal("Rusty") then
#ismining = 0
#endif
#if uo.injournal("Old Copper") then
#ismining = 0
#endif
#if uo.injournal("Dull Copper") then
#ismining = 0
#endif
#if uo.injournal("the Copper") then
#ismining = 0
#endif
#if uo.injournal("Iron") then
#ismining = 0
#endif
#if not ismining then
#uo.print("Not mining here")
#endif
wend
UO.DeleteJournal()
next
next
wend
end sub

sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')

repeat
wait(50)
until UO.InJournal('backpack')
end sub


Вообщем оч. прошу помоч) Нужно пришить к срипту реконнектор, только так чтобы реконнектор запускался при запуске самого скрипта)

Author:  Denton [ 2007-10-20 08:42:04 ]
Post subject: 

Code:
sub mining()
var mx, my, mz, i, j
var ismining, ixx, isheavy
mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
uo.Exec('exec Reconnect')

uo.setcatchbag('0x400FDED9')

While not UO.Dead()
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+2
UO.Print("Now Mining In: "+str(mx-i)+" "+str(my-j))
ismining = 1
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 ismining

UO.DeleteJournal()
hide()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype('0x0F39')
ixx = 0
ismining=1
while not UO.InJournal("You put") and not UO.InJournal("location") and not UO.InJournal("no ore") and not UO.InJournal("far away") and not UO.InJournal("in rock") and ixx <= 100
wait (100)
ixx = ixx + 1
wend
while UO.InJournal("but fail")
Wait (100)
UO.DeleteJournal()
wend



#if uo.injournal("Rusty") then
#ismining = 0
#endif
#if uo.injournal("Old Copper") then
#ismining = 0
#endif
#if uo.injournal("Dull Copper") then
#ismining = 0
#endif
#if uo.injournal("the Copper") then
#ismining = 0
#endif
#if uo.injournal("Iron") then
#ismining = 0
#endif
#if not ismining then
#uo.print("Not mining here")
#endif
wend
UO.DeleteJournal()
next
next
wend
end sub

sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')

repeat
wait(50)
until UO.InJournal('backpack')
end sub

sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
endif
wait(20000)
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.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

Author:  No***Name [ 2007-10-20 20:35:53 ]
Post subject: 

hide()-Тут ошибку выдает(

Author:  Okypok [ 2007-10-20 22:15:48 ]
Post subject: 

О_о потому что нету такой функции. Либо вставляй функцию хайда, либо удаляй эту строчку, на которую он ругается. Если хайд у тебя не особо нужен.

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/