Here are a number of scripts for
Gccg, the Generic Collectible Card Game. Some of the scripts are
specific to Magic: The Gathering,
while others work with any Gccg game. Many of the scripts are my own
creation, while some come from others (with or without modifications by
me).
To install these scripts, copy them into the gccg/scripts/ directory
(to make them available to all games) or the gccg/scripts/Mtg
directory (to make them available to Magic: the Gathering only). You will then need to
either restart Gccg, or use the command /eval execute("name of script") to
load the script without restarting.
To keep from overloading the server, those commands that access the game server in
a loop (/buycards, /givecards, /sellextras, and /undersell)
pause for one second after every group of five cards. This may make the scripts somewhat
slower than earlier versions, but it avoids slowing down the server for everybody.
The scripts are written in wigy's little language, gccg-script. Documentation
for gccg-script (it's pretty weird!) may be found in
section 5 of the gccg
reference manual
Scripts by Neil Moore:
- alias.include: Define command aliases.
- Buyall.command: Buy all cards on the current page.
- Islegal.command: Check the current deck's legality.
- Manacurve.command: Analyze a deck's mana curve (Mtg only).
- Sellextras.command: Sell extra cards.
- Setstats.command: Per-set card statistics. Currently
implements the commands /needed, /needed4, and
/needcash4. The first two count the number of cards needed
to complete a given set (or 4x the set); the third gives the amount
of money it would cost to complete 4x the given set.
- Toplay.command: Bring cards from out-of-play to various zones.
- Undersell.command: Sell cards at the lowest price. Now with
protection against predatory undercutting.
- Load.command: Load a saved display (filter + sort) from the command line.
- Wantall.command: Mark all cards on the current page as wanted.
- amclick.key: Use alt-middle-click
to paste canonical card names (including the set when necessary) in a format useful for /givecards.
Requires the patch amclick.diff to recognize
alt-middle-click.
- Saverd.command:
Deal with registered (server-side) decks. /saverd can
register any number of decks, and /giverd can give a copy
to another player.
Scripts by Michael Slone:
Other resources
- gccg/scripts/Mtg-all.rules:
Ruleset for Mtg T1/T1.5/T2/Extended tables.
- gccg/graphics/avatar/penguin.png:
My avatar, drawn by Michael Slone. Now part of the gccg distribution.
- phavewant.diff: patch to add select
syntax
pwant(player) and phave(player), selecting cards
on player's want or have list. Nb this patch is now part of gccg, and is
thus of mostly historical interest.
- gather.bash [highlighted]:
bash script to fetch a Magic: the Gathering
cardlist from WotC's Gatherer database, stripping
out HTML and converting to a UTF-8 text file. Supports all the filters supported by the
Gatherer web interface, but does not support search. Requires
wget, perl, and
iconv.
Otherer resources, elsewhere
Last Modification: 16 Nov 2006.
Previous Modification: 20 Aug 2006.
(explanation)
Neil Moore
Collector, Generic Cards
neil@s-z.org