Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by EdgarAllan*:

 

Yes sir! I figured posting it in this thread would be more helpful since someone could adapt it to fire off a message at any sort of ticket percentage/count.

 

I went ahead and posted my request in that thread. Thanks!

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by EBassie*:

 

@PapaCharlie9:

 

I want to build a limit to counter the "Black Loading Screen Between Rounds" issue.

This is a serious problem and I think I have an idea on how to counter it with a limit, but need some help.

 

Usually, after round end, the new map is loaded in about 90 secs, but when the "Black Loading Screen-Bug" occurs it can take up until 8 minutes before the new map is loaded and the players get see the real loading screen. Often when this happens the server dies out.

 

But the many times I noticed the loading of the new map would take to long and I would issue a "Next Map" command. Almost every time I tried this, the server loads the next map and all is fine.

 

Could we check this with a limit?

Like when the time between "round end" and "Level Loaded" is longer than 120 secs -> issue a next map command.

 

Plugin logs of normal round end and level loading:

Code:

[b][20:16:33] [/b]UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 23
[20:16:33] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND:
[20:16:33] [MULTIbalancer]:2 Status: Winner was team 2 (CN)
[20:16:33] [MULTIbalancer]:0 Status: Map = Guilin Peaks, mode = Conquest Large, time in round = 00:19:34, tickets = 0/201 <- [800]
[20:16:33] [MULTIbalancer]:0 Status: Ticket difference = 201, ticket ratio percentage is 134%, score 145573/147042
[20:16:33] [MULTIbalancer]:0 Status: 0/17 raged, 10 reassigned, 1 balanced, 0 unstacked, 0 unswitched, 70 excluded, 0 exempted, 0 failed; of 1072 TOTAL
[20:16:33] [MULTIbalancer]:0 Status: Team counts [63] = 32(US) vs 31(CN), with 1 unassigned, 0 commanders, 0 spectators
[20:16:33] [MULTIbalancer]:2 +------------------------------------------------+
[20:17:23] UltimateMapManager: WORK -> Next map: Dragon Pass (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][20:17:59] UltimateMapManager: INFO -> Level loaded.[/b]
When it goes wrong:

Code:

[b][21:05:14][/b] UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 25
[21:05:15] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND:
[21:05:15] [MULTIbalancer]:2 Status: Winner was team 1 (US)
[21:05:15] [MULTIbalancer]:0 Status: Map = Caspian Border 2014, mode = Conquest Large, time in round = 00:18:40, tickets = 441/0 <- [800]
[21:05:15] [MULTIbalancer]:0 Status: Ticket difference = 441, ticket ratio percentage is 223%, score 105934/84141
[21:05:15] [MULTIbalancer]:0 Status: 0/9 raged, 5 reassigned, 0 balanced, 0 unstacked, 0 unswitched, 29 excluded, 0 exempted, 0 failed; of 767 TOTAL
[21:05:15] [MULTIbalancer]:0 Status: Team counts [62] = 32(US) vs 30(RU), with 2 unassigned, 0 commanders, 0 spectators
[21:05:15] [MULTIbalancer]:2 +------------------------------------------------+
[21:06:05] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][21:07:54] UltimateMapManager: INFO -> Level loaded.[/b]
[21:07:55] UltimateMapManager: INFO -> Round restart requested. Rounds run on this map list: 26
[21:07:55] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][21:07:56] UltimateMapManager: INFO -> Level loaded.[/b]
[21:08:02] UltimateMapManager: INFO -> Next round requested. Rounds run on this map list: 27
[21:08:02] UltimateMapManager: WORK -> Next map: Wavebreaker (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][21:08:13] UltimateMapManager: INFO -> Level loaded.[/b]
It was stuck in loading until I did a next map command. (marked in blue)

 

As you can see, when to problem occurs there are two "Level loaded" notifications because of this bug. The third one was because I issued a "Next Map" command.

 

The first Level Loaded is already way past 90 secs, so I think it's safe to say we could issue a "Next Map" command here because otherwise the server seems to go into a loading loop and you can let it snap out of it using "Next Map".

 

Your thoughts?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

@PapaCharlie9:

 

I want to build a limit to counter the "Black Loading Screen Between Rounds" issue.

This is a serious problem and I think I have an idea on how to counter it with a limit, but need some help.

 

Usually, after round end, the new map is loaded in about 90 secs, but when the "Black Loading Screen-Bug" occurs it can take up until 8 minutes before the new map is loaded and the players get see the real loading screen. Often when this happens the server dies out.

 

But the many times I noticed the loading of the new map would take to long and I would issue a "Next Map" command. Almost every time I tried this, the server loads the next map and all is fine.

 

Could we check this with a limit?

Like when the time between "round end" and "Level Loaded" is longer than 120 secs -> issue a next map command.

 

Plugin logs of normal round end and level loading:

Code:

[b][20:16:33] [/b]UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 23
[20:16:33] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND:
[20:16:33] [MULTIbalancer]:2 Status: Winner was team 2 (CN)
[20:16:33] [MULTIbalancer]:0 Status: Map = Guilin Peaks, mode = Conquest Large, time in round = 00:19:34, tickets = 0/201 <- [800]
[20:16:33] [MULTIbalancer]:0 Status: Ticket difference = 201, ticket ratio percentage is 134%, score 145573/147042
[20:16:33] [MULTIbalancer]:0 Status: 0/17 raged, 10 reassigned, 1 balanced, 0 unstacked, 0 unswitched, 70 excluded, 0 exempted, 0 failed; of 1072 TOTAL
[20:16:33] [MULTIbalancer]:0 Status: Team counts [63] = 32(US) vs 31(CN), with 1 unassigned, 0 commanders, 0 spectators
[20:16:33] [MULTIbalancer]:2 +------------------------------------------------+
[20:17:23] UltimateMapManager: WORK -> Next map: Dragon Pass (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][20:17:59] UltimateMapManager: INFO -> Level loaded.[/b]
When it goes wrong:

Code:

[b][21:05:14][/b] UltimateMapManager: INFO -> Round ended. Rounds run on this map list: 25
[21:05:15] [MULTIbalancer]:2 FINAL STATUS FOR PREVIOUS ROUND:
[21:05:15] [MULTIbalancer]:2 Status: Winner was team 1 (US)
[21:05:15] [MULTIbalancer]:0 Status: Map = Caspian Border 2014, mode = Conquest Large, time in round = 00:18:40, tickets = 441/0 <- [800]
[21:05:15] [MULTIbalancer]:0 Status: Ticket difference = 441, ticket ratio percentage is 223%, score 105934/84141
[21:05:15] [MULTIbalancer]:0 Status: 0/9 raged, 5 reassigned, 0 balanced, 0 unstacked, 0 unswitched, 29 excluded, 0 exempted, 0 failed; of 767 TOTAL
[21:05:15] [MULTIbalancer]:0 Status: Team counts [62] = 32(US) vs 30(RU), with 2 unassigned, 0 commanders, 0 spectators
[21:05:15] [MULTIbalancer]:2 +------------------------------------------------+
[21:06:05] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][21:07:54] UltimateMapManager: INFO -> Level loaded.[/b]
[21:07:55] UltimateMapManager: INFO -> Round restart requested. Rounds run on this map list: 26
[21:07:55] UltimateMapManager: WORK -> Next map: Nansha Strike (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][21:07:56] UltimateMapManager: INFO -> Level loaded.[/b]
[21:08:02] UltimateMapManager: INFO -> Next round requested. Rounds run on this map list: 27
[21:08:02] UltimateMapManager: WORK -> Next map: Wavebreaker (Conquest Large). Setting server preset to Custom Preset: CQ LARGE 100%.
[b][21:08:13] UltimateMapManager: INFO -> Level loaded.[/b]
It was stuck in loading until I did a next map command. (marked in blue)

 

As you can see, when to problem occurs there are two "Level loaded" notifications because of this bug. The third one was because I issued a "Next Map" command.

 

The first Level Loaded is already way past 90 secs, so I think it's safe to say we could issue a "Next Map" command here because otherwise the server seems to go into a loading loop and you can let it snap out of it using "Next Map".

 

Your thoughts?

Short answer is, unfortunately, no. Insane Limits doesn't expose the OnLevelLoaded event.

 

I think you've got a good idea, but it will have to be done as a full plugin. That said, I'd advise looking at the raw console.log events and timing. A normal round end/round start cycle can and does exceed 90 seconds -- I've seen pretty wide variance while trying to pick a single number for when to scramble teams, some map/mode combos take longer than others. It's also slightly proportional to the number of players in the server.

 

It may be that the double load level of exactly the same map/mode would be a better indicator than elapsed time. Not to mention that it's much easier not to use time, in terms of the code.

 

For the plugin, if you do have to use time, you might be able to do it with a procon.protected.tasks.add that does a mapList.runNextRound. Set the delay to the maximum amount of time you are willing to wait for the next round to load. You can tell a level has actually loaded and started if you see an OnPlayerTeamChange some time after the OnLevelLoaded. You can set the delay in the procon.protected.tasks.add from whatever starting point you decide -- might as well be the first OnLevelLoaded. Then, one of two things happen: 1) Normally, the OnPlayerTeamChange happens, which would issue a procon.protected.tasks.remove before time runs out, or 2) no OnPlayerTeamChange event is seen and time runs out on the delayed task. Then you don't have to write any timer code yourself.

 

EDIT: I looked at some console.log timings for full TDM and Conquest servers. The time between onLevelLoaded and the first onTeamChange is between 15 and 30 seconds. All the team changes happen in 1 to 5 seconds, proportional to number of players. Then the first spawn is 0 to 5 seconds after that. So if the timer is set to 60 seconds, that should be plenty of time for a round to start normally.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by EBassie*:

 

Short answer is, unfortunately, no. Insane Limits doesn't expose the OnLevelLoaded event.

Hmm, too bad.

 

I think you've got a good idea, but it will have to be done as a full plugin. That said, I'd advise looking at the raw console.log events and timing. A normal round end/round start cycle can and does exceed 90 seconds -- I've seen pretty wide variance while trying to pick a single number for when to scramble teams, some map/mode combos take longer than others. It's also slightly proportional to the number of players in the server.

 

It may be that the double load level of exactly the same map/mode would be a better indicator than elapsed time. Not to mention that it's much easier not to use time, in terms of the code.

Well, on my fully populated 64 slots CQ server the timespan between rounds (round end - level loaded) never exceeds 90 secs. Usually it's even lower: 70 secs.

 

DICE will fix this bug, but for the time being I hoped for a simple and dirty workaround.

 

For the plugin, if you do have to use time, you might be able to do it with a procon.protected.tasks.add that does a mapList.runNextRound. Set the delay to the maximum amount of time you are willing to wait for the next round to load. You can tell a level has actually loaded and started if you see an OnPlayerTeamChange some time after the OnLevelLoaded. You can set the delay in the procon.protected.tasks.add from whatever starting point you decide -- might as well be the first OnLevelLoaded. Then, one of two things happen: 1) Normally, the OnPlayerTeamChange happens, which would issue a procon.protected.tasks.remove before time runs out, or 2) no OnPlayerTeamChange event is seen and time runs out on the delayed task. Then you don't have to write any timer code yourself.

Unfortunately I don't have the experience nor the time (going on vacation at the end of the week) in making this plugin.

 

As said, I hoped for a quick and dirty solution using IL for the time being until DICE fixes it.

 

I'll just keep nagging DL about it, to hurry f. up :P

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by hollebolle*:

 

hi there, hi papa

 

so, i have another request for a vote to restart the actual map. I tried to edit your !surrender -script, but after 2 days i don't get it ...

Although I get a !voterestart on the server and the round is ending, but there is no vote before and the round ends immediately -.-

 

 

What i try to do is a simple vote for all players on the server (whether Team A or Team B) so they can call a "!voterestart" and the current round ends.

e.g.: A player types !voterestart (server says something like "PLAYER X wants a maprestart! Type !yes for restart, !no against restart.") and 75 precent of all players on the server have to vote with !yes or !no for or against the restart.

 

 

hope, someone can help me

 

 

thanks and regards

holle

 

 

 

ps: sorry for my english, I try my best :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Blaze2014*:

 

Hey ihave 2 questions to you.How i set all digits from 0123456789 in only digits__Just know is only 0-1 set in this example.I will use all digits forbidden in player name.charter shall be allowed.Example if player name like this:135987643.How i write in code to change this__Question 2:Iwill only have eng-swe in chat (speak)And forbidden example france,dutch,etc in chat.Can i do that in create code__Jonas

 

Set limit to evaluate OnJoin, set action to Say | PRoConEvent | Log | Kick.

 

Set first_check to this Expression:

 

 

 

Code:

( Regex.Match(player.Name, @"^[0-9]+$").Success )Set the action specific settings to something like the following. This shows the settings for limit_1, but if your limit is a different number, for example "3", look for "limit_3_kick_message", etc.

 

 

 

Code:

limit_1_say_message %p_fn% kicked for bad player name, all digits!

limit_1_say_audience All

limit_1_say_delay 0

limit_1_procon_chat True

 

limit_1_procon_event_text Attempting to kick %p_fn% for bad player name, all digits

limit_1_procon_event_player Insane Limits

 

limit_1_log_destination Plugin

limit_1_log_message [%date% %time%] %p_fn% kicked for bad name: all digits

 

limit_1_kick_message bad player name: all digits

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

hi there, hi papa

 

so, i have another request for a vote to restart the actual map. I tried to edit your !surrender -script, but after 2 days i don't get it ...

Although I get a !voterestart on the server and the round is ending, but there is no vote before and the round ends immediately -.-

 

 

What i try to do is a simple vote for all players on the server (whether Team A or Team B) so they can call a "!voterestart" and the current round ends.

e.g.: A player types !voterestart (server says something like "PLAYER X wants a maprestart! Type !yes for restart, !no against restart.") and 75 precent of all players on the server have to vote with !yes or !no for or against the restart.

 

 

hope, someone can help me

 

 

thanks and regards

holle

 

 

 

ps: sorry for my english, I try my best :smile:

You don't have to change the limit, it already does what you want. You type !votenext and instead of !yes or !no, other players also type !votenext. Players on either team can vote, but players on the winning team aren't allowed to vote more than the losing team -- this prevents the winning team from getting a few points ahead and clinching the win before the losing team even gets a chance to do anything.

 

myrcon.net/...insane-limits-v09r6-vote-to-nuke-campingbase-raping-team-or-surrender#entry28837

 

If you want to change !votenext to !voterestart, find this line of code:

 

Code:

Match nextMatch = Regex.Match(player.LastChat, @"^\s*[@!](_:surrender|vote\s*next)", RegexOptions.IgnoreCase);
and change it to this:

 

 

Code:

Match nextMatch = Regex.Match(player.LastChat, @"^\s*[@!]vote\s*restart", RegexOptions.IgnoreCase);
If you have further questions, please post them in that thread rather than here.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hey ihave 2 questions to you.How i set all digits from 0123456789 in only digits__Just know is only 0-1 set in this example.I will use all digits forbidden in player name.charter shall be allowed.Example if player name like this:135987643.How i write in code to change this__Question 2:Iwill only have eng-swe in chat (speak)And forbidden example france,dutch,etc in chat.Can i do that in create code__Jonas

 

Set limit to evaluate OnJoin, set action to Say | PRoConEvent | Log | Kick.

 

Set first_check to this Expression:

 

 

 

Code:

( Regex.Match(player.Name, @"^[0-9]+$").Success )Set the action specific settings to something like the following. This shows the settings for limit_1, but if your limit is a different number, for example "3", look for "limit_3_kick_message", etc.

 

 

 

Code:

limit_1_say_message %p_fn% kicked for bad player name, all digits!

limit_1_say_audience All

limit_1_say_delay 0

limit_1_procon_chat True

 

limit_1_procon_event_text Attempting to kick %p_fn% for bad player name, all digits

limit_1_procon_event_player Insane Limits

 

limit_1_log_destination Plugin

limit_1_log_message [%date% %time%] %p_fn% kicked for bad name: all digits

 

limit_1_kick_message bad player name: all digits

Question 1: I don't understand. The limit will match any sequence of numbers, not just 0-1. It should match 1746826, for example.

 

Question 2: It's not possible to detect whether chat is in one language or another.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by p19blo*:

 

Couple requests

 

First is it possible to temporary ban a player for using anything but helicopters to kill ? Heli superioritty server

second, how can i make it some both sides have the same helicopter ?

 

Thank you.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Couple requests

 

First is it possible to temporary ban a player for using anything but helicopters to kill ? Heli superioritty server

second, how can i make it some both sides have the same helicopter ?

 

Thank you.

You could try this:

 

OnKill

first check code

Code:

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by prohibited weapon/vehicle name, see below
String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}";
String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}";
String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}";
String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again.";

// Times
int yellTime = 20; // seconds
int banTime = 60; // minutes
double multiKillTime = 5; // seconds

// Weapon/vehicle codes

bool isHELI = Regex.Match(kill.Weapon, @"(AH1Z|Mi28)").Success;

/* CODE */

if (!isHELI) return false;

String prohibited = "Heli";

String key = "PersistHeli_" + prohibited + "_" + killer.Name;

int count = 0;
if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key);

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

count = count + 1;

String msg = null;

if (count == 1) { // First Violation: Kill

    msg = String.Format(autoKilled, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count == 2) { // Second Violation: Kick

    msg = String.Format(autoKicked, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

} else { // Third or subsequent Violation: TBan

    msg = String.Format(tempBan, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg);

}

plugin.Data.setInt(key, count);
return false;
This will prohibit AH1Z and Mi28. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by p19blo*:

 

You could try this:

 

OnKill

first check code

Code:

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by prohibited weapon/vehicle name, see below
String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}";
String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}";
String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}";
String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again.";

// Times
int yellTime = 20; // seconds
int banTime = 60; // minutes
double multiKillTime = 5; // seconds

// Weapon/vehicle codes

bool isHELI = Regex.Match(kill.Weapon, @"(AH1Z|Mi28)").Success;

/* CODE */

if (!isHELI) return false;

String prohibited = "Heli";

String key = "PersistHeli_" + prohibited + "_" + killer.Name;

int count = 0;
if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key);

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

count = count + 1;

String msg = null;

if (count == 1) { // First Violation: Kill

    msg = String.Format(autoKilled, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count == 2) { // Second Violation: Kick

    msg = String.Format(autoKicked, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

} else { // Third or subsequent Violation: TBan

    msg = String.Format(tempBan, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg);

}

plugin.Data.setInt(key, count);
return false;
This will prohibit AH1Z and Mi28. :smile:
Thank you. I did want to prohibit everuything but the helis. Im assuming i stick in the name of everything but the helis in the kill weapon part?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Thank you. I did want to prohibit everuything but the helis. Im assuming i stick in the name of everything but the helis in the kill weapon part?

I'm pretty sure you could use TMiland's code, just change this line in the first_check:

Code:

/* CODE */

if (!isHELI) return false;
change to:

 

Code:

/* CODE */

if (isHELI) return false;
Also you'll need to go through and change the outputted messages a little.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Hello Guys....

 

I want to have Rule in my Insame Limits....

I need a !punish Rule....

 

Please help my

Take a look at this:

 

Punish: showthread....ll=1#post99483*

 

Forgive: showthread....l=1#post100074*

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Yes

You could try this:

 

Create a new list called "whitelist" f.eks, and add your player to it.

 

And add this to the top of the tk limit:

 

Code:

if (plugin.isInList(player.Name, "whitelist")) return false;
Or, if you have him in the reserved slots list:

 

Code:

List<String> ReservervedSlots = plugin.GetReservedSlotsList();
if (ReservervedSlots.Contains(player.Name)) {
	return false;
	}
Add either of them below:Code:
String key = "Last_TK";
I have no idea if this works, use with caution! :tongue:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I'm pretty sure you could use TMiland's code, just change this line in the first_check:

Nice job, TMiland and LCARS!

 

@p19blo, what exactly do you mean by helis? Attack choppers? Littlebirds? Transport? All? You'll have to tweak the list of codes depending on your answer.

 

Your second question, make both teams have the same choppers, can only be done by making both teams the same faction. You can do that in your Startup.txt for the server, or just type the commands into the Procon Console Window and restart the round.

 

For example, to make both teams be US faction:

 

Code:

vars.teamFactionOverride 1 0
vars.teamFactionOVerride 2 0
The first number is the team id, the second is the faction (US = 0, RU = 1, CN = 2). This doesn't work on Official servers, of course.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

You could try this:

 

Create a new list called "whitelist" f.eks, and add your player to it.

 

And add this to the top of the tk limit:

 

Code:

if (plugin.isInList(player.Name, "whitelist")) return false;
Or, if you have him in the reserved slots list:

 

Code:

List<String> ReservervedSlots = plugin.GetReservedSlotsList();
if (ReservervedSlots.Contains(player.Name)) {
	return false;
	}
Add either of them below:Code:
String key = "Last_TK";
I have no idea if this works, use with caution! :tongue:
If you want to Whitelist all of your limits with the same list, you can use the built-in global whitelist at the top of the settings, use_white_list set to True. That will open up a new section in settings called Whitelist, with clan_white_list for tags and player_white_list for player names. Again, this blocks ALL limits. If there is even just one limit that you don't want to pay attention to the whitelist, you have to do it the way TMiland suggested.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

@PapaCharlie9, just a quick question. Since the clan_white_list contains tags and not names, the following scenario wouldn't work would it?

I have two players:

Player1's full name is: [AAA] PlayerA

Player2's full name is: [bBB] PlayerB

 

player_white_list contains only: PlayerA

clan_white_list contains only: BBB

 

I have a limit with the following line:

Code:

if (plugin.isInWhitelist(player.Name))
Wouldn't this fail (the function return false) if the player that triggered it was Player2 (PlayerB)?
Also, in the Insane Limits post Plugin Object there is the following:

Code:

bool isInClanWhitelist(String PlayerName);
Would this not be as follows?

Code:

bool isInClanWhitelist(String PlayerTag);
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Nice job, TMiland and LCARS!

 

@p19blo, what exactly do you mean by helis? Attack choppers? Littlebirds? Transport? All? You'll have to tweak the list of codes depending on your answer.

 

Your second question, make both teams have the same choppers, can only be done by making both teams the same faction. You can do that in your Startup.txt for the server, or just type the commands into the Procon Console Window and restart the round.

 

For example, to make both teams be US faction:

 

Code:

vars.teamFactionOverride 1 0
vars.teamFactionOVerride 2 0
The first number is the team id, the second is the faction (US = 0, RU = 1, CN = 2). This doesn't work on Official servers, of course.
Thanks! :biggrin:

 

If you want to Whitelist all of your limits with the same list, you can use the built-in global whitelist at the top of the settings, use_white_list set to True. That will open up a new section in settings called Whitelist, with clan_white_list for tags and player_white_list for player names. Again, this blocks ALL limits. If there is even just one limit that you don't want to pay attention to the whitelist, you have to do it the way TMiland suggested.

I wasn't aware of that! Nice :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

I have a request, and i am not sure if i have seen it before, but here it goes:

 

What i need is Factions based on maps:

 

RU vs US on: Dawnbreaker, Siege of Shanghai, Lancang Dam - basically where the attack helicopters are facing each other.

CN vs RU on: Paracel Storm, Hainan Resort - maps where Attack Boats are present.

Rest of maps: default / random.

So, i have this version of Random Factions:

 

Code:

string msg = "none";

Random rnd = new Random();
int Team1 = rnd.Next(0, 3);
int Team2 = rnd.Next(0, 3);

while (Team1 == Team2) {
Team2 = rnd.Next(0, 3);
}
    
Dictionary<int,String> Teams = new Dictionary<int,String>();
Teams.Add(0, "US");
Teams.Add(1, "Russia");
Teams.Add(2, "China");


plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(Team2));

msg = "Scrambling next round team factions...";
plugin.SendGlobalMessage(msg, 12);
plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConEvent(msg, "Insane Limits");

return false;
Changed it to this:

 

Code:

string msg = "none";

Random rnd = new Random();
int Team1 = rnd.Next(0, 3);
int Team2 = rnd.Next(0, 3);

	while (Team1 == Team2) {
	Team2 = rnd.Next(0, 3);
	}
    
Dictionary<int,String> Teams = new Dictionary<int,String>();
	Teams.Add(0, "US");
	Teams.Add(1, "Russia");
	Teams.Add(2, "China");

	if (server.NextMapFileName == "MP_Tremors" || server.NextMapFileName == "MP_Siege" || server.NextMapFileName == "MP_Damage")
	{
		plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(1));
		plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(0));
		msg = "Setting factions to RU vs US on next round...";
	}
	else if (server.NextMapFileName == "MP_Naval" || server.NextMapFileName == "MP_Resort" || server.NextMapFileName == "MP_Damage")
	{
		plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(2));
		plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(1));
		msg = "Setting factions to CN vs RU on next round...";
	}
	else 
	{
		plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
		plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(Team2));
		msg = "Scrambling next round team factions...";
	}
		plugin.SendGlobalMessage(msg, 12);
		plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg);
		plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg);
		plugin.PRoConEvent(msg, "Insane Limits");

	return false;
Question is, will it work? :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

I have a request, and i am not sure if i have seen it before, but here it goes:

 

What i need is Factions based on maps:

 

 

 

So, i have this version of Random Factions:

 

Code:

string msg = "none";

Random rnd = new Random();
int Team1 = rnd.Next(0, 3);
int Team2 = rnd.Next(0, 3);

while (Team1 == Team2) {
Team2 = rnd.Next(0, 3);
}
    
Dictionary<int,String> Teams = new Dictionary<int,String>();
Teams.Add(0, "US");
Teams.Add(1, "Russia");
Teams.Add(2, "China");


plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(Team2));

msg = "Scrambling next round team factions...";
plugin.SendGlobalMessage(msg, 12);
plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConEvent(msg, "Insane Limits");

return false;
Changed it to this:

 

Code:

string msg = "none";

Random rnd = new Random();
int Team1 = rnd.Next(0, 3);
int Team2 = rnd.Next(0, 3);

	while (Team1 == Team2) {
	Team2 = rnd.Next(0, 3);
	}
    
Dictionary<int,String> Teams = new Dictionary<int,String>();
	Teams.Add(0, "US");
	Teams.Add(1, "Russia");
	Teams.Add(2, "China");

	if (server.NextMapFileName == "MP_Tremors" || server.NextMapFileName == "MP_Siege" || server.NextMapFileName == "MP_Damage")
	{
		plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(1));
		plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(0));
		msg = "Setting factions to RU vs US on next round...";
	}
	else if (server.NextMapFileName == "MP_Naval" || server.NextMapFileName == "MP_Resort" || server.NextMapFileName == "MP_Damage")
	{
		plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(2));
		plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(1));
		msg = "Setting factions to CN vs RU on next round...";
	}
	else 
	{
		plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
		plugin.ServerCommand("vars.teamFactionOverride", "2",  Convert.ToString(Team2));
		msg = "Scrambling next round team factions...";
	}
		plugin.SendGlobalMessage(msg, 12);
		plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg);
		plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg);
		plugin.PRoConEvent(msg, "Insane Limits");

	return false;
Question is, will it work? :smile:
I don't see why it shouldn't work, however there's a couple of mistakes in your code:

Code:

server.NextMapFilename
Should be:

Code:

server.NextMapFileName
You also have "MP_Damage" in both the first and second if evaluations.

 

I have made some edits to your code and have come up with this:

Code:

String msg = "none";

int Team1 = 0;
int Team2 = 0;

Dictionary<int,String> Teams = new Dictionary<int,String>();
Teams.Add(0, "US");
Teams.Add(1, "RU");
Teams.Add(2, "CN");

switch (server.NextMapFileName)
{
    case "MP_Tremors":
    case "MP_Siege":
    case "MP_Damage":
        Team1 = 1;
        Team2 = 0;
        break;
    case "MP_Naval":
    case "MP_Resort":
        Team1 = 2;
        Team2 = 1;
        break;
    default:
        Random rnd = new Random();
        Team1 = rnd.Next(0, 3);
        Team2 = rnd.Next(0, 3);

        while (Team1 == Team2)
        {
            Team2 = rnd.Next(0, 3);
        }
        break;
}

plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2));
msg = "Setting factions to " + Teams[Team1] + " vs " + Teams[Team2] + " on next round...";

plugin.SendGlobalMessage(msg, 12);
plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConEvent(msg, "Insane Limits");

return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

I don't see why it shouldn't work, however there's a couple of mistakes in your code:

Code:

server.NextMapFilename
Should be:

Code:

server.NextMapFileName
You also have "MP_Damage" in both the first and second if evaluations.

 

I have made some edits to your code and have come up with this:

Code:

String msg = "none";

int Team1 = 0;
int Team2 = 0;

Dictionary<int,String> Teams = new Dictionary<int,String>();
Teams.Add(0, "US");
Teams.Add(1, "RU");
Teams.Add(2, "CN");

switch (server.NextMapFileName)
{
    case "MP_Tremors":
    case "MP_Siege":
    case "MP_Damage":
        Team1 = 1;
        Team2 = 0;
        break;
    case "MP_Naval":
    case "MP_Resort":
        Team1 = 2;
        Team2 = 1;
        break;
    default:
        Random rnd = new Random();
        Team1 = rnd.Next(0, 3);
        Team2 = rnd.Next(0, 3);

        while (Team1 == Team2)
        {
            Team2 = rnd.Next(0, 3);
        }
        break;
}

plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2));
msg = "Setting factions to " + Teams[Team1] + " vs " + Teams[Team2] + " on next round...";

plugin.SendGlobalMessage(msg, 12);
plugin.ConsoleWrite("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConChat("^b^1ADMIN SCRAMBLE >^0^n " + msg);
plugin.PRoConEvent(msg, "Insane Limits");

return false;
This is why i post it here, because my head is running on it's own sometimes lol!

 

Thanks for the help, running it now to see how it goes! :biggrin:

 

*edit

[23:58:21] ADMIN SCRAMBLE > Setting factions to RU vs US on next round...

 

On Siege of Shanghai, it is US vs CH now, so i guess it didn't work...

 

Could that be because of xVoteMap?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

This is why i post it here, because my head is running it's own sometimes lol!

 

Thanks for the help, running it now to see how it goes! :biggrin:

 

*edit

[23:58:21] ADMIN SCRAMBLE > Setting factions to RU vs US on next round...

 

On Siege of Shanghai, it is US vs CH now, so i guess it didn't work...

 

Could that be because of xVoteMap?

It's possible, try disabling xVoteMap and see if it works (manually set the next map). :ohmy:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

It's possible, try disabling xVoteMap and see if it works (manually set the next map). :ohmy:

After reading this post by PC9: myrcon.net/...insane-limits-requests#entry27046

 

I have changed the code to this:

 

Code:

plugin.ServerCommand("mapList.getMapIndices");
int nextRound = server.CurrentRound + 2;
if (nextRound > server.TotalRounds) nextRound = 1;

if ((server.CurrentRound +1) < server.TotalRounds) {
	plugin.ConsoleWrite("^2Next round is ^b" + plugin.FriendlyMapName(server.MapFileName) + "^n, round " + (server.CurrentRound+1) + " of " + server.TotalRounds + ", with " + server.PlayerCount + " players remaining");
	return false;
}

plugin.ConsoleWrite("^2Next map is ^b" + plugin.FriendlyMapName(server.NextMapFileName) + "^n, round " + nextRound + ", with " + server.PlayerCount + " players remaining");

String msg = "none";

int Team1 = 0;
int Team2 = 0;

Dictionary<int,String> Teams = new Dictionary<int,String>();
Teams.Add(0, "US");
Teams.Add(1, "RU");
Teams.Add(2, "CN");

switch (server.NextMapFileName)
{
	case "MP_Tremors":
	case "MP_Siege":
	case "MP_Damage":
	case "MP_Journey":
		Team1 = 1;
		Team2 = 0;
		break;
	case "MP_Naval":
	case "MP_Resort":
		Team1 = 2;
		Team2 = 1;
		break;
	default:
		Random rnd = new Random();
		Team1 = rnd.Next(0, 3);
		Team2 = rnd.Next(0, 3);

		while (Team1 == Team2)
		{
			Team2 = rnd.Next(0, 3);
		}
		break;
}

plugin.ServerCommand("vars.teamFactionOverride", "1", Convert.ToString(Team1));
plugin.ServerCommand("vars.teamFactionOverride", "2", Convert.ToString(Team2));
msg = "Next map is:" + plugin.FriendlyMapName(server.NextMapFileName) + "Setting factions to " + Teams[Team1] + " vs " + Teams[Team2] + " on next round...";

plugin.SendGlobalMessage(msg, 12);
plugin.ConsoleWrite("^b^1ADMIN FACTIONS >^0^n " + msg);
plugin.PRoConChat("^b^1ADMIN FACTIONS >^0^n " + msg);
plugin.PRoConEvent(msg, "Insane Limits");

return false;
So it's not doing anything if on round 1, but sets the factions on round 2 end. :smile:

 

The line:Code:

this.ExecuteCommand("procon.protected.send", "mapList.getMapIndices");
has been added to the latest xVoteMaps.

 

*edit

But still it's not setting the right factions it seems...

 

[12:26:26] ADMIN FACTIONS > Setting factions to RU vs US on next round...

And it's running Lancang Dam with RU vs CH

 

*Edit2

I can see it is setting the right faction on round end, but on the next map, something has overridden the factions and set them to something else. :huh:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

@PapaCharlie9, just a quick question. Since the clan_white_list contains tags and not names, the following scenario wouldn't work would it?

 

Also, in the Insane Limits post Plugin Object there is the following:

Code:

bool isInClanWhitelist(String PlayerName);
Would this not be as follows?

Code:

bool isInClanWhitelist(String PlayerTag);
Short answer: it does the right thing.

 

isInWhitelist calls both isInPlayerWhitelist and isInClanWhitelist. isInClanWhitelist uses the player's name to look up the player's tag.

 

So using plugin.isInWhitelist(String PlayerName) is all you have to use to check both lists correctly.

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.