|
Pirch is my favorite IRC client.
Its scripting language, PIL (Pirch Interpreted
Language), is a nifty little Pascalesque language that's easier to
understand and to use than mIRC scripting. The one problem is that it
rarely works. Debugging PIL is ten times more annoying than debugging any
other language, because you not only have to figure out where you may have
coded something wrong, you also have to guess what the PIL compiler may
randomly be choosing not to implement. I've had scripts fail to compile
one day and succeed the next without having been touched at all. It's
weird. Perhaps future versions of Pirch will correct this--and
other--errors. In the meanwhile, here are some PILs I wrote that work
correctly more often than not.
AFK.pil -- changes your nick and sets an away
message when you go AFK, and remembers your last nick for when you come
back. IMO, way less annoying than those timers that echo your away
message to the room every few minutes. Add an /afk alias ( /runscript [AFK] *1 ). Type /afk <away message> to go AFK, /afk by itself to return and reclaim your previous
nick. Don't blame me for what happens if you use those at the wrong
times. While AFK you'll still be able to use all normal IRC commands, so
you can always change your nick and unset your away status manually. If
you wanna be really spiffy, add an event level that activates when you go
AFK that reads something like ON INPUT:*.*:/afk
so if you do something you'll come back automatically. Oh yeah, you may
want to put a different AFK nick in place. I tried to set it up so it
could read a random AFK nick from a file but the compiler kept bitching at
me about a missing semicolon that wasn't actually missing, so I chalked it
up to stupid-ass bugs.
l337sp33k.pil -- wanna talk like an
31337 h4x0r d00d? This is basically a rewritten version of Adraken/GTi's
Scream Talk, that turns certain letters
into numbers instead of capitalizing vowels. Note that commands will get
turned into numbers too, so you'll have to turn l337sp33k off if you want
to do anything but talk. I may work on a version that recognizes if the
first word on a line starts with a slash, but don't hold your breath
waiting for it.
randomquits.pil -- chooses a random
message from a text file and quits with that message, writing it to your
server window (which should remain open after you quit) as it does so, so
you know what your quit message was (because Pirch build 1190, unlike
earlier versions, doesn't feel the need to reveal that information).
This will, of course, require you to write such a file. Set up a /q alias ( /runscript [randomquits] ).
Occasionally when I try to quit with this script, Pirch will attempt to
read an invalid memory location and halt execution of the script. If that
happens, just try running it again, and you should be fine.
99bb.pil -- accepts an integer as a
command-line parameter and sings "99 Bottles of Beer" starting with that
many bottles. This script appears on the
99 Bottles of Beer
website.
These PILs are all extracted from my Pirch script, Third Rail, which is available
to the public on request: that is, if you want it, you have to ask me for it,
because I update it piecemeal every now and then, which makes maintaining a
recent snapshot with an appropriate version number much more trouble than it's
worth.
If you want to learn/practice PIL scripting, the best way--especially
because of how buggy Pirch is--is to look at what's worked for other
people. You could try visiting the channel #pirchpil on any IRC network,
or use pirchworld.com or pirch.com as starting points.
|