Jump to content

Beginning scripter - looking for a fix for a chatbot


Ava Cartier
 Share

You are about to reply to a thread that has been inactive for 342 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello! I'm trying to modify an existing script for an NPC for my store. My issue is that I want the bot to answer in upper and lowercase letters, appropriately. Yes, I know it's trivial. Yes, I know it's nit-picky. Regardless, is there a way to do this that will not create a huge scripting problem for the existing script? Thanks in advance!

  • Like 1
Link to comment
Share on other sites

The important word in your question is "appropriately".  To do the job right, the script will need to have rules that tell it when a capital letter is appropriate (at the start of a sentence or a proper name or a title -- like King Charles --, in acronyms, in key words in book or movie titles ... ) and then how to recognize those situations.  That is definitely a non-trivial task.  You can make up very simplified rules -- capitalize the next word following a period, for example -- that will work most of the time, but for most of it there's no hope.  That's why all but the most sophisticated routines use either all lower case or all upper case, or stick with canned responses that are delivered intact from a bank of pre-written answers.  "Hello, <insert llDetectedName(0) here>. How are you today?"   "I'm sorry, <insert llDetectedName(0) here>.  We do not have <insert parsed item name here> in your size."

  • Like 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 342 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...