ImportBot Posted April 9, 2014 Author Share Posted April 9, 2014 Originally Posted by TMiland*: Hmm, okay. Because i had an idea to YELL to the squad, if a player requested something. This is what i tried: Code: string msg = "none"; if (Regex.Match(player.LastChat, @"(_:REQUEST ORDER)", RegexOptions.IgnoreCase).Success) { msg = player.Name + " requested an ORDER! Give it to him!"; plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + player.FullName + " requested an ORDER! "); } else if (Regex.Match(player.LastChat, @"(_:NEED MEDIC)", RegexOptions.IgnoreCase).Success) { msg = player.Name + " needs MEDICAL ATTENTION! Give him a MEDPACK before he dies!"; plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + player.FullName + " requested a MEDPACK! "); } else if (Regex.Match(player.LastChat, @"(_:REQUEST AMMO)", RegexOptions.IgnoreCase).Success) { msg = player.Name + " needs AMMO! Give him a AMMOPACK before he gets himself killed!"; plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + player.FullName + " needs AMMO! "); } return false;I really have no idea what i'm doing, but thought it was worth a try lol! I also need to get who is the squad leader for the REQUEST ORDER part, to maybe direct the msg to him. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2014 Author Share Posted April 10, 2014 Originally Posted by Tomgun*: um could someone help me with my request about the vote nextmap please * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2014 Author Share Posted April 10, 2014 Originally Posted by OddJob001*: Hmm, okay. Because i had an idea to YELL to the squad, if a player requested something. This is what i tried: Code: string msg = "none"; if (Regex.Match(player.LastChat, @"(_:REQUEST ORDER)", RegexOptions.IgnoreCase).Success) { msg = player.Name + " requested an ORDER! Give it to him!"; plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + player.FullName + " requested an ORDER! "); } else if (Regex.Match(player.LastChat, @"(_:NEED MEDIC)", RegexOptions.IgnoreCase).Success) { msg = player.Name + " needs MEDICAL ATTENTION! Give him a MEDPACK before he dies!"; plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + player.FullName + " requested a MEDPACK! "); } else if (Regex.Match(player.LastChat, @"(_:REQUEST AMMO)", RegexOptions.IgnoreCase).Success) { msg = player.Name + " needs AMMO! Give him a AMMOPACK before he gets himself killed!"; plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ConsoleWrite("^b^1ADMIN ORDERS >^0^n " + player.FullName + " needs AMMO! "); } return false;I really have no idea what i'm doing, but thought it was worth a try lol! I also need to get who is the squad leader for the REQUEST ORDER part, to maybe direct the msg to him. If you could get something like this working it would be awesome. A way for the squad leader to see requested commands as short yell. Good idea. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2014 Author Share Posted April 10, 2014 Originally Posted by TMiland*: If you could get something like this working it would be awesome. A way for the squad leader to see requested commands as short yell. Good idea.Yeah, i was really hoping it would pick it right up, but it didn't so, we need to get a dev to answer to see if it's possible at all. Any devs out there? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2014 Author Share Posted April 10, 2014 Originally Posted by PapaCharlie9*: um could someone help me with my request about the vote nextmap pleaseAre you requesting that a specific limit be modified? If so, best to ask in that limit's thread. It gets lost in here. In any case, I'm busy trying to get an update to MB out for Naval Strike then I have to fix Vote Ban, so someone else will have to help you. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 10, 2014 Author Share Posted April 10, 2014 Originally Posted by PapaCharlie9*: Yeah, i was really hoping it would pick it right up, but it didn't so, we need to get a dev to answer to see if it's possible at all. Any devs out there? Devs respond in the Plugin Development thread. If you get it working, post it in a separate thread. BTW, your chat codes are wrong. There are no spaces in the codes. Maybe that's why its not working? Just use @"ID_CHAT_" as the regex match string, since they all start with that. You can use plugin.GetSquadLeaderName(int teamId, int squadId) to get the squad leader. You should really take another look at the documentation. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 13, 2014 Author Share Posted April 13, 2014 Originally Posted by TMiland*: Devs respond in the Plugin Development thread. If you get it working, post it in a separate thread. BTW, your chat codes are wrong. There are no spaces in the codes. Maybe that's why its not working? Just use @"ID_CHAT_" as the regex match string, since they all start with that. You can use plugin.GetSquadLeaderName(int teamId, int squadId) to get the squad leader. You should really take another look at the documentation. Okay, i have got the messages working, and now the problem is the squad leader stuff. This is what i have so far: https://github.com/tmiland/ProconLim...d%20request.cs How could we limit this to the squad? Hmm... Any idea or help is appreciated! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 13, 2014 Author Share Posted April 13, 2014 Originally Posted by LCARSx64*: Okay, i have got the messages working, and now the problem is the squad leader stuff. This is what i have so far: https://github.com/tmiland/ProconLim...d%20request.cs How could we limit this to the squad? Hmm... Any idea or help is appreciated! You could use something like the following, although it's probably not the most efficient way:Code: // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: callersTeam.AddRange(team1.players); break; case 2: callersTeam.AddRange(team2.players); break; case 3: callersTeam.AddRange(team3.players); break; case 4: callersTeam.AddRange(team4.players); break; } // ================================================================== // PUT YOUR CODE TO SETUP THE MESSAGES HERE !!! // ================================================================== // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 13, 2014 Author Share Posted April 13, 2014 Originally Posted by PapaCharlie9*: You could use something like the following, although it's probably not the most efficient way: Code: // We need a list for notification List<PlayerInfoInterface> callersTeam = new List<PlayerInfoInterface>(); // Get a list of players on caller's team switch (player.TeamId) { case 1: callersTeam.AddRange(team1.players); break; case 2: callersTeam.AddRange(team2.players); break; case 3: callersTeam.AddRange(team3.players); break; case 4: callersTeam.AddRange(team4.players); break; } // ================================================================== // PUT YOUR CODE TO SETUP THE MESSAGES HERE !!! // ================================================================== // Send the message only to the players in the same squad foreach (PlayerInfoInterface p in callersTeam) { if ((p.Name != player.Name) && (p.SquadId == player.SquadId)) { plugin.SendPlayerYell(p.Name, msg, 5); } } return false; That would definitely work. You could try the raw yell command with a squad subset, also. I don't know why there is no plugin.SendSquadYell (there is a plugin.SendTeamYell function). Maybe in BF3 it didn't work? Anyway, give this raw version a try: Code: plugin.SendServerCommand("admin.yell", msg, 5, "squad", player.TeamId.ToString(), player.SquadId.ToString()); * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 13, 2014 Author Share Posted April 13, 2014 Originally Posted by PapaCharlie9*: This is what i have so far: https://github.com/tmiland/ProconLim...d%20request.csThat can be simplified substantially. Any time you repeat code in block after block, you can move the repeated code to the bottom. I thought you were going to extract the actual string from the Regex, but since you are matching the entire code each and every time, there is a simpler way to do that: Code: // First make sure it is a commo rose code: if (!player.LastChat.StartsWith("ID_CHAT_")) return false; // Now select each code. The only thing you do is set the yell message variable. switch (player.LastChat) { case "ID_CHAT_ATTACK/DEFEND": msg = player.Name + " Gave you an ORDER! Follow up!"; break; case "ID_CHAT_THANKS": msg = player.Name + " says: THANK YOU!"; break; case "ID_CHAT_SORRY": msg = player.Name + " says: SORRY!"; break; ... // add more "ID_CHAT_..." cases here ... default: // This is for anything that doesn't match any of the cases above // Don't send a message // But log the unknown code plugin.ConsoleWrite("Unknown commo rose chat code: " + player.LastChat); return false; } // The rest of the repeated code is moved down here: plugin.SendSquadMessage(player.TeamId, player.SquadId, msg); // Put squad yell code here ... plugin.PRoConEvent(msg, "Insane Limits"); // I changed the ConsoleWrite to a PRoConChat, so it goes in the chat log instead of the plugin log plugin.PRoConChat("^b^1ADMIN ORDERS >^0^n " + msg); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 14, 2014 Author Share Posted April 14, 2014 Originally Posted by TMiland*: Here's the final result: myrcon.net/.../insane-limits-yell-to-squad-members-on-request Thanks for the help guys! Working really good on all 7 servers! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 14, 2014 Author Share Posted April 14, 2014 Originally Posted by PapaCharlie9*: You forgot the "default:" keyword. I fixed post #1, but you need to fix your Github copy. Otherwise, cheers! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 14, 2014 Author Share Posted April 14, 2014 Originally Posted by TMiland*: You forgot the "default:" keyword. I fixed post #1, but you need to fix your Github copy. Otherwise, cheers! Waat? Got rid of that on some point lol! Thanks for the fix! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by Tomgun*: "on death information" can you guys look at my request on this limit please myrcon.net/.../insane-limits-service-stars-ingame-stats * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: Tomgun also had the idea to Yell to a player who joins a squad, about who the leader is. Something like this: "You have joined alpha squad, your squad leader is: SquadLeaderPlayerName Think of it as a welcome msg. I have searched for ways to do this, but have no idea on where to start. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by PapaCharlie9*: No, sorry, there's no way to determine the squad leader through a limit. I know that it's odd that you can set a new squad leader, but you can't tell who the current one is. It's complicated. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: No, sorry, there's no way to determine the squad leader through a limit. I know that it's odd that you can set a new squad leader, but you can't tell who the current one is. It's complicated.Okay, i figured. Another thing, about the Yell to Squad Members on Request limit, do you have any clue on how i could direct the messages towards a class like Assault f.eks? So if a player is requesting a medic, only the Assault classes get's the yell. To kind of limit the spam some. *edit: I see there's Code: procon.protected.weapons.add Supportand Code: procon.protected.weapons.add Assaultbut i guess that doesn't work with kill.Category? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by PapaCharlie9*: Okay, i figured. Another thing, about the Yell to Squad Members on Request limit, do you have any clue on how i could direct the messages towards a class like Assault f.eks? So if a player is requesting a medic, only the Assault classes get's the yell. To kind of limit the spam some. *edit: I see there's Code: procon.protected.weapons.add Supportand Code: procon.protected.weapons.add Assaultbut i guess that doesn't work with kill.Category?As far as I know, there's no kit info available for BF4 or BF3 for that matter. If you look on Procon's Players tab, you see a Kit column, but it's always blank. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by TMiland*: As far as I know, there's no kit info available for BF4 or BF3 for that matter. If you look on Procon's Players tab, you see a Kit column, but it's always blank.Right, i have seen that. But what if we could determine what class is being used from what category the player had it's last kill with? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by IAF-SDS*: Hi Papa. Here's the idea we talked about as another option to the MAA limit. Discourage MAA limit Each time an MAA kill is tracked, the victim will be able to type @MAA in any chat to auto-kill the MAA. This will make the MAA just as undesirable as the aircraft, because it will be susceptible to dying the same amount (instead of remaining invincible in it's uncap to rape all of the aircraft from across the map). But the players would use their own discretion in using it. This would work the same way the @punish system works for teamkillers, but there would not be any forgive command of course. This private chat message would be sent to the victim once the kill was tracked as an MAA kill: PlayerNameVictim: Type @MAA now to AUTO-KILL your killer in the overpowered Mobile-AA vehicle if you're sick of it! The victim would have 30 seconds to execute the @MAA command, otherwise it would expire. If the victim timely executed the @MAA command, this public chat message would be sent: Victim PlayerNameVictim AUTO-KILLED the Mobile-AA user PlayerNameKiller by typing @MAA in chat. An optional second public message would be sent 10 seconds later (can comment out if we don't want to use it): The overpowered Mobile-AA vehicle is discouraged from camping near its base. Victims have the discretion to auto-kill it. There would not be any kicks nor any further action, just @MAA kills only when the victim timely used it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 15, 2014 Author Share Posted April 15, 2014 Originally Posted by PapaCharlie9*: Discourage MAA limitA couple of questions. What's to stop the MAA driver from getting double/triple killed? For example, say a chopper with pilot and gunner gets taken out by the MAA. The pilot types @MAA within 5 seconds, driver is killed. Driver respawns 10 seconds later, total of 15 seconds has elapsed. Now the gunner types @MAA. Since it is still in the 30 second window, driver would get killed a second time, right? I suppose I could cancel all potential @MAA kills after the first one is executed. Basically reset the timers on all victims. Would that be okay? Basically make it first come, first served. Should there be an automatic kill if no one uses @MAA but the driver racks up X number of kills (not counting roadkills)? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 16, 2014 Author Share Posted April 16, 2014 Originally Posted by PapaCharlie9*: A couple of questions. What's to stop the MAA driver from getting double/triple killed? For example, say a chopper with pilot and gunner gets taken out by the MAA. The pilot types @MAA within 5 seconds, driver is killed. Driver respawns 10 seconds later, total of 15 seconds has elapsed. Now the gunner types @MAA. Since it is still in the 30 second window, driver would get killed a second time, right? I suppose I could cancel all potential @MAA kills after the first one is executed. Basically reset the timers on all victims. Would that be okay? Basically make it first come, first served. Should there be an automatic kill if no one uses @MAA but the driver racks up X number of kills (not counting roadkills)? Here's the new limit: myrcon.net/.../punish-and-forgive-rules-for-proconrulz-plugin * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 16, 2014 Author Share Posted April 16, 2014 Originally Posted by IAF-SDS*: EDIT: I replied before I saw that you finished it. I'll move my reply to that thread. Thanks Papa! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 18, 2014 Author Share Posted April 18, 2014 Originally Posted by OddJob001*: New Request I need a plugin script that would end the round when one of the teams (need the ability to change which team) hits X amount of tickets left (with the ability to change tickets for either team). Since BF does not allow settings individually between teams, it would allow me to do the following: Example: Set both Teams to X tickets (using regular server ticket count %) but end.round when Team x hits y tickets. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 18, 2014 Author Share Posted April 18, 2014 Originally Posted by slayersghost*: New Request Looking for an end of round stats for insane limits.I would like best squad,killing machine,melee,and last kill * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 18, 2014 Author Share Posted April 18, 2014 Originally Posted by PapaCharlie9*: New Request I need a plugin script that would end the round when one of the teams (need the ability to change which team) hits X amount of tickets left (with the ability to change tickets for either team). Since BF does not allow settings individually between teams, it would allow me to do the following: Example: Set both Teams to X tickets (using regular server ticket count %) but end.round when Team x hits y tickets. New limit created here:showthread....d-ticket-count* See the assumptions, I had to make a lot of them ... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 18, 2014 Author Share Posted April 18, 2014 Originally Posted by PapaCharlie9*: New Request Looking for an end of round stats for insane limits.I would like best squad,killing machine,melee,and last kill You sure you don't want to use the Stats plugin? It gives you all of that. myrcon.net/.../stats-webpage-for-xpkillers-stats-logger-plugin If you are sure that plugin won't work for you, I need way more detail. Spell out exactly what you want: * Chat message or yell messages or both? If yell, for how long? * Best squad per team or best squad overall? And what do you mean by "best"? Score? Kills? Something else? * What is "killing machine" exactly? * What do you mean by "melee"? Most knife kills? Again, per team or overall? * Last kill per team or overall? That's a lot of stuff to cram into the end round messaging window. How do you want it to be formatted? Type it out exactly the way you want it in a ... block. For example, chat only, no yells: Code: [ADMIN] Best Squad: Bravo (US), Killing Machine: znorff, Most Knife Takedowns: animal2323 [ADMIN] Last Kill: DEDAX111 (US)EDIT: Melee might not be possible. That's not a per-round stat that Insane Limits tracks. It might be possible to make a separate limit to track melee kills, but the problem is that there is no way to reset the counters, since you want the stats to be posted after the end of the round, which is the normal time to reset counters. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by EdgarAllan*: New Request: Admin Yell/Chat message upon certain ticket percentage remaining Hello, I'm looking for a script that will perform an admin yell and admin chat to all players when one team has 50% (or any configurable percentage) that the opposing team does (ie: 350 vs 700 tickets). The yell/chat should also not occur if the total tickets in the game/on a team are below a certain configurable percentage (20% for example). I want to use this as a way to inform players in a completely lopsided Conquest game that they can utilize the !surrender command (created by PapaCharlie on one of the first pages of the thread). It would probably even be more awesome if there is a minimum ticket gap size before the message would be enabled as well. This might also be something that could be added onto the current !surrender limit. Thanks for any help guys. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by TMiland*: New Request: Admin Yell/Chat message upon certain ticket percentage remaining Hello, I'm looking for a script that will perform an admin yell and admin chat to all players when one team has 50% (or any configurable percentage) that the opposing team does (ie: 350 vs 700 tickets). The yell/chat should also not occur if the total tickets in the game/on a team are below a certain configurable percentage (20% for example). I want to use this as a way to inform players in a completely lopsided Conquest game that they can utilize the !surrender command (created by PapaCharlie on one of the first pages of the thread). It would probably even be more awesome if there is a minimum ticket gap size before the message would be enabled as well. This might also be something that could be added onto the current !surrender limit. Thanks for any help guys. Maybe this limit can help you in some way? showthread....hind-(CQ-only)* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 19, 2014 Author Share Posted April 19, 2014 Originally Posted by PapaCharlie9*: New Request: Admin Yell/Chat message upon certain ticket percentage remaining Hello, I'm looking for a script that will perform an admin yell and admin chat to all players when one team has 50% (or any configurable percentage) that the opposing team does (ie: 350 vs 700 tickets). The yell/chat should also not occur if the total tickets in the game/on a team are below a certain configurable percentage (20% for example). I want to use this as a way to inform players in a completely lopsided Conquest game that they can utilize the !surrender command (created by PapaCharlie on one of the first pages of the thread). It would probably even be more awesome if there is a minimum ticket gap size before the message would be enabled as well. This might also be something that could be added onto the current !surrender limit. Thanks for any help guys. You're talking about this !surrender limit, right? myrcon.net/...insane-limits-v09r6-vote-to-nuke-campingbase-raping-team-or-surrender#entry28837 If so, make your request in that thread and I'll add it as an adjunct. * 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.