Yoko
http://forum.yoko.com.ua/

move to attack npc
http://forum.yoko.com.ua/viewtopic.php?f=20&t=14059
Page 1 of 1

Author:  lcjackal [ 2008-10-14 23:09:00 ]
Post subject:  move to attack npc

I want to make a script that makes me go to NPC which I aim at

Author:  Cornor [ 2008-10-15 08:57:15 ]
Post subject: 

Take walker and find monter what you want with command uo.fintype than go to this monster using walker. You can find many skripts like you need by using 'Search'. Noone will wright this script for free... but thay can help if will try to do it yourself. So use search and try.

Author:  Destruction [ 2008-10-15 09:11:14 ]
Post subject: 

good walker can be found here.

Author:  lcjackal [ 2008-10-15 23:03:25 ]
Post subject: 

Thanx for all

I wrote something in that manner

Code:
#########################################################
#    Attacker                               #
#########################################################

sub Attack()

var NPC

uo.findtype('0x000D','-1','ground')
NPC=UO.GetSerial('finditem')
UO.UseType('axe')   ; Weapon
UO.UseType('shield')   ; Shield
UO.Exec('warmode 1')
   wait (100)

   IF UO.GetDistance(NPC)<4 Then
      uo.targeting('NPC')
      wait(100)
      UO.Attack(NPC)
      wait(100)
   endif      
   
end sub

########### GO SCP ##############################################
sub go()

var NPC

uo.findtype('0x000D','-1','ground')
NPC=UO.GetSerial('finditem')
IF UO.GetDistance(NPC)>1 Then

   WalkME(0,0,NPC)
   endif

end sub

#########################################################
#    WALKER     #
#########################################################

sub WalkME(x,y,Target)
....
.....





It walks over the character that I attacked but it doesn't when the character -that I attacked- goes away from me to use magic. I need a script which makes me walk over other characters continous

Author:  $!@m [ 2008-10-16 16:12:23 ]
Post subject: 

Just add something like a:
Code:
repeat
if UO.GetDistance(NPC)>1 then
   GO(....)
else
   wait(1000)
end if
UO.FindType(...)
until UO.FindCount==0

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/