Yoko

All sides of Injection
It is currently 2026-01-16 16:54:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2005-06-08 12:25:04 
Offline

Joined: 2005-06-08 12:20:28
Posts: 3
Вот сворганил скрипт для спаринга, но почему-то работает с перебоями, то ошибку выдает связанную с ntdll.dll, то просто ошибка скрипта и выключает скрипт.
А вот собственно и скрипт:
Code:
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

P.S. В скриптах шарю плохо, но всеже может кто и поможет :)
Если причина не в скрипте, то в чем? :)


Top
   
 Post subject:
PostPosted: 2005-06-08 19:22:00 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Работо способность н епроверял, но обрати внимание на:
Code:
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

Как видно скрипт начинается с объевления условного цикла Repeat...
Но в нутри процедуры Heal() завершения этого цикла нету...
Но в скрипте замечен метд рекурсии;) тоесть утебя по завершению работы процедуры Хел вызыввается она же;) Здорово конечно, но лутше не эксперементировать и так слабым парсеровм инжекта...
Или dостанови условный цикл и удали строчку Heal() из
Code:
...
UO.Arm('CWeapon')
   Endif
   Heal()
end sub

Или убивай Repeat и делай рекурсию... чего не советую.
Удачи!


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited