################################ C H E S S   L A M E R   v. 2.2 ################################

1. How to install?
  /load -rs "Path\Chess.mrc"
  First of all please don't change the two scripts' filenames (they are used internally)!
The filenames should be Chess.mrc and Chess2.mrc (preferrably unzipped in one directory). And now
for the installation... In any mIRC window type: /load -rs "PathToChess.mrc\Chess.mrc"
If a [Yes] [No] dialog pops-up hit *Yes* and if everything's fine you will get this:
* Wrath Presents: CHESS LAMER v2.2. The second script Chess2.mrc is loaded automatically.
  NOTE: If after /load-ing you are asked for the second script file that's because you put them
in different dirs. Just browse through and find Chess2.mrc.

-----

2. How to play?
  Type /chess in any mIRC window or select through the popups Chess Lamer\Play Chess. A window
should pop up. Now you have the choice to either Create/Load A Game or Join one (select from the
popups of the Chess Lamer window).

>>> Creating a game:
  When you create a game *you choose* which colour you want to play with (White or Black) and
the pieces are shown! Now you have to find a partner (it should be no problem in IRC ;))
who also has the Chess Lamer and persuade him to join and play.

>>> Loading a game:
  If you have previously saved some of your games (they are stored in the "clsaves" dir) you can
load one of them, and when someone joins to play with you he will automatically receive the game
and you can resume playing from the point the game is saved.

>>> Joining a game:
  There are two ways:
  1) In any query window (private chat) select from the popups Chess Lamer\Play Chess while
holding the <Ctrl> key pressed (hold the key, click the popup, let go of the key) and if you are
connected to an IRC server and the guy (you are talking with in that query window) *has created
a game* (and is not currently playing with someone else) you will be able to join and play.
  2) You have to first find out the person's (the creator of the game) hostname or IP. You can
get this information by doing a /userhost on that guy (/userhost nick) and looking for
something like:

    userhost: Wrath=+wratchilo@212.50.147.20

After that you can select Join Game through the Chess Lamer window's popups and enter the
hostname or IP (in our case 212.50.147.20). Then wait a moment and the pieces will be shown
to you which means that you are connected and can begin playing!

>>> Moving the pieces:
  Click on a piece and the square should be highlighted. Then click on the
square where you want to move the piece to and the move will be made. If you want to unselect a
selected piece either click outside the chess board (but inside the Chess Lamer window) or click
that piece again.
  There's another way if you don't want to use the mouse: in the Chess Lamer window type
<type of piece> <from> <to> where type of piece is one of 'r', 'n', 'b', 'q', 'k', 'p' and
<from> & <to> are squares.
  e.g. p e2 e4 -> moves the pawn from e2 to e4
       n c5 d3 -> moves the knight
       k h1 h2 -> moves the king
       0-0     -> kingside castle
       0-0-0   -> queenside castle

>>> Talking to the opponent:
  Just type text and press <Enter> like you normally do when chatting. If you want to say
something that begins with a '/' or that will otherwise be interpreted as a move (like '0-0' or
'q d1 d4') type what you want to say and press Ctrl+Enter.

>>> Captured pieces:
  Chess Lamer monitors piece capturing and updates the results in the Captured Pieces status-box.
The box contains two cells:
  Bottom cell - what pieces *you* have captured.
  Upper cell - what the *opponent* has captured.
The two cells are coloured according to the players colours.

>>> Game logging:
  Chess Lamer logs the games you play in the "cllogs" directory to filenames with syntax:
<player with whites> vs <player with black> $date(dd_mm_yyyy) [num].log. You can turn this
feature ON/OFF from the status, query, etc. popups.

-----

3. Troubleshooting.
> Problems installing.
  Probably you have pressed <Cancel> or did not find the second part of Chess Lamer when the
script advised you to. When you do so the Chess.mrc unloads itself automatically so you have to
/load it again (see 1. How to install...).
  If the script Chess.mrc is in a dir with spaces you should use /load -rs "pa th\Chess.mrc".

> Problems joining a game.
  Before you join a game first of all it has to be *created by someone*! If it's created and you
still can't join either the creator has some sort of firewall that is blocking the connection
(to port 32173) or the creator is currently playing with someone else.

> I can't offer a draw sometimes.
  You can only offer a draw when it's your turn to move! That's a Chess rule.

-----

4. How to Un-Install?
  Select from the popups Chess Lamer\Unload (You suck... ;P just kidding).

-----

5. Bugs, Scripting questions, Comments, Suggestions, Feedback, etc.
  E-mail to: metal_for_muthas@hotmail.com (for every God damn thing ;))

================================================================================================
LEGAL DISCLAIMER:
  Chess Lamer is provided on an "as is" basis without warranty of any kind. In no event shall
  Wrath be liable for any damages whatsoever caused by the script's any related files, even if
  Wrath has been advised of the possibility of such damages. Chess Lamer may not be distributed
  as a part of any commercial package. All rights of Chess Lamer are owned by the author.
================================================================================================
v1.0 - First public release

v1.1
  > Added automatic join game in the query popups (via Ctrl+Click).
  > Chess games are now logged to the file Chess_Game.log if Log Games is ON.
  > Some speed-up.

v2.0
  > Long-File-Name compatible.
  > Totally rewritten core: uses "class"-identifier $sq and hash tables.
    (A little slower now because of $sq but a lot cleaner and easy to add new features)
  > Added the ability to Save & Load games.

v2.1
  > Added captured pieces tracking.
  > Changed some fonts (moves, echoed text, board coordinates).
  > Added Help item in the status, query, etc. popups. Opens this file if it exists.
  > Changed alias _echo a little bit. Now echoes without the rectangle.
  > Changed aliases _echo & _error to _cl.echo & _cl.error for compatibility with other scripts.
  > Added a small dialog when creating a game (previously used mirc's internal input dialog).
  > You can no longer resize the Chess Lamer window.

v2.2
  > Reduced the size of the hash tables (using more /hdel now instead of the old /hadd 0 ;)).
  > Fixed a small bug in _put.lmoves when game was saved with no moves made.
  > Inner clearization & changes of code.
  > Added 'Delete' button in Load game dialog. Deletes without confirmation so be careful!
  > Changed aliases _draw.status2 & _upd.status2 to _draw.capture & _upd.capture.
  > Made the logging system better. Games are now logged in the "cllogs" dir in separate files.
  > Added ChessLog window.
  > Removed '[' & ']' from Chess Lamer window popups.
  > Re-ordered the sq alias. Should be a bit faster now. Also added a catch for wrong property.
  > Fixed a bug in moving pieces when the square(s) were supplied with capital letters from the
    Chess Lamer window editbox.
  > Fixed a bug in the castling routine when the rook was captured by the opponent.
  > Fixed another bug in the castling routine :((.