ID:189635
 
Has anyone coded a really smart NPC that can talk and do commands by talking to it using a regular say verb oview(6) << "[msg]" and the npc hears it and responds, of course without using oview(6) << "(npc[msg])" or somethin like that.
Not directly, but I've coded a program that does stuff by talking to it, its called a parser. The same thing you use in a text MUD. Making a mob that responds to commands would be pretty much the same thing.
My RPGtutorial 2 has an example of this in it... You have to say "Weapon" in your sentence after you speak to him the first time. When you say lets say, "I want a weapon.", he will give you a Stickbane sword.



Also, have you checked out Drugwars? I have it in there so the computer AI characters will respond to a magnitude of comments about them, and they don't even gotta be in the same sentence. Example:

Me: Hey, Fred.
Fred(AI): What?
Me: Do you think you are winning?
Fred: I think I am.

Another Example, but this time both are AI (I'm not sure if I have these parts still in there though.):

Peter: Your dead meat, Fredrick.
Fredrick: Really, Peter? I have already bought your tombstone.
Peter: Hmm, well lets just see about that after you see my shiny new M-16.



I love how this confuses alot of the newbies that play the game :P
Castle has NPC's that you can talk to for help as well as the normal help-files. They can also run procs and stuff and react to the user.
If you look back in the forum history I believe you can see some of splattergnomes developement of it. :D