ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by HexaCanon*: Overall this code looks good. However, That code isn't quite right. You want a Regex.Match for that kind of list: Code: (server.Gamemode.StartsWith("Rush") && Regex.Match(kill.Weapon, @"(_:SV98|M40A5|M98B|MK11|SVD|M39|QBU-88|L96|SKS)", RegexOptions.IgnoreCase).Success)You should change TestMessage to the same message you have in PRoConChat, as well. If you just want to test and not show chat to players, just comment out the SendSquadMessage line, like this: Code: if (limit.Activations(player.Name) > 3) if ( team1.Tickets <= 50 && player.TeamId == 1) { //plugin.SendSquadMessage(player.TeamId, player.SquadId, "TestMessage"); plugin.PRoConChat("Admin > All: Sniperkills >3 bei Rush als Attacker + player.Name + "); } else return false; yeah i was looking for the regex.match but at that moment i just woke up and did not notice it was the wrong one * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by PapaCharlie9*: 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!. I'm starting to plan how to do this. I'd like to do it as simply as possible with as few limits and as little code as possible, since it will be hard to test without actually running it on a full TDM server. Ideally, I'd like to keep it down to 2 limits, but it might need 3 or even 4. Some questions: * Moving players is easier OnRoundOver (end of round), but prevents the 30 second countdown and message from happening. I could do it OnRoundStart, but what I'd have to do is kill everyone who has spawned or who spawns while I'm still moving, do all the moves, then restart the round. On the other hand, doing it OnRoundStart allows for a message to be sent about who the infected zombie is and also allows for a count down before the round restarts, so everyone can get ready. * Do you want this mode to run for as long as the limit is enabled, or do you want to turn it on/off with an in-game command? Adding the command costs +1 limit, but it's relatively easy to write. Command also makes a countdown/restart possible. * Can I assume the server is already in unranked mode, auto balance is off and already running TDM, or do I have to set that all up also in a limit? Also, the gameModeCounter will need to be set really high, like 300 or 400, since we don't want the zombies to win the round simply by reaching the kill goal, when there are still humans alive. * The penalty box requires +1 limit. Instead of a penalty box, I can just Kick a player who uses a forbidden weapon. Which one do you prefer? * Since it's TDM, it's easier to end the round and select the survivors/winners based on kills. Doing it by time is possible, but more complicated and less accurate. Time or kills? Unless I hear otherwise, I'll assume: OnRoundOver with no message or countdown, no in-game command, server is already completely set up with gameModeCounter set to 400, Kick for forbidden weapon, end the round when the US team has 100 kills (that means, not based on time) or there are no US team members left (zombies win). * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by Bl1ndy*: I'm starting to plan how to do this. I'd like to do it as simply as possible with as few limits and as little code as possible, since it will be hard to test without actually running it on a full TDM server. Ideally, I'd like to keep it down to 2 limits, but it might need 3 or even 4. Some questions: * Moving players is easier OnRoundOver (end of round), but prevents the 30 second countdown and message from happening. I could do it OnRoundStart, but what I'd have to do is kill everyone who has spawned or who spawns while I'm still moving, do all the moves, then restart the round. On the other hand, doing it OnRoundStart allows for a message to be sent about who the infected zombie is and also allows for a count down before the round restarts, so everyone can get ready. * Do you want this mode to run for as long as the limit is enabled, or do you want to turn it on/off with an in-game command? Adding the command costs +1 limit, but it's relatively easy to write. Command also makes a countdown/restart possible. * Can I assume the server is already in unranked mode, auto balance is off and already running TDM, or do I have to set that all up also in a limit? Also, the gameModeCounter will need to be set really high, like 300 or 400, since we don't want the zombies to win the round simply by reaching the kill goal, when there are still humans alive. * The penalty box requires +1 limit. Instead of a penalty box, I can just Kick a player who uses a forbidden weapon. Which one do you prefer? * Since it's TDM, it's easier to end the round and select the survivors/winners based on kills. Doing it by time is possible, but more complicated and less accurate. Time or kills? Unless I hear otherwise, I'll assume: OnRoundOver with no message or countdown, no in-game command, server is already completely set up with gameModeCounter set to 400, Kick for forbidden weapon, end the round when the US team has 100 kills (that means, not based on time) or there are no US team members left (zombies win). My personal preference: No in-game commands, OnRoundStart 30 second interval with message and countdown, based on kills, no fixed settings. On Damage Knife > Move RU, On Damage Shotgun kill counts. None of these weapons = kick without switching teams. All players US End round message, countdown and restart. If US survives show survivors, start countdown and restart. I think this should all be possible without to much trouble. Only thing I'm worried about is the weapon limiter and penalty's. Also a huge disadvantage is not being able to run it Ranked aka Custom. Will be hard to get the server going, but if this "mod" gets popular this shouldn't be a problem, we'll see. If you need any help with testing let us know. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by Bl1ndy*: Also is there anything we can do with weapon damage / player health? As far as i know BF3 only allows you to go down to 60% health and 100% weapon damage. If we only had modding tools!!!!! The 10% state of BF3 is perfect for zombies to have, all white and blurry. Damn you EA. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by PapaCharlie9*: Also is there anything we can do with weapon damage / player health? As far as i know BF3 only allows you to go down to 60% health and 100% weapon damage. If we only had modding tools!!!!! The 10% state of BF3 is perfect for zombies to have, all white and blurry. Damn you EA.That's only true for ranked. On unranked you can set it to 10%, but it is 10% for everyone. I just tried it on my unranked server and it worked. Here are the settings I would recommend for Zombie Infection. It's unranked ultra hardcore infantry only. I can't decide if FF should be on or off, I left it off below. Code: # ------------------------------------------------------------------------------------------------------------------------- # File generated by Procon Frostbite. Replace the contents of your /cfg/AdminScripts/startup.txt # on your game server with this file for your settings to remain persistent on game server restart. # ------------------------------------------------------------------------------------------------------------------------- # Comments begin with a # at the start of a line. # Quotations are optional for single words, but are required if the parameter contains spaces: # Correct: admin.password Hello # Correct: admin.password "Hello" # Incorrect: admin.password Hello World # Correct: admin.password "Hello World" vars.ranked false admin.password "your RCON password here" punkBuster.activate vars.gamePassword "zombie" vars.serverName "Zombie Infection, password: zombie" vars.friendlyFire false vars.idleTimeout 7200 vars.teamKillCountForKick 5 vars.teamKillValueForKick 4 vars.teamKillValueIncrease 1 vars.teamKillValueDecreasePerSecond 0 vars.autoBalance false vars.killCam false vars.miniMap false vars.3dSpotting false vars.miniMapSpotting false vars.3pCam false vars.idleBanRounds 0 vars.vehicleSpawnAllowed false vars.vehicleSpawnDelay 25 vars.bulletDamage 100 vars.nameTag false vars.regenerateHealth false vars.roundRestartPlayerCount 3 vars.roundStartPlayerCount 4 vars.onlySquadLeaderSpawn false vars.unlockMode "stats" vars.soldierHealth 30 vars.hud true vars.playerManDownTime 100 vars.playerRespawnTime 100 vars.gameModeCounter 400You sure you want any shotgun, including USAS, DAO, Jackhammer? Zombies don't stand a chance, particularly when there is only one at the beginning, if all the humans have USAS and zombie only has a knife. Even with the 870 it's going to be tough for that first zombie. How about humans can use only non-automatic or semi-automatic pistols (no G18C) until there are more zombies than humans, then humans can use shotguns? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by sorinnana*: anybady can help me whit a plugin for vehicle killing spree? for choppers maybe....thx anybady can help me whit that? thxi guess is no plugin for that yet...anybady ...? pls * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by Rucki*: Overall this code looks good. However, That code isn't quite right. You want a Regex.Match for that kind of list: Code: (server.Gamemode.StartsWith("Rush") && Regex.Match(kill.Weapon, @"(_:SV98|M40A5|M98B|MK11|SVD|M39|QBU-88|L96|SKS)", RegexOptions.IgnoreCase).Success)You should change TestMessage to the same message you have in PRoConChat, as well. If you just want to test and not show chat to players, just comment out the SendSquadMessage line, like this: Code: if (limit.Activations(player.Name) > 3) if ( team1.Tickets <= 50 && player.TeamId == 1) { //plugin.SendSquadMessage(player.TeamId, player.SquadId, "TestMessage"); plugin.PRoConChat("Admin > All: Sniperkills >3 bei Rush als Attacker + player.Name + "); } else return false; Yesssssssssssss! It seems it works! THANKS HexaCanon and PapaCharlie! I hope last question: How can I get a msg like this? X Sniperkills from PlayerNameY! Your are Attacker! + player.Name + or %p_n% does not work. Same as %r_x%. :/ ---edit--- This limit is working fine for me! OnKill first_check Expression Code: (server.Gamemode.StartsWith("Rush") && Regex.Match(kill.Weapon, @"(_:SV98|M40A5|M98B|MK11|SVD|M39|QBU-88|L96|SKS)", RegexOptions.IgnoreCase).Success)second_Check Code Code: if (limit.Activations(player.Name) > 3) if ( team1.Tickets <= 80 && player.TeamId == 1) { //plugin.SendSquadMessage(player.TeamId, player.SquadId, "%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!"); //plugin.SendGlobalMessage(plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); plugin.PRoConChat(plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); } else return false;This code writes a message in Proconchat.For GlobalMessge or SquadMessage delete the "//" Edit the tickets and kills! This is code is only for testing! I have 10 kills at Translation for the msg: %p_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch! %p_fn% is Attacker and has %p_x% Sniperkills! Move your ass! Thx! Rucki * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by feeblemedic*: I am looking for the following sample rule I could use for tank "whoring" as my player base has labeled it. The rule would do the following: On player join, check for (time in armor vehicles.....maybe specify tanks if possible or combine not sure how to work it); if time in tanks/armor is 10 hour or more then apply the following rule...if not do nothing. If 10+ hours in a vehicle/armor and have a vehicle/armor KILL PER HOUR of XX then it kicks/bans them. Is anything like this possible with this plugin? I'll donate some beer money to anyone who can give me an example of how to create a rule as detailed above. Thanks in advance for any assistance on this issue. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by PapaCharlie9*: I am looking for the following sample rule I could use for tank "whoring" as my player base has labeled it. The rule would do the following: On player join, check for (time in armor vehicles.....maybe specify tanks if possible or combine not sure how to work it); if time in tanks/armor is 10 hour or more then apply the following rule...if not do nothing. If 10+ hours in a vehicle/armor and have a vehicle/armor KILL PER HOUR of XX then it kicks/bans them. Is anything like this possible with this plugin? I'll donate some beer money to anyone who can give me an example of how to create a rule as detailed above. Thanks in advance for any assistance on this issue. I don't believe it's possible. The only stats we have available are VehicleTime, VehiclePercent, VehicleScore and VehicleKills, all of which include aircraft and jeeps as well as tanks. What's worse, some of the stats appear to be corrupted when fetched from Battlelog. VehicleTime and VehiclePercent are always NaN, for some reason. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by micovery*: I don't believe it's possible. The only stats we have available are VehicleTime, VehiclePercent, VehicleScore and VehicleKills, all of which include aircraft and jeeps as well as tanks. What's worse, some of the stats appear to be corrupted when fetched from Battlelog. VehicleTime and VehiclePercent are always NaN, for some reason.The stats info come from the battle-log overview stats ... in there, they have the vehicle category ... but it's always empty. I left it there hoping in the future battlelog would populate it. In the future, if vehicle-level stats are added it would mean an extra HTTP request. Is this something a lot people would want? Is not hard to add ... in fact weapon-level stats fetching code is already in the plugin, but it's disabled. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by sorinnana*: The stats info come from the battle-log overview stats ... in there, they have the vehicle category ... but it's always empty. I left it there hoping in the future battlelog would populate it. In the future, if vehicle-level stats are added it would mean an extra HTTP request. Is this something a lot people would want? Is not hard to add ... in fact weapon-level stats fetching code is already in the plugin, but it's disabled. so i guess is no code for vehicle killing spree yet? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by HexaCanon*: so i guess is no code for vehicle killing spree yet?you can not have vehicle killing spree because it reports as dying with DEATH ! and DEATH shares its name with other ways of dying ! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by Bl1ndy*: That's only true for ranked. On unranked you can set it to 10%, but it is 10% for everyone. I just tried it on my unranked server and it worked. Here are the settings I would recommend for Zombie Infection. It's unranked ultra hardcore infantry only. I can't decide if FF should be on or off, I left it off below. Code: # ------------------------------------------------------------------------------------------------------------------------- # File generated by Procon Frostbite. Replace the contents of your /cfg/AdminScripts/startup.txt # on your game server with this file for your settings to remain persistent on game server restart. # ------------------------------------------------------------------------------------------------------------------------- # Comments begin with a # at the start of a line. # Quotations are optional for single words, but are required if the parameter contains spaces: # Correct: admin.password Hello # Correct: admin.password "Hello" # Incorrect: admin.password Hello World # Correct: admin.password "Hello World" vars.ranked false admin.password "your RCON password here" punkBuster.activate vars.gamePassword "zombie" vars.serverName "Zombie Infection, password: zombie" vars.friendlyFire false vars.idleTimeout 7200 vars.teamKillCountForKick 5 vars.teamKillValueForKick 4 vars.teamKillValueIncrease 1 vars.teamKillValueDecreasePerSecond 0 vars.autoBalance false vars.killCam false vars.miniMap false vars.3dSpotting false vars.miniMapSpotting false vars.3pCam false vars.idleBanRounds 0 vars.vehicleSpawnAllowed false vars.vehicleSpawnDelay 25 vars.bulletDamage 100 vars.nameTag false vars.regenerateHealth false vars.roundRestartPlayerCount 3 vars.roundStartPlayerCount 4 vars.onlySquadLeaderSpawn false vars.unlockMode "stats" vars.soldierHealth 30 vars.hud true vars.playerManDownTime 0 vars.playerRespawnTime 100 vars.gameModeCounter 400You sure you want any shotgun, including USAS, DAO, Jackhammer? Zombies don't stand a chance, particularly when there is only one at the beginning, if all the humans have USAS and zombie only has a knife. Even with the 870 it's going to be tough for that first zombie. How about humans can use only non-automatic or semi-automatic pistols (no G18C) until there are more zombies than humans, then humans can use shotguns? Put this on 0 to prevent reviving wich might spoil the gameplay. Also let's give the US only a Magnum. 44? No more fun way to kill zombies then to do it the cowboy way. Also then you have to time your reloads cause of the reload speed which might make it even more intense. This is going the right direction Papa, let's keep it up! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by Rucki*: Hi, another limit that i cant create myself. Hoping for your help. At first, i try to explain why this limit. We are warning 3 times for noobtube on inf . Then kick. Regular guests are knowing the 3 warnings, and they are using noobtube 3 times. So they get not kicked. My wish: regularguest_list with regularguestA, regularguestB If gamemode TDM or mapname is Bazaar (we play inf on Bazaar) or mapname is Metro and killing with M320|SMAW|RPG-7 and killer is in regularguest_list kick with msg "%p_n% you know the rules!" Thanks in advance! Rucki * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by Mootart*: Hi, another limit that i cant create myself. Hoping for your help. At first, i try to explain why this limit. We are warning 3 times for noobtube on inf . Then kick. Regular guests are knowing the 3 warnings, and they are using noobtube 3 times. So they get not kicked. My wish: regularguest_list with regularguestA, regularguestB If gamemode TDM or mapname is Bazaar (we play inf on Bazaar) or mapname is Metro and killing with M320|SMAW|RPG-7 and killer is in regularguest_list kick with msg "%p_n% you know the rules!" Thanks in advance! Rucki the regular player list will be really really long i guess.. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by Rucki*: the regular player list will be really really long i guess.. Ok; call it top25_guest_playerlist. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by droopie*: currently i have if 0 people go to X map. how can i log what was the last map that played? i would like a couple weeks to see what map, if excessive, gets people to leave and remove it. i currently have playerstats with map statistics but i have a strong feeling those stats are off because they never change.. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by Rucki*: ---edit--- Sry, maybe wrong answere......... OnRoundOver first_expression Code: (true)second_check_CODE Code: /* von Papa Charly */ TimeSpan time = TimeSpan.FromSeconds(server.TimeRound); String hhmmss = time.Hours.ToString("D2") + ":" + time.Minutes.ToString("D2") + ":" + time.Seconds.ToString("D2"); /* BF3 friendly map names, including B2K */ Dictionary<String, String> Maps = new Dictionary<String, String>(); Maps.Add("MP_001", "Grand Bazaar"); Maps.Add("MP_003", "Teheran Highway"); Maps.Add("MP_007", "Caspian Border"); Maps.Add("MP_011", "Seine Crossing"); Maps.Add("MP_012", "Operation Firestorm"); Maps.Add("MP_013", "Damavand Peak"); Maps.Add("MP_017", "Noshahr Canals"); Maps.Add("MP_018", "Kharg Island"); Maps.Add("MP_Subway", "Operation Metro"); Maps.Add("XP1_001", "Strike At Karkand"); Maps.Add("XP1_002", "Gulf of Oman"); Maps.Add("XP1_003", "Sharqi Peninsula"); Maps.Add("XP1_004", "Wake Island"); /* BF3 friendly game modes, including B2K */ Dictionary<String, String> Modes = new Dictionary<String, String>(); Modes.Add("ConquestLarge0", "Conquest64"); Modes.Add("ConquestSmall0", "Conquest"); Modes.Add("ConquestSmall1", "Conquest Assault"); Modes.Add("RushLarge0", "Rush"); Modes.Add("SquadRush0", "Squad Rush"); Modes.Add("SquadDeathMatch0", "Squad Deathmatch"); Modes.Add("TeamDeathMatch0", "Team Deathmatch"); if ( true ) { if (Maps.ContainsKey(server.MapFileName) && Modes.ContainsKey(server.Gamemode)) plugin.PRoConChat("^7Admin > All: " + plugin.R("[%date% %time%] Map duration for " + Maps[server.MapFileName]+" "+ Modes[server.Gamemode] + " was " + server.TimeRound/60 + " minutes." )); plugin.Log("Plugins/roundduration.log", plugin.R("[%date% %time%] Map duration for " + Maps[server.MapFileName]+" "+ Modes[server.Gamemode] + " was " + server.TimeRound/60 + " minutes.")); } else return false;Shows on ProconChat[16:04:26] Admin > All: [samstag, 3. März 2012 16:04] Map duration for Caspian Border Team Deathmatch was 10,2833333333333 minutes. and also in Plugins/roundduration.log If server goes emtpy the roundtime is longer and longer. I think in a week you can see, which map players are leaving. Say Thanks to Papa Charly! Rucki * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by PapaCharlie9*: Put this on 0 to prevent reviving wich might spoil the gameplay. Also let's give the US only a Magnum. 44? No more fun way to kill zombies then to do it the cowboy way. Also then you have to time your reloads cause of the reload speed which might make it even more intense. This is going the right direction Papa, let's keep it up!A friend who played zombie mode in BF2 (entirely on the honor system, no admin tool enforcement) told me that the zombie team was allowed to rez other zombies, for a more horror movie like effect. That's why I had a non-zero man down time. It's fine to recommend 0, though. All the server settings will just be recommendations and individual admins can tweak as they like. Okay, .44 it is until zombies have a majority, then shotguns will be allowed. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 3, 2012 Author Share Posted March 3, 2012 Originally Posted by PapaCharlie9*: currently i have if 0 people go to X map. how can i log what was the last map that played? i would like a couple weeks to see what map, if excessive, gets people to leave and remove it. i currently have playerstats with map statistics but i have a strong feeling those stats are off because they never change.. Use this Insane Limit: Insane Limits V0.7/R1: Player Count Tracker*. Once every minute it logs a player count to a comma separated value (CSV) file in your logs folder. You can open the CSV in a spreadsheet program like Excel and do statistical analysis. It also logs the player count to your plugin.log, depending on your debug level. At level 2 it logs the map, round N of M, and game mode at the end of the round along with minimum and maximum players in that round. Looks like this: [20:46:58 53] [insane Limits] Thread(enforcer): [PCT]: Sharqi/CQ64/2/2, 15/16, -3 net change. Round (min-max) 15-18 ... [21:17:08 57] [insane Limits] Thread(enforcer): [PCT]: Caspian/CQ64/1/2, 13/16, -8 net change. Round (min-max) 13-21 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by Singh400*: make it on interval of 3 minutes (fastest rush round i played in), also you could make it have limit activations of say 5-6 so that it keeps saying the next level every 3 minutes 5-6 times. if you want the code i could make it for you. Thanks, but I really want to avoid adding any more admin chat spam. I've already got enough as it is, I'm actually trying reduce it. I've already got a @shownext feature that players can activate, but it is nice to see it auto say during the last few moments of a round. You'll need to gather some data. Write an OnIntervalServer limit (60 seconds) that does a ConsoleWrite of the number of tickets each team has and the percentages. If the tickets go from max to 0 four times (one for each stage), you can modify your announcer to count the activations for each stage and only send on the last one. If the tickets and/or percentages follow some other kind of pattern, adapt to that pattern.Cor blimey that sounds like a lot of work/coding. I'm taking baby steps remember! To that extent I want to tackle a smaller problem. In our Conquest list we have all the standard 9 maps. With one round of each. Expect Grand Bazaar and Operation Metro both of which have two rounds. Now both the limits I have currently (...* & ...*). Don't work correctly on Grand Bazaar or Operation Metro. I figure I need to call int CurrentRound & int TotalRounds. And then somehow work them into the existing limits I have in-place. Any tips/points how I can do this? I'm thinking of adding something like:- Code: if TotalRounds = 2 then [i]something[/i] plugin.SendGlobalMessage( " [b]The next map will be[/b] " + Maps[server.NextMapFileName] + " [b]on[/b] " + Modes[server.NextGamemode] + " [b]Round[/b] " [i]CurrentRound[/i] " [b]of[/b] " [i]TotalRounds[/i] " );I feel that is not totally right though. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by PapaCharlie9*: I can't make this work at the start of the round. OnRoundStart doesn't activate until a player spawns. We don't want any players to spawn before the countdown. The best I can do is move the players between rounds (after an OnRoundOver activation) and then wait for the zombie player to spawn, maybe killing any human player that spawns prematurely. This would be a good way to give the lone zombie a 30 second head start -- otherwise, humans could just camp the zombie spawnpoints -- and also give a 30 second countdown for the human players. See list of limits/states below (there are a lot!) Speaking of which, I'm convinced one lone zombie has no chance versus up to 23 players. Unless the zombie gets 1 or 2 lucky kills on his first spawn, the humans will camp all the spawn points and freeze the zombie out. That won't be any fun. So how about starting with one zombie for every six players? 0 - 1 players: zombie mode won't start, requires at least 2 players 2 - 6 players: 1 zombie vs. 1-5 humans 7 - 12 players: 2 zombies vs. 5-10 humans 13 - 18 players: 3 zombies vs. 10-15 humans 19 - 24 players: 4 zombies vs. 15-20 humans This table will be applied to players who join mid-round as well. So if there are 6 players and 1 zombie, if a 7th joins, he will be made a zombie. The 8th to join will be human, etc. Also, how about giving the zombies unlimited weapons until they make their first kill? Or if unlimited is too much, how about at least knife and grenade? They've got to have some advantage to balance out the disadvantage of numbers and weapon distance. Question: can anyone use T-UGS? MAV? Spawn Beacon? Mortar? I can't control any of those with an admin tool, so this question is purely for honor system rules. T-UGS will be useless if the mini-map is disabled, so that takes care of itself with the right server settings. Question: what to do about people who join in the middle of a round? The table above could be applied, I guess. Question: what to do if the lone zombie at the beginning of the round leaves? Pick another one? Despite my wanting to keep this simple, it's looking impossible to do without at least 4 limits, according to this state machine: State 0) Pre-round Move all players to US side, apply player table to move 1 to 4 players to RU side. OnJoin: go to State 0. OnLeave: if player was on RU side, pick a replacement from US side and move to RU, go to State 0. OnSpawn: if player is US, warn and kill, go to State 0. if player is RU, go to State 1. State 1) Start of round countdown Send chat every 5 seconds counting down from 30. OnJoin: apply table to move player to US or RU, go to State 1. OnLeave: if player was on RU side, replace with player from US side (this might fail!), go to State 1 OnSpawn: if player is US, warn and kill, go to State 1. if player is RU, go to State 1. Countdown ends: go to state 2. State 2) Round in progress OnJoin: apply table to move player to US or RU, go to State 2. OnLeave: if player was RU AND there are no more RU players left, replace with player from US side (this might fail!), go to State 2 OnDeath: if player was US, move to RU, go to State 2. If no US players left, go to State 3. if player was RU and US players reach victory condition (X kills), go to State 3. If anyone uses a forbidden weapon, first time is a warning and kill, second is a kick, go to State 2. State 3) Winners! Announce winners, countdown to round end (mapList.endRound). OnRoundOver: go to State 0. All other activations: do nothing, go to State 3. So that's 5 limits, one for OnJoin, OnLeave, OnSpawn, OnDeath and OnRoundOver. That's pretty complicated. I might be able to combine the OnJoin and OnSpawn cases into one limit, we'll see. I could eliminate the OnLeave limit if we had an honor system rule that if a zombie leaves, a US player will voluntarily switch teams. That would cut it down to a more reasonable number of 3 limits. Note that sometimes a forced move will fail. So there will be some glitches when players leave. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by HexaCanon*: ---edit--- Sry, maybe wrong answere......... OnRoundOver first_expression Code: (true)second_check_CODE Code: /* von Papa Charly */ TimeSpan time = TimeSpan.FromSeconds(server.TimeRound); String hhmmss = time.Hours.ToString("D2") + ":" + time.Minutes.ToString("D2") + ":" + time.Seconds.ToString("D2"); /* BF3 friendly map names, including B2K */ Dictionary<String, String> Maps = new Dictionary<String, String>(); Maps.Add("MP_001", "Grand Bazaar"); Maps.Add("MP_003", "Teheran Highway"); Maps.Add("MP_007", "Caspian Border"); Maps.Add("MP_011", "Seine Crossing"); Maps.Add("MP_012", "Operation Firestorm"); Maps.Add("MP_013", "Damavand Peak"); Maps.Add("MP_017", "Noshahr Canals"); Maps.Add("MP_018", "Kharg Island"); Maps.Add("MP_Subway", "Operation Metro"); Maps.Add("XP1_001", "Strike At Karkand"); Maps.Add("XP1_002", "Gulf of Oman"); Maps.Add("XP1_003", "Sharqi Peninsula"); Maps.Add("XP1_004", "Wake Island"); /* BF3 friendly game modes, including B2K */ Dictionary<String, String> Modes = new Dictionary<String, String>(); Modes.Add("ConquestLarge0", "Conquest64"); Modes.Add("ConquestSmall0", "Conquest"); Modes.Add("ConquestSmall1", "Conquest Assault"); Modes.Add("RushLarge0", "Rush"); Modes.Add("SquadRush0", "Squad Rush"); Modes.Add("SquadDeathMatch0", "Squad Deathmatch"); Modes.Add("TeamDeathMatch0", "Team Deathmatch"); if ( true ) { if (Maps.ContainsKey(server.MapFileName) && Modes.ContainsKey(server.Gamemode)) plugin.PRoConChat("^7Admin > All: " + plugin.R("[%date% %time%] Map duration for " + Maps[server.MapFileName]+" "+ Modes[server.Gamemode] + " was " + server.TimeRound/60 + " minutes." )); plugin.Log("Plugins/roundduration.log", plugin.R("[%date% %time%] Map duration for " + Maps[server.MapFileName]+" "+ Modes[server.Gamemode] + " was " + server.TimeRound/60 + " minutes.")); } else return false;Shows on ProconChat[16:04:26] Admin > All: [samstag, 3. März 2012 16:04] Map duration for Caspian Border Team Deathmatch was 10,2833333333333 minutes. and also in Plugins/roundduration.log If server goes emtpy the roundtime is longer and longer. I think in a week you can see, which map players are leaving. Say Thanks to Papa Charly! Rucki fixing the code to show HHMMSS duration format Code: /* von Papa Charly */ TimeSpan time = TimeSpan.FromSeconds(server.TimeRound); String hhmmss = time.Hours.ToString("D2") + ":" + time.Minutes.ToString("D2") + ":" + time.Seconds.ToString("D2"); /* BF3 friendly map names, including B2K */ Dictionary<String, String> Maps = new Dictionary<String, String>(); Maps.Add("MP_001", "Grand Bazaar"); Maps.Add("MP_003", "Teheran Highway"); Maps.Add("MP_007", "Caspian Border"); Maps.Add("MP_011", "Seine Crossing"); Maps.Add("MP_012", "Operation Firestorm"); Maps.Add("MP_013", "Damavand Peak"); Maps.Add("MP_017", "Noshahr Canals"); Maps.Add("MP_018", "Kharg Island"); Maps.Add("MP_Subway", "Operation Metro"); Maps.Add("XP1_001", "Strike At Karkand"); Maps.Add("XP1_002", "Gulf of Oman"); Maps.Add("XP1_003", "Sharqi Peninsula"); Maps.Add("XP1_004", "Wake Island"); /* BF3 friendly game modes, including B2K */ Dictionary<String, String> Modes = new Dictionary<String, String>(); Modes.Add("ConquestLarge0", "Conquest64"); Modes.Add("ConquestSmall0", "Conquest"); Modes.Add("ConquestSmall1", "Conquest Assault"); Modes.Add("RushLarge0", "Rush"); Modes.Add("SquadRush0", "Squad Rush"); Modes.Add("SquadDeathMatch0", "Squad Deathmatch"); Modes.Add("TeamDeathMatch0", "Team Deathmatch"); if ( true ) { if (Maps.ContainsKey(server.MapFileName) && Modes.ContainsKey(server.Gamemode)) plugin.PRoConChat("^7Admin > All: " + plugin.R("[%date% %time%] Map duration for " + Maps[server.MapFileName]+" "+ Modes[server.Gamemode] + " was " + hhmmss)); plugin.Log("Plugins/roundduration.log", plugin.R("[%date% %time%] Map duration for " + Maps[server.MapFileName]+" "+ Modes[server.Gamemode] + " was " + hhmmss)); } else return false; Yesssssssssssss! It seems it works! THANKS HexaCanon and PapaCharlie! I hope last question: How can I get a msg like this? X Sniperkills from PlayerNameY! Your are Attacker! + player.Name + or %p_n% does not work. Same as %r_x%. :/ ---edit--- This limit is working fine for me! OnKill first_check Expression Code: (server.Gamemode.StartsWith("Rush") && Regex.Match(kill.Weapon, @"(_:SV98|M40A5|M98B|MK11|SVD|M39|QBU-88|L96|SKS)", RegexOptions.IgnoreCase).Success)second_Check Code Code: if (limit.Activations(player.Name) > 3) if ( team1.Tickets <= 80 && player.TeamId == 1) { //plugin.SendSquadMessage(player.TeamId, player.SquadId, "%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!"); //plugin.SendGlobalMessage(plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); plugin.PRoConChat(plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); } else return false;This code writes a message in Proconchat.For GlobalMessge or SquadMessage delete the "//" Edit the tickets and kills! This is code is only for testing! I have 10 kills at Translation for the msg: %p_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch! %p_fn% is Attacker and has %p_x% Sniperkills! Move your ass! Thx! Rucki try it Code: if (limit.Activations(player.Name) > 3) if ( team1.Tickets <= 80 && player.TeamId == 1) { plugin.SendGlobalMessage(plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); plugin.SendSquadMessage(player.TeamId, player.SquadId, plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); plugin.PRoConChat(plugin.R("%k_fn% ist Angreifer und hat %p_x% Sniperkills! Bewege deinen Arsch!")); } else return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by Singh400*: Now both the limits I have currently (...* & ...*). Don't work correctly on Grand Bazaar or Operation Metro. I figure I need to call int CurrentRound & int TotalRounds. And then somehow work them into the existing limits I have in-place. Any tips/points how I can do this? I'm thinking of adding something like:- Code: if TotalRounds = 2 then [i]something[/i] plugin.SendGlobalMessage( " [b]The next map will be[/b] " + Maps[server.NextMapFileName] + " [b]on[/b] " + Modes[server.NextGamemode] + " [b]Round[/b] " [i]CurrentRound[/i] " [b]of[/b] " [i]TotalRounds[/i] " );I feel that is not totally right though.I'm making some progress on this. But why does server.CurrentRound return 0 when it is really 1? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by HexaCanon*: I'm making some progress on this. But why does server.CurrentRound return 0 when it is really 1?just do currentround + 1 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by Singh400*: just do currentround + 1Yeah, I tried that and ever variation I could think of in my head. But it wasn't returning it correctly. It would just output 0 + 1, really quite frustrating! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by Singh400*: Yeah, I tried that and ever variation I could think of in my head. But it wasn't returning it correctly. It would just output 0 + 1, really quite frustrating!This is what I've got so far:- Code: /* BF3 friendly map names, including B2K */ Dictionary<String, String> Maps = new Dictionary<String, String>(); Maps.Add("MP_001", "Grand Bazaar"); Maps.Add("MP_003", "Teheran Highway"); Maps.Add("MP_007", "Caspian Border"); Maps.Add("MP_011", "Seine Crossing"); Maps.Add("MP_012", "Operation Firestorm"); Maps.Add("MP_013", "Damavand Peak"); Maps.Add("MP_017", "Noshahr Canals"); Maps.Add("MP_018", "Kharg Island"); Maps.Add("MP_Subway", "Operation Metro"); Maps.Add("XP1_001", "Strike At Karkand"); Maps.Add("XP1_002", "Gulf of Oman"); Maps.Add("XP1_003", "Sharqi Peninsula"); Maps.Add("XP1_004", "Wake Island"); /* BF3 friendly game modes, including B2K */ Dictionary<String, String> Modes = new Dictionary<String, String>(); Modes.Add("ConquestLarge0", "Conquest"); Modes.Add("ConquestSmall0", "Conquest"); Modes.Add("ConquestSmall1", "Conquest Assault"); Modes.Add("RushLarge0", "Rush"); Modes.Add("SquadRush0", "Squad Rush"); Modes.Add("SquadDeathMatch0", "Squad Deathmatch"); Modes.Add("TeamDeathMatch0", "Team Deathmatch"); plugin.ConsoleWrite(plugin.R("%p_n% wants to know the next map")); [b]if (Maps.ContainsKey(server.NextMapFileName) && Modes.ContainsKey(server.NextGamemode))[/b] plugin.SendGlobalMessage( "The next map is " + Maps[server.NextMapFileName] + " on " + Modes[server.NextGamemode] ); if (server.NextMapFileName == "MP_Subway") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); if (server.NextMapFileName == "MP_001") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " );It's probably not perfect code wise or very efficient. But it works. Also, I don't understand what the line of code highlighted in red does, so I removed it and the code still works fine? Edit* AHA! I'm getting somewhere:- Code: plugin.SendGlobalMessage( "" + ( (server.TotalRounds) +1 ) );Returns 3!! WOOOHOOO! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 4, 2012 Author Share Posted March 4, 2012 Originally Posted by PapaCharlie9*: Also, I don't understand what the line of code highlighted in red does, so I removed it and the code still works fine? Edit* AHA! I'm getting somewhere:- Code: plugin.SendGlobalMessage( "" + ( (server.TotalRounds) +1 ) ); Leave in the red code. It's an error checker. If someday in the future BF3 introduces a new map or new game mode, your limit code will fail (exception error message) without the red code. It's future proofing. Since you have added code, put everything in braces, like this: Code: if (Maps.ContainsKey(server.NextMapFileName) && Modes.ContainsKey(server.NextGamemode)) [b]{[/b] plugin.SendGlobalMessage( "The next map is " + Maps[server.NextMapFileName] + " on " + Modes[server.NextGamemode] ); if (server.NextMapFileName == "MP_Subway") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); if (server.NextMapFileName == "MP_001") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); [b]}[/b]Don't add +1 to TotalRounds. Just to CurrentRound. The current round is "zero based", meaning, the count starts from 0. So the "first" round is 0, the "second" round is 1, etc. To print out the round as a number, do this: plugin.SendGlobalMessage("The current round is " + (server.CurrentRound+1) + " of " + server.TotalRounds); If the current round is the "first" round (value 0), this will chat: The current round is 1 of 2 * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 5, 2012 Author Share Posted March 5, 2012 Originally Posted by Singh400*: Leave in the red code. It's an error checker. If someday in the future BF3 introduces a new map or new game mode, your limit code will fail (exception error message) without the red code. It's future proofing.Ah I see, righto added back in! Since you have added code, put everything in braces, like this: Code: if (Maps.ContainsKey(server.NextMapFileName) && Modes.ContainsKey(server.NextGamemode)) [b]{[/b] plugin.SendGlobalMessage( "The next map is " + Maps[server.NextMapFileName] + " on " + Modes[server.NextGa/memode] ); if (server.NextMapFileName == "MP_Subway") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); if (server.NextMapFileName == "MP_001") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); [b]}[/b] I take it the braces just help group it together? Don't add +1 to TotalRounds. Just to CurrentRound. The current round is "zero based", meaning, the count starts from 0. So the "first" round is 0, the "second" round is 1, etc. To print out the round as a number, do this: plugin.SendGlobalMessage("The current round is " + (server.CurrentRound+1) + " of " + server.TotalRounds); If the current round is the "first" round (value 0), this will chat: The current round is 1 of 2 Yes, I realise about server.TotalRounds I was just messing about. Turns out I was going about it the wrong way. I was trying to add + 1 using the Say action on a new limit, it doesn't handle it correctly and just prints x + 1 instead of the sum. Here is the final code for @shownext: Code: /* BF3 friendly map names, including B2K */ Dictionary<String, String> Maps = new Dictionary<String, String>(); Maps.Add("MP_001", "Grand Bazaar"); Maps.Add("MP_003", "Teheran Highway"); Maps.Add("MP_007", "Caspian Border"); Maps.Add("MP_011", "Seine Crossing"); Maps.Add("MP_012", "Operation Firestorm"); Maps.Add("MP_013", "Damavand Peak"); Maps.Add("MP_017", "Noshahr Canals"); Maps.Add("MP_018", "Kharg Island"); Maps.Add("MP_Subway", "Operation Metro"); Maps.Add("XP1_001", "Strike At Karkand"); Maps.Add("XP1_002", "Gulf of Oman"); Maps.Add("XP1_003", "Sharqi Peninsula"); Maps.Add("XP1_004", "Wake Island"); /* BF3 friendly game modes, including B2K */ Dictionary<String, String> Modes = new Dictionary<String, String>(); Modes.Add("ConquestLarge0", "Conquest"); Modes.Add("ConquestSmall0", "Conquest"); Modes.Add("ConquestSmall1", "Conquest Assault"); Modes.Add("RushLarge0", "Rush"); Modes.Add("SquadRush0", "Squad Rush"); Modes.Add("SquadDeathMatch0", "Squad Deathmatch"); Modes.Add("TeamDeathMatch0", "Team Deathmatch"); plugin.ConsoleWrite(plugin.R("%p_n% wants to know the next map")); if (Maps.ContainsKey(server.NextMapFileName) && Modes.ContainsKey(server.NextGamemode)) { plugin.SendGlobalMessage( "The next map is " + Maps[server.NextMapFileName] + " on " + Modes[server.NextGamemode]); plugin.SendGlobalMessage( "The current round is " + (server.CurrentRound+1) + " of " + server.TotalRounds); if (server.NextMapFileName == "MP_Subway") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); if (server.NextMapFileName == "MP_001") plugin.SendGlobalMessage( Maps[server.NextMapFileName] + " will have 2 rounds " ); } * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 5, 2012 Author Share Posted March 5, 2012 Originally Posted by Singh400*: Players like to vent, so I thought it would be funny if the server vented back:- 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(@".*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].*"); bad_words.Add("twat"); bad_words.Add("prick"); bad_words.Add("noob"); foreach(String bad_word in bad_words) if (Regex.Match(player.LastChat, "^"+bad_word+"$", RegexOptions.IgnoreCase).Success) return true; return false; Note: Member supermillhouse wrote ...*, I just modified it. Set second_check to this Code:Code: /* Version: V0.8/R1-Random */ List<String> shame = new List<String>(); shame.Add("%p_n% you are muppet!"); shame.Add("%p_n% you are 'special'!"); shame.Add("%p_n% that was a pathetic insult, not going to even bother!"); shame.Add("%p_n% not much of an insult eh_!"); shame.Add("%p_n% such a large vocalbury - we are all impressed(!)"); // Add additional messages here with shame.Add("..."); //Randomize Random rand = new Random(); int next = rand.Next(shame.Count); // Choose random index bounded by list count String msg = plugin.R(shame[next]); //Send message plugin.SendGlobalMessage(msg); return false; Note: Member PapaCharlie9 wrote ...*, I just modified it. * 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.