Server-website scripting
Moderators: Forum moderators, developers
- M8DNephelim
- Posts: 7
- Joined: Tue Mar 16, 2004 3:40 am
- Location: Sundsvall, Sweden
- Contact:
-
- Posts: 28
- Joined: Sun Feb 22, 2004 3:34 am
- Location: Portugal
- Contact:
hey ph*deus i saw ur server status and its better that the 1 i use for my php-nuke site ,can u drop me a copy of that?
ulissesnelson@zmail.pt
ulissesnelson@zmail.pt
- M8DNephelim
- Posts: 7
- Joined: Tue Mar 16, 2004 3:40 am
- Location: Sundsvall, Sweden
- Contact:
- KingJackaL
- Posts: 666
- Joined: Thu Jan 08, 2004 3:47 pm
- Location: ChCh, NZ
- Contact:
- SiliconSlick
- Posts: 14
- Joined: Wed Jan 14, 2004 6:21 am
- Location: College Station, TX
- Contact:
I've got a small script:
http://www.nd80usa.net/qstat-html/htmlstatus.sh
that consults our server database:
http://www.nd80usa.net/cfgs/home-ND80se ... s2.dat.txt
that runs "qstat" every 5 minutes (as a cron job) to create this:
http://www.nd80usa.net/qstat-html/
however, it doesn't (yet) provide links for connecting
with the game.
I also have a plain text listing:
http://www.nd80usa.net/serverstatus.txt
generated by these scripts:
http://www.nd80usa.net/cfgs/usr-local-b ... tus.sh.txt
http://www.nd80usa.net/cfgs/home-ND80se ... tus.sh.txt
Finally, if you are using PHP-Nuke, you can set up Q3Plug
pages like these:
http://www.nd80usa.net/modules.php?name=Server_Viewer
http://www.nd80usa.net/modules.php?name=GameScan
that allow for connections but require the user to have Q3Plug.
SiliconSlick
http://www.nd80usa.net/qstat-html/htmlstatus.sh
that consults our server database:
http://www.nd80usa.net/cfgs/home-ND80se ... s2.dat.txt
that runs "qstat" every 5 minutes (as a cron job) to create this:
http://www.nd80usa.net/qstat-html/
however, it doesn't (yet) provide links for connecting
with the game.
I also have a plain text listing:
http://www.nd80usa.net/serverstatus.txt
generated by these scripts:
http://www.nd80usa.net/cfgs/usr-local-b ... tus.sh.txt
http://www.nd80usa.net/cfgs/home-ND80se ... tus.sh.txt
Finally, if you are using PHP-Nuke, you can set up Q3Plug
pages like these:
http://www.nd80usa.net/modules.php?name=Server_Viewer
http://www.nd80usa.net/modules.php?name=GameScan
that allow for connections but require the user to have Q3Plug.
SiliconSlick
"We got a kinder, gentler, machine gun hand"--Neil Young,Rockin' in the Free World,Freedom
http://siliconslick.com/wp/mgb.jpg
http://siliconslick.com/wp/mgb.jpg
great idea![pH*Deus] wrote:What about using a bitmask for each ?bani wrote: maybe I can put "Players" in as a 64 char string? 0 = no player, 1 = axis, 2 = allies, 3 = spectator
so it would look eg like \Players\11212202133
shorten the cvarnames:
p_ax
p_al
and use a bitmask
0 = not on the team, 1 = on the team.
a phpscript can then split them into the information that is needed.
There is no need to announce the specing players, because if a player isnt on either ax or al he must be a spec.
f.E.:
Player 1 = Axis (1)(0)
Player 2 = Axis (1)(0)
Player 3 = Allies (0)(1)
Player 4 = Axis (1)(0)
Player 5 = Allies (0)(1)
Player 6 = allies (0)(1)
Then we have Ax:
1011
ans Al:
110100
what will be for ax
11
and for al
52
so it would look like...\p_ax\11\p_al\52\...
I know this has nothing to do with competition, and its not useful for any kind of gameplay, just for the guys who want to display their servers on their homepage.
but lets see we need that will be 8 bits for 1 char
so maybe its look like that
every player using 2 bits
00 - no player
10 - player in allies
01 - player in axis
11 - player in spec
f.e.
player 1 - axis 01
player 2 - axis 01
player 3 - spec 11
player 4 - allies 10
players 5 - allies 10
the result:
01011110 10000000
its meen that in every 4 players there will be 1 byte
the bits of the first 4 players are: 01011110
and for the last 1 is: 10 but we need to make it byte, so it will be 10000000
Can I have a copy of your script? Please, pleales please... it looks great!!!![pH*Deus] wrote:Plz take a look at www.poohunter.de and click on "server"
If this is what You are looking for I can send You a copy
my e-mail: kilgore@o2.pl
Ok, here's the new format.
P=NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Values of N:
0 (should never happen)
1 Axis
2 Allies
3 Spectator
A completely empty server will have no 'P=' at all.
Worst case this comes out to 66 characters for a completely full 64 player server.
Contrast with OSP's old format which would be 210 chars for a completely full 64 player server.
P=NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Values of N:
0 (should never happen)
1 Axis
2 Allies
3 Spectator
A completely empty server will have no 'P=' at all.
Worst case this comes out to 66 characters for a completely full 64 player server.
Contrast with OSP's old format which would be 210 chars for a completely full 64 player server.
so it will look like that :bani wrote:P=NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Values of N:
0 (should never happen)
1 Axis
2 Allies
3 Spectator
A completely empty server will have no 'P=' at all.
??\voteFlags\55771\g_balancedteams\1\P\2132223112131221211\g_covertopsChargeTime\30000
Thanx for reimplemeting it *bow*
If everything goes right i will finish work on this tomorrow afternoon.
Test it here: www.poohunter.de/beta/serverstatus.php? ... 6.70:27969
Get it here: http://www.poohunter.de/index.php?page=getfile&id=19
Make sure to edit server/_config.php
HF & GL
Get it here: http://www.poohunter.de/index.php?page=getfile&id=19
Make sure to edit server/_config.php
HF & GL
- SHVDKTY (ID)
- Posts: 211
- Joined: Wed Jan 22, 2003 12:10 am
- Location: Boise, Idaho
Thanks pH*Deus It runs great and is easy even for a nub like me. All in all it took me about 10 mins of editing (language change) check it here.[pH*Deus] wrote:Test it here: www.poohunter.de/beta/serverstatus.php? ... 6.70:27969
Get it here: http://www.poohunter.de/index.php?page=getfile&id=19
Make sure to edit server/_config.php
HF & GL