ID:178791
 
Hi all,
Does anyone have any code for NPC movment? but so you cant kill the NPC just talk to it.
I will add you in my credits in my game.

Regards Rinereg
Well, something like this,
obj/NPC
icon = 'NPC.dmi'
Click()
alert("Hi, I am an NPC, I am merely a configuration of data appearing before you through the computer moniter.")
mob/proc/MoveNPC
for(obj/NPC/N as obj in world)
Ravioli
step(N,NORTH)
sleep(10)
step(N,EAST)
sleep(10)
step(N,SOUTH)
sleep(10)
step(N,WEST)
sleep(10)
goto Ravioli


Or something like that,
In your attack verb put this,

if(istype(M,/mob/Npc))
src<<"Sorry you can't attack Npc's"
return

mob/Npc/proc/Walker()
walk_rand(src,50)
mob/Npc/New()
..()
Walker()
mob/Npc/Click()
var/input=input("blah")
..//put your code there