This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
client_side_scripting:client_scripting_interface-basic_howto [2015/11/30 12:57] partmedia Update first example |
client_side_scripting:client_scripting_interface-basic_howto [2020/01/10 14:19] boingman |
||
---|---|---|---|
Line 59: | Line 59: | ||
| | ||
monitor -1 1 run_stop | monitor -1 1 run_stop | ||
+ | |||
+ | If you are using an older JXClient release than currently available, monitor commands sent to the script may look like: | ||
+ | |||
+ | ncom XXYYYYeast | ||
+ | |||
+ | Where XX is a 16-bit packet ID and YYYY is a 32-bit repeat indicator. Binary data is transmitted in network byte order (big endian). NOTE: Newline characters regularly occur in the packet ID field so reading this line will have to contend with that, simply reading a line will invariably end in error. | ||
+ | |||
+ | This behavior was eliminated in JXClient by the 15-Nov-2019 snapshot release. Other scripting bugs were also corrected by this release of JXClient. | ||
If you type the command __scripts__ in your client you will see our script is still running.\\ | If you type the command __scripts__ in your client you will see our script is still running.\\ | ||
Line 152: | Line 160: | ||
| map all | Return all the known map information | | | map all | Return all the known map information | | ||
| map <x> <y> | Return the information about square x,y in the current map (relative to player position)| | | map <x> <y> | Return the information about square x,y in the current map (relative to player position)| | ||
+ | | player | Return the player's tag and title | | ||
+ | | skills | Return a list of all skill names, one per line (see also stat xp) | | ||
+ | | spells | Return a list of known spells, one per line | | ||
+ | | stat paths | Return spell paths: attuned, repelled, denied | | ||
+ | Note: player, skills, spells, stat path were added between versions 1.11 and 1.50 of the client.\\ | ||
</box> | </box> | ||
- | :!: in order to get the result of the request into your script's stdin you have to "watch request <data type>" before you do the request. | + | FIXME \\ |
+ | :!: In order to get the result of the request into your script's stdin you have to "watch request <data type>" before you do the request.\\ | ||
+ | :!: No, you do not need to watch requests (anymore?). The client will send the request to stdin of the script. | ||
* //issue <repeat> <must_send> <command>// - send <command> to server on behalf of client. <repeat> is the number of times to execute command <must_send> tells whether or not the command must sent at all cost (1 or 0). <repeat> and <must_send> are optional parameters. See [[#The Issue Command]] for more details. | * //issue <repeat> <must_send> <command>// - send <command> to server on behalf of client. <repeat> is the number of times to execute command <must_send> tells whether or not the command must sent at all cost (1 or 0). <repeat> and <must_send> are optional parameters. See [[#The Issue Command]] for more details. |