Jump to content

Insane Limits (0.9.17.0 - 30-MAR-2015) + BFHL


ImportBot

Recommended Posts

Originally Posted by BuRockK*:

 

Hi, Is it possible to make a limit that checks every players score and kill count individually on every "OnIntervalServer" seconds?

 

Red part is what it would be like (with the right code of course)

 

Code:

List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
players.AddRange(team1.players);
players.AddRange(team2.players);
if (team3.players.Count > 0)
    players.AddRange(team3.players);
if (team4.players.Count > 0)
    players.AddRange(team4.players);

foreach (PlayerInfoInterface p in players) {
    [b]if (p.Kills < 10 && p.Score > 15000) {
        plugin.KickPlayerWithMessage(p.Name, No statspadding.);
    }
[/b]
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by maxdralle*:

 

Hi, Is it possible to make a limit that checks every players score and kill count individually on every "OnIntervalServer" seconds?

 

Red part is what it would be like (with the right code of course)

 

Code:

List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
players.AddRange(team1.players);
players.AddRange(team2.players);
if (team3.players.Count > 0)
    players.AddRange(team3.players);
if (team4.players.Count > 0)
    players.AddRange(team4.players);

foreach (PlayerInfoInterface p in players) {
    [b]if (p.Kills < 10 && p.Score > 15000) {
        plugin.KickPlayerWithMessage(p.Name, No statspadding.);
    }
[/b]
}
here the RED part:

Code:

if ((p.KillsRound < 10) && (p.ScoreRound > 15000)) {
	String TmpPlayerTag = p.Tag;
	plugin.ConsoleWrite("^1^bSTATSPADDING:^0^n [" + TmpPlayerTag + "] " + p.Name + " KICKED for statspadding");
	plugin.PRoConChat("^1^bSTATSPADDING^0^n > [" + TmpPlayerTag + "] " + p.Name + " KICKED statspadding");
	plugin.KickPlayerWithMessage(p.Name, plugin.R("KICKED for statspadding"));

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

Originally Posted by BuRockK*:

 

here the RED part:

Code:

if ((p.KillsRound < 10) && (p.ScoreRound > 15000)) {
	String TmpPlayerTag = p.Tag;
	plugin.ConsoleWrite("^1^bSTATSPADDING:^0^n [" + TmpPlayerTag + "] " + p.Name + " KICKED for statspadding");
	plugin.PRoConChat("^1^bSTATSPADDING^0^n > [" + TmpPlayerTag + "] " + p.Name + " KICKED statspadding");
	plugin.KickPlayerWithMessage(p.Name, plugin.R("KICKED for statspadding"));

}
Thank you, i honestly didnt know which exact variables were stored in PlayerInfoInterface
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by thunderje*:

 

insane limits will not let me paste the limit in the limit section 1, could anyone help me with this.im using win 8.1 and the current procon,in the limit it says also to hit cntrl and enter to add the txt, but it does nothing

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

Originally Posted by LCARSx64*:

 

insane limits will not let me paste the limit in the limit section 1, could anyone help me with this.im using win 8.1 and the current procon,in the limit it says also to hit cntrl and enter to add the txt, but it does nothing

Copy the code then click the arrow at the end of the first_check_code section of the limit you want to paste the code to, press CTRL + V.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

Hi all, can someone approve this limit works? I dont know why but its not working for me..

 

Code:

List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
players.AddRange(team1.players);
players.AddRange(team2.players);
if (team3.players.Count > 0)
    players.AddRange(team3.players);
if (team4.players.Count > 0)
    players.AddRange(team4.players);

foreach (PlayerInfoInterface p in players) {
    double maxscoreperkill = 1200;
    double tmp_totalkills_maxscore = maxscoreperkill * p.KillsRound;

    if (tmp_totalkills_maxscore / p.KillsRound > maxscoreperkill) {
        String TmpPlayerTag = p.Tag;
        plugin.ConsoleWrite("^1^bSTATSPADDING:^0^n [" + TmpPlayerTag + "] " + p.Name + " KICKED for statspadding");
        plugin.PRoConChat("^1^bSTATSPADDING^0^n > [" + TmpPlayerTag + "] " + p.Name + " KICKED statspadding");
        plugin.KickPlayerWithMessage(p.Name, plugin.R("KICKED for statspadding"));
    }
}
return false;
In the code, limit checks the total score player can have depending on his kill count. 1200 score points for every 1 kill count (200 for 1 kill and other 1000 is for various stuff like ammo usage by others,revives etc.).

 

There is a player now that has over 1200 score in the round with 0 kills and 7 deaths (statspadding) but the limit not working for some reason.

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

Originally Posted by Hodor*:

 

Someone knows why @PapaCharlie9 didnt add the delay function for SendPlayerYell etc? He did delay only for SendPlayerMessage etc (admin.say):

 

Code:

SendPlayerYell(String name, String message, int duration);
Code:
SendPlayerMessage(String name, String message, int delay);
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Hodor*:

 

Does anyone know how to make OnJoin triggered immediately like ProconRulz?

My rule:

 

//evaluation OnJoin

//first_check Code

Code:

if (server.PlayerCount<= 10 ) {
    plugin.SendGlobalYell(plugin.R("\n[Player: %p_n%] 3axoguT Ha CepBep! \nOcTaBauc9l Ha CepBepe 6yg My}l{ukoM! | CepBep ckopo 3aIIoJIHuTc9I"),10);
	}
else if (server.PlayerCount<= 14 ) {
    plugin.SendGlobalMessage(plugin.R("==================================="));
    plugin.SendGlobalMessage(plugin.R("[Player: %p_n%] 3axoguT"));
    plugin.SendGlobalMessage(plugin.R("OcTaBauc9l Ha CepBepe 6yg My}l{ukoM!"));
    plugin.SendGlobalMessage(plugin.R("CepBep ckopo 3aIIoJIHuTc9I"));
	}
    return false;
//second_check Disabled

 

This rule is triggered when a player will joined entirely to the server, but I need that it triggered after pressing in battlelog "Join server" like ProconRulz

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

Originally Posted by MRniceGuy*:

 

Hello!

I want to create a list of players who can join the server as a commander and kick anyone else who isn't in the list

would be great to provide a sample

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

Originally Posted by BuRockK*:

 

Hello!

I want to create a list of players who can join the server as a commander and kick anyone else who isn't in the list

would be great to provide a sample

Create a new limit with "OnJoin" evaluation. than make the "first_check: code" and paste this in "first_check_code":

 

if (((player.Role == 2) || (player.Role == 3)) && (!plugin.isInList(player.Name, "commander_list"))) { return true; }

 

 

Select action etc in that drop down list to set action on trigger.

 

 

Also you need to make a new list named "commander_list". But before that you need to enable "use custom lists" from the settings of the plugin.

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

Originally Posted by MRniceGuy*:

 

Create a new limit with "OnJoin" evaluation. than make the "first_check: code" and paste this in "first_check_code":

 

if (((player.Role == 2) || (player.Role == 3)) && (!plugin.isInList(player.Name, "commander_list"))) { return true; }

 

 

Select action etc in that drop down list to set action on trigger.

 

 

Also you need to make a new list named "commander_list". But before that you need to enable "use custom lists" from the settings of the plugin.

d2ee2f5f24bc2029339d59c9657fa213.jpg

 

Im a total newbie with insane limits man

more details please xD

Thanks

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

Originally Posted by BuRockK*:

 

Make a custom list:

 

1) Plugin>Settings>use_custom_lists>True

2) Plugin>List Manager>new_list>True

3) Goto newly created list at the bottom (List #1 - Name1)

4) Under that tree;

list_x_hide: Show

list_x_name: commander_list

list_x_comparison: CaseSensitive

list_x_data: Name1, Name2, Name3 (seperate names the way you see here)

 

Make a new limit:

 

1)Plugin>Limit Manager>new_limit>true

2) Goto newly created limit at the bottom (Limit #1 - Name1)

3) Under that tree;

limit_x_hide: Show

limit_x_name: whatever

limit_x_evaluation: OnJoin

limit_x_first_check: Code

limit_x_first_check_code:

Code:

if (((player.Role == 2) || (player.Role == 3)) && (!plugin.isInList(player.Name, "commander_list"))) { return true; }
limit_x_new_action: Kick

X [-----Kick Action-----]: Show

limit_x_kick_message: (Type your kick msg here)

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

Originally Posted by MRniceGuy*:

 

Make a custom list:

 

1) Plugin>Settings>use_custom_lists>True

2) Plugin>List Manager>new_list>True

3) Goto newly created list at the bottom (List #1 - Name1)

4) Under that tree;

list_x_hide: Show

list_x_name: commander_list

list_x_comparison: CaseSensitive

list_x_data: Name1, Name2, Name3 (seperate names the way you see here)

 

Make a new limit:

 

1)Plugin>Limit Manager>new_limit>true

2) Goto newly created limit at the bottom (Limit #1 - Name1)

3) Under that tree;

limit_x_hide: Show

limit_x_name: whatever

limit_x_evaluation: OnJoin

limit_x_first_check: Code

limit_x_first_check_code:

Code:

if (((player.Role == 2) || (player.Role == 3)) && (!plugin.isInList(player.Name, "commander_list"))) { return true; }
limit_x_new_action: Kick

X [-----Kick Action-----]: Show

limit_x_kick_message: (Type your kick msg here)

Thank you sir :_) really appreciated :*
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

Hey guys! Can you help me to create a simple player rank code.So player can check rank in server?

Blaze

The only way to do something like that currently is with the stat logger plugin. You will need a MySQL database to do that.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 4 months later...

Originally Posted by BuRockK*:

 

Could anyone help me with this code? Im sure im missing something very simple here but i just cant figure out why this doesnt work the way i want.

 

I have on join msg set in the server. Under 44 players = Shows either "player joined" or "VIP player joined" msgs. Over 44 players, same but only logs in Procon chat.

 

Recently i updated this so when a spectator joins it just logs to procon chat and nothing else. Everything else should have stayed the same (if not spectator, shows normal join msgs depending on player count). But for some reason, it works as if it has mind of its own, sometimes showing "player joined" msg, sometimes its "VIP player joined" msg, and sometimes it shows "spectator player joined" in procon chat like its supposed to. But it never works perfect like i was hoping it would.

 

Well, heres my code:

 

Code:

if (player.Role == 1) {
    plugin.PRoConChat(plugin.R("^b^4LOG:^0 SPECTATOR^n " + player.FullName + " has ^4joined ^0the game."));
}
if (player.Role != 1) {
    if (server.PlayerCount < 44) {
        if (!plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.SendGlobalMessage(plugin.R("%p_fn% has joined the game."));
            plugin.PRoConChat(plugin.R("^b^4TO ALL:^0^n " + player.FullName + " has ^4joined ^0the game."));
        }
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.SendGlobalMessage(plugin.R("VIP PLAYER %p_fn% has joined the game."));
            plugin.PRoConChat(plugin.R("^b^4TO ALL:^0VIP PLAYER^n " + player.FullName + " has ^4joined ^0the game."));
        }
    }
    if (server.PlayerCount >= 44) {
        if (!plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.PRoConChat(plugin.R("^b^4LOG:^0^n " + player.FullName + " has ^4joined ^0the game."));
        }
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.PRoConChat(plugin.R("^b^4LOG:^0VIP PLAYER^n " + player.FullName + " has ^4joined ^0the game."));
        }
    }
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Could anyone help me with this code? Im sure im missing something very simple here but i just cant figure out why this doesnt work the way i want.

 

I have on join msg set in the server. Under 44 players = Shows either "player joined" or "VIP player joined" msgs. Over 44 players, same but only logs in Procon chat.

 

Recently i updated this so when a spectator joins it just logs to procon chat and nothing else. Everything else should have stayed the same (if not spectator, shows normal join msgs depending on player count). But for some reason, it works as if it has mind of its own, sometimes showing "player joined" msg, sometimes its "VIP player joined" msg, and sometimes it shows "spectator player joined" in procon chat like its supposed to. But it never works perfect like i was hoping it would.

 

Well, heres my code:

 

Code:

if (player.Role == 1) {
    plugin.PRoConChat(plugin.R("^b^4LOG:^0 SPECTATOR^n " + player.FullName + " has ^4joined ^0the game."));
}
if (player.Role != 1) {
    if (server.PlayerCount < 44) {
        if (!plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.SendGlobalMessage(plugin.R("%p_fn% has joined the game."));
            plugin.PRoConChat(plugin.R("^b^4TO ALL:^0^n " + player.FullName + " has ^4joined ^0the game."));
        }
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.SendGlobalMessage(plugin.R("VIP PLAYER %p_fn% has joined the game."));
            plugin.PRoConChat(plugin.R("^b^4TO ALL:^0VIP PLAYER^n " + player.FullName + " has ^4joined ^0the game."));
        }
    }
    if (server.PlayerCount >= 44) {
        if (!plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.PRoConChat(plugin.R("^b^4LOG:^0^n " + player.FullName + " has ^4joined ^0the game."));
        }
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.PRoConChat(plugin.R("^b^4LOG:^0VIP PLAYER^n " + player.FullName + " has ^4joined ^0the game."));
        }
    }
}
I'm assuming that the limit is triggered OnJoin.

It's possible that player.Role may not always be set when the limit is triggered, however, try this code and see if it helps:

Code:

String sMsg = player.FullName + " has joined the game.";
String[] sLog = new String[] { "^b^4LOG:^0^n ",
                                             "^b^4TO ALL:^0^n ",
                                             "^bSPECTATOR^n ",
                                             "^bVIP PLAYER^n ",
                                             player.FullName + "has ^4joined^0 the game." };

switch (player.Role)
{
    case 1:         // Spectator
        sLog[0] = sLog[0] + sLog[2] + sLog[4];
        break;
    default:        // Everyone else
        if (server.PlayerCount < 44)
        {
            // Less than 44 players
            sLog[0] = sLog[1];
            if (!plugin.GetReservedSlotsList().Contains(player.Name))
            {
                // Not VIP
                sLog[0] = sLog[0] + sLog[4];
            }
            else
            {
                // VIP
                sMsg = "VIP PLAYER " + sMsg;
                sLog[0] = sLog[0] + sLog[3] + sLog[4];
            }
            plugin.SendGlobalMessage(sMsg);
        }
        else
        {
            // 44 or more players
            if (!plugin.GetReservedSlotsList().Contains(player.Name))
            {
                // Not VIP
                sLog[0] = sLog[0] + sLog[4];
            }
            else
            {
                // VIP
                sLog[0] = sLog[0] + sLog[3] + sLog[4];
            }
        }
        break;
}
plugin.PRoConChat(sLog[0]);

return false;       // Only needed if this is the end of the limit
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

I get this error:

 

[20:27:07 43] [insane Limits] ERROR: 1 error compiling Code

[20:27:07 43] [insane Limits] ERROR: (CS0163, line: 39, column: 17): Das Steuerelement kann nicht von einer case-Bezeichnung (default:smile: zur nächsten fortfahren.

 

Why its in German, i dont know lol

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

Originally Posted by LCARSx64*:

 

I get this error:

 

[20:27:07 43] [insane Limits] ERROR: 1 error compiling Code

[20:27:07 43] [insane Limits] ERROR: (CS0163, line: 39, column: 17): Das Steuerelement kann nicht von einer case-Bezeichnung (default:smile: zur nächsten fortfahren.

 

Why its in German, i dont know lol

Oops sorry, I forgot the break in switch default. I've corrected the code in my previous post.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

Yes, now it works. Thank you LCARSx64

 

Now i need to learn how your code works. ^^

 

At first look, basicly i see you set up "cases" and have script exec those cases depending on player count and player role. I will study this lol thank again

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

Originally Posted by BitterLooter*:

 

I'm running procon layer on a dedicated Debian (Linux) server using Mono. A lot of plugins work (Adaptive Server/Ticket Size, PRoCon Chat, GUID, Stats and Map Logger, Ultimate Map Manager, CheatDetector, ProconRulz, TrueBalancer, and more), but I'm unable to get InsaneLimits working correctly.

 

Here's the error in Procon console:

Code:

[08:23:30 59] [Insane Limits] Thread(Threadpool worker): ERROR: unable to dump information to file
[08:23:30 59] [Insane Limits] Thread(Threadpool worker): EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/procon/procon/home/procon/procon/Plugins/BF4/InsaneLimits_getwrekd.game.nfoservers.com_XXXXX.conf".
The path is incorrect. Instead of /home/procon/procon/home/procon/procon/Plugins/BF4/ it should be /home/procon/procon/Plugins/BF4/.

 

I tried hard coding the path in:

Code:

String procon_path = Directory.GetParent(Application.ExecutablePath).FullName;
String plugins_path = Path.Combine(procon_path, Path.Combine("Plugins", "BF3"));
deleting the .dll and restarting the procon layer, but that just made the "Plugin Settings" section in procon blank with no additional debug/error output available.

 

Any advice on how to get this working on Linux?

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

Originally Posted by BitterLooter*:

 

Ok, update to my original Linux thread... I got InsaneLimits loaded and working in procon console. It's enabled, virtual mode is off. I set up a limit as follows....

 

limit_1_state: enabled

limit_1_name: NextRound

limit_1_eval: OnRoundOver

limit_1_first_check: Expression

limit_1_first_check_exp: (server.PlayerCount>=6)

limit_1_second_check: Code

limit_1_second_check_code:

Code:

Thread ender = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = 15; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                plugin.ServerCommand("mapList.runNextRound");
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);
ender.Name = "RoundEnder";
ender.Start();
return false;
limit_1_new_action:....

limit_1_action: None

 

But it's not working. The next (end of) round count-down timer between maps goes from 50 (or whatever) all the way to 1 or 0 when it should fire off the next map at 30 or 35 seconds. No errors are displayed in console.

 

Limit has been compiled. How can I debug this?

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

Originally Posted by BitterLooter*:

 

As i understand, you want start next map if server player count >= 6?

At the end of a round, yes. So folks aren't waiting around for a minute after a map staring at the scoreboard. Round over? Move to next map in 15 or 30 seconds, don't wait for the clock to count-down.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BitterLooter*:

 

Can you try this code for OnRoundOver triger

Code:

if (server.PlayerCount <= 6 )
{
plugin.ServerCommand("mapList.runNextRound");
}
else
{
// plugin.ServerCommand("mapList.runNextRound");
}
but i dont fully understand, when you want work this command, on low population or on high population, if you want it's work on high population, uncomment second command and set comment to first command
If there are more than 6 people on the server, and the round is over, goto the next map/round after x seconds. Again, all I'm trying to do is prevent folks from having to wait 45+ seconds between matches.

 

I will try your code and report back, but I have a feeling Insane Limits isn't working right at all. The plugin loads, I can enter limits, compile them, but they aren't actually doing anything on/to the server.

 

-- edit

 

Ok, so as a test, under "console" in Procon->Insane Limits->Plugin Settings, I put the following:

plugin.ServerCommand("mapList.runNextRound");

 

And the next round didn't load... Insane Limits doesn't appear to be working.

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

Originally Posted by Vejling*:

 

I put InsaneLimit plugin in my Nitrado BF4 / plugin folder

When starting procon it appears in under plugins, but say "WARNING: you must review and accept the privacy policy before plugin can be activated"

How do i do that?

This HAS to be a noob question but i cannot seem to find the answer anywhere...

 

/Towli

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

Originally Posted by LCARSx64*:

 

If there are more than 6 people on the server, and the round is over, goto the next map/round after x seconds. Again, all I'm trying to do is prevent folks from having to wait 45+ seconds between matches.

 

I will try your code and report back, but I have a feeling Insane Limits isn't working right at all. The plugin loads, I can enter limits, compile them, but they aren't actually doing anything on/to the server.

 

-- edit

 

Ok, so as a test, under "console" in Procon->Insane Limits->Plugin Settings, I put the following:

plugin.ServerCommand("mapList.runNextRound");

 

And the next round didn't load... Insane Limits doesn't appear to be working.

Are you running other plugins/limits that make changes to the maplist/next map?

 

I put InsaneLimit plugin in my Nitrado BF4 / plugin folder

When starting procon it appears in under plugins, but say "WARNING: you must review and accept the privacy policy before plugin can be activated"

How do i do that?

This HAS to be a noob question but i cannot seem to find the answer anywhere...

 

/Towli

You can do this in the plugin settings for Insane Limits.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Yes. xVotemap and Ultimate Map Manager.

These may be your problem. Plugins in Procon execute in alphabetical order, the delay set in the limit needs to be long enough to ensure that it executes after UMM & xVotemap.
* Restored post. It could be that the author is no longer active.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.