A.G.S. v2.21
Text Script Commands Manual by Spyros

Main Page
Character

Cursor
Dialogue
Display
File
Game
GUI
Inventory
Music,Sound,Flic

Palette
Object

Room
Screen
String

 

RunDialog (int topic)
Starts a conversation using topic number TOPIC. This is identical to the "Run dialog topic %d" room interaction command.
Note: The conversation will not start immediately; instead, it will be run when the current script function finishes executing.
Example:
RunDialogue(4);

SetDialogOption (int topic, int option, int new_state)
Changes whether an option in a conversation is available to the player or not. This allows you to add extra options to a conversation once the player has done certain things.
TOPIC is the topic number, from 0 to the number of topics - 1. Find this out in the Room Editor.
OPTION is the option number within that topic, from 1 to whatever the highest option is for that topic.
NEW_STATE controls what happens to this option. It can have the following values:
0 The option is disabled - the player will not see it
1 The option is enabled - the player can now see and use it
2 The option is permanently disabled - no other command can ever turn it back on again.
These are equivalent to the option-off, option-on, and option-off-forever dialog commands.
Example:
SetDialogueOption(4,3,1);

StopDialog ()
This command can only be used from within the dialog_request function. It tells AGS that when dialog_request finishes, the whole conversation should stop rather than continuing with the dialog script. You can use this function to end the conversation depending on whether the player has/does a certain thing.
Example:
StopDialogue(4);