ID:189635
Jun 14 2003, 5:20 pm
|
|
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.
|
Jun 14 2003, 5:47 pm
|
|
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 |