23-04-2009, 01:24 AM
Code:
Type MapNpcRec
Num As Integer
Target As Integer
HP As Long
MP As Long
SP As Long
x As Byte
y As Byte
Dir As Integer
' For server use only
SpawnWait As Long
AttackTimer As Long
End Type
First you need to be able to specify if you are attacking a Player or an other NPC. Do this the same way players do it, adding the "TargetType As Byte" to the npc's type.