ImportBot Posted June 19, 2012 Author Share Posted June 19, 2012 Originally Posted by HexaCanon*: i would love a plugin that will autoban anyone who says "crash the server" "crashing the server". i already use the badwords limit but that kicks only after 3 times of using the bad word. is there anyway i can auto ban someone who says this? i had a cheater on my server last night who the players were trying to votekick and he said "going to crash this server" and then bam! server crashed. i found him in logs and banned him manually but would like to insta ban anyone who says this. thanks! one of my server goers just reported the same incident about our servers and he did indeed crash it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 19, 2012 Author Share Posted June 19, 2012 Originally Posted by MajorWinters101*: I believe the following Insane Limit will do that. I haven't compiled or tested this, so let me know if there are any problems: Set a limit to evaluate OnTeamDeath. Set the Action to None. Set first_check to this Code: Code: // Define your message here: String msg = "Yo! You want payback on that bitch that TK'd you_ Type !punish into chat."; /* Since yells are not visible when a player is dead, we have to wait a little while before we send the yell. We'll yell twice, just in case. */ String who = victim.Name; ThreadStart yellTKReminder = delegate { Thread.Sleep(45*1000); // Try the first yell at 45 seconds after death plugin.ServerCommand("admin.yell", msg, "15", "player", who); Thread.Sleep(((2*60)+15)*1000); // Try the second yell at 3 minutes after death (0:45 + 2:15) plugin.ServerCommand("admin.yell", msg, "15", "player", who); }; Thread t = new Thread(yellTKReminder); t.Start(); Thread.Sleep(10); return false; I tested it out, it is functioning properly as intended. However, the time until the message is displayed it too long. And the repeat message is not needed. By the time 45 sec or 3 mins rolls by, your already dead 5 times (at least me) and TK punish no longer works since it is used for the last person you 'killed' you. I would eliminate the 2nd message and make the 1st message display something like 20 seconds after the TK, especially in CQ maps. Thank you again. UPDATE: I tried to edit this as per written above, it didn't work. If you can tweak that, it would be awesome. Thanks. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 19, 2012 Author Share Posted June 19, 2012 Originally Posted by Singh400*: Random wonderment. Anyone remember in the alpha/beta of BF3 it would tell you who revived you (in a private yell)? It has since been removed now. BUT, can IL detect revives? Maybe a reserve-kill with defib as the weapon? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 20, 2012 Author Share Posted June 20, 2012 Originally Posted by Kugelfaenger*: Hi, i would give our players the possibility to kill them self if they are buged (respawnmenu-bug) !killme should be the command: OnAnyChat - firstcheck: Code: if (Regex.Match(player.LastChat, @"(_:kill me|bugged|cant move)", RegexOptions.IgnoreCase).Success) { plugin.ServerCommand("admin.say", "Type '!killme' if you bugged", "player", player.Name); plugin.ServerCommand("admin.yell", "Type '!killme' if you bugged", "10", "player", player.Name); } if (Regex.Match(player.LastChat, @"^\s*!(_:killme)", RegexOptions.IgnoreCase).Success) { plugin.ServerCommand("admin.say", "Your wish is my command! Kill in 5 sec!", "player", player.Name); plugin.ServerCommand("admin.yell", "Your wish is my command! Kill in 5 sec!", "10", "player", player.Name); plugin.KillPlayer(player.Name,5); }all players (non-admin) get the error: no enough previlegs and cant be killedadmins get the question "do you mean PlayerXYZ_" and "Player name or reason missing from command" how to get it working for every player w/o adminrights and get away the both messages as admin? using kick/ban shortcuts (but there is no !killme command) * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 20, 2012 Author Share Posted June 20, 2012 Originally Posted by Singh400*: Try this instead: * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 20, 2012 Author Share Posted June 20, 2012 Originally Posted by Kugelfaenger*: seems to work, but i will test it with some players - thx * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 20, 2012 Author Share Posted June 20, 2012 Originally Posted by xeroe*: Can someone help me to write a limit? I want do prohibit sniper for the attacking team in rush at metro and damavand, the limit should look like the following evaluation: OnKill First Check : If Team = Attacker and Weapon = Sniper and Map = Metro,Damavand Action: Kill the Player It would be nice if someone could do this for me quickly * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 20, 2012 Author Share Posted June 20, 2012 Originally Posted by xFaNtASyGiRLx*: Try this instead: hey! this is great. i never even saw this before. do they have to type @stuck to get "killed"? is it possible for them to type anything with the word "stuck in it" that will kill them? for example "i am stuck on the deploy screen" * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 20, 2012 Author Share Posted June 20, 2012 Originally Posted by Singh400*: hey! this is great. i never even saw this before. do they have to type @stuck to get "killed"? is it possible for them to type anything with the word "stuck in it" that will kill them? for example "i am stuck on the deploy screen"Yeah you could make it do that. Not recommend though, what happens if they are talking about being "stuck at a chokepoint"? You could have it trigger as keyword:- IF "stuck" detected in player.laschat send private yell/message to say "If you are stuck (at the deploy screen), type @stuck to kill yourself". * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 21, 2012 Author Share Posted June 21, 2012 Originally Posted by xFaNtASyGiRLx*: Yeah you could make it do that. Not recommend though, what happens if they are talking about being "stuck at a chokepoint"? You could have it trigger as keyword:- IF "stuck" detected in player.laschat send private yell/message to say "If you are stuck (at the deploy screen), type @stuck to kill yourself". uhhh okay codes please? thanks! * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 21, 2012 Author Share Posted June 21, 2012 Originally Posted by PapaCharlie9*: I would eliminate the 2nd message and make the 1st message display something like 20 seconds after the TK, especially in CQ maps.Okay. I removed the second yell and made the first message a yell after 20 seconds, plus I added a chat, in case they took a little longer to change kits and respawn -- they'll miss the yell but at least they have a chance of seeing the chat. Code: // Define your message here: String msg = "Yo! You want payback on that bitch that TK'd you_ Type !punish into chat."; /* Since yells are not visible when a player is dead, we have to wait a little while before we send the yell. We'll yell twice, just in case. */ String who = victim.Name; ThreadStart yellTKReminder = delegate { Thread.Sleep(20*1000); // Yell and chat 20 seconds after death plugin.ServerCommand("admin.yell", msg, "15", "player", who); plugin.ServerCommand("admin.say", msg, "player", who); }; Thread t = new Thread(yellTKReminder); t.Start(); Thread.Sleep(10); return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 21, 2012 Author Share Posted June 21, 2012 Originally Posted by PapaCharlie9*: Can someone help me to write a limit? I want do prohibit sniper for the attacking team in rush at metro and damavand, the limit should look like the following evaluation: OnKill First Check : If Team = Attacker and Weapon = Sniper and Map = Metro,Damavand Action: Kill the Player It would be nice if someone could do this for me quickly Here's a start. It's in the Metro thread so it is Metro only and it needs to be updated to the new R26 sniper rifles, but it's better than nothing. You can easily modify it to add Damavand and the missing weapons, but if you need help, post a request in that thread, the Metro thread: http://www.phogue.net/forumvb/showth...ll=1#post50258* * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 21, 2012 Author Share Posted June 21, 2012 Originally Posted by Singh400*: uhhh okay codes please? thanks! Pssst, the code has already been posted. Look above my original post that you first quoted * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 21, 2012 Author Share Posted June 21, 2012 Originally Posted by xFaNtASyGiRLx*: You could have it trigger as keyword:- IF "stuck" detected in player.laschat send private yell/message to say "If you are stuck (at the deploy screen), type @stuck to kill yourself". yes i saw the code but i'm talking about this part where i just quoted. where would i put the private/yell message? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 21, 2012 Author Share Posted June 21, 2012 Originally Posted by Singh400*: yes i saw the code but i'm talking about this part where i just quoted. where would i put the private/yell message?Well if you really want to use that way. Make the limit shown the picture, then create another limit. OnAnyChat and set the first_check to this code:Code: if (Regex.Match(player.LastChat, @"(_:kill me|bugged|cant move|stuck)", RegexOptions.IgnoreCase).Success) { plugin.ServerCommand("admin.say", "Type @stuck if you bugged out at the spawn menu", "player", player.Name); plugin.ServerCommand("admin.yell", "Type @stuck if you bugged out at the spawn menu", player.Name); } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by xFaNtASyGiRLx*: Well if you really want to use that way. Make the limit shown the picture, then create another limit. OnAnyChat and set the first_check to this code: Code: if (Regex.Match(player.LastChat, @"(_:kill me|bugged|cant move|stuck)", RegexOptions.IgnoreCase).Success) { plugin.ServerCommand("admin.say", "Type @stuck if you bugged out at the spawn menu", "player", player.Name); plugin.ServerCommand("admin.yell", "Type @stuck if you bugged out at the spawn menu", player.Name); } return false; thanks!! works great! it doesn't yell though, only says in chat but thats ok. i don't have spambot or w/e running so not sure if thats why. no big deal * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by Singh400*: thanks!! works great! it doesn't yell though, only says in chat but thats ok. i don't have spambot or w/e running so not sure if thats why. no big dealWhoops, try this instead: Code: if (Regex.Match(player.LastChat, @"(_:kill me|bugged|cant move|stuck)", RegexOptions.IgnoreCase).Success) { string msg = "Type @stuck if you bugged out at the spawn menu"; plugin.ServerCommand("admin.yell", msg, "10", "player", player.Name); plugin.ServerCommand("admin.say", msg, "player", player.Name); } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by dyn*: Interestingly enough I came here looking for this very thing: A way to let players kill themselves should they become stuck!! Great timing. The examples provided should do the trick, however, I'd really like to put an evaluation on the limit so players can't keep killing themselves over and over again. I can see this being a problem if, for example, you're in a tank and you're about to die. Just type @stuck and the attacker won't get the kill. Out of ammo? Type @stuck and you can then respawn with more. Out of bounds because you bailed out from a vehicle? Type @stuck and the death doesn't count. A couple of solutions: Limit the number of times a person is able to @stuck per round (1-2 times max). Give the player a countdown -- say 15 seconds -- after the command is issued to actually kill the player. These two changes could prevent abuse. I don't have the slightest idea of how to go about programming this though.... Thoughts on the idea and if it's even possible? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by Singh400*: Interestingly enough I came here looking for this very thing: A way to let players kill themselves should they become stuck!! Great timing. The examples provided should do the trick, however, I'd really like to put an evaluation on the limit so players can't keep killing themselves over and over again. I can see this being a problem if, for example, you're in a tank and you're about to die. Just type @stuck and the attacker won't get the kill. Out of ammo? Type @stuck and you can then respawn with more. Out of bounds because you bailed out from a vehicle? Type @stuck and the death doesn't count. A couple of solutions: Limit the number of times a person is able to @stuck per round (1-2 times max). Give the player a countdown -- say 15 seconds -- after the command is issued to actually kill the player. These two changes could prevent abuse. I don't have the slightest idea of how to go about programming this though.... Thoughts on the idea and if it's even possible? You'd need to work in:- Code: if ( limit.Activations ( player.Name ) > 2) return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by Singh400*: Threw this together, I've no idea if it works. I'll be able to test it tomorrow:- Code: if (Regex.Match(player.LastChat, @"(_:kill me|bugged|cant move|stuck)", RegexOptions.IgnoreCase).Success) { string msg1 = "Type !killme if you bugged"; plugin.ServerCommand("admin.say", msg1, "player", player.Name); plugin.ServerCommand("admin.yell", msg1, "10", "player", player.Name); } if (Regex.Match(player.LastChat, @"^\s*!(_:killme)", RegexOptions.IgnoreCase).Success) { if ( limit.Activations ( player.Name ) > 2) return false; string msg2 = "Your wish is my command! Kill in 5 sec!"; plugin.ServerCommand("admin.say", msg2, "player", player.Name); plugin.ServerCommand("admin.yell", msg2, "10", "player", player.Name); plugin.KillPlayer(player.Name,5); } return false; * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by Singh400*: Threw this together, I've no idea if it works. I'll be able to test it tomorrow:- Code: if (Regex.Match(player.LastChat, @"(_:kill me|bugged|cant move|stuck)", RegexOptions.IgnoreCase).Success) { string msg1 = "Type !killme if you bugged"; plugin.ServerCommand("admin.say", msg1, "player", player.Name); plugin.ServerCommand("admin.yell", msg1, "10", "player", player.Name); } if (Regex.Match(player.LastChat, @"^\s*!(_:killme)", RegexOptions.IgnoreCase).Success) { if ( limit.Activations ( player.Name ) > 2) return false; string msg2 = "Your wish is my command! Kill in 5 sec!"; plugin.ServerCommand("admin.say", msg2, "player", player.Name); plugin.ServerCommand("admin.yell", msg2, "10", "player", player.Name); plugin.KillPlayer(player.Name,5); } return false; That code doesn't work correctly. I've posted a working example ...* with a limit of 3 self-kills per round. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by dyn*: Thank you Singh400!! The code in the examples thread works exactly like I was looking for. You just saved our admins a bit of a headache * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by xFaNtASyGiRLx*: yes thanks! but isn't pc9 trying to retire the examples thread? might be a good idea to post that code here too. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by Singh400*: yes thanks! but isn't pc9 trying to retire the examples thread? might be a good idea to post that code here too. Yes, but it's easier for me to find it, as it is the examples thread. And this is the requests thread. We should have a locked examples thread that could be updated by a mod with correct working examples. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 22, 2012 Author Share Posted June 22, 2012 Originally Posted by xFaNtASyGiRLx*: i agree! so much and so long of a thread to go through. but i like how the examples thread first post is a list of examples with links. but i guess mic isn't here to update it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 23, 2012 Author Share Posted June 23, 2012 Originally Posted by Fruity*: I might be imagining things (or I just can't find it) but was their a limit that would log player stats at the end of a round (like score, kd, etc of each player) to a csv file? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 23, 2012 Author Share Posted June 23, 2012 Originally Posted by PapaCharlie9*: yes thanks! but isn't pc9 trying to retire the examples thread? might be a good idea to post that code here too. I just want to move requests off of that thread. Posting new examples there is fine. Even better, if it is more than a 3 liner, just ask me to start a top-level post in Plugin Enhancements and I'll make one for you, with a canonical title like, "Insane Limits 0.8p3: xxx", you tell me what to put for xxx. The contents of the post #1 will be "see below", and then you post your limit in the first reply. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 23, 2012 Author Share Posted June 23, 2012 Originally Posted by PapaCharlie9*: i agree! so much and so long of a thread to go through. but i like how the examples thread first post is a list of examples with links. but i guess mic isn't here to update it.Yeah, and it seriously needs updating. I had been gearing up to start an Examples 2.0 thread -- not a rewrite, just a fresh thread to post new examples in. But that was at the same time there was that micovery sighting, so I thought he was coming back! Put those plans on hold. What do you think, should I start an Examples 2.0 thread? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 23, 2012 Author Share Posted June 23, 2012 Originally Posted by Singh400*: I might be imagining things (or I just can't find it) but was their a limit that would log player stats at the end of a round (like score, kd, etc of each player) to a csv file?OnRound, log player.KdrRound etc etc. Should be pretty easy. Never used OnRound though. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted June 23, 2012 Author Share Posted June 23, 2012 Originally Posted by PapaCharlie9*: I might be imagining things (or I just can't find it) but was their a limit that would log player stats at the end of a round (like score, kd, etc of each player) to a csv file?Sounds familar, but I couldn't find it in the Examples nor plugin thread. It's easy enough to just write one. What exactly do you want in terms of stats? The basic template for the code is: Set limit to evaluate OnRoundOver. Set first_check to this Code: Code: // List all the players List<PlayerInfoInterface> all = new List<PlayerInfoInterface>(); all.AddRange(team1.players); all.AddRange(team2.players); if (team3.players.Count > 0) all.AddRange(team3.players); if (team4.players.Count > 0) all.AddRange(team4.players); if (!plugin.Data.issetBool("FreshLog")) { // Write the heading line plugin.Log("stats.csv", "Name,Rank,SPM,..."); plugin.Data.setBool("FreshLog", true); } // Dump all the players to the log foreach (PlayerInfoInterface p in all) { // Build up the log line: String line = player.FullName + ","; line += player.Rank + ","; line += player.Spm + ","; ... // Log it plugin.Log("stats.csv", line); } return false;If you want to get fancy, you can roll the log at midnight by looking at DateTime.Now and formatting the file name to be something like stats_YYYYMMDD.csv. EDIT: oops, did you want per round stats or current battlelog stats (might be reset) or all-time stats? I listed current battlelog stats. If your want per round, just use the corresponding Round property, e.g., player.SpmRound. If you want all-time stats, see this thread: www.phogue.net/forumvb/showth...Premium-resets* * 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.