ImportBot Posted April 30, 2013 Author Share Posted April 30, 2013 Originally Posted by PapaCharlie9*: Hello, i had an idea here the other day, not sure if it has been asked before, but here it goes: Is it possible to create a limit, that will save an away message set with f.eks !away [msg], that tells players who write your name in chat that you are away, and that you will respond as soon as you get back? And !back when you are back. I would want the function for a list of my admins, so that the players will want to maybe wait until i get back instead of leaving the server... Hope i make myself clear(I'm Norwegian), if not just ask! It depends on what you mean by "away". If you mean left the server, that would be hard. If you mean still in the server but AFK, that would be easy. If you mean never in the server but watching Procon as an admin, that would be impossible. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 30, 2013 Author Share Posted April 30, 2013 Originally Posted by PapaCharlie9*: i dont know how huge of an undertaking this is but, is there anyone that can write up some code for a game of "tag" i found this plugin showthread....highlight=hunt* but it doesnt say it will work for bf3 the plugin i linked is basically what im looking for but without the use of a mysql or points essentially i would like to have a random person secretly picked at the start of a round,no one knows who it is. when that player is killed, a yell message apprears saying "john doe killed the billy bob, the profiled target" or something like that. That would be possible as a set of limits, but easier to do as a plugin. And lucky for you, there is a BF3 version of Currency: showthread....ed-06-06-2012)* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 1, 2013 Author Share Posted May 1, 2013 Originally Posted by TMiland*: It depends on what you mean by "away". If you mean left the server, that would be hard. If you mean still in the server but AFK, that would be easy. If you mean never in the server but watching Procon as an admin, that would be impossible. Hehe! I mean still in the server but AFK yes! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 1, 2013 Author Share Posted May 1, 2013 Originally Posted by IAF-SDS*: EDIT: I fixed the issue by combining the two versions below. Original post #1094 updated to include "team speak" pattern.Hey Papa, thanks for the update, but unfortunately "teamspeak" no longer worked while the "team speak" addition did, so I fixed that by combining the two versions of code you wrote as follows: Code: // Version 4 - Auto Chat Trigger Responder // You can add as many "else if (Regex.Match" lines as you want for different keywords. // // Chat Trigger for "teamspeak" (one word) info: if ( Regex.Match(player.LastChat, @"(_:^teamspeak|^ts[3]_|\s+teamspeak|\s+ts[3]_)", RegexOptions.IgnoreCase).Success ) { plugin.SendPlayerYell(player.Name, "XXX your TS message here", 15); } // Chat Trigger for "team speak" (two words) info: else if ( Regex.Match(player.LastChat, @"(_:^team[\s*]speak|^ts[3]_|\s+team[\s*]speak|\s+ts[3]_)", RegexOptions.IgnoreCase).Success ) { plugin.SendPlayerYell(player.Name, "XXX your TS message here", 15); } // Chat Trigger for "vent" info: else if ( Regex.Match(player.LastChat, @"(_:^vent|\s+vent)", RegexOptions.IgnoreCase).Success ) { plugin.SendPlayerYell(player.Name, "XXX your Vent message here", 15); } return false;You might want to update post #1094 again based on the relevant parts from my revision (has some redundancy in code). Works great. Thank you again Papa! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 1, 2013 Author Share Posted May 1, 2013 Originally Posted by BTFU_Maverick*: Ive tried searching for this but I cant seem to find it, and short of testing it I thought Id just ask: Can you write functions within a limit? e.g.: safe = CheckPlayer(BTFU_Maverick); function CheckPlayer(player_name) { //blah blah blah return true/false; } * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 1, 2013 Author Share Posted May 1, 2013 Originally Posted by Tomgun*: any help with my request about clan tag on noob prevention? myrcon.net/...insane-limits-requests#entry26490 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 2, 2013 Author Share Posted May 2, 2013 Originally Posted by starsky*: this just an idea is it possible to change map automatically after 30-60 minutes when server = 0 players. my thought is most the time. servers empty on a not liked map. until we work out the popular and most demanded maps. thanks in advance. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 2, 2013 Author Share Posted May 2, 2013 Originally Posted by shadow2k1*: That would be possible as a set of limits, but easier to do as a plugin. And lucky for you, there is a BF3 version of Currency: showthread....ed-06-06-2012)* thank but the author of that plugin is hinting that, that plugin is not what i think it does. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 4, 2013 Author Share Posted May 4, 2013 Originally Posted by PapaCharlie9*: Hehe! I mean still in the server but AFK yes! NOT TESTED, MAY NOT COMPILE Create a custom list called admin_list, set it to CaseInsensitive, add all of your admin's names to it. Create a limit that evaluates OnAnyChat, call it "Admin Away Commands", leave Action set to None. Set first_check to this Code: Code: /* Version 0.9/R1 */ bool isAdmin = plugin.isInList(player.Name, "admin_list"); Match away = Regex.Match(player.LastChat, @"^\s*!away\s+(.*)$", RegexOptions.IgnoreCase); Match back = Regex.Match(player.LastChat, @"^\s*!back", RegexOptions.IgnoreCase); String prefix = "AdminAwayName_"; String key = prefix + player.Name; if (isAdmin && away.Success) { String msg = away.Groups[1].Value; plugin.SendPlayerMessage(player.Name, "Your away message has been recorded: " + msg); plugin.ConsoleWrite("^b[Away]^n " + player.Name + " recorded away message: " + msg); plugin.Data.setString(key, msg); return false; } if (isAdmin && back.Success) { plugin.SendPlayerMessage(player.Name, "You are back, your message has been deleted!"); plugin.ConsoleWrite("^b[Away]^n " + player.Name + " is back!"); plugin.Data.unsetString(key); return false; } // Check if chat contains an admin's name String[] words = Regex.Split(player.LastChat, @"[^\w]"); if (words == null || words.Length == 0) return false; foreach (String word in words) { PlayerInfoInterface admin = plugin.GetPlayer(word, true); if (admin != null && plugin.isInList(admin.Name, "admin_list")) { key = prefix + admin.Name; if (plugin.Data.issetString(key)) { // Send admin's away message to player plugin.SendPlayerMessage(player.Name, plugin.Data.getString(key)); plugin.ConsoleWrite("^b[Away]^n " + admin.Name + " away message sent to " + player.Name); break; } } } return false;EDIT: hopefully fixed compiler error * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 4, 2013 Author Share Posted May 4, 2013 Originally Posted by PapaCharlie9*: You might want to update post #1094 again based on the relevant parts from my revision (has some redundancy in code).Updated, thanks. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 4, 2013 Author Share Posted May 4, 2013 Originally Posted by PapaCharlie9*: Ive tried searching for this but I cant seem to find it, and short of testing it I thought Id just ask: Can you write functions within a limit? e.g.: safe = CheckPlayer(BTFU_Maverick); function CheckPlayer(player_name) { //blah blah blah return true/false; } You can create delegates inside of a limit, but not arbitrary functions. Two handy delegates are Action and Converter. The first gives you a void function with a single parameter, the second a function with one parameter that returns a result. For example: Code: Converter<String, bool> CheckPlayer = delegate(String player_name) { ... return true; }; ... if (CheckPlayer(player.Name)) { ... } * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 4, 2013 Author Share Posted May 4, 2013 Originally Posted by PapaCharlie9*: any help with my request about clan tag on noob prevention? myrcon.net/...insane-limits-requests#entry26490 I'm leaving that one up to Hexacanon. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 5, 2013 Author Share Posted May 5, 2013 Originally Posted by shadow2k1*: is anyone available to help me out with a "tag" rule? noting fancy just a plain, "tag your it" type of thing. a random person is picked at start of map and then when he is killed another random person is picked? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 5, 2013 Author Share Posted May 5, 2013 Originally Posted by PapaCharlie9*: is anyone available to help me out with a "tag" rule? noting fancy just a plain, "tag your it" type of thing. a random person is picked at start of map and then when he is killed another random person is picked? That sounds like fun. It will have to go on my to-do list, along with the "guard the VIP" request as I'm am too busy right now to work on it. Someone else might have time to write this up for you, though. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 6, 2013 Author Share Posted May 6, 2013 Originally Posted by shadow2k1*: That sounds like fun. It will have to go on my to-do list, along with the "guard the VIP" request as I'm am too busy right now to work on it. Someone else might have time to write this up for you, though.thanks also does anyone have or is it possible to have "next map" rule where you dont have to load the name of the map in manually in the code, it knows what map it is based of the server... somehow? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 6, 2013 Author Share Posted May 6, 2013 Originally Posted by TMiland*: NOT TESTED, MAY NOT COMPILE Create a custom list called admin_list, set it to CaseInsensitive, add all of your admin's names to it. Create a limit that evaluates OnAnyChat, call it "Admin Away Commands", leave Action set to None. Set first_check to this Code: Code: /* Version 0.9/R1 */ bool isAdmin = plugin.isInList(player.Name, "admin_list"); Match away = Regex.Match(player.LastChat, @"^\s*!away\s+(.*)$", RegexOptions.IgnoreCase); Match back = Regex.Match(player.LastChat, @"^\s*!back", RegexOptions.IgnoreCase); String prefix = "AdminAwayName_"; String key = prefix + player.Name; if (isAdmin && away.Success) { String msg = away.Groups[1].Value; plugin.SendPlayerMessage(player.Name, "Your away message has been recorded: " + msg); plugin.ConsoleWrite("^b[Away]^n " + player.Name + " recorded away message: " + msg); plugin.Data.setString(key, msg); return false; } if (isAdmin && back.Success) { plugin.SendPlayerMessage(player.Name, "You are back, your message has been deleted!"); plugin.ConsoleWrite("^b[Away]^n " + player.Name + " is back!"); plugin.Data.unsetString(key); return false; } // Check if chat contains an admin's name String[] words = Regex.Split(player.LastChat, @"[^\w]"); if (words == null || words.Length == 0) return false; foreach (String word in words) { if (plugin.isInList(word, "admin_list") { PlayerInfoInterface admin = plugin.GetPlayer(word, true); if (admin == null) continue; key = prefix + admin.Name; if (plugin.Data.issetString(key)) { // Send admin's away message to player plugin.SendPlayerMessage(player.Name, plugin.Data.getString(key)); plugin.ConsoleWrite(""^b[Away]^n " + admin.Name + " away message sent to " + player.Name); break; } } } return false; Thank you! You where right, i got this error:Code: [19:25:58 05] [Insane Limits] Compiling Limit #4 - Admin Away Commands - OnAnyChat [19:25:58 05] [Insane Limits] WARNING: first_check_code is empty for Limit #4 [19:26:13 64] [Insane Limits] Thread(fetch): DONE inserting 1 new players, 0 still in queue, took a total of 4 secs [19:27:08 49] [Insane Limits] Compiling Limit #4 - Admin Away Commands - OnAnyChat [19:27:08 53] [Insane Limits] ERROR: 1 error compiling Code [19:27:08 53] [Insane Limits] ERROR: (CS1010, line: 56, column: 98): Newline in constant [19:27:21 01] [Insane Limits] Thread(settings): Compiling Limit #4 - Admin Away Commands - OnAnyChat [19:27:21 03] [Insane Limits] Thread(settings): ERROR: 1 error compiling Code [19:27:21 03] [Insane Limits] Thread(settings): ERROR: (CS1010, line: 56, column: 98): Newline in constant [19:28:07 71] [Server Kills] andreielena has just ended his life with a Suicide! R.I.P Soldier!Damn, i wish i had your brain * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 6, 2013 Author Share Posted May 6, 2013 Originally Posted by TMiland*: New request: What i wanted to ask, is if it was possible to limit the use of tank and apc on city maps CQ and RUSH when there is less than 16 players? I have been trying to limit this manually, but it is just too much work, and players tend to leave when i am starting the server for the day. And i found this: showthread....-Simple-punish* Is that still working? Well, i need it to limit vehicle whoring on Air Maps, especially the JETS on infantry, they are just too much! Thanks in advance! :-) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 7, 2013 Author Share Posted May 7, 2013 Originally Posted by BTFU_Maverick*: You can create delegates inside of a limit, but not arbitrary functions. Two handy delegates are Action and Converter. The first gives you a void function with a single parameter, the second a function with one parameter that returns a result. Thats exactly what I was looking for. That should do quite nice in rewriting one of our admin scripts. Thanks PC9. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 8, 2013 Author Share Posted May 8, 2013 Originally Posted by shadow2k1*: New request: What i wanted to ask, is if it was possible to limit the use of tank and apc on city maps CQ and RUSH when there is less than 16 players? I have been trying to limit this manually, but it is just too much work, and players tend to leave when i am starting the server for the day. And i found this: showthread....-Simple-punish* Is that still working? Well, i need it to limit vehicle whoring on Air Maps, especially the JETS on infantry, they are just too much! Thanks in advance! :-) there is a post here by papacharlie that limits vehicles based on modeif you look for it, its in the 100 and on page anything before page 100 you wont find it here check this out myrcon.net/...insane-limits-requests#entry26436 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 9, 2013 Author Share Posted May 9, 2013 Originally Posted by TMiland*: there is a post here by papacharlie that limits vehicles based on mode if you look for it, its in the 100 and on page anything before page 100 you wont find it here check this out myrcon.net/...insane-limits-requests#entry26436 I don't want the server settings changed, that will make the server show as custom... E.g no players :/ * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 9, 2013 Author Share Posted May 9, 2013 Originally Posted by p19blo*: been seeing alot of base raping on my servers and im looking for a !votenukeus/ru option similar to the voteban where a % is needed. i found showthread....CQ-Rush)/page7* but not sure if thei is what im after or will work on the latest limits. Any help would be appreciated edit found this showthread....light=votenuke* 2nd edit Although its kind of what im looking for im not clued up on to make it work for votenuke ru/ us with 60% being the accepted vote. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 9, 2013 Author Share Posted May 9, 2013 Originally Posted by shadow2k1*: I don't want the server settings changed, that will make the server show as custom... E.g no players :/then you need to set your server to infantry only.im plagued with the same issue and these are the only ways i have found to do this. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 10, 2013 Author Share Posted May 10, 2013 Originally Posted by PapaCharlie9*: Thank you! You where right, i got this error:Original post edited, hopefully will be fixed now. Give it a try:myrcon.net/...insane-limits-requests#entry26501 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 10, 2013 Author Share Posted May 10, 2013 Originally Posted by TMiland*: Original post edited, hopefully will be fixed now. Give it a try: myrcon.net/...insane-limits-requests#entry26501 Thanks PapaCharlie9, but unfortunately i get this error:Code: 07:51:51 19] [Insane Limits] Compiling Limit #4 - Admin Away Commands - OnAnyChat [07:51:51 25] [Insane Limits] ERROR: 1 error compiling Code [07:51:51 25] [Insane Limits] ERROR: (CS1026, line: 49, column: 57): ) expected [07:52:04 28] [Insane Limits] Thread(settings): Compiling Limit #4 - Admin Away Commands - OnAnyChat [07:52:04 33] [Insane Limits] Thread(settings): ERROR: 1 error compiling Code [07:52:04 33] [Insane Limits] Thread(settings): ERROR: (CS1026, line: 49, column: 57): ) expected * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 11, 2013 Author Share Posted May 11, 2013 Originally Posted by PapaCharlie9*: Thanks PapaCharlie9, but unfortunately i get this error:Whoops. Fixed that one too. Give it another try. We'll get there eventually! myrcon.net/...insane-limits-requests#entry26501 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 11, 2013 Author Share Posted May 11, 2013 Originally Posted by TMiland*: Whoops. Fixed that one too. Give it another try. We'll get there eventually! myrcon.net/...insane-limits-requests#entry26501 That works! Thank you so much! Is it possible to make it show the set !away msg on parts of the name? Not just exact match? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 11, 2013 Author Share Posted May 11, 2013 Originally Posted by Tomgun*: Noob prevention cant clan tag be added to both of these please first:code List bad_words = new List(); bad_words.Add(@".*n+[ -/:-@[-`{-~£]*[3e]+[ -/:-@[-`{-~£]*w+[ -/:-@[-`{-~£]*[bp].*"); bad_words.Add(@".*b+[ -/:-@[-`{-~£]*[o0]{2,}[ -/:-@[-`{-~£]*n.*"); bad_words.Add(@".*n+[ -/:-@[-`{-~£]*[4aiu*]+[ -/:-@[-`{-~£]*b.*"); bad_words.Add(@".*n+[ -/:-@[-`{-~£]*[o0]+[ -/:-@[-`{-~£]*[bp]{2,}.*"); bad_words.Add(@".*n+[ -/:-@[-`{-~£]*[o0u]+[ -/:-@[-`{-~£]*[o0u]+[ -/:-@[-`{-~£]*[bp].*"); String[] chat_words = Regex.Split(player.LastChat, @"\s+"); foreach(String chat_word in chat_words) foreach(String bad_word in bad_words) if (Regex.Match(chat_word, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success) return true; return false; second code double count = limit.Activations(player.Name); if (count == 1) plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("%p_n%, this is a NOOB word free zone!!!!")); else if (count == 2) { plugin.KillPlayer(player.Name); plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("%p_n%, this is your %p_x_th% warning, stop saying the word NOOB or your kicked!")); } else if (count == 3) { plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for excessive use of the word noob!")); plugin.SendGlobalMessage(plugin.R("%p_n% was kicked for excessive use of the word noob")); } return false; and then this one of hackusations first expression (Regex.Match(player.LastChat, @"(__:^h+|\sh+)\W?[a4]+\W_c+\W_k+\W_|(_:^[a4]+|\s[a4]+)[1ia]+m+\s*b+[o0]+[t7]+|(:_^c+|\sc+)h+[3e]+[4a]+t+|(_:^h+|\sh+)\W?[a4]+\W_x+\W?[0o]+\W_r+|(_:^g+|\sg+)\W_l+\W?[i1]+\W?[t7]*\W_c+\W_h+)", RegexOptions.IgnoreCase).Success second code /* Version: V0.8/R2 */ String kCounter = player.Name + "_chat_spams"; String msg1 = "ok calm down!! If you suspect a hacker, ask for ADMIN!!!"; // CUSTOMIZE: 1st warning String msg2 = "LAST WARNING: Stop spamming hackusations or your out!!!"; // CUSTOMIZE: 2nd warning, kill String msg3 = "excessive hackusations, don't come back unless you STFU!!!"; // CUSTOMIZE: kick message int warnings = 0; if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter); String msg = "none"; Action ChatPlayer = delegate(String who) { plugin.ServerCommand("admin.say", msg, "player", who); plugin.ServerCommand("admin.yell", msg, "15", "player", who); plugin.PRoConChat( "ADMIN to " + who +"> " + msg); }; if (warnings == 2) { // Private warning msg = msg1; ChatPlayer(player.Name); } else if (warnings == 3) { // Kill msg = msg2; ChatPlayer(player.Name); plugin.KillPlayer(player.Name, 15); } else if (warnings == 4) { // Kick msg = "Kicking " + player.Name + " for " + msg3; plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.KickPlayerWithMessage(player.Name, msg); } else if (warnings > 4) { // Temp ban msg = "Banning for 1 hour: " + player.Name + " for " + msg3; plugin.SendGlobalMessage(msg); plugin.PRoConChat("ADMIN > " + msg); plugin.PRoConEvent(msg, "Insane Limits"); plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, player.Name, 60, msg); // 1 hour } server.Data.setInt(kCounter, warnings+1); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 11, 2013 Author Share Posted May 11, 2013 Originally Posted by supermillhouse*: Code: if (player.Tag != "Your tag in here") { double count = limit.Activations(player.Name); if (count == 1) plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("%p_n%, this is a NOOB word free zone!!!!")); else if (count == 2) { plugin.KillPlayer(player.Name); plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("%p_n%, this is your %p_x_th% warning, stop saying the word NOOB or your kicked!")); } else if (count == 3) { plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for excessive use of the word noob!")); plugin.SendGlobalMessage(plugin.R("%p_n% was kicked for excessive use of the word noob")); } } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 11, 2013 Author Share Posted May 11, 2013 Originally Posted by Tomgun*: cheers millhouse, your the man * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 11, 2013 Author Share Posted May 11, 2013 Originally Posted by PapaCharlie9*: That works! Thank you so much! Is it possible to make it show the set !away msg on parts of the name? Not just exact match? It's not using exact match, it's using the same near match that Procon in-game commands do, like !kick. For example, if I were the admin, any chat with papac or Charlie or PAPAPCHARLIE should match me. EDIT: oops, sorry. There was a problem in the code that was defeating the near match intent. I fixed it so that it really is near match now. * 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.