Skip to content

Latest commit

 

History

History
346 lines (238 loc) · 12 KB

commands.md

File metadata and controls

346 lines (238 loc) · 12 KB

Commands

Display

#CLR

Add blank lines to clear the screen ignoring any current trailing blank lines

#COLOR {pattern} fore,back,bold profile

Color last added line, comma delimited colors, supports raw jiMUD color codes, ansi word values, any valid HTML color name, of ##RRGGBB html format

#CW {pattern} fore,back,bold profile

Color all strings matching current trigger pattern, see #color for arguments

#GAG number

Gag the current or multiple lines of incoming or previous lines, if no arguments gags current line

#ECHO text

Display text to the screen and append newline

#ECHOPROMPT text

Display text to the screen

#FREEZE state

Scroll lock the display, if state is omitted it will toggle the scroll lock, if state is 0 or false it will disable scroll lock, if state is anything else it will lock the scroll back

#HIGHLIGHT pattern

make last line or lined with matching pattern bold or brighter color if already bold, or

#PCOL fore,back,bold XStart XEnd YStart YEnd

Color position, will assume full line if position is not supplied, if XEnd omitted will assume end of line, if xEnd -1 it will assume end of line, if YEnd omitted will assume current line, YStart and YEnd are relative to the current line, 0 current, 1 previous, ...

#PRINT text

Display text to the screen and append newline, and the display text will not fire triggers

#PRINTPROMPT text Display text to the screen, and the display text will not fire triggers

#SAY text

Display text to the screen and append newline

#SAYPROMPT text

Display text to the screen

#SHOW text

Process text as if it came from the MUD and append a new line

#SHOWPROMPT text

Process text as if it came from the MUD

#UNGAG

clear previous #gag command settings

Conditionals

#CASE index {command 1}{command n}

return command from list based on the value of index

#IF {expression} {true-command} {false-command}

if expression is true execute true command, if false and false commands supplied execute them

#SWITCH (expression) {command} (expression) {command} ... {else command}

execute each expression until one returns true, if none are true and an else command supplied it is executed instead

Repeating and Loops

#nnn/#-nnn commands

Repeat commands NNN number of times

#BREAK

breaks a loop

#CONTINUE

skips to the next loop iteration

#FORALL stringlist {commands}

loop stringlist, in the format of a | delimited string and set %i as each word

#fo "first|second|third" {#sh %i} would display the words first, second, third

#LOOP range {commands}

Execute the commands a number of times given by the range. range is a min and max value separated by a comma, if max value is omitted it is assumed the single value is the max and 1 is the min value

#loop 5 {#show %i} will display numbers 1 to 5

#REPEAT expression {commands}

repeat commands number of times returned by expression

#repeat 5 %i will display the numbers 1 to 5

#UNTIL expression {commands}

Execute commands until the expression evaluates to TRUE

#WHILE expression {commands}

Execute commands as long as expression evaluates to TRUE

Sounds

#BEEP

Play standard System beep

#PLAYSOUND soundfile

Play a sound effect, to play local files use file://path/file.ext

#PLAYMUSIC soundfile

Play background music, to play local files use file://path/file.ext

#MUSICINFO

display currently playing background music, current position, and total length

#SOUNDINFO

display currently playing sound effect, current position, and total length

#STOPALLSOUND

stop all sound effects and background music

#STOPSOUND

Stop the current sound effect

#STOPMUSIC

Stop the current background music

Create/Modify Profile or Items

#ALIAS name|index {commands} profile

Create or alter an alias

#BUTTON name|index

Cause a button to react as if it was clicked, if index it is the position from top down starting at 0

#BUTTON name caption {commands} {icon} options2 profile

Update or create a button

#PROFILE name enable|disable

enable or disable a profile

#PROFILELIST

display a list of all profiles and current state

#UNBUTTON name|index|caption

remove a button, if index it is the position in order of buttons in profile manager

#VARIABLE name value

Set, get, or display all user set variables

#UNALIAS name profile

Delete an alias

Triggers

#ALARM name {time pattern} {commands} profile

Create or alter an alarm trigger

#EVENT name {commands} options1 profile

create or update event

#RAISEEVENT name arguments

fire a custom event

#raiseevent "test" 1 2 3 "4 5" will fire an event named test with arguments 1, 2, 3, and 4 5

#RAISEDELAYED amount name arguments

fire a custom event with a delay

#raisedelayed 3000 "test" 1 2 3 "4 5" will fire and event named test with arguments 1, 2, 3, and 4 5 after waiting 3 seconds

#RESUME name|pattern

enable an alarm, id arguments omitted will attempt to suspend last suspended alarm

#SUSPEND name|pattern

disable an alarm, id arguments omitted will attempt to suspend last added alarm

#TRIGGER name {pattern} {commands} options1 profile

create or update trigger

#TRIGGER name options1 profile

Update options1 for a trigger

#UNTRIGGER {name|pattern} profile

remove a trigger

#UNEVENT name profile

Delete an event

Miscellaneous

#ADD name value

Add value to variable named name, if current value is non numeric an error will be displayed

#CHAT text

Send text to chat window and append a new line

#CHATPROMPT text

same as #chat but does not append a new line

#CONNECTTIME

display time since connected

#EVALUATE expression

Evaluate expression and display to screen like show

#GETSETTING name

display a setting value, Keys and value types

#HIDECLIENT

Hide client window

#IDLETIME

Display time a command was last sent

#MATH name value

Set value to variable named name

#NOTIFY title message {icon}

display a notification popup with no sound, use client.notify to turn off silent option or #playsound

#SETSETTING name value

alter a setting value see: Keys and value types

#SHOWCLIENT

Show client window

#TOGGLECLIENT

Toggle show and hide of client window

#WAIT amount

Pause current block for a number of milliseconds

#WINDOW name

Open or show named window, supported names: about, prefs, mapper, editor, profiles, chat, code-editor, help, immortals, history, log-viewer, skills, who

#VERSION

Display current jiMUD version information

Test commands

Test commands allow you to debug or test features of the client

#TESTLIST

List all test commands

#TESTCOLORS

Display a basic ANSI color table

#TESTCOLORSDETAILS

Display a more detailed ANSI color table

#TESTXTERM

Display an XTerm test pattern

#TESTMXP

Test MXP support by displaying several MXP tags

#TESTMXP2

Test custom elements

#TESTMXPEXPIRE

Test MXP link expiring

#TESTMXPCOLORS

Display a full list of all supported MXP color names

#TESTMXPELEMENTS

Test more MXP custom elements

#TESTMXPLINES

Test MXP line tagging support

#TESTMAPPER

Test mapper by generating a test area named Doc Build Samples Area, with 3 x 3 room square with different settings set for each room.

#TESTFANSI

Test FANSI support

#TESTURLDETECT

Test auto url detection by displaying random urls and formats

#TESTXTERMRGB

Display a more detailed XTerm color pattern

#TESTSIZE

Test the current width and height of the client in characters by repeating w for # of columns as line 0 and displaying the numbers 1 to height - 1

#TESTSPEED

Test the speed of the client by running the commands #TestMXPColors, #TestMXP, #TestColors, #TestColorsDetails, #TestXTerm, #TestXTermRGB 10 times taking the time it took to parse, then display. After all test have been ran it will display 0 to 9 and each time and an avg time. Note this will cause the client to become unresponsive or locked while running this test, either wait til done or close.

#TESTSPEEDFILE file

Works exactly like #testspeed but will use file argument instead of built in test functions, Note file load time can cause test to run longer then total time returned

#TESTSPEEDFILER file

Works exactly like #TestSpeedFile but will attempt to emulate as if sent from remote mud for processing

#TESTFILE file

Loads a file, displays it and time to display Note this will cause the client to become unresponsive or locked while running this test, either wait til done or close.

#TESTPERIOD

Toggle on/off a test that will alternate between #testcolors, #textxterm, #testlist every 2 seconds to simulate constant streaming of text

#TESTUNICODEEMOJI

Display emoji unicode symbols

Note: All italic arguments are optional and can be left out

Note: All quoted arguments will be processed based on scripting quote preference when required

Arguments

Explain what each argument does and if it is optional

Argument Optional
text Text to display or process by a command
amount The amount of milliseconds to wait, must be greater then 0
name Sometimes The name for an item or setting
index an index of an item from 0 to max items - 1
{commands} Commands to set for command, the {} are required and will be stripped when processed
options Yes comma delimited list of options to set1,2
profile Yes Which profile to search
value the value to set for a command, if toggle will and boolean type it will toggle between true and false
enable Yes send enable to command, if left off will toggle
disable Yes send disable to command, if left off will toggle
soundfile A sound file from the mud or a full url to a sound file, Note: due to security checks some sites may not allow access to files from other sites.
title the text to display for title, quote text to include spaces
message the text to display as message
arguments Space delimited format grouped based on scripting quote preference
number Yes if >= 0 it will gag current line and that number of incoming lines, if negative it will gag the # of lines before current line
{pattern} Sometimes A valid trigger pattern
caption the caption to display when mouse hovers over button
{icon} Yes a path to an image file, supports {assets} path

1.Trigger and event options

  • nocr disable trigger on newline
  • prompt enable trigger on prompt
  • case enable case sensitive
  • verbatim enable verbatim
  • disable disable trigger
  • enable enable trigger
  • temporary temporary trigger
  • cmd command input trigger, invalid for events
  • priority=# set the priority of trigger
  • raw raw trigger, invalid for events

2.Button options

  • nosend do not send to mud
  • chain chain to end of command if nosend disabled
  • append append command to end of command input if nosend is set
  • stretch stretch icon to fill button
  • disable disable button
  • enable enable button
  • priority=# set the priority of button