Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by Singh400*:

 

Any one got any ideas how to combat random players trying to impersonate admins? I don't like to publicly broadcast I'm an admin in game. But I do want something where a buzzword is caught ("admin") and private msg is sent to the player saying "Check if an admin is in-game at the moment by typing @checkadmin". The logic would be:

 

Code:

if player.name == singh400 is on server then say "yes an admin is present")
I know how to do the majority of the code, but how do I get the code to look at pb_sv_plist?

 

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?

Any thoughts on this Charlie?
* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 3.2k
  • Created
  • Last Reply

Originally Posted by xFaNtASyGiRLx*:

 

What do you think, should I start an Examples 2.0 thread?

YES please! .. its so hard to find things in these long threads and search function brings up tons of irrelevant stuff.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

That code doesn't work correctly. I've posted a working example ...* with a limit of 3 self-kills per round.

i just tested the code you put in the examples thread and was able to type @stuck 5+ times and get admin killed.

 

also, not sure what the player sees when they are stuck at the spawn menu, but when i'm at the spawn menu and am dead, typing @stuck doesn't do anything. am i doing something wrong here?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

i just tested the code you put in the examples thread and was able to type @stuck 5+ times and get admin killed.

 

also, not sure what the player sees when they are stuck at the spawn menu, but when i'm at the spawn menu and am dead, typing @stuck doesn't do anything. am i doing something wrong here?

Remember you've got the other limit setup as well (you've got two @stuck limits). Delete the older limit, and start using this one only.

 

When they type "stuck" in a sentence, it will send a private message and a private yell to the player informing them that they can self-kill with @stuck.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

Remember you've got the other limit setup as well (you've got two @stuck limits). Delete the older limit, and start using this one only.

 

When they type "stuck" in a sentence, it will send a private message and a private yell to the player informing them that they can self-kill with @stuck.

but the new limit you posted in examples thread doesn't have an "action" - kill. does that matter?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

but the new limit you posted in examples thread doesn't have an "action" - kill. does that matter?

Code:
if ( limit.Activations ( player.Name ) > 3 )
	return false;

if ( Regex.Match ( player.LastChat, @"^\s*[@](_:killme)", RegexOptions.IgnoreCase).Success )
	{
		string msg2 = "Killing " + player.Name + " in 3 seconds!" ;
		plugin.ServerCommand ( "admin.say" , msg2 , "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg2 , "8", "player" , player.Name ) ;
		plugin.KillPlayer ( player.Name , 3 );
	}

return false;
red color is the action, so set your action to none...
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

but the new limit you posted in examples thread doesn't have an "action" - kill. does that matter?

But it does! :ohmy: The action is already coded into the example. Just copy and paste the entire thing.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

But it does! :ohmy: The action is already coded into the example. Just copy and paste the entire thing.

ok i have done this and copied the example exactly but it doesn't seem to work. i even tested it last night by going to the server and when dead at spawn screen (not stuck) but just while waiting to spawn i typed @stuck and nothing happened.

 

when someone was really stuck, it didn't work for them either

 

[12:51:30] Endeav > gota love the deploy screen revive bufg

[12:51:45] Zerelth > just type @ stuck

[12:51:55] Endeav > @ stuck

[12:52:00] Zerelth > with no space

[12:52:03] Endeav > @stuck

[12:52:18] Endeav > @stuck

[12:52:23] Endeav > its not doing anything

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

ok i have done this and copied the example exactly but it doesn't seem to work. i even tested it last night by going to the server and when dead at spawn screen (not stuck) but just while waiting to spawn i typed @stuck and nothing happened.

 

when someone was really stuck, it didn't work for them either

@stuck will no longer work because you disabled/deleted that particular limit. It's now @killme in the new one.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

@stuck will no longer work because you disabled/deleted that particular limit. It's now @killme in the new one.

umm okay but doesn't the instruction or yell message tell them to type @stuck?

 

edit: nvm, i see you just edited the example to say @killme.

 

no wonder why it wasn't working

 

also, when you edited the code, you also removed the words, kill me, bugged. can you readd those words so that it will yell at them to type @kill me

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

umm okay but doesn't the instruction or yell message tell them to type @stuck?

 

edit: nvm, i see you just edited the example to say @killme.

 

no wonder why it wasn't working

You have a lot to learn oh little one :biggrin:

 

I changed it to @killme because it's obvious what the command does, and the first_check wouldn't get falsely trigger by @stuck.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

bahh.. i see that but the problem is, i copied/pasted your code EXACT as you had it before you edited it just now. and that code was telling them to type @stuck. sooooooooooooooooooooo... yeahhhh

 

anyways.. i edited my post to ask if you could add the words: "kill me", "bugged", along with stuck to the trigger words that would give them the yell message to type @killme

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

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?

Yes, I do remember a message in Beta saying player xyz revived you. It's gone now, more's the pity. There's nothing in the protocol for it now and I don't think it's possible for IL to detect revives, sorry. That said, I have noticed players being unmovable after an OnKill event, which I assume to be a revive. I don't think moving everyone who gets killed just to see if they were revived would be a good idea, though. :ohmy:

 

Any one got any ideas how to combat random players trying to impersonate admins? I don't like to publicly broadcast I'm an admin in game. But I do want something where a buzzword is caught ("admin") and private msg is sent to the player saying "Check if an admin is in-game at the moment by typing @checkadmin". The logic would be:

 

Code:

if player.name == singh400 is on server then say "yes an admin is present")
I know how to do the majority of the code, but how do I get the code to look at pb_sv_plist?

 

Any thoughts on this Charlie?

So, in a command where player.Name is the player typing the command, you want to know if "singh400" is on the server?

 

Easy.

 

Use

 

Code:

PlayerInfoInterface singhToTheRescue = plugin.GetPlayer("singh400", false);
It's not documented in the plugin thread, but it is documented in the Plugin Details tab in PRoCon, for IL.

 

The singhToTheRescue variable is just like player, so you can do singhToTheRescue.Name, singhToTheRescue.Score, etc. If singhToTheRescue == null, you are not on the server.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

You have a lot to learn oh little one :biggrin:

 

I changed it to @killme because it's obvious what the command does, and the first_check wouldn't get falsely trigger by @stuck.

ok well.. i just had a member get stuck at deploy screen. he typed @killme and got the message "you do not have enough privilege to blablabla.

 

yesterday, when i was testing it on your old code "@stuck" would admin kill you. but NOT at the deploy screen. only when you were alive and typed it.

 

so.. has anyone been able to get this working on their server and if so, could you please tell me how?

 

here is the code from singh that i am using:

 

Used by players to kill themselves when they get bugged out at the spawn deployment menu.

 

Set the evaluation to OnAnyChat.

 

Set first_check to this code:

Code:

if ( Regex.Match ( player.LastChat, @"(_:stuck)", RegexOptions.IgnoreCase ).Success ) 
	{
		string msg1 = "Type @killme if you are stuck at the deploy screen" ;
		plugin.ServerCommand ( "admin.say" , msg1, "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg1 , "8" , "player" , player.Name ) ;
	}
	
return true;
Set second_check to this code:

Code:

if ( limit.Activations ( player.Name ) > 3 )
	return false;

if ( Regex.Match ( player.LastChat, @"^\s*[@](_:killme)", RegexOptions.IgnoreCase).Success )
	{
		string msg2 = "Killing " + player.Name + " in 3 seconds!" ;
		plugin.ServerCommand ( "admin.say" , msg2 , "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg2 , "8", "player" , player.Name ) ;
		plugin.KillPlayer ( player.Name , 3 );
	}

return false;
It allows the player to kill themselves no more than 3 times per round.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

bahh.. i see that but the problem is, i copied/pasted your code EXACT as you had it before you edited it just now. and that code was telling them to type @stuck. sooooooooooooooooooooo... yeahhhh

 

anyways.. i edited my post to ask if you could add the words: "kill me", "bugged", along with stuck to the trigger words that would give them the yell message to type @killme

I edited the post to include the information for the evaluation to be with OnAnyChat.

 

Yes, I do remember a message in Beta saying player xyz revived you. It's gone now, more's the pity. There's nothing in the protocol for it now and I don't think it's possible for IL to detect revives, sorry. That said, I have noticed players being unmovable after an OnKill event, which I assume to be a revive. I don't think moving everyone who gets killed just to see if they were revived would be a good idea, though. :ohmy:

Gah :sad:

 

 

So, in a command where player.Name is the player typing the command, you want to know if "singh400" is on the server?

 

Easy.

 

Use

 

Code:

PlayerInfoInterface singhToTheRescue = plugin.GetPlayer("singh400", false);
It's not documented in the plugin thread, but it is documented in the Plugin Details tab in PRoCon, for IL.

 

The singhToTheRescue variable is just like player, so you can do singhToTheRescue.Name, singhToTheRescue.Score, etc. If singhToTheRescue == null, you are not on the server.

Thanks, I got as far as Code:
PlayerInfoInterface Singh400 = plugin.GetPlayer(Singh400, true) ;
by breaking down your code for Hero & Villian.

 

No idea what the true or false is for though?

 

ok well.. i just had a member get stuck at deploy screen. he typed @killme and got the message "you do not have enough privilege to blablabla.

 

yesterday, when i was testing it on your old code "@stuck" would admin kill you. but NOT at the deploy screen. only when you were alive and typed it.

 

so.. has anyone been able to get this working on their server and if so, could you please tell me how?

 

here is the code from singh that i am using:

Very odd, you are the only person to report problems so far. It should be working fine, and I'm sure if it was incorrect code Charlie would have said as much.

 

For now I'd suggest reverting to the older limit.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by xFaNtASyGiRLx*:

 

has anyone else tested it so far?

 

well i would revert to the older limit but you deleted it and edited it. :biggrin:

 

sooo.. do you have it?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Figured out why it was saying not enough privileges, it was conflicting with the In-Game Admin plugin. @killme is similar to the @kill command used by the In-Game Admin plugin.

 

Changing @killme to @slayme works in conjunction with the In-Game Admin plugin. I'll update the code in the other thread.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Sorry*:

 

This limit will activate for players who get more than 90% headshots after 30 kills (with a specific weapon). This works across rounds. (Total stats are not reset at the end of the round).

 

Set limit to evaluate OnKill, set action to Kick,

 

Set first_check to this Code:

 

 

 

Code:

double kills = player[kill.Weapon].KillsTotal;

double headshots = player[kill.Weapon].HeadshotsTotal;

double headshots_percent = Math.Round((headshots / kills)*100.0, 2);

 

if (headshots_percent > 90 && kills > 30)

{

plugin.ConsoleWrite(plugin.R("%p_n% has " + headshots_percent + " headshots percent with "+ kill.Weapon + " after " + kills + " kills"));

return true;

}

 

return false; Set these action specific parameters:

 

 

Code:

kick_message = %p_n%, you were kicked for suspicious headshots percentage with %w_n% This feature (per-weapon stats) is not extensively tested. You should adjust the conditions to test, and see if it works as you expect it. If you are going to test it on a populated server, make sure it's on virtual so you can adjust the values until you feel comfortable that it will not kick everyone.

Is it possible to add certain weapons to this limit (page 8, post 78 of insane limits examples)?

 

IE F2000|FAMAS|PP-19 for example. I tried a few different things, but it just returned errors :smile:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Thanks, I got as far as Code:

PlayerInfoInterface Singh400 = plugin.GetPlayer(Singh400, true) ;
by breaking down your code for Hero & Villian.

 

No idea what the true or false is for though?

Set it to false. Unless you want anything close to "Singh400", like singmeasong, gh400buddy, IngholdVerboten, etc. to match! True means take any name that is kinda close to the string. It will almost always return non-null. If I was the only one on your server, it would return me.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Figured out why it was saying not enough privileges, it was conflicting with the In-Game Admin plugin. @killme is similar to the @kill command used by the In-Game Admin plugin.

 

Changing @killme to @slayme works in conjunction with the In-Game Admin plugin. I'll update the code in the other thread.

First of all, you two need to get a room. :smile:

 

Second, that was my guess as well, conflict with In-Game Admin @kill. The code is awesome, nothing wrong there.

 

How about @suicide instead of @slayme? Seems more apropos.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Is it possible to add certain weapons to this limit (page 8, post 78 of insane limits examples)?

 

IE F2000|FAMAS|PP-19 for example. I tried a few different things, but it just returned errors :smile:

No problem. You need the Weapon codes first. Look in your PRoCon installation in the Configs folder. You should see a file called BF3.def, look at it in Notepad or whatever and look for the codes you want. It turns out that the codes you want are exactly as you spelled them.

 

Here's the rest of it:

 

Set limit to evaluate OnKill, set action to Kick,

 

Set first_check to this Code:

 

Code:

if (!Regex.Match(kill.Weapon, @"(_:F2000|FAMAS|PP-19)", RegexOptions.IgnoreCase).Success) return false;

double kills = player[kill.Weapon].KillsTotal;
if (kills < 1.0) return false;
double headshots = player[kill.Weapon].HeadshotsTotal;
double headshots_percent = Math.Round((headshots / kills)*100.0, 2);

if (headshots_percent > 90 && kills > 30)
{
    plugin.ConsoleWrite(plugin.R("%p_n% has " + headshots_percent + " headshots percent with "+ kill.Weapon + " after " + kills + " kills"));
    return true;
}

return false;
Set these action specific parameters:

 

 

Code:

kick_message = %p_n%, you were kicked for suspicious headshots percentage with %w_n%
This feature (per-weapon stats) is not extensively tested. You should adjust the conditions to test, and see if it works as you expect it.

 

In fact, it's known not to work in certain cases, so your mileage may vary.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

how can I use the limit on page 2 for a grenade limit for RPG/SMAW? what do I need to change? thanks in advance

Just so you know, everyone has different number of posts per pages set, so "page 2" could be anywhere. Each post has a number, that's a better way to specify, but best is that the number of the post is itself a link. Just copy that link into your post and I can go directly to the example you are talking about.

 

I searched through the early posts in the thread, is this the one you meant (it's on page 1 for me)?

 

myrcon.net/...insane-limits-requests#entry25400

 

If so, check out this thread and see if what you want is already there:

 

www.phogue.net/forumvb/showth...s-Count-As-One*

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Greek*:

 

Hey Papa,

 

the code you send to Donkim causes a kick at first kill. I'm sure i made something wrong...

 

Can you please take a look at the code and tell me what's wrong ?

 

Thanks :smile:

 

limit_5_evaluation: OnKill

limit_5_first_check: Expression

limit_5_first_check_expression: ( Regex.Match(kill.Weapon, @"(:_M67)", RegexOptions.IgnoreCase).Success )

 

limit_5_second_check: Code

 

limit_5_second_check_code:

 

 

Code:

/* Version: V0.8/R1 */
String kCounter = killer.Name + "_TreatAsOne_Count";
TimeSpan time = TimeSpan.FromSeconds(5); // Activations within 5 seconds count as 1

int warnings = 0;
if (server.Data.issetInt(kCounter)) warnings = server.Data.getInt(kCounter);
    
/*
The first time through, warnings is zero. Whether this is an isolated
activation or the first of a sequence of activations in a short period
of time, do something on this first time through.
*/
String msg = "none";
if (warnings == 0) {
        return false;
}

/*
The second and subsequent times through, check to make sure we are not
getting multiple activations in a short period of time. Ignore if
less than the time span required.
*/

if (limit.Activations(killer.Name, time) > 1) return false;

/*
We get here only if there was exactly one activation in the time span
*/

if (warnings == 3) {
        msg = plugin.R("FINAL WARNING %k_n%! Only 8 M67 kills allowed!"); // Second warning message
        plugin.SendGlobalMessage(msg);
		plugin.ServerCommand("admin.yell", msg, "player", killer.Name);
        plugin.PRoConChat("ADMIN > " + msg);
} else if (warnings >= 4) {
        msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%!");
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.PRoConEvent(msg, "Insane Limits");
        plugin.KickPlayerWithMessage(killer.Name, msg);
}
server.Data.setInt(kCounter, warnings+1);
return false;
I am trying to modify the expression and code for an RPG/SMAW kill limit of 10 and kick player on the 11 kill. thanks
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Learning-Curve*:

 

I have yet to see any solution in forums. What I want is to send to procon chat. Using action send to procon chat doesnt give me the information I need. It needs to be part of code.

 

{ plugin.ConsoleWrite(plugin.R("" + ""));

silly me thinks

{ plugin.procon_chat_txtWrite(plugin.R("" + ""));

 

what is the code to send info to procon chat window? Thanks in advance for any help...peace

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Singh400*:

 

Set it to false. Unless you want anything close to "Singh400", like singmeasong, gh400buddy, IngholdVerboten, etc. to match! True means take any name that is kinda close to the string. It will almost always return non-null. If I was the only one on your server, it would return me.

Yeah figured it after I messed about - thanks. Here is what I came up with:-

 

First_Check as Code:Code:

if ( Regex.Match ( player.LastChat, @"(_:admin|kick|ban)", RegexOptions.IgnoreCase ).Success ) 
	{
		string msg1 = "Is someone claiming to be an admin_ Type @check to verify!" ;
		plugin.ServerCommand ( "admin.say" , msg1, "player" , player.Name ) ;
		plugin.ServerCommand ( "admin.yell" , msg1 , "8" , "player" , player.Name ) ;
	}
	
return true ;
Second_Check as Code:Code:
if ( Regex.Match ( player.LastChat, @"^\s*[@](_:check)", RegexOptions.IgnoreCase).Success )
	{
		PlayerInfoInterface singhToTheRescue = plugin.GetPlayer ( "Singh400" , false ) ;




		if ( singhToTheRescue != null )
			{
				string msg1 = "An admin is present in-game" ;
				plugin.ServerCommand ( "admin.say" , msg1 , "player" , player.Name ) ;
				plugin.ServerCommand ( "admin.yell" , msg1 , "8" , "player" , player.Name ) ;
			}




		if ( singhToTheRescue == null )
			{
				string msg2 = "An admin isn't present in-game" ;
				plugin.ServerCommand ( "admin.say" , msg2 , "player" , player.Name ) ;
				plugin.ServerCommand ( "admin.yell" , msg2 , "8" , "player" , player.Name ) ;
			}
	
	}




return false;
I want to go one further and do @check and then it returns "player is admin" or "player isn't admin". I know I could just easily solve it by saying I'm admin. But I'd rather not do that, and it's a nice way to learn some additional stuff.

 

I guess I would define an admin list, and then have it look through the list and see if a match is found.

 

First of all, you two need to get a room. :smile:

 

Second, that was my guess as well, conflict with In-Game Admin @kill. The code is awesome, nothing wrong there.

 

How about @suicide instead of @slayme? Seems more apropos.

A room? She needs to buy me dinner first! :ohmy: Well who ever is using it can change @slayme to whatever they like. Me I take the view most players are stupid and can't spell it's easier to type @slayme than @suicide :ohmy:

 

Edit* Regarding my self-kill code (@slayme) I can't seem to add a limit.activation to it. It counts the trigger _:stuck as an activation, so me typing stuck three times will trigger the limit of 3 and then the code will cease to work until next round. Any ideas?

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.