ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by Dudenell*: Code: if (limit.Activations() == 1) { Match m = Regex.Match(kill.Weapon, @"/[^/]+$"); String wn = kill.Weapon; if (m.Success) wn = m.Groups[1].Value; String msg = player.FullName + " slaughtered " + victim.FullName + " for the first kill of the round with a " + wn + "!"; plugin.PRoConChat("ADMIN > " + msg); plugin.ServerCommand("admin.yell", msg); } return false;The above will include the victims full name. you can change slaughtered to whatever you want I have noticed that this may activate at the end of a round (tdm for example) if a player gets a kill over the allowed amount EX team 1 gets 400 kills but right before the screen goes black player 2 gets a kill it will display player 2's kill. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by aduh*: Hi, I need code for our server rullz: 1. Claymores & M320 are forbidden - Multi-Action 1st Kill, 2nd KICK 2. DAO-12, M1014, USAS-12, Saiga12, mk3a1 limited to 1 in a team - Multi-Action 1st Kill, 2nd KICK 28 slots server with TDM mode Thanks ! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by PapaCharlie9*: +1 I was going to ask this also but didn't want to push my luck Thanks again for all your hard work and effort! I corrected the original post again and added the victim's name. It will still say some silly shit if it's a vehicle kill, like "Mootart got the first kill against medicine man with Death", but for regular weapons it should look good. myrcon.net/...insane-limits-examples#entry19382 EDIT: I did'nt see that Dudenell already replied. Dude, please correct your copy of my code to the newer version, the Regex.Match isn't right. My bad. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by PapaCharlie9*: Hi, I need code for our server rullz: 1. Claymores & M320 are forbidden - Multi-Action 1st Kill, 2nd KICK 2. DAO-12, M1014, USAS-12, Saiga12, mk3a1 limited to 1 in a team - Multi-Action 1st Kill, 2nd KICK 28 slots server with TDM mode Thanks ! Claymore and M320 forbidden can be adapted from this: www.phogue.net/forumvb/showth...0-RPG-USAS-etc* I'm not sure what "limited to 1 in a team" means. That's not really possible with anything in PRoCon. I know that someone did a ProconRulz for limiting snipers, but I looked at the code for it and it looks kinda dumb to me. Basically, whoever fires first gets to be "the one" and everyone who fires after gets kicked. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by aduh*: I'm not sure what "limited to 1 in a team" means. That's not really possible with anything in PRoCon. I know that someone did a ProconRulz for limiting snipers, but I looked at the code for it and it looks kinda dumb to me. Basically, whoever fires first gets to be "the one" and everyone who fires after gets kicked.Yes it is.Currently we are using Xtrem Weapon Limiter and it works like that: In every team there are allowed DAO-12, M1014, USAS-12, Saiga12 for 1 piece each. First player who gets DAO-12 he's allowed to play with it to the end of map. If another player starts to using DAO-12 then he is punished Slay/Kick. Yes it works :-) I was thinking that it is also possible on Insane Limits ? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by aduh*: I'm not sure what "limited to 1 in a team" means. That's not really possible with anything in PRoCon. I know that someone did a ProconRulz for limiting snipers, but I looked at the code for it and it looks kinda dumb to me. Basically, whoever fires first gets to be "the one" and everyone who fires after gets kicked.Yes it is.Currently we are using Xtrem Weapon Limiter and it works like that: In every team there are allowed DAO-12, M1014, USAS-12, Saiga12 for 1 piece each. First player who gets DAO-12 he's allowed to play with it to the end of map. If another player starts to using DAO-12 then he is punished Slay/Kick. Yes it works :-) I was thinking that it is also possible on Insane Limits ? You can check how it works on our server: * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 8, 2012 Author Share Posted April 8, 2012 Originally Posted by Dudenell*: I corrected the original post again and added the victim's name. It will still say some silly shit if it's a vehicle kill, like "Mootart got the first kill against medicine man with Death", but for regular weapons it should look good. myrcon.net/...insane-limits-examples#entry19382 EDIT: I did'nt see that Dudenell already replied. Dude, please correct your copy of my code to the newer version, the Regex.Match isn't right. My bad. thanks for the help * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by mrkrabz*: This limit allows players to use In-Game command "!votekick ". Players can vote as many times they want, and against as many players they want. The are no time or concurrency restrictions. However, votes are only counted once (you can only vote once against a certain player). If any player accumulates votes from more than 50% of all players in the server, that player is kicked. All votes are reset at the end of a round. The player name does not have to be a full-name. It can be a sub-string or misspelled name. Set limit to evaluate OnAnyChat, set action to None Set first_check to this Code Code: double percent = 50; /* Verify that it is a command */ if (!plugin.IsInGameCommand(player.LastChat)) return false; /* Extract the command */ String command = plugin.ExtractInGameCommand(player.LastChat); /* Sanity check the command */ if (command.Length == 0) return false; /* Parse the command */ Match kickMatch = Regex.Match(command, @"^votekick\s+([^ ]+)", RegexOptions.IgnoreCase); /* Bail out if not a vote-kick */ if (!kickMatch.Success) return false; /* Extract the player name */ PlayerInfoInterface target = plugin.GetPlayer(kickMatch.Groups[1].Value.Trim(), true); if (target == null) return false; if (target.Name.Equals(player.Name)) { plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("player.Name, you cannot vote-kick yourself!")); return false; } /* Account the vote in the voter's dictionary */ /* Votes are kept with the voter, not the votee */ /* If the voter leaves, his votes are not counted */ if (!player.DataRound.issetObject("votekick")) player.DataRound.setObject("votekick", new Dictionary<String, bool>()); Dictionary<String, bool> vdict = (Dictionary<String, bool>) player.DataRound.getObject("votekick"); if (!vdict.ContainsKey(target.Name)) vdict.Add(target.Name, true); /* Tally the votes against the target player */ double votes = 0; List<PlayerInfoInterface> all = new List<PlayerInfoInterface>(); all.AddRange(team1.players); all.AddRange(team2.players); all.AddRange(team3.players); all.AddRange(team4.players); foreach(PlayerInfoInterface p in all) if (p.DataRound.issetObject("votekick")) { Dictionary<String, bool> pvotes = (Dictionary<String, bool>) p.DataRound.getObject("votekick"); if (pvotes.ContainsKey(target.Name) && pvotes[target.Name]) votes++; } if (all.Count == 0) return false; int needed = (int) Math.Ceiling((double) all.Count * (percent/100.0)); int remain = (int) ( needed - votes); if (remain == 1) plugin.SendGlobalMessage(target.Name + " is about to get vote-kicked, 1 more vote needed"); else if (remain > 0) plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("player.Name, your vote against " + target.Name + " was counted, " + remain + " more needed to kick")); if (remain > 0) plugin.ConsoleWrite(player.Name + ", is trying to vote-kick " + target.Name + ", " + remain + " more votes needed"); if (votes >= needed) { String count = "with " + votes + " vote" + ((votes > 1)_"s":""); String message = target.Name + " was vote-kicked " + count ; plugin.SendGlobalMessage(message); plugin.ConsoleWrite(message); plugin.KickPlayerWithMessage(target.Name, target.Name + ", you were vote-kicked from the server " + count); return true; } return false; This is not working for me, ever since the procon update. Any ideas? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by Mootart*: thanks papa charlie... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by Dudenell*: Edited the Multi-Action Bad Word Filter* to deter / make fun of people who are calling others fag, faggot, fagget, faggets, fags, homo ect.. in the server. Basically if a player say fag or homo it will yell to the player saying: No, player, you are the "insert word used here" Set limit to evaluate OnAnyChat, set action to None Set first_check to this Code: Code: List<String> bad_words = new List<String>(); bad_words.Add(@"f[oea]+g(s_)+(g+[oe]_t_s_)_"); bad_words.Add(@"homo+"); 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) { plugin.PRoConChat("ADMIN > " + player.Name + " was called a " + chat_word); plugin.ServerCommand("admin.yell", ("No, " + player.Name + ", you are the " + chat_word ),"10", "player", player.Name); } return false;Also you could probably make this in the same script but I felt it was just easier to create a second rule. Anyways use below for gay since the response is a little different. Code: List<String> bad_words = new List<String>(); bad_words.Add(@"gay+"); 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) { plugin.PRoConChat("ADMIN > " + player.Name + " was called a " + chat_word); plugin.ServerCommand("admin.yell", ("No, " + player.Name + ", you are " + chat_word ),"10", "player", player.Name); } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by sorinnana*: any updated for yell commands? thx post 1000 lol * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by Dudenell*: any updated for yell commands? thx post 1000 lol gotta be more specific what you want updated... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by PapaCharlie9*: Yes it is. Currently we are using Xtrem Weapon Limiter and it works like that: In every team there are allowed DAO-12, M1014, USAS-12, Saiga12 for 1 piece each. First player who gets DAO-12 he's allowed to play with it to the end of map. If another player starts to using DAO-12 then he is punished Slay/Kick. Yes it works :-) I was thinking that it is also possible on Insane Limits ? It's certainly possible to do something similar in Insane Limits. Someone else will have to do it, though. That's not a limit I'm interested in working on. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 9, 2012 Author Share Posted April 9, 2012 Originally Posted by aduh*: It's certainly possible to do something similar in Insane Limits. Someone else will have to do it, though. That's not a limit I'm interested in working on.OK I'm waiting for it * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: For Inception: This limit yells a different welcome message to a player, depending on what country they are from. Set limit to evaluate OnSpawn, and action to None, Set first_check to this Expression: Code: (true)Set second_check to this Code: Code: double count = limit.ActivationsTotal(player.Name); if (count > 1) return false; String CC = player.CountryCode.ToLower(); String msg = CC; Dictionary<String, String> localizedWelcome = new Dictionary<String, String>(); localizedWelcome["us"] = "Welcome"; localizedWelcome["gb"] = "Welcome"; localizedWelcome["ca"] = "Welcome"; localizedWelcome["at"] = "Welcome"; localizedWelcome["nz"] = "Welcome"; localizedWelcome["ph"] = "Welcome"; localizedWelcome["dk"] = "Velkommen"; localizedWelcome["nl"] = "Welkom"; localizedWelcome["fi"] = "Tervetuloa"; localizedWelcome["se"] = "Vaalkommen"; localizedWelcome["no"] = "Velkommen"; localizedWelcome["at"] = "Willkommen"; localizedWelcome["de"] = "Willkommen"; localizedWelcome["de"] = "Willkommen"; localizedWelcome["ch"] = "Willkomme"; localizedWelcome["fr"] = "Bienvenue"; localizedWelcome["it"] = "Benvenuto"; localizedWelcome["mx"] = "Bienvenido"; localizedWelcome["es"] = "Bienvenido"; localizedWelcome["br"] = "Bem-vindo"; if (localizedWelcome.ContainsKey(CC)) { msg = localizedWelcome[CC] + " " + playerName + "!"; } else { msg = "Welcome " + player.Name + " from " + CC; } plugin.ServerCommand("admin.yell", msg, "15", "player", player.Name); return false;To add a chat say to the player as well, add this line after the yell: Code: plugin.ServerCommand("admin.say", msg, "player", player.Name);To make the yell be global to all players, change the yell line to this: Code: plugin.ServerCommand("admin.yell", msg);To make the chat say be to all players, add this line after the yell: Code: plugin.SendGlobalMessage(msg);List of country codes: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 List of welcome phrases in different languages: http://www.omniglot.com/language/phrases/welcome.htm * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by Inception*: Thank you very much PapaCharlie! Only one question, are the %p_n% and %p_cc% shortcuts still working? My current welcome message is: Welcome %p_n% (%p_cc%), type !rules to get informed. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: CORRECTED Thank you very much PapaCharlie! Only one question, are the %p_n% and %p_cc% shortcuts still working? My current welcome message is: Welcome %p_n% (%p_cc%), type !rules to get informed. What do you mean by "my current welcome message"? Did you change the code in my example to include that message, or does that message appear in some other plugin or setting? If you changed the code, you have to write the message like this: Code: msg = plugin.R("Welcome %p_n% (%p_cc%), type !rules to get informed.");If you want to change the localized welcome version, you have to change the localized line to this: Code: msg = localizedWelcome[CC] + " " + player.Name + " (" + CC + "), type !rules to get informed."; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: Posted new limit in this thread: Insane Limits V0.8/R1: Team Switching Limit* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by Damien720*: And you've done a good job. I just do a little clean-up below. I also added some more words and retorts and added the option for doing a yell. OnAnyChat First Check Code Code: List<String> bad_words = new List<String>(); bad_words.Add("hack"); bad_words.Add("hacker"); bad_words.Add("hacking"); bad_words.Add("cheat"); bad_words.Add("cheater"); bad_words.Add("cheating"); bad_words.Add("exploit"); bad_words.Add("exploiter"); bad_words.Add("exploiting"); bad_words.Add("glitch"); bad_words.Add("glitcher"); bad_words.Add("glitching"); 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 CheckCode Code: /* Version: V0.8/R1 */ List<String> shame = new List<String>(); shame.Add("%p_n%, hackusations are not welcome on this server!"); shame.Add("%p_n% must have been killed, go cry hackusations to mommy!"); shame.Add("%p_n% go report the hacker on battlelog, dont spam my chat with hackusations."); shame.Add("Would you like some cheese with your whine about hacking, %p_n%_"); shame.Add("%p_n%, maybe if you played better everyone wouldn't seem like a hack_"); shame.Add("%p_n%, surrounded by hacks who can't possibly play better than you ... really_"); shame.Add("%p_n%, don't go away mad, just go away."); shame.Add("%p_n%, u mad, bro_"); // Add additional messages here with shame.Add("..."); int level = 2; try { level = Convert.ToInt32(plugin.getPluginVarValue("debug_level")); } catch (Exception e) {} int next = Convert.ToInt32(limit.ActivationsTotal()); next = next % shame.Count; // Ensure rotation of messages String msg = plugin.R(shame[next]); /* To keep a lid on spam, only the first activation per player per round is sent to all players. Subsequent shames are only sent to the killer's squad. */ bool squadOnly = (limit.Activations(player.Name) > 1); if (level >= 2) plugin.ConsoleWrite("^b[Hackusation]^n " + ((squadOnly)_"^8private^0: ":"^4public^0: ") + msg + " to " + player.Name + " about[b][/b]: " + player.LastChat); if (squadOnly) { plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); } else { plugin.SendGlobalMessage(msg); plugin.ServerCommand("admin.yell", msg); } plugin.PRoConChat("ADMIN > " + msg); return false; thanks a bunch but one of the other server admins asked about adding a whitelist. I have a custom list setup but ATM i have no idea how to add it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by Inception*: PapaCharlie, I get two errors (see image). error.png * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by Bl1ndy*: PapaCharlie, I get two errors (see image). error.png Try: Code: player.Name * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: Try: Code: player.Name Yes, sorry, my bad. I corrected the typo in my post. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: thanks a bunch but one of the other server admins asked about adding a whitelist. I have a custom list setup but ATM i have no idea how to add it.You need the name of the list. I'll assume it is "custom_list", but replace that with the proper name. Add this at the very top/beginning of first_check: Code: if (plugin.isInList(player.Name, "custom_list")) return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: Here is the original request: Here's the problem I'm trying to solve and failing miserably at it. We run a mixed mode server. We also use BF3 manager to change the map cycle at a certain player count. We also want to set ticket ratios based on the map / mode. 0 - 16 players = TDM map cycle (100 percent tickets) 16 - 48 player = CONQ / Rush map cycle (rush - 100, conq - 250) My attempt. 2 lists consisting of modes. List #1 (RHI_250): ConquestSmall0, ConquestSmall1, ConquestAssaultSmall1, ConquestAssaultLarge0 List #2 (RHI_100): RushLarge0, TeamDeathMatch0 The code: OnRoundOver Code: /* Set the tickets based on mode */ if(plugin.isInList(server.NextGamemode, "RHI_100")){ plugin.ServerCommand("vars.gameModeCounter", "100"); plugin.ConsoleWrite("Next map is "+server.NextMapFileName+" with game mode "+server.NextGamemode+". Tickets set for next map: 100 - 1"); return false; }else if(plugin.isInList(server.NextGamemode, "RHI_250")){ if(server.Gamemode == "RushLarge0" && server.CurrentRound == 1){ plugin.ServerCommand("vars.gameModeCounter", "100"); plugin.ConsoleWrite("Next map is "+server.NextMapFileName+" with game mode "+server.NextGamemode+". Tickets set for next map: 100 - 2"); return false; }else{ plugin.ServerCommand("vars.gameModeCounter", "250"); plugin.ConsoleWrite("Next map is "+server.NextMapFileName+" with game mode "+server.NextGamemode+". Tickets set for next map: 250"); return false; } }some problems have arose from this so far. 1. When moving from round 1 to round 2 of Rush... the tickets are set to 250 because the plugin see's the "nextGamemode" as conquest but doesn't take into account the second round of rush 2. Since the map cycle can be switched by another plugin, using RoundStart presents a problem in that the cycle may be switched during the current round. Therefore... using RoundOver is preferable to avoid incorrect ticket percent. 3. Using roundOver will cause problems determining the "current" round as it's over and I'm not sure that if the "current" round becomes 2 immediately after the RoundOver event. Any pointers or advice is greatly appreciated. I know that time is very precious. Thank you! P.s. Something I thought of while typing this out... would wrapping the entire check in the current round check work to avoid setting incorrect tickets? I'm assuming this will be dependent on how the RoundOver event is received and whether the server immediately reports as round 2 just after the roundOver. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by boom-admin*: Sorry about the PM... didn't want to clutter the topic with stuff that was not needed. Appreciate your understanding. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by PapaCharlie9*: Sorry about the PM... didn't want to clutter the topic with stuff that was not needed. Appreciate your understanding.No worries. It's much easier for me to reply in the forum than in PM anyway. You are in luck. I recently did something similar for my own server. Since you are only changing gameModeCounter and since the change is instantaneous, the trick is to use OnIntervalServer and change the var in the current round with the current mode. It doesn't hurt to do it multiple times in the same round, but even so, we use a counter to avoid overdoing it. OnIntervalServer set to 30 seconds. first_check Code Code: int count = 0; if (server.RoundData.issetInt("GMCount")) count = server.RoundData.getInt("GMCount"); count = count + 1; server.RoundData.setInt("GMCount", count); if (count > 3) return false; // Only do it three times every round /* BF3 friendly map names, including B2K */ Dictionary<String, String> maps = new Dictionary<String, String>(); maps.Add("MP_001", "Bazaar"); maps.Add("MP_003", "Teheran"); maps.Add("MP_007", "Caspian"); maps.Add("MP_011", "Seine"); maps.Add("MP_012", "Firestorm"); maps.Add("MP_013", "Damavand"); maps.Add("MP_017", "Canals"); maps.Add("MP_018", "Kharg"); maps.Add("MP_Subway", "Metro"); maps.Add("XP1_001", "Karkand"); maps.Add("XP1_002", "Oman"); maps.Add("XP1_003", "Sharqi"); maps.Add("XP1_004", "Wake"); /* BF3 friendly game modes, including B2K */ Dictionary<String, String> modes = new Dictionary<String, String>(); modes.Add("ConquestLarge0", "CQ64"); modes.Add("ConquestSmall0", "CQ"); modes.Add("ConquestAssaultLarge0", "CA64"); modes.Add("ConquestAssaultSmall0", "CA"); modes.Add("ConquestAssaultSmall1", "CAS"); modes.Add("RushLarge0", "Rush"); modes.Add("SquadRush0", "Squad Rush"); modes.Add("SquadDeathMatch0", "SQDM"); modes.Add("TeamDeathMatch0", "TDM"); String mapName = (maps.ContainsKey(server.MapFileName)) _ maps[server.MapFileName] : server.MapFileName; String modeName = (modes.ContainsKey(server.Gamemode)) _ modes[server.Gamemode] : server.Gamemode; /* Set the tickets based on mode */ if(plugin.isInList(server.Gamemode, "RHI_100")){ plugin.ServerCommand("vars.gameModeCounter", "100"); plugin.ConsoleWrite("Current map is "+mapName+" with game mode "+modeName+". Tickets set for: 100 - 1"); return false; }else if(plugin.isInList(server.Gamemode, "RHI_250")){ plugin.ServerCommand("vars.gameModeCounter", "250"); plugin.ConsoleWrite("Current map is "+mapName+" with game mode "+modeName+". Tickets set for: 250"); return false; } return false;I even threw in the code to convert the map and mode names to easy to read names. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2012 Author Share Posted April 10, 2012 Originally Posted by boom-admin*: @Papa.... is the gameModeCounter read at round start? If so... how does this set the tickets for the round? Also, when you say it's instant... does that mean the tickets can change immediately upon the command? If so... the "hardcoded" counter in startup.txt is 100... so for instance... when conquest map starts.. it will start with 100 percent and change within 30 seconds to 250? How does that work for y'all on your server as far as players seeing the tickets change before their eyes? Sigh.. sorry for the questioning... Is it nessary to check within the conquest list for gamemode since it's not using current round only? I.e. Code: int count = 0; if (server.RoundData.issetInt("GMCount")) count = server.RoundData.getInt("GMCount"); count = count + 1; server.RoundData.setInt("GMCount", count); if (count > 3) return false; // Only do it three times every round /* Set the tickets based on mode */ if(plugin.isInList(server.Gamemode, "RHI_100")){ plugin.ServerCommand("vars.gameModeCounter", "100"); plugin.ConsoleWrite("Current map is "+server.MapFileName+" with game mode "+server.Gamemode+". Tickets set for: 100 - 1"); return false; }else if(plugin.isInList(server.Gamemode, "RHI_250")){ plugin.ServerCommand("vars.gameModeCounter", "250"); plugin.ConsoleWrite("Current map is "+server.MapFileName+" with game mode "+server.Gamemode+". Tickets set for: 250"); return false; } return false;Would this have desired effect? 3rd edit... Nice use of Ternary code. I like it. ;-) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 11, 2012 Author Share Posted April 11, 2012 Originally Posted by PapaCharlie9*: We need to stop editing at the same time, lol. Make sure you look at the version with my latest edit. Yes, the tickets change immediately on the command, but the first one, before anyone spawns, is the best one, since it gets things started out right. Since the time between round end and round start is 45 seconds (at least, on my server), a 30 second interval insures that at least one setting happens before anyone spawns in the current round. The startup.txt is applied only once at server boot time. Once Insane Limits starts running, the value stays at whatever it was set to last. So once it is set to 250, it stays 250 until it gets set to something else. Oops, right, I should have cleaned that up. Since you are setting current round, all that matters is which mode you have set in which list. No additional checks needed. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 11, 2012 Author Share Posted April 11, 2012 Originally Posted by boom-admin*: Yea... I had to keep refreshing to see your edits as they happened. Thanks for clearing all that up... I've been struggling for the past 3 days to figure out how the rounds are reported at round over. Thank you again for the clarification!!! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 11, 2012 Author Share Posted April 11, 2012 Originally Posted by Inception*: Question, I've got this limit: First Check - Expression: Code: Regex.Match(player.LastChat, @"(noo+b|nu+b|naa+b)", RegexOptions.IgnoreCase).SuccessSecond Check - Code:Code: double count = limit.Activations(player.Name); if (count == 1) plugin.SendGlobalMessage(plugin.R("No %p_n%, we ain't all as good as you are.")); else if (count == 2) plugin.SendGlobalMessage(plugin.R("%p_n%, stop using offensive language!")); else if (count == 3) { plugin.SendGlobalMessage(plugin.R("%p_n% was kicked for using too much offensive language.")); plugin.KickPlayerWithMessage(player.Name, plugin.R("Kicked for using too much offensive language.")); } return false; Is it possible to make those messages yelled as well? Not only to the player himself, but to the whole server. * 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.