ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 Originally Posted by Mootart*: all in same check1 (code) and make : returne true; with a mail function where is the code sir? icannot see the mail code.. where did you insert? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 Originally Posted by QUACK-Major-Pain*: Set the action to Mail in your limit settings. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 Originally Posted by AssassinX*: Can you make a team scrambler without actually scrambling the admins? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 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
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 Originally Posted by PapaCharlie9*: Please see this thread if you are interested: Insane Limits: Need testers for Kick for VIP command* Thanks! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 Originally Posted by QUACK-Major-Pain*: Isn't there already a tweet functionality built into v8?There is but I am not sure if the code is setup to activate the tweet function. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 Originally Posted by PapaCharlie9*: Can you make a team scrambler without actually scrambling the admins?It's possible to do with Insane Limits, yes. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 23, 2012 Author Share Posted February 23, 2012 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).SuccessSet 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
ImportBot Posted February 24, 2012 Author Share Posted February 24, 2012 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 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 24, 2012 Author Share Posted February 24, 2012 Originally Posted by PapaCharlie9*: [17:46:37 84] [insane Limits] Thread(enforcer): EXCEPTION: Timeout(30 seconds) expired, while waiting for indices_handle within getMapIndicesSyncAre 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
ImportBot Posted February 24, 2012 Author Share Posted February 24, 2012 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 1See 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 Originally Posted by pharbehind*: What are the weapon codes for: 1) defib 2) repair tool 3) eod bot We wanna allow those to our knives and pistol server * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 Originally Posted by Bl1ndy*: Added a video example to the original post. Could someone turn this in a separate topic? I don't have the permission. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 Originally Posted by QUACK-Major-Pain*: NVM - found it - missing a " * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 Originally Posted by PapaCharlie9*: Code: String message = admin_name + command + "ed " + actual_name + "(" + player.LastChat + ")"; You are missing the final double quote. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 25, 2012 Author Share Posted February 25, 2012 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
ImportBot Posted February 26, 2012 Author Share Posted February 26, 2012 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
ImportBot Posted February 26, 2012 Author Share Posted February 26, 2012 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
ImportBot Posted February 26, 2012 Author Share Posted February 26, 2012 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
ImportBot Posted February 26, 2012 Author Share Posted February 26, 2012 Originally Posted by QUACK-Major-Pain*: Thanks - works great. Might shuffle the message around a bit later. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 26, 2012 Author Share Posted February 26, 2012 Originally Posted by Bl1ndy*: This clip is a better example. If we are able to even get a little bit close to that experience we struck gold. * Restored post. It could be that the author is no longer active. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.