[Home] [Download] [Documentation] [Discussion Forum] [Jin at SourceForge] [Contribute]

Variables available to scripts

Chat (All types of tells)

Event subtype(s) Variable name Meaning and explanation Sample values (all possible values are listed when possible)
All subtypes sender The nickname/handle of the person who sent the tell, the author of the message "Kiebitz", "fishbait", "DAV"
tellType A short (server specific) string describing the type of the tell "tell", "say", "ptell", "channel-tell", "shout", "ishout", "announcement", "kibitz", "whisper", "qtell", "atell" ICC only, "sshout" ICC only, "channel-qtell" ICC only, "channel-atell" ICC only, "tshout" FICS only, "cshout" FICS only
title The title(s) of the sender "GM", "C", "U", "SR * TM"
message The text of the message that was sent "Hello!", "Want to play chess?"
Channel Tell channel The number of the channel to which the tell was sent 107, 43, 85, 212
Kibitz, Whisper gameNumber The number of the game to which the kibitz/whisper was sent 1, 12, 106

ICC only - Applies only to the Internet Chess Club (chessclub.com)
FICS only - Applies only to the Free Internet Chess Server (freechess.org)

Text (unparsed text)

Variable name Meaning and explanation Sample values
text The line of text "You have 4 messages (1 unread).", "There are no new news items."

Connection

There are no variables specific to this event type available.

Seek

Event subtype(s) Variable name Meaning and explanation Sample values (all possible values are listed when possible)
All subtypes seek The Seek object itself An instance of the free.jin.Seek class
name The nickname/handle of the person posting/withdrawing the seek "POTZY", "Gorgonian"
title The title(s) of the player posting/withdrawing the seek "GM", "C", "", "U", "SR * TM"
rating The rating of the player posting/withdrawing the seek 1801, 2300, 1327, 0
isProvisional Is the player posting/withdrawing the seek provisional? true, false
isRegistered Is the player posting/withdrawing the seek registered? true, false
isComputer Is the player posting/withdrawing the seek a computer? true, false
ratingCategory The rating category of the sought game "Bullet" ICC only, "Blitz", "Standard", "Wild", "Loser's" ICC only, "Bughouse", "Crazyhouse", "5-minute" ICC only, "1-minute" ICC only, "Lightning" FICS only, "Suicide" FICS only, "Losers" FICS only, "Atomic" FICS only
time The time of the sought game, in minutes 1, 5, 15, 60
inc The increment (the time added after each move), in seconds 0, 1, 12
isRated Is the sought game rated? true, false
color The color of the pieces the seeking player wants to play with "black", "white", null
ratingLimited Is the seek limited to players with a certain rating? true, false
minRating The minimal rating a player must have to accept the seek. Irrelevant if ratingLimited is false 1600, 0, 2500
isManualAccept Does the seeker wish to confirm accepting the seek manually? true, false
isFormula Must the person accepting the seek match the seeker's formula before the seek can be accepted? true, false

ICC only - Applies only to the Internet Chess Club (chessclub.com)
FICS only - Applies only to the Free Internet Chess Server (freechess.org)

Game

Event subtype(s) Variable name Meaning and explanation Sample values (all possible values are listed when possible)
All subtypes game The Game object itself An instance of the free.jin.Game class
gameType A short string describing the relation of the game to the user "my" (a game either played or examined by the user), "observed", "isolated" (the user sees only a snapshot of the game, such as obtained, for example, with the "sposition" command)
initialPosition The initial position in the game An instance of the free.chess.Position class
variant The name of the wild variant "Chess", "Kriegspiel", "Atomic"
whiteName The nickname/handle of the player with the white pieces "fpawn", "Darooha"
blackName The nickname/handle of the player with the black pieces "POTZY", "fpawn"
whiteTime The initial time on the clock of the player with the white pieces, in minutes 1, 5, 15
blackTime The initial time on the clock of the player with the black pieces, in minutes 2, 3, 60
whiteInc The increment to the clock of the player with the white pieces after each move, in seconds 0, 2, 5
blackInc The increment to the clock of the player with the black pieces after each move, in seconds 1, 3, 20
whiteRating The rating of the player with the white pieces 1605, 1900, 2727
blackRating The rating of the player with the black pieces 1456, 0, 2102
whiteTitle The title(s) of the player with the white pieces "GM", "WIM", "", "FM", "DM", "C", "U"
blackTitle The title(s) of the player with the black pieces "GM", "WIM", "", "FM", "DM", "C", "U"
isGameRated Is the game rated? true, false
ratingCategory The rating category of the game "Bullet" ICC only, "Blitz", "Standard", "Wild", "Loser's" ICC only, "Bughouse", "Crazyhouse", "5-minute" ICC only, "1-minute" ICC only, "Lightning" FICS only, "Suicide" FICS only, "Losers" FICS only, "Atomic" FICS only
isPlayed Is the game played? (it can also be examined) true, false
isTimeOdds Is the game a time odds game? true, false
Move move The made move An instance of the free.chess.Move class, and if the game is plain chess (not wild), an instance of the free.chess.ChessMove class
Takeback/Backward takebackCount The amount of plies (half-moves) taken back 1, 2, 5, 999
Board Flip isFlipped Is the board shown with the black pieces at the bottom? true, false
Illegal Move Attempt illegalMove The attempted illegal move An instance of the free.chess.Move class, and if the game is plain chess (not wild), an instance of the free.chess.ChessMove class
Clock Update player The player whose clock is being updated "white", "black"
time The amount of time on the clock, in milliseconds 14340, 600000, 500
isClockRunning Is the clock running? true, false
Offers offerType The type of the offer "draw", "abort", "adjourn", "takeback"
isOffered True if the offer has just been made, false if removed true, false
player The player who made the offer "white", "black"
takebackCount The amount of plies offered to take back. Only valid if the type of the offer is "takeback" 1, 2, 3
Other Position Change newPosition The new position An instance of the free.chess.Position class
Game End gameResult The result of the game For games you are playing: "win", "loss", "draw", "unknown". For other games: "1-0", "0-1", "1/2-1/2" or "unknown".
Available for all subtypes, but only if the user is playing the game myName The nickname/handle of the user "EeEk", "ChessCracker"
oppName The nickname/handle of the opponent "MAd", "Lyon"
myTime The amount of time on the user's clock at the beginning of the game, in minutes 5, 1, 10
myInc The amount of time the user's clock is incremented by after each move, in seconds 0, 1, 10
oppTime The amount of time on the opponent's clock at the beginning of the game, in minutes 5, 1, 10
oppInc The amount of time the opponent's clock is incremented by after each move, in seconds 0, 1, 10
myRating The user's rating 1873, 2304, 0
oppRating The opponent's rating 2376, 0, 1202
myTitle The user's title(s) "GM", "WIM", "", "FM", "DM", "C", "U"
oppTitle The opponent's title(s) "GM", "WIM", "", "FM", "DM", "C", "U"
userPlayer The color of the user "black", "white"

ICC only - Applies only to the Internet Chess Club (chessclub.com)
FICS only - Applies only to the Free Internet Chess Server (freechess.org)

All events

These variables usually require fairly intimate understanding of Jin's source code (or at least the API) to use.

Variable name Meaning and explanation
scripter The Scripter plugin itself. With this class, you can do anything a plugin can. For more information, see the free.jin.scripter.Scripter API.
prefs An object that stores user preferences. You can use it to store small bits of information between sessions and runs of Jin. For more information, see the free.jin.Preferences API.
connection An instance of JinConnection which is responsible for communicating with the server. For more information, see the free.jin.JinConnection class and its implementations - free.jin.chessclub.JinChessclubConnection and free.jin.freechess.JinFreechessConnection.
event The event that triggered this script to be run. See free.jin.event.JinEvent and its various subclasses.
eventSubtype The subtype of the event that triggered this script to be run. This is just a string - one of the subtype names you select when defining the script.