В чем проблема?

Ask for help

Moderators: Murderator+, Murderator

Post Reply
maNDrila
Posts: 3
Joined: 2005-06-08 12:20:28

В чем проблема?

Post by maNDrila »

Запускаю в инжекте скрипт и через пару минут инжект выкидывает ошибку: Unhandled exception in parser, а также частенько вылазиет ошибка с проблемой в injection.dll и ntdll.dll.
В чем проблема?
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post by flake »

Скрипт в студию!
maNDrila
Posts: 3
Joined: 2005-06-08 12:20:28

Post by maNDrila »

Code: Select all

sub Heal()
Repeat
         UO.Exec("usetype 0x097B")
         uo.UseType(0x0E20)
         uo.waittargettype(0x1008)
Wait (3000)
walkn(1850,2094,"")               
             if UO.Life<80 Then     
walkn(1848,2094,"")
               UO.SetArm('CWeapon')
   UO.Exec("bandageself")
            wait(5000)
   UO.Exec("bandageself")
               wait(500)
UO.Arm('CWeapon')
   Endif
   Heal()
end sub

Sub WalkN(x,y,Target)
 VAR i,StepSucess
 VAR dx,dy,Exit=0
 
 While Exit<>1
  If Target<>"" Then
   dx=UO.GetX(Target)-UO.GetX()
   dy=UO.GetY(Target)-UO.GetY()
   If UO.GetDistance(Target)<2 Then
   Exit=1
   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
   StepSucess=Go(3,40,300) ;SE - DownArrow
   Endif

   If dx>0 AND dy<0 Then
   StepSucess=Go(1,39,300) ;NE - RightArrow
   Endif

   If dx<0 AND dy>0 Then
   StepSucess=Go(5,37,300) ;SW - LeftArrow
   Endif

   If dx<0 AND dy<0 Then
   StepSucess=Go(7,38,300) ;WN - UpArrow
   Endif

  Endif
 
  If dx<>0 AND dy==0 Then
   If dx>0 Then
   StepSucess=Go(2,34,300) ;E - PgDown
   If StepSucess==-1 Then
    StepSucess=Go(3,40,300) ;SE - DownArrow
    If StepSucess==-1 Then
     StepSucess=Go(1,39,300) ;NE - RightArrow
    Endif
   Endif
   Endif
   If dx<0 Then
   StepSucess=Go(6,36,300) ;W - Home
   If StepSucess==-1 Then
    StepSucess=Go(7,38,300) ;WN - UpArrow
    If StepSucess==-1 Then
     StepSucess=Go(5,37,300) ;SW - LeftArrow
    Endif
   Endif
   Endif
  Endif
  If dx==0 AND dy<>0 Then
   If dy>0 Then
   StepSucess=Go(4,35,300) ;S - End
   If StepSucess==-1 Then
    StepSucess=Go(3,40,300) ;SE - DownArrow
    If StepSucess==-1 Then
     StepSucess=Go(5,37,300) ;SW - LeftArrow
    Endif
   Endif
   Endif
   If dy<0 Then
   StepSucess=Go(0,33,300) ;N - PgUp
   If StepSucess==-1 Then
    StepSucess=Go(7,38,300) ;WN - UpArrow
    If StepSucess==-1 Then
     StepSucess=Go(1,39,300) ;NE - RightArrow
    Endif
   Endif
   Endif
  Endif
 Wend
end sub
sub Go(dir,key,walkwait)
 VAR x,y

 x=UO.GetX()
 y=UO.GetY()

 while UO.GetDir()<>dir
  UO.Press(key)
  wait(walkwait)
  If UO.GetDir()<>dir Then
  Endif
 wend

 UO.Press(key)
 wait(walkwait)

 If x==UO.GetX() AND y==UO.GetY() Then 
 Endif
 
 If x==UO.GetX() AND y==UO.GetY() Then
  return -1
 Else
  return 1
 Endif
end sub

Sub cheklag()
    uO.DeleteJournal()
    uO.Click('backpack')
Repeat
wait(50)
    until UO.InJournal('backpack')
end sub
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

maNDrila wrote:

Code: Select all

sub Heal()
Repeat
         UO.Exec("usetype 0x097B")
         uo.UseType(0x0E20)
         uo.waittargettype(0x1008)
........
   Heal()
end sub


1. Сначала ловушку прицела, потом использование предмета, генерирующее прицел.

2. Рекурсию надо использовать аккуратно. А у тебя простое вложение без каких-либо условий.
Post Reply