|This checkers script, Checkers_01.txt, can be used with xelagot bots as from the following versions (minimum bot version):
NOTE: the Checkers package and installation are very similar to the Chess ones, but there are subtle differences. The main difference is that they have different pieces and boards, that the pieces are called Reds and Whites instead of Whites and Blacks, and that Reds initiates the game. This affects the names in files and signs.
The Checkers package consists of a few files:
Make a folder in your Script folder, call it Checkers (or something appropriate). Unzip these files into this Checkers folder. You will need to replace the CheckersObjects.txt file with the one supplied with the Checkers objects, and you must edit the CheckersBoards.txt file to suite your needs.
Not everywhere... because not all worlds will have the correct objects and the small green and white (or coloured) squares needed to play this game, or they may have them as z-objects and you may not have permission to use them.
You may play in any world that has the Checkers-piece ojects and the squares, and where you have a piece of land and may build. Your bot will use your citizen number to build and play the game.
Checkers pieces. The world must have Checkers pieces on it's object path, and Checkers squares (not full boards, individual squares are required). The set available with this script is:
File CheckersObjects.txt. The names of the models used for the Checkers pieces and for the squares must be in the CheckersObjects.txt file. This is an example (the column under 'name in file' has the contents of the file):
name in file what it means ------------ ------------- bs=cksqgr.rwx GREEN or BLACK square ws=cksqbf.rwx BUFF or WHITE square sq=1.00 size of the square in metres rk=ck_kr.rwx red king rp=ck_pr.rwx red pawn wk=ck_kw.rwx white king wp=ck_pw.rwx white pawn rkj=ck_krj.rwx red king (jumping) rpj=ck_prj.rwx red pawn (jumping) wkj=ck_kwj.rwx white king (jumping) wpj=ck_pwj.rwx white pawn (jumping)
Location. The location in the world is very important. Due to limitations imposed by the Building Inspector, each Checkers board requires 4 cells, which should be empty otherwise (except for a cover and 3 signs). The Checkers board MUST be located at FULL coordinates (no decimals allowed in the N S W E coordinates), at the intersection of the four cells. To test this, once the boards have been built by the Checkers_Setup.txt script, hold down CTRL and right-click on a corner of the Checkers board. Only 16 squares of the board should get selected, with their corresponding Checkers pieces, and the ground cover. If you have placed a sign (for example, sign1.rwx) in that cell, it will also get selected. Repeat this operation for each corner of the board.
If you are in doubt whether there may be objects far above or below the Checkers board, CTRL-select each corner and delete the contents of the cells. Then replace the cover and maybe the sign, and run setup once more. You can also test the capacity of the cell by cloning the Checkers pieces until they fill the Checkers board (one piece on each square). If all pieces are built without the Building Inspector interfering, you are safe to leave other objects in the cells.
Spacing. Checkers boards must be separated by at least 2 coordinates in the NS or WE direction. See the example file CheckersBoards.txt below.
Orientation. The boards must face either North (rotation = 0), West (rotation = 90), South (rotation = 180) or East (rotation = 270).
Altitude. Any altitude is allowed, but the board should be at least 30cm above the ground cover (or way below).
File CheckersBoards.txt. As an example, the boards I have in City4All use the following file CheckersBoards.txt to create two Checkers boards:
world=city4all universe=City4All scan=28s 12w 8a 0 board3=27s 12w 0.30a 270 board4=29s 12w 0.30a 270
As you see, the world and universe are named in the file. This is because the script runs automatically when loaded, and continues running. If the bot is in the wrong world or universe, it will try to run the script anyway, unless you specify the world and universe names. NB: the universe name must be identical to the one used by the xelagot program for logging the bot. If you never visit another universe with your bot, you may omit the universe name; the same applies for the world.
scan=28s 11w 8a 0 tells the bot to go to that position and to scan that area. The coordinates need not be full aw coordinates, they may contain decimals. Altitudes are in metres, not in aw units. This position must be near the centre of the Checkers boards, that is: if you have one Checkers board only, it must be on top of this board (about 8 metres higher); if you have 2 boards, put the scan coordinate in between the two boards (approximately); and so on.
board3 and board4 are the names of the boards (you can call them anything except 'world', 'universe' or 'scan', they may not contain spaces, underscores or special signs). After the equal sign, you must put the coordinates of these boards. See above about the limitations imposed to these coordinates concerning the spacing, location and orientation of the boards. Notice that I called the boards board3 and board4: this is because in City4All I use board1 and board2 for chess (another bot whith the same citizen number, another script), and board names must be unique per citizen number!
You may decide to start with one board only: omit the other board names from this file. For example, if your world is called 'santa' (as spelled on the world list) in the 'ActiveWorlds' universe (as spelled in your xelagot program, mind the space!), and you want your board to be called MyCheckers, situated at 7n 7w, 30 cm above the ground, with the bot 8 m higher:
world=santa universe=ActiveWorlds scan=7n 7w 8.30a 0 MyCheckers=7n 7w 0.30a 0
I repeat this: the name of the universe must be spelled EXACTLY as it is in your xelagot program. For X1, that is the name you see in the login screen. For Av99Bot and SrvcXlgBot, the name as it appears in the ini file. If in doubt, omit this line!
Once you have your models on the object path, you have cleared space in your world, you have the files CheckersObjects.txt (included with the objects you download from this page) and CheckersBoards.txt in the same folder as your scripts, you can test run the Checkers_Setup.txt script.
If things went wrong, delete what you must, adjust what you must, and run Checkers_Setup.txt again.
This is almost the final stage. Load this script, it runs by itself. If all is well, you can start playing when the bot has set up the Checkers boards.
Do this for each board, using the corresponding board name instead of Board1. The boards must each be in a different cell. CTRL-select a board, the cell objects get selected with it. You can test in this way if each sign is in a different cell around the board.
By adding the 'name' to the action field of these boards, the bot recognises the board name and the function of the sign. The signs become activated, and will respond to clicks.
Keep your script running, it will eventually recognise and use the boards :)
allows the bot to say general announcements aloud.
forces the bot to say general announcements in whisper, and only to persons within the broadcast radius.
where x is the radius in metres (minimum 10) from the centre of each board for the bot to whisper announcements if the bot whispers them. Only people within the broadcast radius of any of the boards will hear them. The default value is 30 metres
where x is number of seconds (minimum 1) the bot waits before clearing a board after a game ends.
... and do me a favour: put a sign somewhere not too far form the Checkers games, saying they are xelagot Checkers games, and pointing to: http://www.imatowns.com/xelagot/
Many universes and people have helped to test this script.
OuterWorlds - Likeness provided accomodation in GameZone for Chess and Checkers boards and uploaded the objects.
City4All - JayDee provided space and uploaded the objects for their main world City4All 25s 10w 0a 180 for Chess and Checkers boards.
ActiveWorlds - provides the sdk, software and permissions that makes all of this possible. Special thanks to Brant for the beta testing space in AWTeen :)
Thank you all, and thank you also all beta-testers who have sent in reports: almost all of the reports lead to bug fixes and enhancements.