-
Notifications
You must be signed in to change notification settings - Fork 8
Script Commands
MicroBlaster edited this page Jul 5, 2022
·
27 revisions
Many of these commands exist only for internal use or backwards compatibility.
- add - Adds a value to a variable.
- addMenu - Adds a new TWX menu.
- addQuickText - Sets text snippets for echo.
- and - Performs a logical 'AND' on a variable.
- branch - Tests a value and performs a conditional jump to a script label.
- clearAllAvoids - Removes all sectors from TWX's internal Avoid list.
- clearAvoid - Removes a single sector from TWX's internal Avoid list.
- clearGlobals - Clears all global variables from memory.
- clearQuickText - Clears text snippets for echo.
- clientMessage - Broadcast a block of formatted text to all connected telnet terminals.
- closeDatabase - Closes an existing database.
- closeInstance - Closes a new instance of TWXP.
- closeMenu - Closes the open TWX menu.
- concat - Combines the text from multiple strings into a single string.
- connect - Connects TWX Proxy to a remote server.
- copyDatabase - Copies an existing database with the specified name.
- createDatabase - Creates a new database with the specified name and size.
- cutLengths - Cuts the lengths of an array of strings.
- cutText - Cuts a value out of a piece of text.
- dateTimeDiff - Gets the difference between two Unix/Julian Datetimes.
- dateTimeToStr - Converts a Unix/Julian Datetimes to strring with an optional forrmat.
- delete - Deletes a file.
- deleteDatabase - Deletes an existing database, configuration, and optionally script data.
- dirExists - Checks to see if a directory exists.
- disconnect - Disconnects TWX Proxy from the remote server.
- divide - Performs mathematical division on a variable.
- echo - Prints text to all connected telnet terminals.
- echoEx - Extended version of echo. Converts ASCII boxes to CP437.
- editDatabase - Edits the details of an existing database.
- fileExists - Checks to see if a file exists.
- find - Finds the specified value in an array.
- findall - Returns an array of all matching strings.
- format - Formats a string for display.
- getAllCourses - Populates an array with coarse plots from a specified sector.
- getBotList - Retrieves a list of all available Bots.
- getCharCode - Retrieves an ASCII character code from a single-character value.
- getConsoleInput - Get input from a connected terminal without sending it.
- getCourse - Internally calculates a warp course using warp data in the TWX Proxy database.
- getDate - Retrieves the date and stores it in a variable.
- getDateTime - Retrieves the current Unix/Julian Datetime.
- getDeafClients - Retrieves the status of any deaf clients.
- getDirList - Gets a list of files from a directory.
- getDistance - Internally calculates the distance between two sectors.
- getFileList - Populates a specified array with any files that match a specified Mask (like *.ts).
- getInput - Gets a line of text from the user.
- getLength - Retrieves the length of a block of text.
- getMenuValue -Retrieve the display value of an existing menu.
- getNearestWarps - Populates a specified array with surrounding sectors, sorted by distance.
- getOutText - Retrieve any outgoing text from TWX Proxy's outgoing buffer.
- getRnd - Generate a random number within a specified range.
- getScriptVersion - Reports the version of the compiler used for a compiled script. (*.cts)
- getSector - Retrieve the details of a specific sector from the TWX Proxy Database.
- getSectorParameter - Retrieves a permanent user specified variable assigned to a sector.
- getText - Copies a value out of a line of text by using sub strings.
- getTime - Retrieves the current system time, or a formatted date/time value.
- getTimer - Retrieves the number of CPU ticks since power on.
- getWord - Copies a specific word out of a line of text.
- getWordCount - Counts the words in a string.
- getWordPos - Finds the location of a value within a block of text.
- gosub - Temporarily jumps to a subroutine with the ability to return to where it came from.
- goto - Jumps to a different area within the script.
- halt - Immediately and unconditionally terminates the script.
- isEqual - Compares two values to see if they are equal.
- isGreater - Compares two values to see if the first is greater than the second.
- isGreaterEqual - Compares two values if the first is greater than or equal to the second.
- isLesser - Compares two values to see if the first is less than the second.
- isLesserEqual - Compares two values to see if the first is less than or equal the second.
- isNotEqual - Compares two values to see if they are not equal.
- isNumber - Tests a value to see if it is a valid number.
- killAllTriggers - Terminates all triggers in the script and its included subroutines.
- killTrigger - Terminates a trigger.
- killWindow - Unloads a script window.
- labelExists - Checks to see if a label exists.
- listActiveScripts - Populates a user-specified array with a list of currently active scripts.
- listAvoids - Populates a user-specified array with the list of internal Avoided sectors.
- listDatabases - Retrieves a list of available databases.
- listGlobals - Retrieves a list of global names and values.
- listSectorParameters - Populates an array with the list of Sector Parameters for a sector.
- load -Loads a script from a file.
- loadGlobal - Loads a variable from a global array without all that mucking around in INI files.
- loadVar - Loads a variable from the config file associated with the current Database.
- logging - Disables or enables TWX Proxy's logging feature while the script is running.
- lowerCase - Converts all text within a variable to lower case.
- MakeDir - Creates a directory.
- mergeText - Concatenates two text values together to form one.
- modulus - Calculates the remainder of a division operation.
- multiply - Performs mathematical multiplication on a variable.
- openDatabase - opens an existing database for use.
- openInstance - opens a new instance of TWXP.
- openMenu - Activates an existing script menu or TWX Terminal Menu option.
- or - Performs a logical 'OR' on a variable.
- padLeft - Add spaces to the left of a variable.
- padRight - Add spaces to the right of a variable.
- pause - Pauses the script's execution, allowing it to wait for its triggers to activate.
- processIn - Emulates incoming text from the remote server, activating TextLine triggers.
- processOut - Resumes processing out outgoing data that was trapped by a TextOutTrigger.
- read - Reads a line of a text from a text file.
- readToArray - Reads a text file directly into a TWX array.
- RemoveDir - Removes a directory.
- rename - Renames a file.
- replaceText - Replaces a value, or set of values within a variable.
- reqRecording - Ensures that data recording is turned ON.
- reqVersion - Will halt script if the TWX version is to old.
- resetDatabase - Resets an existing database for a Re-Bang or Script Testing.
- return - Return from a subroutine.
- round - Rounds a variable to the specified precision.
- saveGlobal - Saves a variable to a global array without all that mucking around in INI files.
- saveVar - Saves a variable to a file associated with the currently selected Database.
- send - Sends text to the remote server.
- setArray - Declares a static array.
- setAutoTrigger - Creates a trigger that will respond to the event instead of jumping to a label.
- setAvoid - Adds an Avoid to TWX's internal Avoid list.
- setDeafClients - Sets the deaf status on all clients.
- setDelayTrigger - Creates a trigger that will activate after a specified time period.
- setEventTrigger - Creates a trigger that will activate on a certain program event.
- setMenuHelp - Sets the help display of an existing menu.
- setMenuKey - Sets the menu key used to activate TWX.
- setMenuOptions - Configures standard options accessible from a menu.
- setMenuValue - Sets the display value of an existing menu.
- setPrecision - Sets the maximum precision for decimal calculations.
- setProgVar - Sets a program variable.
- setSectorParameter - Sets a permanent variable, assigning it to a sector.
- setTextLineTrigger - Creates a trigger activated when specific text is received from Server.
- setTextOutTrigger - Creates a trigger activated when specific text is received from Client.
- setTextTrigger - Creates a text trigger activated when specific text is received.
- setVar - Sets the value of a variable.
- setWindowContents - Sets the display content of a script window.
- sort - Sorts a one dimensional array of strings.
- sound - Plays a sound (.WAV) file.
- splitText - Splits a string into an array of words.
- startTimer - Starts a performance timer.
- stop - Terminates an active script.
- stopAll - Stops all running scripts optionally including system scripts.
- stopTimer - Stops a performance timer, and returns the time elapsed.
- stripANSI - Removes ANSI characters from a variable.
- stripText - Removes a character or sub-string from a variable.
- subtract - Subtracts a value from a variable.
- switchBot - Kills previous bot, and loads the specified or next bot.
- systemScript - Sets the script as a "systemScript", allowing it to run in the background .
- trim - Removes leading and trailing spaces from a string.
- truncate - Calculates the integral part of a specified decimal number.
- updateQuickStats - Updates stats from the '/' command.
- upperCase - Converts all text within a variable to upper case.
- waitFor - Pauses script execution, waiting for specified text from server connection.
- window - Creates a script window to display information while the script is running.
- write - Appends a line of text to a text file.
- xor - Performs a logical 'XOR' on a variable.
.