Yoko

All sides of Injection
It is currently 2025-10-15 15:54:58

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2009-10-25 14:42:05 
Offline

Joined: 2007-11-21 00:15:38
Posts: 9
Code:
sub fishing()
var plav = 16
var l
var m
var k
dim xx[10]
xx[0] = -5
xx[1] = -4
xx[2] = -3
xx[3] = -2
xx[4] = -1
xx[5] = 0
xx[6] = 1
xx[7] = 2
xx[8] = 3
xx[9] = 4
xx[10] = 5

dim yy[7]
yy[0] = -6
yy[1] = -5
yy[2] = -4
yy[3] = -3
yy[4] = 3
yy[5] = 4
yy[6] = 5
yy[7] = 6

while True
for l = 0 to 10
for m = 0 to 7
if uo.GetGlobal("fish")=='yes' then
if uo.weight > 400 then
dobor()
End If
k=0
uo.deletejournal()
UO.WaitTargetTile(0,str(uo.GetX()+xx[l]),str(uo.GetY()+yy[m]),str(uo.GetZ()))
uo.usetype("0x0DBF")
while not (uo.injournal("You pull out a fish!") or uo.injournal("You stop fishing.") or uo.injournal("You fail to catch anything.") or uo.injournal("There are no fish here.") or uo.injournal("You put") or uo.injournal("You pull") or uo.injournal("Fishing has") or uo.injournal("That is too") or uo.injournal("Try fishing") or uo.injournal("Unexpected target info")) or k > 40000
wait(500)
k=k+500
wend
next
wait(50)
next
wait(50)
if plav < 5 then
plav = plav + 1
uo.msg("forward")
uo.print(str(plav))
wait(10000)
uo.msg("stop")
end if
if plav >= 5 and plav < 10 then
plav = plav + 1
uo.msg("Right")
uo.print(str(plav))
wait(10000)
uo.msg("stop")
end if
if plav >= 10 and plav < 15 then
plav = plav + 1
uo.msg("Back")
uo.print(str(plav))
wait(10000)
uo.msg("stop")
end if
if plav >= 15 and plav < 20 then
plav = plav + 1
uo.msg("left")
uo.print(str(plav))
wait(10000)
uo.msg("stop")
end if
if plav == 20 then
plav = 0
uo.print(plav)
end if
wait(50)
end if
wait(50)
wend
wait(50)
end sub



Вот Кусок моего скрипта на фишинг.Работает отлично, плавает по квадрату, Но иногда возникает проблема: Чар просто перестает ловить и стоит, в чем проблема я не знаю, Даже если вручную ему помочь и один раз выловить рыбу, то цикл дальше не идет, значит проблема не с журналом. Помогите, пожалуйста =(


Top
   
 Post subject:
PostPosted: 2009-10-25 18:30:11 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
if uo.GetGlobal("fish")=='yes' then вот эта хрень тут зачем? О_о
Пропусти через табулятор Дестракшена - у тебя структура не верна в циклах. Увидишь ошибки сразу.
Code:
for
If
next
endif...

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject:
PostPosted: 2009-10-25 20:30:06 
Offline

Joined: 2007-11-21 00:15:38
Posts: 9
Mirage wrote:
if uo.GetGlobal("fish")=='yes' then вот эта хрень тут зачем? О_о
Пропусти через табулятор Дестракшена - у тебя структура не верна в циклах. Увидишь ошибки сразу.
Code:
for
If
next
endif...


Глобал, для того, чтобы если выловил моба, процесс отвечающий за убийство моба ставит значение NO, и скрипт на паузе, соотв как убил моба ставит переменную YES


Top
   
 Post subject:
PostPosted: 2009-10-25 20:34:42 
Offline

Joined: 2007-11-21 00:15:38
Posts: 9
Code:
sub fishing()
   var plav = 16
   var l
   var m
   var k
   dim xx[10]
   xx[0] = -5
   xx[1] = -4
   xx[2] = -3
   xx[3] = -2
   xx[4] = -1
   xx[5] = 0
   xx[6] = 1
   xx[7] = 2
   xx[8] = 3
   xx[9] = 4
   xx[10] = 5
   dim yy[7]
   yy[0] = -6
   yy[1] = -5
   yy[2] = -4
   yy[3] = -3
   yy[4] = 3
   yy[5] = 4
   yy[6] = 5
   yy[7] = 6
   while True
      for l = 0 to 10
         for m = 0 to 7
            if uo.GetGlobal("fish")=='yes' then
               if uo.weight > 400 then
                  dobor()
               End If
               k=0
               uo.deletejournal()
               UO.WaitTargetTile(0,str(uo.GetX()+xx[l]),str(uo.GetY()+yy[m]),str(uo.GetZ()))
               uo.usetype("0x0DBF")
               while not (uo.injournal("You pull out a fish!") or uo.injournal("You stop fishing.") or uo.injournal("You fail to catch anything.") or uo.injournal("There are no fish here.") or uo.injournal("You put") or uo.injournal("You pull") or uo.injournal("Fishing has") or uo.injournal("That is too") or uo.injournal("Try fishing") or uo.injournal("Unexpected target info")) or k > 40000
                  wait(500)
                  k=k+500
               wend
            end if
         next
         wait(50)
      next
      wait(50)
      if plav < 5 then
         plav = plav + 1
         uo.msg("forward")
         uo.print(str(plav))
         wait(10000)
         uo.msg("stop")
      end if
      if plav >= 5 and plav < 10 then
         plav = plav + 1
         uo.msg("Right")
         uo.print(str(plav))
         wait(10000)
         uo.msg("stop")
      end if
      if plav >= 10 and plav < 15 then
         plav = plav + 1
         uo.msg("Back")
         uo.print(str(plav))
         wait(10000)
         uo.msg("stop")
      end if
      if plav >= 15 and plav < 20 then
         plav = plav + 1
         uo.msg("left")
         uo.print(str(plav))
         wait(10000)
         uo.msg("stop")
      end if
      if plav == 20 then
         plav = 0
         uo.msg("left")
         uo.print(str(plav))
         wait(10000)
         uo.msg("stop")
      end if
      wait(50)
   wend
   wait(50)
end sub


Так нада?


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 4 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