Jump to content

Insane Limits - Examples


Recommended Posts

Originally Posted by HexaCanon*:

 

Did you mean you want the first and second times to be a Kill instead of the second being a Kick? If so, yes, your code will work. You can also just simplify it to:

 

Code:

if (limit.Data.issetBool(player.Name))
  {
     plugin.SendGlobalMessage(plugin.R("%p_n% has been banned for using %w_n%, after a kick!"));
     plugin.PBBanPlayerWithMessage(PBBanDuration.Temporary, player.Name, 15, plugin.R("%p_n% you have been banned for 15 minutes for using %w_n%"));
     limit.Data.unsetBool(player.Name);
  }
  
  int count = (int) limit.Activations(player.Name);
   
  if (count < 3)
  {
      plugin.SendGlobalMessage(plugin.R("%p_n% do not use %w_n%!"));
      plugin.KillPlayer(player.Name);
  }
  else if (count == 3)
  {
     plugin.SendGlobalMessage(plugin.R("%p_n% has been kicked for using %w_n%"));
     plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n% you have been kicked for using %w_n%"));
     
     if (!limit.Data.issetBool(player.Name))
         limit.Data.setBool(player.Name, true);
  }
What maps do you want to enable this for? Let's say you want to enable it for MP_Subway (Metro) and Bazaar (MP_001). Change the first_check Expression to this:

 

Code:

( Regex.Match(kill.Weapon, @"(_:m320|smaw|rpg|usas-12)", RegexOptions.IgnoreCase).Success && Regex.Match(server.MapFileName, @"(_:MP_Subway|MP_001)", RegexOptions.IgnoreCase).Success )
If you want different maps, just replace the MP_Subway and/or MP_001 with the map file names. Use | to separate each separate map. If you only want one map, like MP_Subway, make it @"MP_Subway", you don't need the ( and ) and | and the rest.
you need to give them your work (the X seconds activation counted as one warning), it is very good if someone does multi kill with rpg he does not get 2+ warnings.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by medicine-man*:

 

Hi and thanks for the insane limiter plug in.

 

I just wanted to ask if there is anyway to adjust the scroll speed of the rules code. I got a couple of inquires about how fast it scrolls off the chat box while others are playing.

 

Thanks again.

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

Originally Posted by stufz*:

 

I've modified this to use Rules only on Metro !

 

Replace first_check with this :

 

Code:

Regex.Match(kill.Weapon, @"m320|smaw|rpg", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("MP_Subway")
Hmmm, I cannot get this to work, ganja - any ideas ? I'm using hosted layer ... not sure what is wrong.

 

Your post is HERE*

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

Originally Posted by Mootart*:

 

You can't get it to send and email when Procon is at your hosting service and you can't get it to send email when your running Procon from your desktop...

 

It works fine for me with SSL set to true, port 587 and smtp.gmail.com. Sounds like you have a problem with the username or password. I would try it in Outlook

thanks bro.. i already sort it out yesterday... the problem is with gmail with spam protection something... but now its working again... thanks man... :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mootart*:

 

Hmmm, I cannot get this to work, ganja - any ideas ? I'm using hosted layer ... not sure what is wrong.

 

Your post is HERE*

First Check: Expression

Regex.Match(kill.Weapon, @"m320|smaw|rpg", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("MP_Subway")

Second Check: Code

if (limit.Data.issetBool(player.Name))

{

plugin.SendGlobalMessage(plugin.R("%p_n% has been banned 15mins using %w_n%, "));

plugin.PBBanPlayerWithMessage(PBBanDuration.Tempor ary, player.Name, 15, plugin.R("%p_n% you have been banned for 15 minutes for using %w_n%"));

limit.Data.unsetBool(player.Name);

}

 

int count = (int) limit.Activations(player.Name);

 

if (count == 1)

{

plugin.SendGlobalMessage(plugin.R("%p_n% do not use %w_n%!"));

plugin.KillPlayer(player.Name);

}

else if (count == 2)

{

plugin.SendGlobalMessage(plugin.R("%p_n% has been kicked for using %w_n%"));

plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n% you have been kicked for using %w_n%"));

 

if (!limit.Data.issetBool(player.Name))

limit.Data.setBool(player.Name, true);

}

 

this is the one i am usng.... and it works fine.... im using layer too.... you can post the error you are getting...

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

Originally Posted by Bl1ndy*:

 

Set limit to evaluate OnKill and action to None

 

Set first_check to this Expression

Code:

( true )
Set second_check to this Code

 

Code:

Dictionary<int, String> kmessage = new Dictionary<int, String>();
    kmessage.Add(6, "[SPREE] %p_n% with %r_x% kills!");
    kmessage.Add(8, "[RAMPAGE] %p_n% with %r_x% kills!");
    kmessage.Add(10, "[DOMINATION] %p_n% with %r_x% kills!");
    kmessage.Add(12, "[UNSTOPPABLE] %p_n% with %r_x% kills!");
    kmessage.Add(14, "[GODLIKE] %p_n% with %r_x% kills!");
    kmessage.Add(16, "[LEGENDARY] %p_n% with %r_x% kills!");
    
    Dictionary<int, String> vmessage = new Dictionary<int, String>();
    vmessage.Add(6, "%k_n% ended %v_n%'s killing spree!");
    vmessage.Add(8, "%k_n% ended %v_n%'s rampage!");
    vmessage.Add(10, "%k_n% ended %v_n%'s domination!");
    vmessage.Add(12, "%k_n% ended %v_n%'s unstoppable kill streak!");
    vmessage.Add(14, "%k_n% ended %v_n%'s godlike kill streak!");
    vmessage.Add(16, "%k_n% ended %v_n%'s legendary kill streak!");

    List<int> vkeys = new List<int>(vmessage.Keys);
    List<int> kkeys = new List<int>(kmessage.Keys);

    vkeys.Sort(delegate(int left, int right) { return left.CompareTo(right)*-1; });
    kkeys.Sort(delegate(int left, int right) { return left.CompareTo(right)*-1; });

    int kcount = (int) limit.Spree(player.Name);
    int vcount = (limit.RoundData.issetInt(victim.Name))_ limit.RoundData.getInt(victim.Name): 0;
    
    for(int i = 0; i < vkeys.Count; i++)
        if (vcount >= vkeys[i])
        {   vcount = vkeys[i];

            String message = plugin.R(vmessage[vcount]);
            plugin.ConsoleWrite(message);
            plugin.SendGlobalMessage(message);
            limit.RoundData.unsetInt(victim.Name);
            break;
        }

    for(int i = 0; i < kkeys.Count; i++)
        if (kcount == kkeys[i])
        {
            String message = plugin.R(kmessage[kcount]);
            plugin.ConsoleWrite(message);
            plugin.SendGlobalMessage(message);
            limit.RoundData.setInt(killer.Name, kcount);
            break;
        }
    
    return false;
Is it possible to only activate this when the server rotation is on a TDM map? Cause i don't want players camping on Rush to get a killstreak. Thanks!
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

Is it possible to only activate this when the server rotation is on a TDM map? Cause i don't want players camping on Rush to get a killstreak. Thanks!

change first check to

 

Code:

( server.Gamemode == "TeamDeathMatch0" )
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

you need to give them your work (the X seconds activation counted as one warning), it is very good if someone does multi kill with rpg he does not get 2+ warnings.

That's right, I forgot about that.

 

@dknight903, take a look at this thread. You should incorporate some of the code from there as well to avoid accidentally triggering multiple punishments for a multiple kill:

 

All Activations In 5 Seconds Count As One*

 

i need a rule for specific weapons only, else they would be killed. can someone help me. thanks in advance

Look at these two examples:

 

Knife Only Server*

 

Pistol Only Server*

 

Change the KickPlayer to KillPlayer and replace the reason string with the number 3 (for 3 seconds delay, necessary for correct operation).

 

Weapon names are in your procon/Configs/BF3.def file.

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

Originally Posted by QUACK-Major-Pain*:

 

Looked through many pages and I think this was asked, but can frag rounds for usas be restricted?

 

Like: Regex.Match(kill.Weapon, @"m320|smaw|usas-12|rpg", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("MP_Subway")

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

Originally Posted by micovery*:

 

Looked through many pages and I think this was asked, but can frag rounds for usas be restricted?

 

Like: Regex.Match(kill.Weapon, @"m320|smaw|usas-12|rpg", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("MP_Subway")

It all depends if the servers sends the Kill weapon details with that information. Given the current (sad) state of weapon names in the protocol, I doubt server would send that info. Server probably just sends "usas-12" as the weapon without saying the kind of round ... Anyway, someone who has that gun, should try it out.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Looked through many pages and I think this was asked, but can frag rounds for usas be restricted?

I don't think so. With respect to weapon/kit/ammo limits, if you can't find it's name in procon/Configs/BF3.defs, it's not something you can test for.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mootart*:

 

This limit will activate for players that exceed a certain Kpm value during the round. In this example the action being taken is Kick, but you may set it to any action you want.

 

 

Set limit to evaluate OnInterval, and set action to Kick

 

Set first_check to this Expression:

 

Code:

( player.KpmRound > 30 && (player.TimeRound/60) > 5 )
Note that for sanity reasons, I have put an extra check to make sure that the player has been playing in the current round for at least 5 minutes. That way the Kpm measure has some time to stabilize itself, before a kick based on Kpm can be considered.

 

You may change the values being checked in the Expression as you see fit.

Hi micovery i was trying to use this but i cannot select OnInterval,

i can only select either OnIntervalplayer or OnIntervalserver

which one should i select and what value so i input on evaluation_interval?

 

thanks

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

Originally Posted by micovery*:

 

Hi micovery i was trying to use this but i cannot select OnInterval,

i can only select either OnIntervalplayer or OnIntervalserver

which one should i select and what value so i input on evaluation_interval?

 

thanks

Choose OnIntervalPlayers ... for the evaluation_interval ... that's in seconds. The round KPM value is constantly changing, you choose how often you want to do the check. With this, I'd say every three minutes is ok. (180 seconds).
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mootart*:

 

This limit will activate for players that exceed a certain Kpm value during the round. In this example the action being taken is Kick, but you may set it to any action you want.

 

 

Set limit to evaluate OnIntervalPlayers, and set action to Kick

Evaluation_Interval : 300 (5min 300secs)

 

Set first_check to this Expression:

 

Code:

( player.KpmRound > 30 )
Note that for sanity reasons, I have put an extra check to make sure that the player has been playing in the current round for at least 5 minutes. That way the Kpm measure has some time to stabilize itself, before a kick based on Kpm can be considered.

 

You may change the values being checked in the Expression as you see fit.

i make it like this....

 

is this correct? if not please let me know thank you so much.

also how do i compute the spm?

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

Originally Posted by micovery*:

 

i make it like this....

 

is this correct? if not please let me know thank you so much.

also how do i compute the spm?

Leave the original condition as is. It's a safety check, that will prevent the check if the player has been in the server for less than 5 minutes.

 

Remember ... that the evaluation_interval, even though you have it set to 5 minutes, may not coincide exactly with the time player joins the server.

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

Originally Posted by QUACK-Major-Pain*:

 

Would this be correct so to use only on metro conquest maps?

 

Regex.Match(kill.Weapon, @"m320|smaw|usas-12|rpg", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("mp_subway conquest")

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

Originally Posted by Mootart*:

 

Leave the original condition as is. It's a safety check, that will prevent the check if the player has been in the server for less than 5 minutes.

 

Remember ... that the evaluation_interval, even though you have it set to 5 minutes, may not coincide exactly with the time player joins the server.

so interval i set it to 180 and bring back this one

 

( player.KpmRound > 30 && (player.TimeRound/60) > 5 )

 

this is correct right...

what do you suggest for the KPM round should be?

the map is only metro. 24/7 no explosive with 48players.

 

thanks bro.

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

Originally Posted by Mootart*:

 

Would this be correct so to use only on metro conquest maps?

 

Regex.Match(kill.Weapon, @"m320|smaw|usas-12|rpg", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("mp_subway conquest")

Regex.Match(kill.Weapon, @"m320|smaw|rpg|usas-12", RegexOptions.IgnoreCase).Success && server.MapFileName.StartsWith("MP_Subway")

this one i use in metro which only on conquest.

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

Originally Posted by QUACK-Major-Pain*:

 

But it works on rush and TDM too, and trying to avoid it on those game modes.

Your line would work on any subway map.

 

I think I have to add on the end:

 

Code:

&& server.GameMode.StartsWith("Conquest")
But not sure if I have it correct.

Guess I will have to test it.

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

Originally Posted by PapaCharlie9*:

 

Posted a new example in this thread:

 

Insane Limits V0.8/R1: Squad Recruiter*

 

Excerpt from the description:

 

Would you like for players to join squads on your server? These two limits work together to enforce a squad-up policy called the "Insane Limits Draft".

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

Originally Posted by PapaCharlie9*:

 

But it works on rush and TDM too, and trying to avoid it on those game modes.

Your line would work on any subway map.

 

I think I have to add on the end:

 

Code:

&& server.GameMode.StartsWith("Conquest")
But not sure if I have it correct.

Guess I will have to test it.

Let's make sure I have the specification right. You want:

 

* Weapon kills of type: M320 or SMAW or RPG or USAS

* Only on Metro

* Only for Conquest

 

There are several ways to do this. I tend to prefer to use Regex.Match because it makes it easier to modify in the future if I want to add more modes or map names. Regex is also more forgiving of typos or lazy typing if you IgnoreCase (and that can be a problem if you need an exact match -- trade-offs). All that said, it's perfectly fine to do something like server.MapFileName == "MP_Subway" or server.Gamemode.StartsWith("..."). Those all do similar things, but with more restrictions.

 

This is the expression I would use:

Code:

( Regex.Match(kill.Weapon, @"(_:m320|smaw|rpg|usas)", RegexOptions.IgnoreCase).Success && server.MapFileName == "MP_Subway" && Regex.Match(server.Gamemode, @"Conquest", RegexOptions.IgnoreCase).Success )
The MapFileName is simplified to an exact match because we know exactly how to spell Metro in server-talk. If I wanted to include multiple maps or be lazy in how to spell the map name, I would use:

 

Code:

( Regex.Match(kill.Weapon, @"(_:m320|smaw|rpg|usas)", RegexOptions.IgnoreCase).Success && Regex.Match(server.MapFileName, @"(_:mp_subway)", RegexOptions.IgnoreCase && Regex.Match(server.Gamemode, @"Conquest", RegexOptions.IgnoreCase).Success )
That's more than is necessary for a single map name, but sets you up to very easily add another map name with a vertical bar | and the other name. For example, to add Bazaar, do this:

 

Code:

( Regex.Match(kill.Weapon, @"(_:m320|smaw|rpg|usas)", RegexOptions.IgnoreCase).Success && Regex.Match(server.MapFileName, @"(_:mp_subway[b]|mp_001[/b])", RegexOptions.IgnoreCase && Regex.Match(server.Gamemode, @"Conquest", RegexOptions.IgnoreCase).Success )
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Mootart*:

 

Doesn't matter much right now.

There stupid patch won't even install.

Keep getting error on 2 computers.

Meleemissile S3 s3meleemissile2.playerstats.net

server is running smooth if still having problem with pb use pb console and type pb_sv_restrictions 0 for the mean time. while dice and pb sorting things out.. Default is 1

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

Originally Posted by QUACK-Major-Pain*:

 

My issue isn't with pb.

Downloads patch, and tries to install, and get install error.

Same on my sons pc.

 

I tried doing repair install but same error.

 

Deleted the game and trying to reinstall.

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

Originally Posted by ango*:

 

... some wishes :smile:

 

- a limit that start a random map of an existing maplist.txt, after the daily server restart.

 

- a simple punisher limit. Only with the !punish and !forgive command after a teamkill. The teamkiller should be killed by an admin.

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

Originally Posted by Mootart*:

 

My issue isn't with pb.

Downloads patch, and tries to install, and get install error.

Same on my sons pc.

 

I tried doing repair install but same error.

 

Deleted the game and trying to reinstall.

yeah i heard that issue with some of our members.. will try to scout some information for you bro... will let you know.
* 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.

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.




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