Jump to content

Insane Limits - Examples


ImportBot

Recommended Posts

  • Replies 1.4k
  • Created
  • Last Reply

Originally Posted by Singh400*:

 

Was wondering if action was set to Twitter, if it would be posted.

 

Looking to Tweet:

 

(kick) - playername was kicked for whatever reason

or

(tban) - playername was banned for x minutes for whatever reason

or

(ban) - playername was banned for what ever reason

 

* of course I would have to add "ban" to reasons.

Isn't there already a tweet functionality built into v8?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by EntraVenuS*:

 

This limit will check for how many times a player made non-pistol kills. On the first kill, it will send a warning on chat, on the second kill, it will kick the player.

 

 

Set limit to evaluate OnKill, set action to None

 

 

Set first_check to this Expression:

 

Code:

! Regex.Match(kill.Weapon, @"(M1911|M9|M93R|Taurus|MP412REX|MP443|Glock)", RegexOptions.IgnoreCase).Success
Set second_check to this Code:

 

Code:

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

     if (count == 1)
         plugin.SendGlobalMessage(plugin.R("%p_n%, this is a pistol only server, do not use %w_n% again! Next time kick"));
     else if (count > 1)
         plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for using %w_n% on pistol only server"));
     
     return false;
You can use this limit as a template for restricting any weapon you want. Just change the Expression in the first_check depending on what weapon you want to restrict. The way it is right now, it will activate for any Non-Pistol ... that is because of the Negation symbol "!" at the begining of the expression. If you remove, the Negation symbol "!", it becomes a positive check. So you could make it activate for certain weapons, and restrict those only, while allowing the rest.
Can someone tell me where im going wrong? i want to limit the use of rpg/smaw so i used the above code and changed the weapon names but nothing seemed to happen.

heres my code

 

 

Set first_check to this Expression

Regex.Match(kill.Weapon, @"(RPG-7|SMAW)", RegexOptions.IgnoreCase).Success

 

 

Set second_check to this Code

 

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

 

if (count == 1)

plugin.SendGlobalMessage(plugin.R("%p_n%, No RGP ON Infantry, do not use %w_n% again! Next time kick"));

else if (count > 1)

plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for using %w_n% RGP/Smaw On Infantry"));

 

return false;

 

Ok as i have this to work does anyone know how i can make this 2 warnings and kick on the 3rd time just in case someone gets killed by you in a tank when you rpg the tank

 

 

thanks in advance

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

Originally Posted by ango*:

 

Sorry, that was my mistake. I didn't test that one. I've corrected it below, give this a try:

Code:

int maxNextLevels = 18; // Change this to the number of maps in your rotation

String kRandomized = "ango_random";
int randomLevels = -1;
if (server.Data.issetInt(kRandomized)) randomLevels = server.Data.getInt(kRandomized);

if (randomLevels == 0) {
	if (server.TimeUp < 2*60) return false; // Prevent repetition while in the critical time period
	// We're done, forget the counter
	server.Data.unsetInt(kRandomized);
	plugin.ConsoleWrite("^b[Map Randomizer]^n: Done!");
	return false;
} else if (randomLevels == -1) {
	// Generate a random number
	Random rand = new Random();
	randomLevels = rand.Next(maxNextLevels);
}

if (randomLevels > 0) {
	// Jump to a random level by setting the next map index
	plugin.ServerCommand("mapList.setNextMapIndex", randomLevels.ToString());
	plugin.ServerCommand("mapList.runNextRound");
	plugin.ConsoleWrite("^b[Map Randomizer]^n: jumped to map index " + randomLevels);
	randomLevels = 0;
}

// Prevent repetition of the runNextRound command
server.Data.setInt(kRandomized, randomLevels);

return false;
Hi PapaCharlie9,

I´ve tested it again and got sometimes the following error:

 

[17:46:33 08] [insane Balancer] Requesting player list

[17:46:33 24] [insane Balancer] check state phase-1 started 24.02.2012 17:32:32

[17:46:33 24] [insane Balancer] Teams are balanced, going to wait state

[17:46:33 24] [insane Balancer] wait state re-started 24.02.2012 17:32:33

[17:46:37 84] [insane Limits] Thread(enforcer): EXCEPTION: Timeout(30 seconds) expired, while waiting for indices_handle within getMapIndicesSync

[17:46:38 36] [insane Limits] Thread(enforcer): [Map Randomizer]: jumped to map index 14

[17:46:49 31] [insane Balancer] check state started 24.02.2012 17:32:49

[17:46:49 31] [insane Balancer] check state phase-0 started 24.02.2012 17:32:49

[17:46:49 31] [insane Balancer] Requesting player list

 

After some restart of our game server the limit is working fine now.

I think you can add this one to the list of limits.

 

Thank you verry much for this nice one :smile:

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

Originally Posted by PapaCharlie9*:

 

[17:46:37 84] [insane Limits] Thread(enforcer): EXCEPTION: Timeout(30 seconds) expired, while waiting for indices_handle within getMapIndicesSync

Are you using 0.0.0.8 patch 3? If not, updating to patch 3 should fix that problem. If you are using patch 3, micovery will need to help you, that is an Insane Limits error message. In the mean time, try increasing your wait_timeout in the "1. Settings" section of the Plugin Settings for Insane Limits. I use 61 and don't see that error.

 

And you are welcome!

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

Originally Posted by PapaCharlie9*:

 

Yes this does work i stopped plugin and restarted it and all is fine just need to know how to make 2 warnings then kick instead of 1

See the examples in this thread:

All Activations

 

Post #14 in that thread is close to what you want. Change the Regex "M67" grenade line to = " ", and change the list of weapons in the Regex to what you want, delete the warning == 2 clause and change warnings >= 3 to warnings >= 2 and fill in that code with your kick.

 

Nevermind, I did it for you, post #27 in that thread:

 

myrcon.net/...insane-limits-warn-then-punish-pattern#entry23529

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

Originally Posted by QUACK-Major-Pain*:

 

Set limit to evaluate OnAnyChat, set action to None.

 

Set first_check to this Code:

Code:

String txt = player.LastChat;

/* Remove the first character if it is "/" */

if (txt.Length > 0 && txt[0] == '/' )
    txt = txt.Substring(1);

/* Exit if text is not prefixed with "/", "!", "@", or "_" */ 
if (!plugin.IsCommand(txt))
    return false;

txt = plugin.ExtractCommand(txt);

List<String> commands = new List<String>();
commands.Add("kick");
commands.Add("tban");
commands.Add("kill");

List<String> words = new List<String>(Regex.Split(txt.Trim(), @"\s+"));

/* Exit if not enough words */
if ( words.Count < 2)
    return false;

/* Get the command being executed */
String command = words[0];

/* Exit if command is not in list */
if (!commands.Contains(command)) 
    return false;

/* Determine the player being kicked/banned/killed */

String typed_name = words[1];
String actual_name = plugin.BestPlayerMatch(words[1]);

if (actual_name == null)
    actual_name = "Unknown";

String admin_name = player.Name;
String message = "[%date% - %time%] " + admin_name + " > " +  command + " " + player.LastChat + " " + typed_name + " (Actual Name: " + actual_name + ")";

plugin.Log("Logs/InsaneLimits_AAT.log", plugin.R(message));
Please note: I did not code this, Micovery did. He kindly coded it for me when I asked. I've modified it to suits my needs. Thanks again Micovery :cool:
Using the above code, I want to only tweet the message and not log it.

 

Would I:

 

Change

 

Code:

plugin.Log("Logs/InsaneLimits_AAT.log", plugin.R(message));
to

 

Code:

plugin.Tweet(plugin.R(message));
or would I use Tweet action, and remove the last line of code and use "(plugin.R(message))" as the tweet message?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by QUACK-Major-Pain*:

 

NVM - above code doesn't seem to do anything.

 

Never gets triggered.

 

Where does it check to see if the player typing the command is an admin?

Wouldn't it be triggered by anyone typing it?

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

Originally Posted by Bl1ndy*:

 

Hi,

 

Games like CS:S, Halo 3 etc. all have 1 mode that people really enjoy and never gets old. It's called Zombie Infection. After checking with modders that work with Insane Limits they confirmed this was possible to do. So i hereby hope someone picks up this idea and turns it into a new gametype for BF3.

 

SPECIFICATIONS:

 

Limit Name: BF3 Zombie Infection

Gametype to run on: Team-Deathmatch

 

LIMIT EXAMPLE:

 

On roundStart ALL players will be moved into the US team, after 30 sec one player will be moved to the RU team with a global message saying %p_n% turned into a Zombie, the Infection has begun!. The first Zombie now has X amount of time to infect all US players switching them to RU team aswell. When everyone becomes infected the round ends and restarts. If there are survivors on the US team a global message will appear Players X Survived the Infection! Get ready for the next round!.

 

VIDEO EXAMPLE:

 

 

 

 

WEAPON RESTRICTIONS:

 

* If a zombie gets a kill with anything other than a knife, kill on spawn for X minutes (penalty box).

 

* If a human gets a kill with anything other than a pistol, kill on spawn for X minutes (penalty box), but he still stays human.

 

This should be a good base to begin writing an example for. If you have any other suggestions please post them so we can turn this into something epic.

 

May the scripting BEGIN! :cool:

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

Originally Posted by QUACK-Major-Pain*:

 

Hi,

 

Games like CS:S, Halo 3 etc. all have 1 mode that people really enjoy and never gets old. It's called Zombie Infection. After checking with modders that work with Insane Limits they confirmed this was possible to do. So i hereby hope someone picks up this idea and turns it into a new gametype for BF3.

 

SPECIFICATIONS:

 

Limit Name: BF3 Zombie Infection

Gametype to run on: Team-Deathmatch

 

LIMIT EXAMPLE:

 

On roundStart ALL players will be moved into the US team, after 30 sec one player will be moved to the RU team with a global message saying %p_n% turned into a Zombie, the Infection has begun!. The first Zombie now has X amount of time to infect all US players switching them to RU team aswell. When everyone becomes infected the round ends and restarts. If there are survivors on the US team a global message will appear Players X Survived the Infection! Get ready for the next round!.

 

WEAPON RESTRICTIONS:

 

* If a zombie gets a kill with anything other than a knife, kill on spawn for X minutes (penalty box).

 

* If a human gets a kill with anything other than a pistol, kill on spawn for X minutes (penalty box), but he still stays human.

 

This should be a good base to begin writing an example for. If you have any other suggestions please post them so we can turn this into something epic.

 

May the scripting BEGIN! :cool:

Cool idea.

 

- Any autobalance would have to be disabled.

- on a 32 slots server, teams would be 31-1

- uninfected shot and moved to infected team

- when 1 uninfected left, announnce finally played as winner.

- 30 secs later restart round and do it again.

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

Originally Posted by PapaCharlie9*:

 

Using the above code, I want to only tweet the message and not log it.

 

Would I:

 

Change

 

Code:

plugin.Log("Logs/InsaneLimits_AAT.log", plugin.R(message));
to

 

Code:

plugin.Tweet(plugin.R(message));
or would I use Tweet action, and remove the last line of code and use "(plugin.R(message))" as the tweet message?
You can do it either way, but you are much more limited in what you can do with the Action message. It would have to all come from Simple Replacements. That said, just using:

 

%p_fn% > %lc%

 

as the Action Tweet message would post the entire chat line typed in by the player and his name.

 

Also, if you go the Action route, replace the plugin.Log line with "return true;".

 

Personally, I'd just change the code to use plugin.Tweet.

 

EDIT: Yes, as written, it would tweet anyone who types in chat that looks like a command. I actually think that's a good thing. I'd want to see what non-admins think they can do and maybe adjust my scrolling spam messages to better inform.

 

However, if you want to limit it to admins only, you can steal code from one of my limits that has admin in-game commands, like Squad Recruiter or the VIP Kicker. Look for !plugin.isInList(player.Name, admins) and !plugin.isInList(tag, admin_tags).

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

Originally Posted by PapaCharlie9*:

 

Cool idea.

 

- Any autobalance would have to be disabled.

- on a 32 slots server, teams would be 31-1

- uninfected shot and moved to infected team

- when 1 uninfected left, announnce finally played as winner.

- 30 secs later restart round and do it again.

On TDM max players is 24, so 23 vs 1. Even that seems a bit impossible, so how about starting with 2 zombies that can rez each other?

 

Also, I'd turn friendly fire on and set to ultra hard core so that 2 shots with a pistol will kill.

 

Human players would have to agree to do no rezzing or med packs (no way to enforce automatically).

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

Originally Posted by QUACK-Major-Pain*:

 

You can do it either way, but you are much more limited in what you can do with the Action message. It would have to all come from Simple Replacements. That said, just using:

 

%p_fn% > %lc%

 

as the Action Tweet message would post the entire chat line typed in by the player and his name.

 

Also, if you go the Action route, replace the plugin.Log line with "return true;".

 

Personally, I'd just change the code to use plugin.Tweet.

 

EDIT: Yes, as written, it would tweet anyone who types in chat that looks like a command. I actually think that's a good thing. I'd want to see what non-admins think they can do and maybe adjust my scrolling spam messages to better inform.

 

However, if you want to limit it to admins only, you can steal code from one of my limits that has admin in-game commands, like Squad Recruiter or the VIP Kicker. Look for !plugin.isInList(player.Name, admins) and !plugin.isInList(tag, admin_tags).

Thanks.

 

I went with the plugin.Tweet command and I think it worked.

 

Now I am trying to change the message line and I get an error.

 

Code:

String message = admin_name + command + "ed " + actual_name + "(" + player.LastChat + ");
Can you see where I went wrong?

 

Error:

 

[12:38:45 21] [insane Limits] ERROR: 1 error compiling Code

[12:38:45 21] [insane Limits] ERROR: (CS1010, line: 62, column: 99): Newline in constant

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

Originally Posted by QUACK-Major-Pain*:

 

Got it working now with a few extra edits,

 

Code:

String txt = player.LastChat;

/* Remove the first character if it is "/" */

if (txt.Length > 0 && txt[0] == '/' )
    txt = txt.Substring(1);

/* Exit if text is not prefixed with "/", "!", "@", or "_" */ 
if (!plugin.IsCommand(txt))
    return false;

txt = plugin.ExtractCommand(txt);

List<String> commands = new List<String>();
commands.Add("kick");
commands.Add("k");
commands.Add("tban");
commands.Add("ban");
commands.Add("b");

List<String> words = new List<String>(Regex.Split(txt.Trim(), @"\s+"));

/* Exit if not enough words */
if ( words.Count < 2)
    return false;

/* Get the command being executed */
String command = words[0];

/* Exit if command is not in list */
if (!commands.Contains(command)) 
    return false;

/* Determine the player being kicked/banned/killed */

String typed_name = words[1];
String actual_name = plugin.BestPlayerMatch(words[1]);

if (actual_name == null)
    actual_name = "Unknown";
	
if ((command == "k") || (command == "kick"))
	command = "kicked";
	
if (command == "tban")
	command = "tbanned";
	
if ((command == "b") || (command == "ban"))
	command = "banned";

String admin_name = player.Name;
String message = admin_name + " " + command + " " + actual_name + " (" + player.LastChat + ")";

plugin.Tweet(plugin.R(message));
Would have preferred to extract the reason out of the chat, but seemed to be a bit of a hassle so it's fine the way it was.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by pharbehind*:

 

Can someone please tell me what the weapon keys are for Defib, EOD Bot and Repair tool?

 

Also, can I request a Chat Spam limit that will only display depending on the player count?

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

Originally Posted by Bl1ndy*:

 

Can someone please tell me what the weapon keys are for Defib, EOD Bot and Repair tool?

 

Also, can I request a Chat Spam limit that will only display depending on the player count?

Defib,Repair. EOD-Bot does not have his own key yet. I believe it counts as "Death".
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by pharbehind*:

 

Ah, ok thanks.

 

Any way to tie a player count condition to the Chat Spam? I have special rules on my server when there are less than 16 and 32 and want to have set sets of chat spam...

 

one for 0-15, another for 16-31, and another for 32-64

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

Originally Posted by PapaCharlie9*:

 

This version should put the reason in the message, instead of LastChat:

 

Code:

String txt = player.LastChat;

/* Remove the first character if it is "/" */

if (txt.Length > 0 && txt[0] == '/' )
    txt = txt.Substring(1);

/* Exit if text is not prefixed with "/", "!", "@", or "_" */ 
if (!plugin.IsCommand(txt))
    return false;

txt = plugin.ExtractCommand(txt);

List<String> commands = new List<String>();
commands.Add("kick");
commands.Add("k");
commands.Add("tban");
commands.Add("ban");
commands.Add("b");

List<String> words = new List<String>(Regex.Split(txt.Trim(), @"\s+"));

/* Exit if not enough words */
if ( words.Count < 2)
    return false;

/* Get the command being executed */
String command = words[0];

/* Exit if command is not in list */
if (!commands.Contains(command)) 
    return false;

/* Determine the player being kicked/banned/killed */

String typed_name = words[1];
String actual_name = plugin.BestPlayerMatch(words[1]);

if (actual_name == null)
    actual_name = "Unknown";
	
if ((command == "k") || (command == "kick"))
	command = "kicked";
	
if (command == "tban")
	command = "tbanned";
	
if ((command == "b") || (command == "ban"))
	command = "banned";

String reason = "Reason:";
for (int i = 2; i < words.Count; ++i) reason = reason + " " + words[i];

String admin_name = player.Name;
String message = admin_name + " " + command + " " + actual_name + " (" + reason + ")";

plugin.Tweet(plugin.R(message));
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Ah, ok thanks.

 

Any way to tie a player count condition to the Chat Spam? I have special rules on my server when there are less than 16 and 32 and want to have set sets of chat spam...

 

one for 0-15, another for 16-31, and another for 32-64

Are you using my Chat Message Spambot_* If so, I'll post a reply in that thread on how to do this.
* 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.