Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🟡 A Tiny First Example

Example: simple “hello” trigger

if (context.chat.last_message.toLowerCase().indexOf("hello") !== -1) { context.character.scenario += "They greet you warmly."; context.character.personality += "Friendly and welcoming."; }

What it means:

  • Look at what the user just typed.
  • Change it to lowercase so “HELLO” or “Hello” also works.
  • Check if the word “hello” is in there.
  • If yes, add two short notes: one to scenario (what’s happening) and one to personality (how they act).