Simple Chat
version 4 by Mark Tilford
Section - Running a conversation from
To run a conversation from (current node - a chat node):
let previous node be no quip chosen;
let next node be no quip chosen;
while current node is not no quip chosen:
try giving text for current node;
reset the links;
try silently finding responses to current node;
if rowcount is greater than 0:
repeat with current row running from 1 to rowcount:
say "[current row]) [run paragraph on]";
now next node is result in row current row of table of current choices;
now first chat node is next node;
now second chat node is current node;
try giving link to next node;
let choice made be 0;
if exiting on zero is allowed:
say "[italic type]([simple chat zero option])[roman type][line break]";
now choice made is the choice made from 0 to rowcount;
otherwise:
now choice made is the choice made from 1 to rowcount;
if choice made is 0:
now next node is no quip chosen;
say "[line break][run paragraph on]";
otherwise:
now next node is result in row choice made of table of current choices;
now previous node is current node;
now current node is next node;
otherwise:
now current node is no quip chosen.
To say simple chat zero option:
say "or 0 to say nothing[run paragraph on]".