Author Topic: cube v1.6.1 - CTF/INF Ultimate Balancer  (Read 35816 times)

0 Members and 1 Guest are viewing this topic.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.5 - major update
« Reply #40 on: July 12, 2013, 07:58:13 am »
Not possible, the code compiles. Check that you properly deleted the if (GetPlayerStat(player[​i], 'Flags') = 0) then part, including both if and then.

Offline KoGAi

  • Major(1)
  • Posts: 32
  • The Light of the Universe
Re: cube v1.5 - major update
« Reply #41 on: July 29, 2013, 08:36:32 pm »
Hi, is there a work around the errors the legacy compiler shows for cube?
The error that the legacy compiler is showing in Linux is [Error] (183:19): Semicolon (';') expected. I checked the code and it appears to be correct.

Thank You,
K-
=₳US7RAL|¹² is a growing Soldat Community making a difference by offering a wide variety of top-notch servers across North America- a new alternative to everyone.
Jump into our servers in NA with the new domain (austral12.com)! Check our Facebook Page.
_______
#austral12soldat @ QuakeNet ▲ facebook.com/AUS7RAL12 ▲ twitter.com/AUS7RAL12

Offline Bydlak

  • Major(1)
  • Posts: 34
Re: cube v1.5 - major update
« Reply #42 on: July 30, 2013, 02:12:58 pm »
Hello

There is a problem with last cube version. When I mix a teams using command /mix, some of the mixed players respawn in the enemy base when the map change. Is there any way to fix it?

Offline Moneymaker

  • Major(1)
  • Posts: 6
Re: cube v1.5 - major update
« Reply #43 on: October 09, 2013, 03:56:10 am »
Cube is good script, but too complicated. I need a simple script... only balance, when one team have 2 players more... do you know something that?

Offline rOy

  • Soldier
  • **
  • Posts: 120
Re: cube v1.5 - major update
« Reply #44 on: October 09, 2013, 02:47:39 pm »
Cube is good script, but too complicated. I need a simple script... only balance, when one team have 2 players more... do you know something that?

I know one more script

Name: CTF Team Balancer
Author: Swompie (©2o1o) - Modified by StayAlive (@2012)
Recoder: rOy

This script is a modified for version 2.7.5 server

Commands:
!balance
Every 60 sec. automaticaly balanced teams

Download here:

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.6 - CTF/INF Ultimate Balancer
« Reply #45 on: March 31, 2014, 05:58:26 pm »
cube v1.6 is out, after over two years!

Changes 1.5 -> 1.6:
added: /exclude ID command for admins, to exclude players for the duration of their visit on the server
added: /cubeinfo command for admins - shows current cube info (version, config, number of balances)
added: a message that shows up if cube could not choose any player to move; you should not see it anyway
added: public messages show current balance status, e.g. 'Teams balanced. [3v2 4:7]'
added: option to make swap ignore the number of flag captures when choosing players
fixed: a bug that caused spectators to be moved to alpha team when /swap all was used
modified: reworked the whole config to make it even clearer
modified: some default values in config
modified: bots are now ignored by cube
modified: excluding now makes people completely immune to cube's effects
modified: colors of some messages
modified: /hwid ID command also works with nicknames

Hotfix: added spaces before ShowPlayers(); in public messages, and fixed typo in message shown after swapping.
« Last Edit: April 03, 2014, 12:58:45 pm by freestyler »

Offline PKS|Shooter

  • Soldier
  • **
  • Posts: 130
  • Dont fuck with us!
    • PKS - La Familia
Re: cube v1.6 - CTF/INF Ultimate Balancer
« Reply #46 on: April 18, 2014, 08:49:01 am »
where is the dl link?

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: cube v1.6 - CTF/INF Ultimate Balancer
« Reply #47 on: April 19, 2014, 06:44:25 am »
cube v1.6 is out, after over two years! - click that

Im chill like that

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.6.1 - CTF/INF Ultimate Balancer
« Reply #48 on: April 25, 2014, 03:25:48 pm »
1.6.1 is out! Grab the latest version by clicking here.

Changes 1.6 -> 1.6.1:
fixed: a terrible bug which rendered /exclude command useless (it excluded the user, not the specified ID)
modified: simplified a bit of logic

Offline Mittsu

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 617
Re: cube v1.6.1 - CTF/INF Ultimate Balancer
« Reply #49 on: May 02, 2014, 01:06:34 pm »
could you, pretty pretty please, include settings for survival? Balance should be done ONLY in between rounds, otherwise the players get pissed off as team change kills them and they have to wait for a new round
Realistic-Soldat.net
<+elerok> soldat is dead
<+AThousandD> shit happens

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.6.1 - CTF/INF Ultimate Balancer
« Reply #50 on: May 05, 2014, 03:05:58 pm »
Sure, but is there any reliable way of detecting round end? I found no scripting event for this. Is checking if everyone's dead the only way?

Offline Mittsu

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 617
Re: cube v1.6.1 - CTF/INF Ultimate Balancer
« Reply #51 on: May 11, 2014, 02:39:58 am »
i have no idea about coding, but maybe this script will help? It prevents from scoring with flag caps after the round is already won by killing the other team:

Code: [Select]
var
  Double, Alone, Messages: boolean;
  PlayerPnts, TeamPnts: byte;
  Color: longint;

function AlivePlayers(Team: shortint): byte;
var
  i: byte;
begin
  for i := 1 to 32 do if (GetPlayerStat(i,'Active') = true) and (GetPlayerStat(i,'Alive') = true) and ((Team = -1) or (GetPlayerStat(i,'Team') = Team)) then Result := Result + 1;
end;

procedure ActivateServer();
begin
  try
    if ReadINI('scripts/' + ScriptName + '/settings.ini','General','Message','true') = 'true' then Messages := true else Messages := false;
    Color := StrtoInt(ReadINI('scripts/' + ScriptName + '/settings.ini','General','MsgColor','$FFFFFFFF'));
    PlayerPnts := StrtoInt(ReadINI('scripts/' + ScriptName + '/settings.ini','General','PlayerPnts','5'));
    TeamPnts := StrtoInt(ReadINI('scripts/' + ScriptName + '/settings.ini','General','TeamPnts','1'));
    if ReadINI('scripts/' + ScriptName + '/settings.ini','General','DoubleCap','false') = 'true' then Double := true else Double := false;
    if ReadINI('scripts/' + ScriptName + '/settings.ini','General','AloneCap','false') = 'true' then Alone := true else Alone := false;
  except
    WriteLn('Error while loading settings.');
  end;
end;

procedure OnFlagScore(ID, TeamFlag: byte);
var
  i: byte;
begin
  if iif(TeamFlag = 1,AlphaPlayers,BravoPlayers) = 0 then begin
    if Alone = false then begin
      SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1);
      if Messages then WriteConsole(ID,'Capturing while alone has no effect.',Color);
    end else begin
      SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1 + TeamPnts);
    end;
  end else if AlivePlayers(TeamFlag) = 0 then begin
    if Double = false then begin
      SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1);
      if Messages then WriteConsole(ID,'Double capturing has no effect.',Color);
    end else begin
      SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1 + TeamPnts);
    end;
  end else begin
    SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1 + TeamPnts);
  end;
end;
Realistic-Soldat.net
<+elerok> soldat is dead
<+AThousandD> shit happens

Offline rOy

  • Soldier
  • **
  • Posts: 120
Re: cube v1.6.1 - CTF/INF Ultimate Balancer
« Reply #52 on: May 09, 2022, 07:36:06 am »
Hey,
freestyler's script again uploaded! (cube v1.6.1)
The link has long since disappeared!
But here you have the file pin!