INIT Section
DB_SingleLetter("A", 1);
DB_SingleLetter("B", 2);
DB_SingleLetter("C", 3);
DB_SingleLetter("D", 4);
DB_SingleLetter("E", 5);
DB_SingleLetter("F", 6);
DB_SingleLetter("G", 7);
DB_SingleLetter("H", 8);
DB_SingleLetter("I", 9);
DB_SingleLetter("J", 10);
DB_SingleLetter("K", 11);
DB_SingleLetter("L", 12);
DB_SingleLetter("M", 13);
DB_SingleLetter("N", 14);
DB_SingleLetter("O", 15);
DB_SingleLetter("P", 16);
DB_SingleLetter("Q", 17);
DB_SingleLetter("R", 18);
DB_SingleLetter("S", 19);
DB_SingleLetter("T", 20);
DB_SingleLetter("U", 21);
DB_SingleLetter("V", 22);
DB_SingleLetter("W", 23);
DB_SingleLetter("X", 24);
DB_SingleLetter("Y", 25);
DB_SingleLetter("Z", 26);
KB Section
IF
CharacterUsedSkill(_, _, _)
THEN
PrintText("ZONE");
PartyAddExperience(5);
CharacterDisplayText(CHARACTER_Player1, "A");
PROC
PrintText((STRING)_word)
THEN
DB_Forward(1);
DB_Backward(1);
CharacterSetVarString(CHARACTER_Player1, "DebugWord", "");
CharacterSetVarInteger(CHARACTER_Player1, "DebugLetterListIndex", 1);
Proc_FindFrequency(_word, 1);
Proc_GrowForward(_word);
Proc_GrowBackward(_word);
PROC
Proc_FindFrequency((STRING)_word, (INTEGER)_index)
AND
DB_SingleLetter(_char, _index)
AND
IntegerSum(_index, 1, _nextIndex)
THEN
Proc_FindLetter(_word, _char);
Proc_FindFrequency(_word, _nextIndex);
PROC
Proc_FindLetter((STRING)_word, (STRING)_char)
AND
StringContains(_word, _char, _output)
AND
_output > 0
THEN
Proc_AddToLetterList(_char);
PROC
Proc_AddToLetterList((STRING)_char)
AND
CharacterGetVarInteger(CHARACTER_Player1, "DebugLetterListIndex", _index)
AND
IntegerSum(_index, 1, _nextIndex)
THEN
DB_TempLetterList(_char, _index);
CharacterSetVarInteger(CHARACTER_Player1, "DebugLetterListIndex", _nextIndex);
PROC
Proc_GrowForward((STRING)_word)
AND
DB_Forward(1)
THEN
NOT DB_Forward(1);
Proc_TestNextLetterForward(_word, 1);
Proc_GrowForward();
PROC
Proc_TestNextLetterForward((STRING)_word, (INTEGER)_index)
AND
NOT DB_Forward(1)
AND
IntegerSum(_index, 1, _nextIndex)
AND
CharacterGetVarString(CHARACTER_Player1, "DebugWord", _currentWord)
AND
DB_TempLetterList(_char, _index)
AND
StringConcatenate(_currentWord, _char, _testWord)
AND
StringContains(_Word, _testWord, _result)
AND
_result > 0
THEN
CharacterSetVarString(CHARACTER_Player1, "DebugWord", _testWord);
Proc_OutputLetter(_char, 1);
DB_Forward(1);
PROC
Proc_TestNextLetterForward((STRING)_word, (INTEGER)_index)
AND
IntegerSum(_index, 1, _nextIndex)
AND
DB_TempLetterList(_char, _index)
THEN
Proc_TestNextLetterForward(_word, _nextIndex);
PROC
Proc_GrowBackward((STRING)_word)
AND
DB_Backward(1)
THEN
NOT DB_Backward(1);
Proc_TestNextLetterBackward(_word, 1);
Proc_GrowBackward();
PROC
Proc_TestNextLetterBackward((STRING)_word, (INTEGER)_index)
AND
NOT DB_Forward(1)
AND
IntegerSum(_index, 1, _nextIndex)
AND
CharacterGetVarString(CHARACTER_Player1, "DebugWord", _currentWord)
AND
DB_TempLetterList(_char, _index)
AND
StringConcatenate(_char, _currentWord, _testWord)
AND
StringContains(_Word, _testWord, _result)
AND
_result > 0
THEN
CharacterSetVarString(CHARACTER_Player1, "DebugWord", _testWord);
Proc_OutputLetter(_char, 0);
DB_Backward(1);
PROC
Proc_TestNextLetterBackward((STRING)_word, (INTEGER)_index)
AND
IntegerSum(_index, 1, _nextIndex)
AND
DB_TempLetterList(_char, _index)
THEN
Proc_TestNextLetterBackward(_Word, _nextIndex);
PROC
Proc_OutputLetter((STRING)_char, (INTEGER)_dir)
AND
_dir > 0
THEN
CharacterDisplayText(CHARACTER_Player1, _char);
PROC
Proc_OutputLetter((STRING)_char, (INTEGER)_dir)
AND
_dir < 1
THEN
CharacterDisplayText(CHARACTER_Player1, _char);