Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: rhide on January 13, 2008, 04:42:20 pm
-
Script Name:
Soldat 1v1 Tournament
Original Author: rhide
Core Version: 2.6.3
Script Description:
This script is strongly inspired by the Quake III Arena mode Tournament, where 2 players play 1v1 and the others wait as spectators. The winner stays and fight, but the looser is placed last in que (you might think of it as king of the hill).
Finally, after intense learning pascal and soldat scripting, I managed to produce something I like. The script contains various features listed below:
- The server is never empty
If there is one or less human players online the server automatically adds a random bot so it's never empty.
- Sudden death
If a match takes too long sudden death can be activated. For example, if a match last 6 minutes, but sudden death is set to activate after 5 minutes - the last minute will be sudden death. During sudden death all weapons are doomgiving death machines from hell with 1000 damage.
function OnPlayerDamage(Victim, Shooter: Byte; Damage: Integer) : integer;
Begin
if sudden_death_active = true then
Result := 1000 { Increase damage }
else
Result:=Damage; { Normal damage }
End;
Toggle sudden death with the admin command /suddendeath.
[/list]
- No spying by waiting players
All players are gmuted on join and /say is therefore disabled. Instead, everyone have to use / to chat, that is, everything you write after the / is a chat message, except for commands.
Spectators can only chat among spectators, but the fighters chat to everyone.
procedure Chat(ID : Byte; Text : string);
var
i : integer;
Message : string;
Begin
{ Cut off / from text (first letter) }
Message := '';
if length(Text) >= 2 then
for i:=2 to length(Text) do
Message := Message + Text[i];
{ Spectator chat should not be visible to fighters }
{ Fighters chat should be visible to everyone }
if (ID = que[1]) or (ID = que[2]) then
writeConsole(0, '[' + IdToName(ID) + '] ' + Message, colorWHITE)
else
if NumPlayers >= 3 then
for i:=3 to NumPlayers do
writeConsole(que[i], '[' + IdToName(ID) + '] ' + Message, colorWHITE);
End;
Server setup for best performance:
Game type: DeathMatch
BotChat: OFF
Match time: ~6 minutes
Sudden death time: ~5 minutes
Kill limit: ~10 kills
Maps: Good 1v1 maps, e.g. Bridge, Blocks, Lagrange etc
Version:
1.0 alpha release candidate 3
1.0 alpha release candidate 4 (Removed due to unresolved bug)
-
Awesome!
If somebody is going to host a server with this, I wanna check it out so post the ip/port please :)
-
Hey Dorks i think ill host it :) btw will this work well with realistic mod?
Edit: why is it saying cant load C:\Documents and Settings\Owner\Desktop\1v1\maps\A.P MS/ ? it isnt letting me use the normal maplist im confused is it a bug?\
I cant use this script untill this is fixed sorry looks like a nice script looking forward to using it when it doesnt do that.
/nextmap (127.0.0.1)
Next map: ÿþA
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
Error: Could not load map (ÿþA)
-
Tip: "includes.txt" should have capped "i" so "Includes.txt" (case-sensitive os' may have it so it doesn't work properly)
Lol, I tried to run the script as a CTF and it told me that its supost2 be a DM and then crashed :P
Does the timer still go when the game is paused?
When an admin does a command (like /pause), it acts as if its a message and also preforms the cmd
I never got a chance to test with people, although seems pretty cool so far.
/kick 3
Billy has been kicked.
- New Folder (2): FATAL! Billy is not in the waiting que!
- New Folder (2): FATAL! Billy is not in the waiting que!
- New Folder (2): FATAL! Billy is not in the waiting que!
- [Error] New Folder (2) -> (OnLeaveGame): Out Of Range
/kick 4
Kruger has been kicked.
- New Folder (2): FATAL! Kruger is not in the waiting que!
- New Folder (2): FATAL! Kruger is not in the waiting que!
- New Folder (2): FATAL! Kruger is not in the waiting que!
- [Error] New Folder (2) -> (OnLeaveGame): Out Of Range
/kick 5
Boogie Man has been kicked.
- New Folder (2): FATAL! Boogie Man is not in the waiting que!
- New Folder (2): FATAL! Boogie Man is not in the waiting que!
- New Folder (2): FATAL! Boogie Man is not in the waiting que!
- [Error] New Folder (2) -> (OnLeaveGame): Out Of Range
Error message when I kicked a few test bots..
-
am i the only one getting that error?
-
i had a bug like that because i had in one directory soldatserver and soldat
-
Hey guys! Thank's for reporting bugs and thanks for liking the script :)
DorkeyDear:
If you add bots manually they are not added to the waiting que, I was thinking of adding another command for that, but then what the heck... why would you want bots quing anyway? :P
With players it works flawless for all I've seen.
Thanks for reporting though!
chris:
This is a very strange error and I've never seen anything like it... I belive KwS Pall can help you more than me there...
Date Posted: January 14, 2008, 03:54:45 pm
Oh, and one more thing, I also set up a test server:
IP: 87.227.89.200
Port: 23073 (std)
-
So you cant help me with that problem? ill try reinstalling i found a work around tho i named a map ÿþA and just used that to play.
-
I belive there's a problem with your servers map list. Maby it has been saved in some evil format that have added the strange characters, or perhaps it's empty and soldat tries to use default but fails... I dont know.
Anyway, the map list file is in the soldat servers root directory (same folder as soldatserver.exe), try editing that before editing map names. Post again if it doesnt work, gl
-
I belive there's a problem with your servers map list. Maby it has been saved in some evil format that have added the strange characters, or perhaps it's empty and soldat tries to use default but fails... I dont know.
Anyway, the map list file is in the soldat servers root directory (same folder as soldatserver.exe), try editing that before editing map names. Post again if it doesnt work, gl
I know its my server computer now because i tried it from the school and it worked maby its a bad version of the server or my computer. It has nothing to do with your script sorry for the inconvenence
-
Tip: "includes.txt" should have capped "i" so "Includes.txt" (case-sensitive os' may have it so it doesn't work properly)
Didn't know that, but fixed now. Thanks!
Lol, I tried to run the script as a CTF and it told me that its supost2 be a DM and then crashed :P
Yes I know, I put in a test to see if the server is DM, and if it's not I use the command shutdown.
{ Make sure that the gametype is deathmatch }
if GameStyle <> DEATH_MATCH then
Begin
writeln('****** ERROR ******');
writeln('[*] Game type must be Deathmatch. Now shutting down...');
shutdown;
End;
It crached for me aswell, but I don't know what to do about it. I could really use a hand here please!
Does the timer still go when the game is paused?
No. Unless soldat's built in match timer still goes when the game is paused, because I have not created my own clock, I just check TimeLimit - MatchTime to see how long time has passed.
will this work well with realistic mod?
Yes. The server must be set to DM, but anything else goes. real/survival/dodgeball etc etc
Now try it on yer own server lads 8) It would be fun to see if people would play, after all i'ts very hard to find 1v1 servers on the internet.
Cya round!
-
Lol, I tried to run the script as a CTF and it told me that its supost2 be a DM and then crashed :P
Yes I know, I put in a test to see if the server is DM, and if it's not I use the command shutdown.
{ Make sure that the gametype is deathmatch }
if GameStyle <> DEATH_MATCH then
Begin
writeln('****** ERROR ******');
writeln('[*] Game type must be Deathmatch. Now shutting down...');
shutdown;
End;
It crached for me aswell, but I don't know what to do about it. I could really use a hand here please!
You could try 'DisableScript', from the official help: If you set this variable to true (by doing "DisableScript := true;"), then your script will no longer receive event calls from the server. Eg, AppOnIdle, OnPlayerSpeak etc.
-
Ah, thanks!
I changed it and uploaded the new version. Now going release candidate 3, hope there has to be no more before stable :P
-
found another bug it doesnt kick the bot when the last person leaves
[Error] Tournament -> (OnLeaveGame): Invalid variant operation
-
It's not supposed to kick the bot when the last person leaves ;o The server is meant never to be empty... I know of the invalid invariant though, but I havn't seen any effect of it at all, neither positive nor negative. I'll look in to it and see if the message can be removed, but for all I know the script might just be stable now! :)
Date Posted: January 15, 2008, 09:21:27 am
Fixed the error message.
Apparantly I deleted the player from the waiting que before checking what team he was on - hence the soldat server tried to check team of a non-existing player wich is a big nono.
Thanks for drawing my attention to the bug! :)
-
System fails, no one wait to play. When they join the server and become spectators they leave after a while. Always 2 players only playing or a player and a bot.
-
well could you send me a custom script so it does that i find an empty server gets more people than a botted server
-
so what do i do with a script after dling or copy and pasting one
-
Either try it out or move it to some folder no one will ever have to see it again
Date Posted: March 03, 2008, 03:20:57 pm
After testing this script today it seems like the update I made for RC4 made the script not work somwehy... Therefore I uploaded RC3 wich should work flawlessly but without the features found in CHANGELOG.TXT
-
Shouldn't this script have been tested before releasing?
-
yes
why ask a question you know the answer to?