Yoko

All sides of Injection
It is currently 2025-11-13 06:38:19

All times are UTC+02:00




Post new topic  Reply to topic  [ 17 posts ] 
Author Message
PostPosted: 2007-08-01 20:14:30 
Offline

Joined: 2006-07-06 08:30:59
Posts: 40
Помагите выскакивает ошибка Line 42:Goto"Полетел счётчик вложености циклов" с чего бы это?Вроде летит подходит а как тока подошёл начинает юзать скил и сразу вот это вот.Кто знает в чём проблема?

Code:
sub main()
VAR n , x, q
VAR maxrune = 16

uo.exec("set norbcheck 1")
uo.exec("set norbcalc 1")
uo.exec("set grabdelay 0")
Dim rune[16]
rune[1] = '20';home
rune[2] = '22';and reagents
rune[3] = '24'
rune[4] = '26'
rune[5] = '28'
rune[6] = '30'
rune[7] = '32'
rune[8] = '34'
rune[9] = '36'
rune[10]= '38'
rune[11]= '40'
rune[12]= '42'
rune[13]= '44'
rune[14]= '46'
rune[15]= '48'
rune[16]= '50'

uo.exec('addobject runebook')
while uo.targeting()
wait(200)
wend

uo.exec('addobject safe')
while uo.targeting()
wait(200)
wend

uo.exec('addobject bag')
while uo.targeting()
wait(200)
wend

Check()

While true and NOT uo.dead()
uo.ignorereset()
 For n = 2 To maxrune
  uo.deletejournal()
   If uo.mana < 20 then
    repeat
     uo.warmode(0)
      uo.useskill('Meditation')
       wait(2000)
        until uo.mana >= uo.int
         endif
          fizzle:
           uo.recall('runebook', rune[n] )
            x = uo.getx()
             q = 0
              repeat
               q = q + 1
                wait(500)
               checklag()
              until uo.getx()<>x or q >= 20
             if q >= 20 then
            goto fizzle
           endif
          checklag()
         wait(2000)
        GOandBUY()
     endif
    next
   GOandDROP()
  hide()
 wait(220000)
wend
end sub

sub GOandBUY()
  var f=0, name, s
  uo.ignore('self')
  uo.set('finddistance','15')
Dim Vname[31]
Vname[1] = 'Gilana'#1
Vname[2] = 'Lene'#1
Vname[3] = 'Donna'#2
Vname[4] = 'Fayme'#2
Vname[5] = 'Dagny'#3
Vname[6] = 'Daren'#3
Vname[7] = 'Janice'#3
Vname[8] = 'Lorenzo'#4
Vname[9] = 'Keith'#5
Vname[10]= 'Russ'#5
Vname[11]= 'Meyer'#6
Vname[12]= 'Sharman'#7
Vname[13]= 'Ianthe'#7
Vname[14]= 'Geoff'#8
Vname[15]= 'Arley'#8
Vname[16]= 'Jamie'#9
Vname[17]= 'Bella'#10
Vname[18]= 'Palmiera'#10
Vname[19]= 'Kegan'#11
Vname[20]= 'Morgance'#11
Vname[21]= 'Hamlin'#12
Vname[22]= 'Kayin'#12
Vname[23]= 'Hilliard'#13
Vname[24]= 'Elliott'#13
Vname[25]= 'Chaya'#13
Vname[26]= 'Walter'#13
Vname[27]= 'Kedar'#14
Vname[28]= 'Beval'#14
Vname[29]= 'Aitan'#14
Vname[30]= 'Ramon'#15
Vname[31]= 'Melian'#15

Dim Vser[31]
Vser[1] = '0x00109355'#1
Vser[2] = '0x0010D3F0'#1
Vser[3] = '0x0010781B'#2
Vser[4] = '0x000DBB5A'#2
Vser[5] = '0x000DE57B'#3
Vser[6] = '0x000D7DB9'#3
Vser[7] = '0x000DC725'#3
Vser[8] = '0x000DD62F'#4
Vser[9] = '0x000C8930'#5
Vser[10]= '0x000CD150'#5
Vser[11]= '0x0009293B'#6
Vser[12]= '0x0011FF45'#7
Vser[13]= '0x0011F3D2'#7
Vser[14]= '0x000E5568'#8
Vser[15]= '0x000DDE3E'#8
Vser[16]= '0x000E0EF7'#9
Vser[17]= '0x000D8CE8'#10
Vser[18]= '0x000E578E'#10
Vser[19]= '0x00117DFC'#11
Vser[20]= '0x000CF22F'#11
Vser[21]= '0x001132BF'#12
Vser[22]= '0x00058509'#12
Vser[23]= '0x000CAA6A'#13
Vser[24]= '0x000D65FB'#13
Vser[25]= '0x000CDCB1'#13
Vser[26]= '0x000DA9D8'#13
Vser[27]= '0x00069511'#14
Vser[28]= '0x001108EE'#14
Vser[29]= '0x000CC865'#14
Vser[30]= '0x000CE00D'#15
Vser[31]= '0x0004F575'#15

search:
 checklag()
  uo.findtype('0x0190', -1 ,'ground')
    if uo.findcount() == 0 then
      uo.findtype('0x0191', -1 ,'ground')   
       if uo.findcount() == 0 then
        return
       else
      f = 1
     endif
    else
   f = 1
  endif 

  if f == 1 then
   For s = 1 to 31 #
    If uo.getserial('finditem') == Vser[s] then
     ignore()
      uo.deletejournal()
       WalkME( 0 , 0 ,Vser[s])
       WalkME( 0 , 0 ,Vser[s])
          while not uo.InJournal("Begging|no money", 10)
          uo.DeleteJournal()
          UO.WaitTargetObject(Vser[s])
          uo.UseSkill('Begging')
          while not uo.InJournal("Begging|no money|must wait", 10)
          CheckLag()
;         GOandbuy()
;        uo.closeuo()
;       endif
       uo.ignore(Vser[s])
      goto search
     endif
    next
   uo.ignore('finditem')
  goto search
 endif
end sub

sub GOandDROP()
VAR y, w
 fizzle:
  uo.recall('runebook', 20 )
   y = uo.gety()
    w = 0
     repeat
      w = w + 1
     wait(500)
    checklag()
   until uo.gety()<>y or w >= 20
  if w >= 20 then
 goto fizzle
endif
WalkME( 0 , 0 ,'safe')
uo.useobject('bag')
CheckLag()
uo.findtype( -1 , -1 ,'bag')
While uo.findcount()
uo.moveitem('finditem', 0 ,'safe')
wait(200)
CheckLag()
uo.ignore('finditem')
uo.findtype( -1 , -1 ,'bag')
wend
Check()
end sub

sub ignore()
uo.findtype( -1 )
While uo.findcount()
uo.ignore('finditem')
wait(200)
uo.findtype( -1 )
wend
CheckLag()
end sub

sub drag()
uo.findtype( -1 )
While uo.findcount()
uo.moveitem('finditem', 0 ,'bag')
wait(200)
CheckLag()
uo.findtype( -1 )
wend
end sub

sub check()
VAR r
Dim reg[3]
reg[1] = 0x0F7B
reg[2] = 0x0F86
reg[3] = 0x0F7A
 uo.ignorereset()
 if uo.count(reg[1])<50 or uo.count(reg[2])<50 or uo.count(reg[3])<50 then
  If UO.GetDistance('safe')>3 then
   WalkMe( 0 , 0 ,'safe')
  endif
 uo.useobject('safe')
  CheckLag()
   For r = 1 to 3
    uo.findtype(reg[r], -1 ,'safe')
     If uo.findcount() == 0 then
      uo.msg('You must have reagents for recall in your fucking safe chest you stupid fuck!')
       uo.exec('terminate all')
       endif
      uo.moveitem('finditem','50','backpack')
     wait(400)
    CheckLag()
  next
 endif
end sub

sub hide()
while NOT uo.hidden()
uo.useskill('Hiding')
wait(5000)
wend
end sub

################# W A L K E R ######################

sub WalkME(x,y,Target)
   VAR i
   VAR dir,ldir,rdir,key,olddir
   VAR dx,dy,Exit=0
   VAR CacheLimit=9,CacheIndex="Text"
   DIM CacheX[10], CacheY[10]
   
   CacheX[0]="Test"
   While Exit<>1   
      If Target<>"" Then
         dx=UO.GetX(Target)-UO.GetX()
         dy=UO.GetY(Target)-UO.GetY()
;         UO.Print("Target locked!")
         If UO.GetDistance(Target)<2 Then
            return
         Endif
      Else
         dx=x-UO.GetX()
         dy=y-UO.GetY()
         If dx==0 AND dy==0 Then
            Exit=1
         Endif

      Endif
   
      If dx<>0 AND dy<>0 Then
         If dx>0 AND dy>0 Then ; GoSE
            dir=3
            ldir=2
            rdir=4
            key=40 ; DownArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==2 Then ; GoNE
                  dir=1
                  ldir=0
                  rdir=1
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=5
                  rdir=6
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif

         If dx>0 AND dy<0 Then ; GoNE
            dir=1
            ldir=0
            rdir=2
            key=39 ; RightArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==0 Then ; GoWN
                  dir=7
                  ldir=6
                  rdir=7
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSE
                  dir=3
                  ldir=3
                  rdir=4
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif

         If dx<0 AND dy>0 Then ; GoSW
            dir=5
            ldir=4
            rdir=6
            key=37 ; LeftArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==6 Then ; GoWN
                  dir=7
                  ldir=7
                  rdir=0
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSE
                  dir=3
                  ldir=2
                  rdir=3
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif

         If dx<0 AND dy<0 Then ; GoWN
            dir=7
            ldir=6
            rdir=0
            key=38 ; UpArrow
            olddir=UO.GetDir()
            If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then
               If olddir==0 Then ; GoNE
                  dir=1
                  ldir=1
                  rdir=2
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=4
                  rdir=5
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
      Endif
   
      If dx<>0 AND dy==0 Then
         If dx>0 Then ; GoE
            dir=2
            key=34 ; PgDown
            olddir=UO.GetDir()
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==2 Then ; GoSE
                  dir=3
                  ldir=3
                  rdir=4
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoNE
                  dir=1
                  ldir=1
                  rdir=0
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
         
         If dx<0 Then ; GoW
            dir=6
            key=36 ; Home key
            olddir=UO.GetDir()
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==0 Then ; GoWN
                  dir=7
                  ldir=7
                  rdir=0
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=4
                  rdir=5
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
      Endif

      If dx==0 AND dy<>0 Then
         If dy>0 Then ; GoS
            dir=4
            key=35 ; End
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==2 Then ; GoSE
                  dir=3
                  ldir=2
                  rdir=3
                  key=40 ; DownArrow
                  While UO.GetDir()<>3
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoSW
                  dir=5
                  ldir=6
                  rdir=5
                  key=37 ; LeftArrow
                  While UO.GetDir()<>5
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
         
         If dy<0 Then ;GoN
            dir=0
            key=33 ; PgUp
            olddir=UO.GetDir()
            If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then
               If olddir==2 Then ; GoNE
                  dir=1
                  ldir=1
                  rdir=2
                  key=39 ; RightArrow
                  While UO.GetDir()<>1
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Else ; GoWN
                  dir=7
                  ldir=7
                  rdir=6
                  key=38 ; UpArrow
                  While UO.GetDir()<>7
                     StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key)
                  Wend
               Endif
            Endif
         Endif
      Endif
   Wend
end sub


sub StepEdit(x,y,dir,key)
   VAR walkwait=300
   VAR ErrLevel=0
   If UO.GetDir()<>dir Then
         checkstam()
      UO.Press(key)
      wait(walkwait)
      If UO.GetDir()<>dir Then
         CheckLag()
      Endif
   Endif
         checkstam()
   UO.Press(key)
   wait(walkwait)
   If x==UO.GetX() AND y==UO.GetY() Then
      CheckLag()
      If x==UO.GetX() AND y==UO.GetY() Then
;zatik
         ErrLevel=1
      Endif
   Endif
   Return ErrLevel
end sub


sub StepArrow(x,y,dir,ldir,rdir,key)
   VAR walkwait=300
   VAR ErrLevel=0
   If UO.GetDir()<>dir Then
      checkstam()
      UO.Press(key)
      wait(walkwait)
      If UO.GetDir()<>dir AND UO.GetDir()<>ldir AND UO.GetDir()<>rdir Then
         CheckLag()
      Endif
   Endif

   If UO.GetX()==x AND UO.GetY()==y Then
      checkstam()
      UO.Press(key)
      wait(walkwait)
      If UO.GetDir()==dir AND UO.GetX()==x AND UO.GetY()==y Then
         CheckLag()
         If UO.GetDir()==dir AND UO.GetX()==x AND UO.GetY()==y Then
; zatik         
            ErrLevel=1
         Endif
      Endif
   Endif
   Return ErrLevel
end sub

sub checkstam()
var refresh = '0x0F0B'
if uo.stamina < 10 then
   uo.findtype(refresh,-1,'backpack')
   if uo.findcount() then
      uo.usetype(refresh)
      wait(1000)
   else
      uo.print("Nety Refreshey! Stoim...")
   repeat
      wait(500)
   until uo.stamina >= 10
   endif
else
endif
endsub

Sub CHECKLAG()
   del('backpack')
   uo.click('backpack')
   repeat
   wait(200)
   until uo.injournal('backpack')
   del('backpack')
endsub

Sub DEL(msg)
   while uo.injournal(msg)
   uo.setJournalLine(uo.injournal(msg)-1,"Is Empty!")
   wend
endsub

##########################################
Sub test()
##########################################
   If uo.getglobal('test')=='On' then
   uo.setglobal('test',0)
   uo.print(' !!! -= Test: OFF =- !!! ')
   uo.exec('terminate test')
   else
   uo.setglobal('test','On')
   uo.print(' !!! -= Test: On =- !!! ')
   end if
#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#

if uo.weight > uo.str*4-400 then
uo.print(' ok ')
endif

#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#
                                       
   uo.setglobal('test', 0 )
   uo.print(' !!! -= Test: OFF =- !!! ')
##########################################
end sub
##########################################


Top
   
 Post subject:
PostPosted: 2007-08-01 20:16:18 
Offline
Expert!
User avatar

Joined: 2006-02-25 21:48:38
Posts: 1032
Code:
Line 42:Goto"Полетел счётчик вложености циклов"

Че, прям так и пишет? Скрин плз для моей коллекции )

_________________
DerMeister сейчас на нейрале!


Top
   
 Post subject:
PostPosted: 2007-08-01 20:55:15 
Offline

Joined: 2005-08-07 00:22:18
Posts: 12
Тебе смешно,а у нас проблема :)


Top
   
 Post subject:
PostPosted: 2007-08-01 20:57:09 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
goto плохой тон в программировании


Top
   
 Post subject:
PostPosted: 2007-08-01 21:06:51 
Offline

Joined: 2005-08-07 00:22:18
Posts: 12
Еррор появился после того как добавили это

Code:
while not uo.InJournal("Begging|no money", 10)
          uo.DeleteJournal()
          UO.WaitTargetObject(Vser[s])
          uo.UseSkill('Begging')
          while not uo.InJournal("Begging|no money|must wait", 10)

Может кто знает как подругому сделать, чтобы после того как он покупает реги он использовал скилл begining и летел дальше


Top
   
 Post subject:
PostPosted: 2007-08-01 22:08:33 
Offline

Joined: 2006-07-06 08:30:59
Posts: 40
Scripts Writer wrote:
goto плохой тон в программировании


А есть ли какието другие варианты?


Top
   
 Post subject:
PostPosted: 2007-08-01 23:09:29 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Raisefamous wrote:
Scripts Writer wrote:
goto плохой тон в программировании


А есть ли какието другие варианты?


Всегда


Top
   
 Post subject:
PostPosted: 2007-08-02 07:31:41 
Offline

Joined: 2005-08-07 00:22:18
Posts: 12
Подскажи какие?


Top
   
 Post subject:
PostPosted: 2007-08-02 08:59:56 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Я говорю о том что скрипты всегда можно написать без использования goto за счёт условных операторов .


Top
   
 Post subject:
PostPosted: 2007-08-02 14:21:09 
Offline

Joined: 2005-08-07 00:22:18
Posts: 12
Allower wrote:
Еррор появился после того как добавили это

Code:
while not uo.InJournal("Begging|no money", 10)
          uo.DeleteJournal()
          UO.WaitTargetObject(Vser[s])
          uo.UseSkill('Begging')
          while not uo.InJournal("Begging|no money|must wait", 10)

Может кто знает как подругому сделать, чтобы после того как он покупает реги он использовал скилл begining и летел дальше

Почему скрипт портиться при таком маленьком изменение?


Top
   
 Post subject:
PostPosted: 2007-08-02 14:58:12 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
О чём мы можем здесь разговаривать если ты даже не знаешь о чём речь?


Top
   
 Post subject:
PostPosted: 2007-08-02 15:39:31 
Offline

Joined: 2005-08-07 00:22:18
Posts: 12
Так я сюда и пришел за помошью, а не за умными словами.....


Top
   
 Post subject:
PostPosted: 2007-08-02 16:11:42 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Ну допустим в приведённых циклах не хватает двух wend...

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2007-08-02 16:37:25 
Offline

Joined: 2006-07-06 08:30:59
Posts: 40
Где?


Top
   
 Post subject:
PostPosted: 2007-08-02 17:08:26 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Raisefamous wrote:
Где?

Вот уж это точно не мне судить...

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2007-08-03 00:23:06 
Offline
User avatar

Joined: 2007-02-21 20:15:57
Posts: 479
Вот это нужно закрыть 2 раза =)
Code:
while not uo.InJournal("Begging|no money", 10) 
uo.DeleteJournal()
UO.WaitTargetObject(Vser[s])
uo.UseSkill('Begging')
while not uo.InJournal("Begging|no money|must wait", 10)

_________________
Шард Антарес
Ururu


Top
   
 Post subject:
PostPosted: 2007-08-03 13:00:08 
Offline

Joined: 2005-08-07 00:22:18
Posts: 12
Ururu wrote:
Вот это нужно закрыть 2 раза =)
Code:
while not uo.InJournal("Begging|no money", 10) 
uo.DeleteJournal()
UO.WaitTargetObject(Vser[s])
uo.UseSkill('Begging')
while not uo.InJournal("Begging|no money|must wait", 10)

Благодарю, будем тестить :)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited