move to attack npc
Posted: 2008-10-14 23:09:00
I want to make a script that makes me go to NPC which I aim at
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)
....
.....
Code: Select all
repeat
if UO.GetDistance(NPC)>1 then
GO(....)
else
wait(1000)
end if
UO.FindType(...)
until UO.FindCount==0