Fishing

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
Roopert
Posts: 6
Joined: 2009-02-21 01:21:02
Location: Moscow
Contact:

Fishing

Post by Roopert »

Да очередной ))) Искал на сайте, да много нашел ) но основное либо с лодки, либо не режит ((
Все же нашел у друга скрипт с резалкой на месте, но сам шарю плохо в скриптах..
Прошу посмотреть кто может, у кого есть свободное время. Иногда ступарится и при поломки удочки вроде не берет новую, т.к. отхожу от компа надо чтоб брал ее. Что бы можно было оставить на пару часов работы придти и разгрузить только. Еще вешает клиент иногда, и в скрипте пару циклов если пройдет выдает ошибку.. прочитать не могу, клиент зависает (
З.Ы. спс тем кто ответит )

Code: Select all

var MaxFailure=2 # Через сколько подряд безрезультатных попыток переходить к другой клетке.
sub Main()
var iX,iY
for var iStep=0 to 1000
   for iX=-6 to 6
     for iY=-6 to 6
       GetAllFish(UO.GetX()+iX,UO.GetY()+iY)
     next
   next
next
end sub

Sub GetAllFish(iX,iY)
var counter=0
repeat
   counter=counter+1
   UO.DeleteJournal()
   UO.WaitTargetTile(0,iX,iY,0)
   UO.UseType('0x0DBF')
   while not UO.InJournal('You pull out a fish!') and not UO.InJournal('You fish a while, but fail to catch anything') and not UO.InJournal('There are no fish here.') and not UO.InJournal('Try fishing elsewhere') and not UO.InJournal('That is too far away')
     wait(100)
   wend
   if UO.InJournal('There are no fish here.') OR UO.InJournal('Try fishing elsewhere') OR UO.InJournal('That is too far away') then
     return
   end if
   if UO.InJournal('You pull out a fish!') then
     counter=0
    GetFish()
   end if
until UO.Injournal('There are no fish here.') OR UO.InJournal('Try fishing elsewhere') OR UO.InJournal('That is too far away') OR counter>MaxFailure
end sub

Sub GetFish()
UO.set('finddistance',0)
UO.IgnoreReset()
UO.Ignore('self')
UO.FindType('0x352D',-1,'ground')
UO.Ignore('finditem')
UO.FindType(-1,-1,'ground')
while UO.FindCount()>0
   UO.WaitTargetObject('finditem')
   UO.UseType('0x0F51')
   UO.Ignore('finditem')
   wait(500)
   UO.FindType(-1,-1,'ground')
wend
UO.Ignorereset()
UO.Ignore('self')
UO.FindType('0x352D',-1,'ground')
UO.Ignore('finditem')
UO.FindType(-1,-1,'ground')
while UO.FindCount()>0
   UO.Grab(0,'finditem')
   wait(100)
   UO.FindType(-1,-1,'ground')
wend
UO.Ignorereset()
end sub
Roopert
Posts: 6
Joined: 2009-02-21 01:21:02
Location: Moscow
Contact:

Re: Fishing

Post by Roopert »

Сидел только что читал уроки скриптинга стараясь параллельно разобрать скрипт, получается с трудом.

Code: Select all

for var iStep=0 to 1000 

Это не значит ли случаем что он будет делать только 1000 попыток заброса ?

Удочку он берет новую вроде как, осталась только проблема с остановкой скрипта. Перестает ловить рыбу но скрипт не сносится из списка активных .. а так же зависание скрипта... что то в нем иногда вызывает краш клиента. Есть другой скрипт на рыбалку работает стабильно, но не могу прикрутить резку рыбы.
Roopert
Posts: 6
Joined: 2009-02-21 01:21:02
Location: Moscow
Contact:

Re: Fishing

Post by Roopert »

Общаюсь тут сам с собой, и задаю вопросы сам себе ... в общем есть скрипт где не режет рыбу. Во избежания перевеса сделал вот такой тока что скриптик, посмотрите пжл.

Code: Select all

sub ves()
var W
W=UO.Weight
Wheli not uo.dead()
if W == 600 Then
UO.Exec('terminate main')
wait(100)
uo.say ("BanK")
wait(50)
uo.moveitem (0x09CC,0x40EE06D6)  //àêóëà
wait(50)
uo.moveitem (0x09CE,0x40EE06D6) //ñèíèÿ
wait(50)
uo.moveitem (0x09CF,0x40EE06D6)//êðàñíàÿ
wait (1000)
UO.Exec('exec main')
Endif
wait(100)
wend
ens sub


Думаю приклеить снизу вот этого, запускать их отдельно и стоять ловить у банка, возможно ли ? Проверти пожалуйста. Я серьезно не очень в скриптах.. вот то что сверху сам калякал минут 10, снизу не мое :|

Code: Select all

sub main()
UO.DeleteJournal()
var c, z, x, y, i, tmp, inside
c=0
start:
#while uo.getx()>2232
#uo.say("left")
#wait(5000)
#wend
#uo.say("stop")
#uo.say("stop")
for y=-6 to 6
for x=-6 to 6
z=0
try:
UO.Exec ("waittargettile "+" 6039 "+STR(UO.GEtX()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0DBF")
UO.Print ("X Coordinate: "+STR(x))
UO.Print ("Y Coordinate: "+STR(y))
i=0
while i< 10
uo.press(121)
if UO.InJournal("You can't reach") then
i=200
UO.DeleteJournal()
endif
if z>3 then
i=200
UO.DeleteJournal()
endif
if UO.InJournal("There dosn't seem to be any fish here") then
z=z+1
i=200
UO.DeleteJournal()
goto try
endif
if UO.InJournal("You pull out") then
i=200
z=0
UO.DeleteJournal()
UO.Exec ("setreceivingcontainer 0x404381B0"); ID Eiioaeia?a aey neeaae?iaaiey
if uo.countground("0x09ce")>0 then
UO.Exec("findtype 0x09ce -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x09cf")>0 then
UO.Exec("findtype 0x09cf -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x09cc")>0 then
UO.Exec("findtype 0x09cc -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x09cd")>0 then
UO.Exec("findtype 0x09cd -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x0F7A")>0 then
UO.Exec("findtype 0x0F7A -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
UO.Exec ("unsetreceivingcontainer")
goto try
endif
if UO.InJournal("There dosn't seem to be any fish here") then
i=200
UO.DeleteJournal()
endif
wait (500)
i=i+1
wend
next
next
#while uo.getx()<2215
#uo.say("right")
#wait(5000)
#wend
#uo.say("stop")
#uo.say("stop")
for y=-6 to 6
for x=-6 to 6
z=0
try1:
UO.Exec ("waittargettile "+" 6039 "+STR(UO.GEtX()+x)+" "+STR(UO.GetY()+y)+" 0")
UO.exec ("usetype 0x0DBF")
UO.Print ("X Coordinate: "+STR(x))
UO.Print ("Y Coordinate: "+STR(y))
i=0
while i< 10
uo.press(121)
if UO.InJournal("You can't reach") then
i=200
UO.DeleteJournal()
endif
if z>3 then
i=200
UO.DeleteJournal()
endif
if UO.InJournal("You fish a while, but fail to catch anything") then
z=z+1
i=200
UO.DeleteJournal()
goto try1
endif
if UO.InJournal("You pull out") then
i=200
z=0
UO.DeleteJournal()
UO.Exec ("setreceivingcontainer 0x404381B0"); ID Eiioaeia?a aey neeaae?iaaiey
if uo.countground("0x09ce")>0 then
UO.Exec("findtype 0x09ce -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x09cf")>0 then
UO.Exec("findtype 0x09cf -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x09cc")>0 then
UO.Exec("findtype 0x09cc -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x09cd")>0 then
UO.Exec("findtype 0x09cd -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
if uo.countground("0x0F7A")>0 then
UO.Exec("findtype 0x0F7A -1 1")
UO.Exec ("grab 1000 finditem")
#wait (1500)
endif
UO.Exec ("unsetreceivingcontainer")
goto try1
endif
if UO.InJournal("There dosn't seem to be any fish here") then
i=200
UO.DeleteJournal()
endif
wait (500)
i=i+1
wend
next
next
goto start
end sub
Post Reply