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

МининГ-Проблемка- (Прошу помощи Опытных)
http://forum.yoko.com.ua/viewtopic.php?f=20&t=15154
Page 1 of 1

Author:  MorZE21 [ 2009-10-02 12:21:34 ]
Post subject:  МининГ-Проблемка- (Прошу помощи Опытных)

Проблема в том что Скрип почему то выключается сам по себе, через минут 10-15 копания прошу помогите кто разбирается.

Code:
sub mining() 
VAR x,y,z='0',TileNum='1339'
VAR Last=0,LastTimer
For x=-2 to 2
For y=-2 to 2
Repeat
CheckLag()
ToHide()
UO.WaitTargetTile(TileNum,STR(UO.GetX()+x),STR(UO.GetY()+Y),z)
UO.usetype('0x0E85')
LastTimer=UO.Timer()
repeat
wait(2000)
until UO.InJournal("Try mining") OR UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR UO.InJournal("attacking you") OR LastTimer+150<UO.Timer()
if UO.InJournal('You loosen') then
repeat
wait (500)
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
until UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("Try mining")
Next
Next
end sub

sub tohide()
while NOT UO.Hidden()
UO.DeleteJournal()
UO.FindType('0x0F0E','0x0631','my')
if UO.Life<UO.STR/2 AND UO.GetQuantity('finditem')>0 then
UO.UseType('0x0E86','0x0E86')
UO.Exec('warmode 0')
wait(2000)
else
UO.Exec('warmode 0')
UO.UseSkill('Stealth')
repeat
wait(50)
until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide') OR UO.InJournal('preoccupied')
endif
wend
end sub
 
sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(500)
until UO.InJournal('backpack')
end sub

sub Reconnect()
var ReconnectTime,rflag
ReconnectTime='0'
rflag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rflag then
ReconnectTime=Time()
rflag=0
end if
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'
end if
until false
end sub

sub Time()
var Date,nTime,uTime,i
uTime=str(uo.Time())
nTime=''
for i=0 to Len(uTime)
nTime=uTime[Len(uTime)-i]+nTime
if (i==2) or (i==4) then
nTime=':'+nTime
end if
next
uTime=str(uo.Date())
Date=''
for i=0 to Len(uTime)
Date=uTime[Len(uTime)-i]+Date
if (i==2) or (i==4) then
Date='.'+Date
end if
next
uTime=nTime+' @ '+Date
return uTime
end sub



Если кому не тяжко можете добавить сюда реконнект. Пожалуйста. ЗА Ранее Спасибо большое :roll: :?:

Author:  Scripts Writer [ 2009-10-02 12:31:36 ]
Post subject: 

Зациклить надо

Author:  MorZE21 [ 2009-10-02 12:51:32 ]
Post subject: 

Scripts Writer wrote:
Зациклить надо




Пожалуйста если можеш исправь и выложи сюда, а то Я дуб в этом (( и если не тяжко сможешь прилипить сюда реконнект. Спасиб за ответ ! :oops: :roll:

Author:  Scripts Writer [ 2009-10-02 13:16:26 ]
Post subject: 

Смотри подпись.

Author:  MorZE21 [ 2009-10-02 13:28:23 ]
Post subject: 

Scripts Writer wrote:
Смотри подпись.


Да у меня сейчас нету времени изучать создание скриптов. Прошу переправить те кто могут это сделать !

Author:  Nmy [ 2009-10-02 14:30:02 ]
Post subject: 

Code:
sub mining() 
VAR x,y,z='0',TileNum='1339'
VAR Last=0,LastTimer
while 1 #зациклен на всегда
For x=-2 to 2
For y=-2 to 2
Repeat
CheckLag()
ToHide()
UO.WaitTargetTile(TileNum,STR(UO.GetX()+x),STR(UO.GetY()+Y),z)
UO.usetype('0x0E85')
LastTimer=UO.Timer()
repeat
wait(2000)
until UO.InJournal("Try mining") OR UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR UO.InJournal("attacking you") OR LastTimer+150<UO.Timer()
if UO.InJournal('You loosen') then
repeat
wait (500)
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
until UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("Try mining")
Next
Next
wend # конец цикла
end sub

Author:  MorZE21 [ 2009-10-02 14:56:02 ]
Post subject: 

Nmy wrote:
Code:
sub mining() 
VAR x,y,z='0',TileNum='1339'
VAR Last=0,LastTimer
while 1 #зациклен на всегда
For x=-2 to 2
For y=-2 to 2
Repeat
CheckLag()
ToHide()
UO.WaitTargetTile(TileNum,STR(UO.GetX()+x),STR(UO.GetY()+Y),z)
UO.usetype('0x0E85')
LastTimer=UO.Timer()
repeat
wait(2000)
until UO.InJournal("Try mining") OR UO.InJournal("You put") OR UO.InJournal("You loosen") OR UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("OOPS") OR UO.InJournal("attacking you") OR LastTimer+150<UO.Timer()
if UO.InJournal('You loosen') then
repeat
wait (500)
until UO.InJournal("You put") OR LastTimer+105<UO.Timer()
endif
until UO.InJournal("There is no") OR UO.InJournal("That is too") OR UO.InJournal("Try mining")
Next
Next
wend # конец цикла
end sub





Спасибки ДРВ Руль )!!!

Author:  MorZE21 [ 2009-10-08 22:46:42 ]
Post subject: 

Code:
sub fishing()
var mx, my, mz, i, j
uo.print('А где ведро?')
uo.exec('addobject Bag')
while uo.targeting()
wait(100)
wend

mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
for i = mx-4 to mx+4
for j = my -4 to my+4
if UO.dead() then
return
endif
while not UO.Hidden()
UO.Warmode("0")
uo.print("hiding...")
UO.UseSkill("Hiding")
wait(4000)
wend

UO.Print("Now Fishing In: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no fish here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in water")
UO.DeleteJournal()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype("0x0DBF") ;FishingPole
if UO.dead() then
return
endif
if UO.Weight>660 then
return
endif
while not UO.InJournal("You pull") and not UO.InJournal("location") and not UO.InJournal("no fish") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in water")
wait (100)
if UO.InJournal("You pull") then
UO.SetReceivingContainer('Bag')
UO.findtype('0x09CC','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x09CD','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x09CE','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x09CF','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x14EB','0x0000','ground') ;tattered map
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x0DD6','0x05F6','ground') ;Truly rare fish
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x0DD6','0x01BB','ground') ;Prize fish
UO.grab ('1','finditem')
wait (200)
UO.UnSetReceivingContainer()
end if
wend
wend
UO.DeleteJournal()
next
next
end sub



Помогите с этим скриптом тут таже феня он остановку делает (( или когда весь проходит или когда рыбу не находит, хотя он ловит но потом скрипт выключается без ошибок. Я пробывал как и в мининге сделать но тут что то не пашет или я что то не правильно делаю ( Как сделать чтоб он повторялся или чтоб просто не выключался )

Author:  Nmy [ 2009-10-08 23:20:26 ]
Post subject: 

Code:
sub fishing() 
var mx, my, mz, i, j
uo.print('А где ведро?')
uo.exec('addobject Bag')
while uo.targeting()
wait(100)
wend

mx = UO.GetX("self")
my = UO.GetY("self")
mz = UO.GetZ("self")
UO.DeleteJournal()
while 1 # <----------------- безконечный цыкл
for i = mx-4 to mx+4
for j = my -4 to my+4
if UO.dead() then
return
endif
while not UO.Hidden()
UO.Warmode("0")
uo.print("hiding...")
UO.UseSkill("Hiding")
wait(4000)
wend

UO.Print("Now Fishing In: "+str(mx-i)+" "+str(my-j))
while not UO.InJournal("no fish here") and not UO.InJournal("location") and not UO.InJournal("far away") and not UO.InJournal("in water")
UO.DeleteJournal()
UO.Waittargettile("1341", str(i), str(j), str(mz))
UO.Usetype("0x0DBF") ;FishingPole
if UO.dead() then
return
endif
if UO.Weight>660 then
return
endif
while not UO.InJournal("You pull") and not UO.InJournal("location") and not UO.InJournal("no fish") and not UO.InJournal("but fail") and not UO.InJournal("far away") and not UO.InJournal("in water")
wait (100)
if UO.InJournal("You pull") then
UO.SetReceivingContainer('Bag')
UO.findtype('0x09CC','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x09CD','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x09CE','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x09CF','0x0000','ground') ;fish
UO.grab ('3','finditem')
wait (200)
UO.findtype('0x14EB','0x0000','ground') ;tattered map
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x0DD6','0x05F6','ground') ;Truly rare fish
UO.grab ('1','finditem')
wait (200)
UO.findtype('0x0DD6','0x01BB','ground') ;Prize fish
UO.grab ('1','finditem')
wait (200)
UO.UnSetReceivingContainer()
end if
wend
wend
UO.DeleteJournal()
next
next
wend <-------------------------- цыкл
end sub

Author:  Scripts Writer [ 2009-10-08 23:24:15 ]
Post subject: 

Цикл

Author:  CuHTpoH [ 2009-10-09 01:21:52 ]
Post subject: 

а чо спецально без отступов пишете?))))

Author:  Nmy [ 2009-10-09 09:48:02 ]
Post subject: 

Scripts Writer wrote:
Цикл


простите за то что я криво пишу
спасибо опере 10 за спел чек
только вот в ноутпаде нету его =(

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