AQ2 Script for X-Chat? possible?

Forum for anything hard- or software related.

Moderator: Moderators

Post Reply
Znake
is connecting
Posts: 10
Joined: Fri Aug 01, 2003 2:16 am
Location: fi

AQ2 Script for X-Chat? possible?

Post by Znake »

X-Chat uses these for it's scripts:

C-Plugin
Python
TCL
Perl

Instructions for making them here: http://xchat.org/docs/

I personally would need it for Win32 interface (probably in the form of a .dll file) but I have no time or skills to do any scripting.
"Neither Solid nor Liquid but a well-balanced masterpiece"
NRGizeR
feels some chest pain
Posts: 695
Joined: Mon Aug 30, 2004 1:00 am
Location: fi
Contact:

Post by NRGizeR »

I've actually coded X-Chat scripts with all of those, except TCL, It's really easy and the interface is well documented IMO... Don't know if I could be arsed to write another one though... depends if I would use it myself... so what kind of AQ2 script are we talking about? A server browser? A announce script? what? I've never used the different q2 mirc scripts out there, so references to these won't help :)
imeiz
is legless
Posts: 551
Joined: Sun Aug 29, 2004 1:46 pm
Location: et

Post by imeiz »

http://www.aq2suomi.com/forum/viewforum.php?f=21 <- i bet it's something like that.
Sync' imeiz - AQ2Suomi & AQ2World forum moderator, part-time TATM-writer
NRGizeR
feels some chest pain
Posts: 695
Joined: Mon Aug 30, 2004 1:00 am
Location: fi
Contact:

Post by NRGizeR »

So what does the mirc script have that a regular server browser doesn't? I mean, what's the difference between starting up a script, or starting up xqf (or ASE in windows) If you're only looking for a way to be able to click links in irc, and launch q2 from there you can find that at Settings->Advanced->URL Handlers...
Znake
is connecting
Posts: 10
Joined: Fri Aug 01, 2003 2:16 am
Location: fi

Post by Znake »

NRGizeR wrote:So what does the mirc script have that a regular server browser doesn't? I mean, what's the difference between starting up a script, or starting up xqf (or ASE in windows) If you're only looking for a way to be able to click links in irc, and launch q2 from there you can find that at Settings->Advanced->URL Handlers...
I used this one in mirc (script by TERR0RiSTi):

http://www.aq2suomi.com/forum/viewtopic.php?t=3758

it isn't much but enough for me to get from irc to a server quickly(by only typing /aq2 and IP-address). For only that I really dont want to install any other programs when it can be done with a script (at least with mirc).

But like the topic says, I have changed to X-Chat and that script (to my knowledge) does not work there.
"Neither Solid nor Liquid but a well-balanced masterpiece"
NRGizeR
feels some chest pain
Posts: 695
Joined: Mon Aug 30, 2004 1:00 am
Location: fi
Contact:

Post by NRGizeR »

Znake wrote:it isn't much but enough for me to get from irc to a server quickly(by only typing /aq2 and IP-address). For only that I really dont want to install any other programs when it can be done with a script (at least with mirc).

But like the topic says, I have changed to X-Chat and that script (to my knowledge) does not work there.
Oh I could write that, should take about 10 minutes in python :P
hold on for a bit :D
NRGizeR
feels some chest pain
Posts: 695
Joined: Mon Aug 30, 2004 1:00 am
Location: fi
Contact:

Post by NRGizeR »

OK, so it took more than 10 minutes :D I blame not finding my bookmarks to the python reference :P

Well anyway, this works for me on linux:
http://www.abo.fi/~cbjorkel/aq2/aq2.py

Once you load that you will have access to a new /AQ2 command which takes the IP and optionally the port as parameters. For example:

Code: Select all

/aq2 212.116.37.42 27910
or in that case you could also leave out the port since that was the default q2 port.

Before you put it to use you have to edit the script. There are two lines where the variable containing the (full) path to the q2 binary, and the variable containing the parameters (right now only +set game action). If you don't have your aq2 binary in /bin/aq2 and/or want other parameters than +set game action, you HAVE TO EDIT THESE TWO LINES.

As far as I know python should be crossplatform, but since it's using os modules to launch the aq2 binary, I can't guarentee that this works. (I really do think it will though :P )

-NRG
Znake
is connecting
Posts: 10
Joined: Fri Aug 01, 2003 2:16 am
Location: fi

Post by Znake »

Yes, it works but strangely only with R1Q2 client. Anyway, I've had some problems with quake2.exe and aq2.exe in the past:

quake2.exe doesn't find colormap.pcx (it is in baseq2/pics AND action/pics)
aq2.exe (apr 1.18 now) crashes and windows then asks if I want to submit a report about it.
But like I said, after changing those lines and adding proper support to X-Chat, the script works also in Windows.

I will add a link to this to aq2suomi.com forum even though I think many read aq2world.com forums also.
"Neither Solid nor Liquid but a well-balanced masterpiece"
Post Reply