move to attack npc

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
lcjackal
Posts: 6
Joined: 2008-10-09 22:02:46

move to attack npc

Post by lcjackal »

I want to make a script that makes me go to NPC which I aim at
Cornor
Posts: 67
Joined: 2005-06-07 21:05:18

Post by Cornor »

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.
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

good walker can be found here.
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.
Telegram: @tatikom
lcjackal
Posts: 6
Joined: 2008-10-09 22:02:46

Post by lcjackal »

Thanx for all

I wrote something in that manner

Code: Select all

#########################################################
#    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
$!@m
Posts: 106
Joined: 2006-08-10 08:25:32

Post by $!@m »

Just add something like a:

Code: Select all

repeat
if UO.GetDistance(NPC)>1 then
   GO(....)
else
   wait(1000)
end if
UO.FindType(...)
until UO.FindCount==0
Post Reply