Jump to content

Insane Limits - Examples


ImportBot

Recommended Posts

Originally Posted by cloverdefa*:

 

this is a better code

first check code

Code:

!Regex.Match(kill.Weapon, @"(_:ACB-90|Knife|Melee)", RegexOptions.IgnoreCase).Success
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";
Match m = Regex.Match(kill.Weapon, @"/([^/]+)$");
String wn = kill.Weapon;
if (m.Success) wn = m.Groups[1].Value;

if (warnings == 0) {
        msg = plugin.R("FINAL WARNING %k_n%! Do not use" + wn); // warning message
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
        plugin.KillPlayer(player.Name);
        server.Data.setInt(kCounter, warnings+1);
        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 >= 1) {
        msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with" + wn);
        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 try to test this setting

when someone use MAV and EOD kill

sever was direct kick player no worn

how can i change it first time worning player

then second time kick?

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 1.4k
  • Created
  • Last Reply

Originally Posted by HexaCanon*:

 

i am try to test this setting

when someone use MAV and EOD kill

sever was direct kick player no worn

how can i change it first time worning player

then second time kick?

This one saves the warnings each player has. So if he comes back and break rule again he gets kicked without warning. Also warnings stay even if round ends.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by cloverdefa*:

 

This one saves the warnings each player has. So if he comes back and break rule again he gets kicked without warning. Also warnings stay even if round ends.

thank you for answer me

but my question is gun kill first time have worn and second time kick

but MAV and EOD kill no worn

it is direct kick player in first time kill when player use MAV and EOD kill

 

 

 

and another question

if i want to add Repair Tools and DEFIBRILLATOR in this setting for player

i mean sever only knife and Repair Tools and DEFIBRILLATOR can kill player

so i need change first code ?

Code:

!Regex.Match(kill.Weapon, @"(_:ACB-90|Repair Tools|DEFIBRILLATOR|Knife|Melee)", RegexOptions.IgnoreCase).Success
thank you for answer
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by droopie*:

 

if (server.PlayerCount

 

the above gives me a count if its 0-15 players apply thees settings but how do i put specific player count?

 

like

} else if (server.PlayerCount

plugin.ServerCommand("vars.serverName", "0%-50% full");

} else if (server.PlayerCount = 16 ) {

plugin.ServerCommand("vars.serverName", "50% full");

} else if (server.PlayerCount = 32 ) {

plugin.ServerCommand("vars.serverName", "100% full");

}else{

plugin.ServerCommand("vars.serverName", "50%-100% full");

 

just as an example of what i mean.

 

edit: ah i think if i add an extra = so its like if (server.PlayerCount == 16 ) { will do?

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

Originally Posted by Mal-Praktis*:

 

I'm not sure that is correct. I created a script that:

 

Depending on the map Gunmaster it puts a rotation or another:

 

Interval: OnRoundOver

 

 

First Check:

 

Code:

List<String> map_modes = new List<String>();
map_modes.Add("GunMaster0");

List<String> map_names = new List<String>();
map_names.Add("XP4_Parl");

List<String> map_names0 = new List<String>();
map_names0.Add("XP4_FD");

List<String> map_names1 = new List<String>();
map_names1.Add("XP4_Quake");

List<String> map_names2 = new List<String>();
map_names2.Add("XP4_Rubble");

if (map_modes.Contains(server.NextGamemode) && map_names.Contains(server.NextMapFileName))
{
plugin.ServerCommand("vars.gunMasterWeaponsPreset", "6");
}
else

if (map_modes.Contains(server.NextGamemode) && map_names0.Contains(server.NextMapFileName))
{
plugin.ServerCommand("vars.gunMasterWeaponsPreset", "5");
}
else

if (map_modes.Contains(server.NextGamemode) && map_names1.Contains(server.NextMapFileName))
{
plugin.ServerCommand("vars.gunMasterWeaponsPreset", "3");
}
else

if (map_modes.Contains(server.NextGamemode) && map_names2.Contains(server.NextMapFileName))
{
plugin.ServerCommand("vars.gunMasterWeaponsPreset", "7");
}
else

{
plugin.ServerCommand("vars.gunMasterWeaponsPreset ", "2");
}
Action: None
I am interested in this type of gunmaster weapon list change feature too. Will this change to a specific gunMasterWeaponPreset based upon a specific map name, or is the preset random?

 

As a variation to this script, can InsaneLimits check the current round to see if it is GunMaster mode, and if so then change the vars.gunMasterWeaponsPreset to another number on a list so that the next map that is on GunMaster uses that next preset? Then it changes the vars.gunMasterWeaponsPreset again for the map using GunMaster mode?

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

Originally Posted by PapaCharlie9*:

 

I am interested in this type of gunmaster weapon list change feature too. Will this change to a specific gunMasterWeaponPreset based upon a specific map name, or is the preset random?

 

As a variation to this script, can InsaneLimits check the current round to see if it is GunMaster mode, and if so then change the vars.gunMasterWeaponsPreset to another number on a list so that the next map that is on GunMaster uses that next preset? Then it changes the vars.gunMasterWeaponsPreset again for the map using GunMaster mode?

It would be best to move this discussion to the Insane Limits Requests thread. This thread is for old examples only.

 

At the moment, IL cannot detect any vars.* settings. A future version (once Procon itself has complete support) will have that ability.

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

Originally Posted by droopie*:

 

This limit will send a message (global) for the player when he spawns in the server for the first time.

 

Set limit to evaluate OnSpawn, and action to Say

 

Set first_check to this Expression:

 

Code:

(true)
Set second_check to this Expression:

 

Code:

( limit.ActivationsTotal(player.Name) == 1 )
Set these action specific parameters

 

Code:

say_audience = All
           say_message = Everyone, lets welcome %p_n%, from %p_cn%!
If player leaves, and re-joins, welcome message should be displayed again.
im looking for something similar but with an addon...

 

 

if i could have a different message displayed from a list of preset messages. like:

Preset 1: Welcome! This server has NO RULES!

Preset 2: We are RECRUITING! Join at www.TeaBaggersUnited.com

Preset 3: Idle to earn FREE ADMIN!

 

(so it would send either a random message each time the user connects or it cycles from messages 1-3 sending a single message on each connect and spawning)

 

 

after using limits for so long and its prob my primary plugin, i think this is asking too much but after requesting the player tracker and idle loggers which at first they said wasnt possible, u did it! i cant find a plugin that does something similar so if u know of 1 please let me know!!!

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

Originally Posted by PapaCharlie9*:

 

im looking for something similar but with an addon...

 

 

if i could have a different message displayed from a list of preset messages. like:

Preset 1: Welcome! This server has NO RULES!

Preset 2: We are RECRUITING! Join at www.TeaBaggersUnited.com

Preset 3: Idle to earn FREE ADMIN!

 

(so it would send either a random message each time the user connects or it cycles from messages 1-3 sending a single message on each connect and spawning)

 

 

after using limits for so long and its prob my primary plugin, i think this is asking too much but after requesting the player tracker and idle loggers which at first they said wasnt possible, u did it! i cant find a plugin that does something similar so if u know of 1 please let me know!!!

Actually, the knife shame limit is similar, you are just using first Spawn instead of a kill with a knife as the trigger.

 

Post your request in the Insane Limits Request thread and someone will write it up for you.

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

Originally Posted by droopie*:

 

This limit will check for how fast a player makes kills, and perform whatever action you want, if the player exceeds the rate you specify.

 

 

Set the limit to evaluate for OnKill, and set the action to Kick

 

Set first_check to this Expression:

 

Code:

(true)
Set the second_check to this Expression:

 

Code:

( limit.Activations(player.Name, TimeSpan.FromSeconds(30)) >  10 )
In this example, the rate is +10 kills, in 30 seconds. You may want to adjust this rate as you wish.

 

 

What if you wanted to check for the Headshot rate ? Well you can do that as well. In that case, just modify the first_check Expression to activate only for Headshots like this:

 

Code:

( kill.Headshot == true)
how do i take a pbss when this is activated?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by droopie*:

 

This will allow you to change tickets based on next map gamemode. It will check on first kill of each round just to make sure the round have started.

 

Change XXX to the Ticket % you want on your server (100% default)

Code:

plugin.ServerCommand("vars.gameModeCounter", "XXX");
To add other map modes use the following code:

Code:

else if(server.NextGamemode == "GAME MODE HERE")
    {
        plugin.ServerCommand("vars.gameModeCounter", "XXX");
    }
For multiple modes with same ticket ratio you can use this. Make sure to use | to separate each game mode.

Code:

if(Regex.Match(server.NextGamemode, "(GAME MODE 1|GAME MODE 2|GAME MODE 3)", RegexOptions.IgnoreCase).Success)
    {
        plugin.ServerCommand("vars.gameModeCounter", "XXX");
    }

Next Gamemode Ticket Changer

 

Set Evaluation to OnKill

 

first_check to Expression

Code:

(true)
second_check to Code

Code:
if(limit.Activations() == 1)
{
    if(Regex.Match(server.NextGamemode, "(ConquestLarge0|ConquestSmall0|ConquestSmall1)", RegexOptions.IgnoreCase).Success)
    {
        plugin.ServerCommand("vars.gameModeCounter", "150");
    }
    else if(server.NextGamemode == "RushLarge0")
    {
        plugin.ServerCommand("vars.gameModeCounter", "100");
    }
    else if(server.NextGamemode == "TeamDeathMatch0")
    {
        plugin.ServerCommand("vars.gameModeCounter", "100");
    }
    
    plugin.ConsoleWrite("Next map mode is "+server.NextGamemode+". Tickets set for next map");
}
return false;

 

 

 

 

 

 

You can also set ticket % based on map and gamemode by adding before the first gamemode check (Change MP_001 and RushLarge0 to what map and gamemode you want)

Code:

if(server.NextMapFileName == "MP_001" && server.NextGamemode == "RushLarge0")
{
    plugin.ServerCommand("vars.gameModeCounter", "XXX");
    plugin.ConsoleWrite("Next map is "+server.NextMapFileName+" with game mode "+server.NextGamemode+". Tickets set for next map");
    return false;
}
i got a question on this, will it cause conflict with Domination0 333 tickets but making Operation on Domination0 500 tickets?

 

if(limit.Activations() == 1)

{

if(Regex.Match(server.NextGamemode, "(Domination0|)", RegexOptions.IgnoreCase).Success)

{

plugin.ServerCommand("vars.gameModeCounter", "333");

}

else if(server.NextGamemode == "TeamDeathMatchC0")

{

plugin.ServerCommand("vars.gameModeCounter", "500");

}

 

else if(server.NextMapFileName == "XP2_Office" && server.NextGamemode == "Domination0")

{

plugin.ServerCommand("vars.gameModeCounter", "500");

plugin.ConsoleWrite("Next map is "+server.NextMapFileName+" with game mode "+server.NextGamemode+". Tickets set for next map");

return false;

}

 

plugin.ConsoleWrite("Next map mode is "+server.NextGamemode+". Tickets set for next map");

}

return false;

 

 

not sure if i did it right or i should put it the map+mode first followed by all modes.

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

Originally Posted by PapaCharlie9*:

 

i got a question on this, will it cause conflict with Domination0 333 tickets but making Operation on Domination0 500 tickets?

If you want Operation on Domination to be different from the rest of Domination, do the if tests in that order. The most specific should come before the general cases.

 

When you only have one name, like Domination0, you don't need Regex.Match. Just use server.NextGamemode == "Domination0". In any case, the syntax of your Regex.Match is wrong.

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

Originally Posted by droopie*:

 

Set Action to Server Command. Set the command to:

 

Code:

punkBuster.ps_sv_command pb_sv_getss %p_n%
in what location are the ss stored? just wondering the default location to get them in.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

in what location are the ss stored? just wondering the default location to get them in.

In a location set up by your RSP. For example, in the case of Branzone, they stick the files in a folder next to your BF3 game files and provide a web app that points at that folder and lets you browse through the files. Other hosting companies will offer something similar, or just an FTP address.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

How can I make a limit that kills players that get kills with the vehicles/mortars "death".

Submit limit requests in the Insane Limits Requests thread:

 

www.phogue.net/forumvb/showth...imits-Requests*

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

Originally Posted by reclutador*:

 

Set limit to evaluate OnJoin, set action to Kick or ban, or any other action you wish

 

Set first_check to this Expression:

 

Code:

( player.Rank > 45 )
You may change the rank value from 45 to whatever value you want.
i put this for auto kick players more than lvl 45 in me server ( is only for nobs) but no run why__? no kick players

 

or how i put automatick kick players more lvl 45

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

Originally Posted by HexaCanon*:

 

i put this for auto kick players more than lvl 45 in me server ( is only for nobs) but no run why__? no kick players

 

or how i put automatick kick players more lvl 45

most likely it is because of player stats fetching being throttled.

 

do it like this

 

Set limit to evaluate OnSpawn, set action to Kick or ban, or any other action you wush

 

Set first_check to this Expression:

 

Code:

(!player.StatsError && player.Rank > 45 )
you may change the rank value from 45 to whatever value you want.

 

note that this limit will not trigger until player stats are fetched.

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

Originally Posted by Pallywhacker*:

 

I want to setup a Melee/Knife Death Shame From Message List Limit.

 

I found this example. ...*.

 

I used the following.

 

First Check Expression

 

OnKill, action - none

 

Code:

( Regex.Match(kill.Weapon, "(Melee|Knife)").Success )
Second check

 

Code:

List<String> shame = new List<String>(); 
shame.Add("%k_fn% just sliced %v_n%'s throat, what a shame, bro!"); 
shame.Add("%v_n% was shanked by %k_fn%!"); 
shame.Add("%k_fn% just took %v_n%'s tags and made him cry!"); 
shame.Add("%k_fn% slipped a shiv into %v_n%'s back!"); 
shame.Add("%k_fn% knifed %v_n% and Insane Limits approves!"); 
shame.Add("%v_n%, you gonna let %k_fn% get away with taking your tags_"); 
shame.Add("%k_fn% just Tweeted about knifing %v_n%!"); 
shame.Add("%k_fn% just posted %v_n%'s tags on Facebook!"); 
shame.Add("%k_fn%: 'Just die already, %v_n%'"); 
shame.Add("%k_fn%: 'Hey %v_n%, you want summa this_'"); 
shame.Add("%v_n% took a gun to a knife fight with %k_fn%, and LOST!"); 
shame.Add("Did you see the YouTube of %k_fn% knifing %v_n%_"); 
shame.Add("%k_fn% just added +1 knife kills to his Battlelog stats, thanks to %v_n%"); 
shame.Add("%k_fn%: 'Hey %v_n%, check your six next time!'"); 
shame.Add("%v_n%, go tell your momma you lost your tags to %k_fn%!"); 
shame.Add("%v_n% just wanted to see %k_fn%'s Premium knife, not have it shoved in his eye!"); 
int level = 2; try { level = Convert.ToInt32(plugin.getPluginVarValue("debug_level")); } catch (Exception e) {} 
int next = Convert.ToInt32(limit.ActivationsTotal()); 
next = next % shame.Count; String msg = plugin.R(shame[next]); 
bool noSpam = (limit.Activations(killer.Name) > 1); 
if (level >= 2) plugin.ConsoleWrite("^b[Knife Shame]^n " + ((noSpam)_"^8private^0: ":"^4public^0: ") + msg); 
if (noSpam) { plugin.ServerCommand("admin.say", msg, "player", killer.Name); 
plugin.ServerCommand("admin.say", msg, "player", victim.Name); 
plugin.ServerCommand("admin.yell", msg, "8", "player", killer.Name); 
plugin.ServerCommand("admin.yell", msg, "8", "player", victim.Name); } else { plugin.SendGlobalMessage(msg);
 plugin.ServerCommand("admin.yell", msg, "8"); } 
plugin.PRoConChat("ADMIN > " + msg); 
return false;
I got these errors.

 

Code:

ERROR: 2 errors compiling Code
ERROR: (CS0103, line: 23, column: 1221):  The name 'limit' does not exist in the current context
ERROR: (CS0103, line: 23, column: 1326):  The name 'limit' does not exist in the current context
Can someone help me figure out whats going on or what I did wrong?

 

Thanks in advance.

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

Originally Posted by PapaCharlie9*:

 

I want to setup a Melee/Knife Death Shame From Message List Limit.

 

I found this example. ...*.

 

I used the following.

 

First Check Expression

 

OnKill, action - none

 

Code:

( Regex.Match(kill.Weapon, "(Melee|Knife)").Success )
Second check

 

Code:

List<String> shame = new List<String>(); 
shame.Add("%k_fn% just sliced %v_n%'s throat, what a shame, bro!"); 
shame.Add("%v_n% was shanked by %k_fn%!"); 
shame.Add("%k_fn% just took %v_n%'s tags and made him cry!"); 
shame.Add("%k_fn% slipped a shiv into %v_n%'s back!"); 
shame.Add("%k_fn% knifed %v_n% and Insane Limits approves!"); 
shame.Add("%v_n%, you gonna let %k_fn% get away with taking your tags_"); 
shame.Add("%k_fn% just Tweeted about knifing %v_n%!"); 
shame.Add("%k_fn% just posted %v_n%'s tags on Facebook!"); 
shame.Add("%k_fn%: 'Just die already, %v_n%'"); 
shame.Add("%k_fn%: 'Hey %v_n%, you want summa this_'"); 
shame.Add("%v_n% took a gun to a knife fight with %k_fn%, and LOST!"); 
shame.Add("Did you see the YouTube of %k_fn% knifing %v_n%_"); 
shame.Add("%k_fn% just added +1 knife kills to his Battlelog stats, thanks to %v_n%"); 
shame.Add("%k_fn%: 'Hey %v_n%, check your six next time!'"); 
shame.Add("%v_n%, go tell your momma you lost your tags to %k_fn%!"); 
shame.Add("%v_n% just wanted to see %k_fn%'s Premium knife, not have it shoved in his eye!"); 
int level = 2; try { level = Convert.ToInt32(plugin.getPluginVarValue("debug_level")); } catch (Exception e) {} 
int next = Convert.ToInt32(limit.ActivationsTotal()); 
next = next % shame.Count; String msg = plugin.R(shame[next]); 
bool noSpam = (limit.Activations(killer.Name) > 1); 
if (level >= 2) plugin.ConsoleWrite("^b[Knife Shame]^n " + ((noSpam)_"^8private^0: ":"^4public^0: ") + msg); 
if (noSpam) { plugin.ServerCommand("admin.say", msg, "player", killer.Name); 
plugin.ServerCommand("admin.say", msg, "player", victim.Name); 
plugin.ServerCommand("admin.yell", msg, "8", "player", killer.Name); 
plugin.ServerCommand("admin.yell", msg, "8", "player", victim.Name); } else { plugin.SendGlobalMessage(msg);
 plugin.ServerCommand("admin.yell", msg, "8"); } 
plugin.PRoConChat("ADMIN > " + msg); 
return false;
I got these errors.

 

Code:

ERROR: 2 errors compiling Code
ERROR: (CS0103, line: 23, column: 1221):  The name 'limit' does not exist in the current context
ERROR: (CS0103, line: 23, column: 1326):  The name 'limit' does not exist in the current context
Can someone help me figure out whats going on or what I did wrong?

 

Thanks in advance.

Please post your request in Insane Limits Request. This thread is an archive of old limits.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 6 years later...
  • 3 months later...
  • 2 months later...

Still trying to figure out what Procon is not kicking for high KDR in BF4.  Any help would be helpful for this in insane limites.  Here is what I have.

this should work OnJoin

first limit is expression

( player.Kdr> 0.10 )

second is this as code

String reason = "suspicious Battlelog stats (KDR=" + player.Kdr + ")";
    reason = reason + ", appeal at gohackyourself.com";
    plugin.KickPlayerWithMessage(player.Name, reason);
    return false;

 

All this set to kick.

 

Thanks in advance

 

Link to comment
16 hours ago, Scotty69 said:

Still trying to figure out what Procon is not kicking for high KDR in BF4.  Any help would be helpful for this in insane limites.  Here is what I have.

this should work OnJoin

first limit is expression

( player.Kdr> 0.10 )

second is this as code

String reason = "suspicious Battlelog stats (KDR=" + player.Kdr + ")";
    reason = reason + ", appeal at gohackyourself.com";
    plugin.KickPlayerWithMessage(player.Name, reason);
    return false;

 

All this set to kick.

 

Thanks in advance

 

And no, I am not really using that low of Kdr..lol just for testing purposes. :)

Link to comment
18 minutes ago, Scotty69 said:

And no, I am not really using that low of Kdr..lol just for testing purposes. :)

Does: "( player.Kdr> 0.10 )" trigger?

enable virtual mode to see actions or write a msg to the console to see if it triggers :x

Need new plugin features? I can change: Adkats, AdKatsLRT, LanguageEnforcer, InsaneLimits, xVotemap for you. Also working on new plugins. Have an idea? Share it and I might include it in my repos. Github.com/hedius

 

Check out E4GLAdKats for an advancded and maintained AdKats version.

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.