Page 1 of 1

walk to

Posted: 2007-09-04 19:53:34
by zars
i want find element, go to him and kill. but my nothing happen, only big lag until i turn off script.

i dont remember what i done, but one time this script work.... maby problem to inject or walker?

Code: Select all

sub killelem() 
   VAR Count, LastTimer, Elem
   
   
   LastTimer=UO.Timer()


   UO.UseType(0x13FE) ; wepon
   
   UO.DeleteJournal()
   UO.Exec('warmode 1')

   UO.FindType('0x0010',-1,'ground')
   Elem=UO.GetSerial('finditem')

   UO.Attack(Elem)
   
   repeat
      wait(1000)

      If UO.GetDistance(Elem)>1 Then
         walkn(0,0,Elem)
      Endif

   until UO.IsNPC(Elem)==0
   wait(3000)

   UO.FindType('0x0010',-1,'ground')
   If UO.GetQuantity('finditem')>0 Then
      KillElem()
   Endif

   UO.Exec('warmode 0')
   wait(1000)

   UO.Print("Sdoh skotina!")

   LastTimer=UO.Timer()
   if UO.Life<200 then ; U'r max HP
      repeat
         UO.BandageSelf()
         wait(4000)
      until UO.Life>150 OR LastTimer+300<UO.Timer()
   endif
   UO.DeleteJournal()

end sub


i search in forum some things what maby work

Code: Select all

sub gotohind() 


 uo.findtype('0x00ED','-1','ground')
 walkn(0,0,'finditem') ;
 uo.findtype('0x00ED','-1','ground')
 
 while UO.GetDistance('finditem')>1
  wait(1000)
  uo.findtype('0x00ED','-1','ground')
 wend
 uo.findtype('0x00ED','-1','ground')
 uo.waittargetobject('finditem')
 

endsub


i test this. in first time he go, but second time he just go 1 step up and thats all... why?


test 2:

Code: Select all

sub fgfg()
 WalkN(0,0,"0x00065B5F")
end sub


i test this and all work

then:

Code: Select all

sub hhh()
uo.findtype('0x00ED','-1','ground')
walkn(0,0,"finditem")
end sub


he also go to Hind but only to that hind with this id in first test 0x00065B5F


and i have question: how to get from findtype npc ID?

please HELP?


test3:

i test this lines

Code: Select all

UO.FindType('0x0010',-1,'ground') 
   Elem=UO.GetSerial('finditem')


in uo print :
No item found.
invalid object: 0x0000000000

i have set finddistance 14

why dont search type on ground and dont get serial?