Author Topic: Soldat 1v1 Tournament  (Read 7339 times)

0 Members and 1 Guest are viewing this topic.

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Soldat 1v1 Tournament
« 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.

Code: [Select]
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.

Code: [Select]
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)

« Last Edit: March 25, 2008, 07:21:20 am by rhide »
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1506
  • Also known as Curt
    • Soldat Global Account System
Re: Soldat 1v1 Tournament
« Reply #1 on: January 13, 2008, 06:15:31 pm »
Awesome!
If somebody is going to host a server with this, I wanna check it out so post the ip/port please :)
Soldat Global Account System (SGAS): QuakeNet in #soldat.sgas
Rent Cheap Servers: contact CurryWurst

Offline chillis34

  • Major
  • *
  • Posts: 68
    • [FT] Clan Web Site
Re: Soldat 1v1 Tournament
« Reply #2 on: January 14, 2008, 12:21:04 am »
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)
« Last Edit: January 14, 2008, 07:40:42 am by chillis34 »
I am the smartest :D

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1506
  • Also known as Curt
    • Soldat Global Account System
Re: Soldat 1v1 Tournament
« Reply #3 on: January 14, 2008, 06:36:15 am »
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.

Quote
/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..
Soldat Global Account System (SGAS): QuakeNet in #soldat.sgas
Rent Cheap Servers: contact CurryWurst

Offline chillis34

  • Major
  • *
  • Posts: 68
    • [FT] Clan Web Site
Re: Soldat 1v1 Tournament
« Reply #4 on: January 14, 2008, 07:21:01 am »
am i the only one getting that error?
I am the smartest :D

Offline KwS Pall

  • Major(1)
  • Posts: 49
  • I'm going to write Tibia for Soldat
Re: Soldat 1v1 Tournament
« Reply #5 on: January 14, 2008, 09:04:27 am »
i had a bug like that because i had in one directory soldatserver and soldat
I'm going to write Tibia for Soldat

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Soldat 1v1 Tournament
« Reply #6 on: January 14, 2008, 10:56:50 am »
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)
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline chillis34

  • Major
  • *
  • Posts: 68
    • [FT] Clan Web Site
Re: Soldat 1v1 Tournament
« Reply #7 on: January 14, 2008, 12:24:24 pm »
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 am the smartest :D

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Soldat 1v1 Tournament
« Reply #8 on: January 14, 2008, 12:59:28 pm »
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
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline chillis34

  • Major
  • *
  • Posts: 68
    • [FT] Clan Web Site
Re: Soldat 1v1 Tournament
« Reply #9 on: January 14, 2008, 01:57:31 pm »
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
I am the smartest :D

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Soldat 1v1 Tournament
« Reply #10 on: January 14, 2008, 04:59:47 pm »
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.

Code: [Select]
   { 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.

Quote from: Chillis34
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!
« Last Edit: January 14, 2008, 05:02:58 pm by rhide »
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline Mr Pink

  • Major(1)
  • Posts: 37
Re: Soldat 1v1 Tournament
« Reply #11 on: January 14, 2008, 05:43:30 pm »
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.

Code: [Select]
{ 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.

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Soldat 1v1 Tournament
« Reply #12 on: January 14, 2008, 08:12:07 pm »
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
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline chillis34

  • Major
  • *
  • Posts: 68
    • [FT] Clan Web Site
Re: Soldat 1v1 Tournament
« Reply #13 on: January 14, 2008, 10:16:59 pm »
found another bug it doesnt kick the bot when the last person leaves 
Quote
[Error] Tournament -> (OnLeaveGame): Invalid variant operation
I am the smartest :D

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Soldat 1v1 Tournament
« Reply #14 on: January 15, 2008, 04:42:52 am »
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! :)
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1008
Re: Soldat 1v1 Tournament
« Reply #15 on: January 15, 2008, 05:49:34 am »
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.

Offline chillis34

  • Major
  • *
  • Posts: 68
    • [FT] Clan Web Site
Re: Soldat 1v1 Tournament
« Reply #16 on: January 15, 2008, 11:24:20 am »
well could you send me a custom script so it does that i find an empty server gets more people than a botted server
I am the smartest :D

Offline Sub Zero

  • Major(1)
  • Posts: 16
Re: Soldat 1v1 Tournament
« Reply #17 on: March 01, 2008, 02:01:05 pm »
so what do i do with a script after dling or copy and pasting one

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Soldat 1v1 Tournament
« Reply #18 on: March 24, 2008, 05:57:59 pm »
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
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Soldat 1v1 Tournament
« Reply #19 on: March 26, 2008, 12:04:40 pm »
Shouldn't this script have been tested before releasing?

Death is the solution to all problems. No man; no problem.
-Joseph Stalin