Author Topic: Daily GameModes v1.02  (Read 4655 times)

0 Members and 1 Guest are viewing this topic.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Daily GameModes v1.02
« on: June 07, 2009, 11:32:06 am »
Script Name: Daily GameModes
Script Description Automatically change the gamemode at fixed hour
Author: fri
Core Version: 2.6.5

Full Description:
The name speaks for itself - this scripts activates the predefined gamemode for every day, at fixed hour.
Let's say you want to have four days CTF, two TDM and one HTF. All you have to do is change const values of respective days and do /recompile. The script will change the gamemode after map change, only if it occured after predefined hour (default: 04:00 am).



Voting and map-changing commands are disabled while changing gamemode to prevent confusion.

All config and mapslist files are loaded from /configs/ and /maplists/ directories, respectively. The script won't work if you set any day to a gamemode which config file is missing.

The ZIP file contains all seven gamemodes and their maplists.

Please remember that changing the script's folder name will break it, unless you change folder names in the config too.






Changelog:
1.0 -> 1.01
- deleted variable 'yesterday' (it was used only twice)
- less waiting for 'mode detecting' messages after recompile (5 seconds -> 1 second)
- little changes in some messages and comments
- fixed active day coloring in writedays(); after 00:00
- fileexists replaced with xfileexists to ensure Linux compatibility

1.01 -> 1.02
- simplified whole config and maplist change sequence - no backups needed anymore
- shortened waiting time to 10 seconds
- a few other tweaks

« Last Edit: March 31, 2014, 11:56:14 am by freestyler »

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: Daily GameModes
« Reply #1 on: June 07, 2009, 11:51:03 am »
Great work, I think it will be very useful. ;d
« Last Edit: June 07, 2009, 11:53:06 am by Wookash »
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline demoniac93

  • Veteran
  • *****
  • Posts: 1554
Re: Daily GameModes
« Reply #2 on: June 07, 2009, 11:59:08 am »
Genius...This would be useful for clan gaming for fun, and simply not having to own multiple servers in some situations. Good work.
b&

Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: Daily GameModes
« Reply #3 on: June 07, 2009, 12:27:18 pm »
Very nice script :D There's only one think I'm concerned about: Using FileExists in the script will only work for windows based servers, but on most linux servers the script won't work properly.

Here's a function to get the script running on linux (copied and pasted from my loginsystem script)

Code: [Select]

function DoesFileExist(Name: string): boolean;
begin
  if (GetSystem() = 'windows') then
  begin
    if (FileExists(Name)) then
    begin
      result:= true;
    end; 
  end else
  begin
    if ((FileExists(Name)) or (ReadFromFile(Name) <> '')) then
    begin
      result:= true;
    end;
  end;
end;
Soldat Global Account System: #soldat.sgas @ quakenet

Offline VinceBros

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 275
Re: Daily GameModes
« Reply #4 on: June 07, 2009, 12:38:54 pm »
Omg! Fri scripts as fast as Road Runner runs :D
Nice script again, i like your work. Like Forrest Gump's mom said. Life is like a box of chocolate you never know what you gonna get.
We never what we're gonna get from you and it's always good.
I really like the way it loads the maps and the countdown
GOOD WORK!

Offline PKS|Shooter

  • Soldier
  • **
  • Posts: 130
  • Dont fuck with us!
    • PKS - La Familia
Re: Daily GameModes
« Reply #5 on: June 07, 2009, 02:29:30 pm »
Nice Dude :)
ive installed the script on my server

IP: HyDe08.de
Port: 23547

soldat://HyDe08.de/23547

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Daily GameModes
« Reply #6 on: June 07, 2009, 03:06:38 pm »
Nice, it seems scripts are generally getting better and better as time goes on :D I love it!

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Daily GameModes
« Reply #7 on: June 07, 2009, 03:27:05 pm »
Using FileExists in the script will only work for windows based servers, but on most linux servers the script won't work properly.
This the first time I hear that. Are you sure?

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Daily GameModes
« Reply #8 on: June 07, 2009, 03:52:30 pm »
This the first time I hear that. Are you sure?
Yep.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Daily GameModes v1.01
« Reply #9 on: June 07, 2009, 05:37:08 pm »
Changes 1.0 -> 1.01:
- deleted variable 'yesterday' (it was used only twice)
- less waiting for 'mode detecting' messages after recompile (5 seconds -> 1 second)
- little changes in some messages and comments
- fixed active day coloring in writedays(); after 00:00 [ screen ]
- fileexists replaced with xfileexists to ensure Linux compatibility
« Last Edit: June 07, 2009, 05:40:02 pm by freestyler »

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Daily GameModes v1.01
« Reply #10 on: June 07, 2009, 06:28:32 pm »
dammit! I wanted to do something like this but it should change after 3 games or so...

gj, nice script. Does it also load any gamemode at a time if the admin wants so? Like /g DM and it makes the server be DM?

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Daily GameModes v1.01
« Reply #11 on: June 07, 2009, 06:36:33 pm »
Does it also load any gamemode at a time if the admin wants so? Like /g DM and it makes the server be DM?
No. Any changes to gamemode will be detected by script and changed back automatically. I could add a variable and an admin command to disable checking gamemode if you really need it...

Offline UPNPAD

  • Major(1)
  • Posts: 36
Re: Daily GameModes v1.01
« Reply #12 on: June 07, 2009, 07:02:03 pm »
Quote
Changes from 2.6.3 -> 2.6.4
- Fixed FileExists incompatibility with certain Operating Systems
I haven't actually tested it, I just know because it was one of those changes I was looking out for.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Daily GameModes v1.02
« Reply #13 on: June 19, 2011, 05:13:50 pm »
I'm going to rehost my scripts because SoldatCentral is no more, and while doing so, I try to change some thing here and there. So, here it is.

Download GameModes v1.02

Changelog 1.01 -> 1.02:
- simplified whole config and maplist change sequence - no backups needed anymore
- shortened waiting time to 10 seconds
- a few other tweaks