English [Request]Develop plmix command.

4 replies
Goto Page
To the start Previous 1 Next To the start
Up
M3_Quick
User
Offline Off
Hello dear video game forum.
I am trying to separate the players with the highest score by means of a command.
On standard servers, experienced teams of players usually meet to easily win the other team in all rounds.
By keeping more than 20 players on the server this is a problem as new players enter the losing team and a vicious circle is formed.

this code would be very useful for any public standard server and thus we help the steam players who are the ones who suffer and losing so many times they do not like the game very much.

> EJ:
Spoiler >




∗ Thanks in advance and remember that this will be useful. º.º
03.04.18 10:53:39 am
Up
Gaios
Security Supporter
Offline Off
Do you want to mix players in both teams as good 1:1 bad ratio? I mean, do you want to make teams with similar skill? How will you check out the players then? If new player joins, his score is 0-0.. unless you will store their scores (or the !rank does).
03.04.18 11:00:08 am
Up
JeeewNazi
User
Offline Off
Find the mean of scores, And everyone who scored above that ....
that would work.

Btw. You wanna make all the goods in 1 team and the bads in other? or like make both the team fair by ensuring each team has equal proportion of goods and bads..?
03.04.18 03:03:11 pm
Up
_Yank
User
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function shuffle(id)
     local sort
     local playlist = player(0, "team1")
     for _, current in ipairs(player(0, "team2")) do table.insert(playlist, current) end

     sort = function(a, b)
          local aScoreRatio = player(a, "score") / player(a, "deaths")
          local bScoreRatio = player(b, "score") / player(b, "deaths")
          return aScoreRatio < bScoreRatio
     end

     table.sort(playlist, sort)

     for modifier, current in ipairs(playlist) do if modifier % 2 == 0 then parse("maket "..current) else parse("makect "..current) end end

end


This is what I do on BASS. Maybe it's too simple but it kinda works on most occasions. It distributes players by their "score ratio". I haven't revised the code so, except it to not be the most effiecient approach.
03.04.18 11:44:59 pm
Up
M3_Quick
User
Offline Off
@user Gaios: Good point, but I'm not looking to create and store a score database.

@user JeeewNazi: that gets too far away from the script I'm looking for.

@user _Yank: your code is very similar to what I'm looking for, I just want to distribute the best scores of the players that are playing at that moment in the 2 teams (there is no need for a database).

thank you very much guys for your help and your advice, I'm just looking for a simple code that separates the best scores into 2 Teams without using save / load.
To the start Previous 1 Next To the start