ID:149772
 
if i had an attack script like this

verb/attack(mob/victim as mob in oview(1))
Attack(victim)

how would i just make it so if a npc has a variable you cant attack him so you can only attack enemies like this

verb/attack(mob/victim as mob in oview(1))
if(npc = 0)
Attack(victim)
else()
Bored:

mob
var
isnpc = 0
health = 100
mob
proc
Attack(mob/M as mob)
var/damage = rand(1,10)
M.health-=damage
M<<"You were attacked by [src] for [damage] damage!"

mob/verb/attack(mob/victim in oview(2))
if(!victim.isnpc)
src.Attack(victim)
else
src<<"You cannot attack [victim]!"

mob
notattackablenpc
isnpc = 1


There.
In response to Nadrew
dam straiht!
that worked!
GOODY!
thanks!
for
helping
me
you
person!