Forums Index >> Modding >> Auto Balance Script™
Page : <1> :
What do you mean?
Randomize people? –> I might be able to do that
I know that Art has a script for randomly balancing teams. I might be able to do it if I had time...
Last edited: Tuesday, August 02, 2005 at 8:50:21 PM
What you all could do is to, when someone joins, put them on the team with less players, or randomly if the teams are even... (remember the should also be evened :P)
Ya mean something like:
If(%client.incScore >= 10);
%client.team= "blueteam";
Yeah But Where Shall We Add That Line? ;)
HaHa ^^ You Just Got p00ne1) WanT SoMe MoRe?? 1v1 You Host It.
In around 3 weeks I'll start working on it, if it still hasn't been made :)
@art psyco
In around 3 weeks I'll start
working on it, if it still hasn't been made
Just Shut Up!!!!
@Cool: it will need to go in a script, but what about a code?
/balance
EDIT: took me 5 mins. Didnt test it
Function balance(%sender)
{
if(!ClientisAdmin(%sender,"Why even think of trying, you are not admin"))
return;
$len = clientgroup.getCount();
for(%i=0; %i<$len; %i++)
{
%client = clientgroup.getObject(%i);
if(%client != -1)
if(%client.incScore <= 10 && %client.incScore >= 6)
{
%client.team= "greenteam";
}
else if(%client.incScore <= 5 && %client.incScore >= 0)
{
%client.team= "blueteam";
}
else if(%client.incScore <= 20 && %client.incScore >= 11)
{
%client.team= "greenteam";
}
else if(%client.incScore >= 21)
{
%client.team= "blueteam";
}
}
}
Last edited: Friday, August 05, 2005 at 9:16:12 AM
@^
Ok, first, I'm on vacation and can't work on those scripts cos I dont have all my utilities here, second, your script wouldnt shuffle bots, third, look at this:
Imagine the scoreboard would be all tied with 1 everybody would go into the blueteam!
Oh, and fourth, reread your script and check for syntax errors...
And now fifth, they were trying to get it shuffle AUTOMATICALLY when the game starts, so you shut up XD
@Rest
Well The way it woul have to be is to collect all the scores into a database, then go from lower to highest, giving a team, like there was a person with 0, another with 1, another with 2 and another with 3
The script would then random the starting team, put the person with 0 on the starting team, person with 1 in the other team, person with 2 in the starting team too etc...
If there were like 5, 7,9 ppl, the extra person would go to the starting team to even out it starting out with the lowest person...
Art Crazy ur so mean u think u know everything why wont you Shut Up :) XD Ur So Mean Man saying SHUD UP
HaHa ^^ You Just Got p00ne1) WanT SoMe MoRe?? 1v1 You Host It.
Here is a VERY detailed explanation!
SCOREBOARD
1. Pedro - 10 points
2. Art Crazy© -10 points
3. Spark - 8 points
4. CoolBoySF - 7 points
5. Posiden - 6 points
6. FredTank - 6 points
7. Bolo - 5 points
8. Tally Ho - 2 points
9. Scytheman - 0 points
10. LONEWOLF(UF) - 0 points
That above is the scoreboard AFTER a game, now while the next game is loading this happens!
Pedro - Blue team
Art Crazy© - Green team
Spark - Blue team
CoolBoySF - Green team
Posiden - Blue team
FredTank - Green team
Bolo - Blue team
Tally Ho - Green team
Scytheman - Blue team
LONEWOLF(UF) Green team
That above is what needs to happen !!
Now thats sorted crack on with it ! ;)
@Fart Lazy:
took me 5 mins. Didnt test it
1. Im working on ANOTHER specially ordered script. I didnt have time too check it (this was
the blueprint)
2. What do you use to make scripts? TGE? I USE TEXT EDIT!!!!!
3. Bots you say? EASY:
$len = bot
clientgroup.getCount();
for(%i=0; %i<$len; %i++)
@TheFart3
1. Well, I'm working on at least 3 other scripts, (not really, I havent got my research tools here, as I'm on holiday) one of them being a gametype, another one with GUI, and the admin script...
2. TGE cant be used to make scripts dummie... It can only be used to compile and run them... I use Tribal IDE... Even if I can easily use notepad... Like the 2 last scripts released on nappy's thread, they were made in 5 min. Each, and only the debugging took a while, as I dont have TT here and I had to do a debugging with napalm testing it and giving me logs, console errors etc...
3. Well you need to edit 2 lines, one of them is that... But you shouldnt use $len, but %len, as $ uses the same memory as %, but $ stays in the memory till TT is closed
@Pedro
Like I said, thats what I want :) (and will make when the holidays end if it still hasnt been made the way we want...)
Stop being lazy, and actually admin your games, dash did it all for you guys...just simply use /mg Name.
Or for the more informed of you, use the code dash gave you to make a script. Simple, I have made a script just like it from what dash gave me alone :) and it works perfectly.
@ (MF)Morfeuz®'
Are you calling people lazy because they cant do something the moment someone has the tiniest whim?
Art has a holiday and he deserves one!
am I lazy because I have a job and dont have time to script much?
others actually have lives outside of TT, and some dont have time to learn
Give credit where credit is due...
people came looking for help, and they are not lazy for not being able to do it themselves....
I'm just saying that there is tutorials out there and other ways to get info, no need to go overboard Warfare.
Uhm, Racer try it with the change team code 10 times inside the function (blueTeam then greenTeam) like so:
%client.team= "blueteam"; then green (5 times each) and change the client score to 0 - but obviously this will have to be done inside a full server of 10 and right at the beginning of the game.
Need anything more, mail me.
Not efficiant and wont effect bots
Make a new function
Try using clientgroup.getcount();
and botclientgroup.getcount();
to change both bot's and client's teams
also, use a variable like %lastTeam to make sure you arnt using the same team over (IE.... Using blue after using blue)
Last edited: Monday, August 08, 2005 at 3:34:33 PM
Exactly my point Pedro, but Warfare is never there, so he wouldn't know what we mean :)
Well, Chon.. Ups, Morfeuz, In arround 1 week I'll start working on the script and then release it, happy? I havent got much time for scripting as It has been hot and the beach is worderful XD...
Uh well, its easy to include bots so why not to?
Warfare, the client groups do not include "%"... Bad boy :P
Lol, ha!
I wrote that when I was on my way out the door... Sorta rushed XD
thx for pointing that out..anyway.... Edited! :P
Page : <1> :
Ok. If many you have seen Roo's unfair teams thread, you should know what I'm talking about. The idea of this script is when the teams are unfair the game will make them fair. Can this be done?