ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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: ExpressionRegex.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
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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
ImportBot Posted February 13, 2012 Author Share Posted February 13, 2012 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 advanceLook 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 Originally Posted by Mootart*: papacharlie i have a question. where can you see the KPM on the battlelog? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 Originally Posted by QUACK-Major-Pain*: You can't - you have to calculate it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 Originally Posted by Mootart*: You can't - you have to calculate it.but how does the insane limit can fetch the KPM on battlelog? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 Originally Posted by QUACK-Major-Pain*: Probably calculated in the coding. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 14, 2012 Author Share Posted February 14, 2012 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
ImportBot Posted February 15, 2012 Author Share Posted February 15, 2012 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
ImportBot Posted February 15, 2012 Author Share Posted February 15, 2012 Originally Posted by QUACK-Major-Pain*: Doesn't matter much right now. There stupid patch won't even install. Keep getting error on 2 computers. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 15, 2012 Author Share Posted February 15, 2012 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.netserver 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
ImportBot Posted February 15, 2012 Author Share Posted February 15, 2012 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
ImportBot Posted February 15, 2012 Author Share Posted February 15, 2012 Originally Posted by ango*: ... some wishes - 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
ImportBot Posted February 15, 2012 Author Share Posted February 15, 2012 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.