NPC prog help

Posted by BHawk on Fri 30 Jul 2004 04:46 AM — 3 posts, 17,381 views.

#0
Sorry, Im not sure if this belongs here, but please move it or point me in the right direction if it doesnt.

Im trying to create a bouncer NPC that will prevent certain characters from going through an exit. I know a bit about npc progs and can make simple ones and even use if/endif statements in them, but how would I prevent the character from going through an exit? One thought I had, was to teleport the player back to the same room when he tried to leave, but that would be messy since i dont really want the player to see whats on the other side.

thanx in advance for any help.
USA #1
Hmm. Well, one thing off the top of my head would be to lock the exit with a key and give the key to the bouncer mob. Then use the mobprogs to determine whether or not to let the person in, based on whatever criterion you wanted to use. You could then have the mob unlock the door, open it, force the person through (or whatever) then close and lock it again afterward if they're supposed to be allowed through. That shouldn't be too complicated to put together (bear in mind I haven't actually done this) but I would think it could work.

Just a thought I had, hope that helps.
Canada #2
You should be able to do something like this:

mpedit bouncer add speech password 100
if clan($n) == "The Thieving Guild"
say Oh, yes sir. Right this way sir.
unlock east
open east
mpforce $n east
close east
lock east
else
say Sorry, you are not permitted back there.
glare $n
endif

Modify that to how you want, but that should do the job. If you can code, there is also a snippet available that makes mob_progs trigger on phrases entered by the player that could stop them from going east if the door were open.