User Tools

Site Tools


client_side_scripting:client_scripting_interface-basic_howto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
client_side_scripting:client_scripting_interface-basic_howto [2021/04/11 16:58] – Reorganize top partmediaclient_side_scripting:client_scripting_interface-basic_howto [2025/07/16 13:10] (current) – scriptkillall is now available in the GTK client partmedia
Line 11: Line 11:
   * ''scripttell <id> <string>'': send text to currently running script <id>   * ''scripttell <id> <string>'': send text to currently running script <id>
   * ''scriptkill <id>'': stop currently running script <id>   * ''scriptkill <id>'': stop currently running script <id>
-  * ''scriptkillall'' (JXClient only): stop all currently running scripts +  * ''scriptkillall'': stop all currently running scripts 
 +  * JXClient only: 
 +    * Unique alphanumeric substrings of <path> may be used as <id> so that script names may be used in lieu of numbers
 ===== Writing Scripts ===== ===== Writing Scripts =====
 The script must be executable (e.g. ''chmod +x'' with an appropriate shebang). For some languages, it may be necessary to write a wrapper script to start the program. Additionally, on Windows systems where the shebang is not supported, the player must provide a means of running such a script. For example ''script python <path-to-script>'' if you are using python. The script must be executable (e.g. ''chmod +x'' with an appropriate shebang). For some languages, it may be necessary to write a wrapper script to start the program. Additionally, on Windows systems where the shebang is not supported, the player must provide a means of running such a script. For example ''script python <path-to-script>'' if you are using python.
Line 25: Line 26:
 The ''issue'' interface command runs a given command as if a user typed it into the command window. It takes 3 arguments: //repeat//, the number of times to repeat the command (typically used for dropping items); //must_send//, an integer either zero or one; and //command//, the command to execute. The ''issue'' interface command runs a given command as if a user typed it into the command window. It takes 3 arguments: //repeat//, the number of times to repeat the command (typically used for dropping items); //must_send//, an integer either zero or one; and //command//, the command to execute.
  
 +==== Environment ====
 +
 +Scripts have access to the following environment variables:
 +
 +  * CF_PLAYER_NAME
 +  * CF_SERVER_NAME
  
 ==== Monitoring ==== ==== Monitoring ====
client_side_scripting/client_scripting_interface-basic_howto.1618178300.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki