Jump to content

Insane Limits: Mobile Anti-Air and AA Mine Limit


ImportBot

Recommended Posts

Originally Posted by PapaCharlie9*:

 

Hi Papa.

 

Im sure you probably already plan on making a limit for the MAA now that the vehicle codes are available, but I'll make the request here for you to make it when you're ready.

 

I would appreciate a limit that will prohibit the Mobile-AA and this new Anti-Air mine please. I would like it to work like this:

 

First Kill Violation

Violation kill count does not reset on new round/map and keeps accumulating (until ProCon restarts)

Any first kill with the Mobile-AA = Auto KILL with a public message in chat and a private yell to the player

Any first kill with the AA-mine = Auto KILL with a public message in chat and a private yell to the player

 

Public message in chat for the respective violation:

PlayerName AUTO-KILLED for using the PROHIBITED Mobile-AA

PlayerName AUTO-KILLED for using the PROHIBITED Anti-Air Mine

 

Private yell for 20 seconds to the player for the respective violation:

The Mobile-AA is prohibited. You will be AUTO-KICKED if you use it again.

The AA-Mine is prohibited. You will be AUTO-KICKED if you use it again.

 

 

Second Kill Violation

Any second kill with the Mobile-AA = Auto KICK with Kick Reason to the player and same kick reason shown in public chat

Any second kill with the AA-mine = Auto KICK with Kick Reason to the player and same kick reason shown in public chat

 

Kick Reason shown in both public chat and provided as the kick reason to the player for the respective violation:

PlayerName AUTO-KICKED for using the PROHIBITED Mobile-AA

PlayerName AUTO-KICKED for using the PROHIBITED Anti-Air Mine

 

 

Third or greater Kill (running count until ProCon restarts)

Any third or greater kill with the Mobile-AA = Auto 1 HR TEMP BAN with Reason to the player and same reason shown in public chat

Any third or greater kill with the AA-mine = Auto 1 HR TEMP BAN with Reason to the player and same reason shown in public chat

 

Temp Ban Reason shown in both public chat and provided to the player for the respective violation:

PlayerName TEMP BAN 1 HOUR for using the PROHIBITED Mobile-AA

PlayerName TEMP BAN 1 HOUR for using the PROHIBITED Anti-Air Mine

 

 

 

Please also add as part of a second limit the messages shown below.

 

1. The following private chat and private yell are sent at 2 seconds after the player first reaches the deploy screen (before he spawns), but it is sent just one time during his total play session and only on his very first deploy screen (not beyond the first map):

(This is similar to the way Adaptive Server Size sends the welcome message as soon as the player reaches the deploy screen.)

 

Private Chat Message:

WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!

 

Private Yell for 20 seconds (has different formatting with extra spaces after the words "AUTO-KICKED" to center the message nicely):

Code:

[b]WARNING: You will be AUTO-KICKED                                                                      if you use the PROHIBITED Mobile-AA or AA-Mine![/b]
.

2. The following two private chat messages are sent 30 seconds after the player first spawns, but they are sent just one time during his session and only after his very first spawn (not beyond the first map):

.

WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!

.

Please type @rules in chat to see the Server Rules.

 

 

 

.

For the first limit, I wasn't clear on whether the Mobile AA count and the AA Mine count were supposed to be treated separately or combined. To have separate counts would make the code confusing, unless the limit was split into separate Mobile AA and AA Mine limits. Rather than double the limit, I combined the counts below, which means a player may be killed for first Mobile AA use, then use an AA Mine for the first time and get kicked. If that's not acceptable, I'll have to make two separate OnKill limits in a follow-up post.

 

For the second limit, I'm not able to do exactly what you requested. Insane Limits is not able to insure that a message appears during the first deployment screen, let alone some amount of time after a spawn. A full-blown plugin can do that, but Insane Limits is more limited, mostly due to the whole stats-fetching delay thing during initial join.

 

So instead what I have done is just count the number of spawns. That is always reliable. The first notice (what you wanted on the deployment screen) is sent on first spawn, and the second notice is sent on some later spawn count of your choice. The code below is set to the third spawn, but you can change that by changing secondNoticeSpawnCount.

 

Both of these limits require Procon 1.4.2.1 or later and Insane Limits 0.9.16.0 or later.

 

First, here's the first limit, as requested.

 

Create a new limit to evaluate OnKill, call it "Prohibit AA", leave Action set to None.

 

Set first_check to this Code:

 

Code:

/* Version 9.16/R1b */
/* SETUP */

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by prohibited weapon/vehicle name, see below
String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}";
String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}";
String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}";
String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again.";

// Times
int yellTime = 20; // seconds
int banTime = 60; // minutes
double multiKillTime = 5; // seconds

// Prohibited weapon/vehicle
String mobileAA = "Mobile-AA";
String aaMine = "AA-Mine";

// Weapon/vehicle codes

bool isAAMine = (kill.Weapon == "AA Mine");
bool isMAA = Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success;

/* CODE */

if (!isAAMine && !isMAA) return false;

String prohibited = (isMAA) _ mobileAA : aaMine;

String key = "PersistAA_" + killer.Name;

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

int count = 0;
if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key);

count = count + 1;

String msg = null;

if (count == 1) { // First Violation: Kill

    msg = String.Format(autoKilled, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count == 2) { // Second Violation: Kick

    msg = String.Format(autoKicked, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

} else { // Third or subsequent Violation: TBan

    msg = String.Format(tempBan, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg);

}

plugin.Data.setInt(key, count);
return false;

 

Create a second limit to evaluate OnSpawn, call it "AA Notices", leave Action set to None.

 

Set first_check to this Code:

 

Code:

/* Version 9.16/R1a */
/* SETUP */

// Messages
String msg = "WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!";
String yellMsg = @"WARNING: You will be AUTO-KICKED                                                                      if you use the PROHIBITED Mobile-AA or AA-Mine!";
String msg1 = "WARNING: You will be AUTO-KICKED if you use the PROHIBITED Mobile-AA or AA-Mine!";
String msg2 = "Please type @rules in chat to see the Server Rules.";

// Times
int yellTime = 20; // seconds
int secondNoticeSpawnCount = 3;

/* CODE */

String key = "WelcomeRulesAA_" + player.Name;

int count = 0;
if (player.Data.issetInt(key)) count = player.Data.getInt(key);

count = count + 1;

if (count == 1) { // First notice

    plugin.SendPlayerMessage(player.Name, msg);
    plugin.SendPlayerYell(player.Name, yellMsg, yellTime);

} else if (count == secondNoticeSpawnCount) { // Second notice

    plugin.SendPlayerMessage(player.Name, msg1);
    plugin.SendPlayerMessage(player.Name, msg2);
}

player.Data.setInt(key, count);

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

Originally Posted by IAF-SDS*:

 

Thanks Papa for creating this.

 

I tried this part of the second limit, and it did not give me any chat or yell on first spawn (nor on third spawn) on a consistent basis. I get it one time, but if I quit and come back later, I don't get the messages.

 

Also, it looks like you missed this part from the First Kill Violation section:

 

Private yell for 20 seconds to the player for the respective violation (see context above):

The Mobile-AA is prohibited. You will be AUTO-KICKED if you use it again.

The AA-Mine is prohibited. You will be AUTO-KICKED if you use it again.

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

Originally Posted by PapaCharlie9*:

 

I decided to split the first limit into two separate limits, so that AA Mine and MAA are counted separately.

 

Both of these limits require Procon 1.4.2.1 or later and Insane Limits 0.9.16.0 or later.

 

AA Mine

 

Create a new limit to evaluate OnKill, call it "Prohibit AA Mine", leave Action set to None.

 

Set first_check to this Code:

 

Code:

/* Version 9.16/R4 */
/* SETUP */

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by prohibited weapon/vehicle name, see below
String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}";
String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}";
String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}";
String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again.";

// Times
int yellTime = 20; // seconds
int banTime = 60; // minutes
double multiKillTime = 5; // seconds


// Weapon/vehicle codes

bool isAAMine = (kill.Weapon == "AA Mine");

/* CODE */

if (!isAAMine) return false;

String prohibited = "AA-Mine";

String key = "PersistAA_" + prohibited + "_" + killer.Name;

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

int count = 0;
if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key);

count = count + 1;

String msg = null;

if (count == 1) { // First Violation: Kill

    msg = String.Format(autoKilled, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count == 2) { // Second Violation: Kick

    msg = String.Format(autoKicked, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

} else { // Third or subsequent Violation: TBan

    msg = String.Format(tempBan, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg);

}

plugin.Data.setInt(key, count);
return false;
Mobile AA

 

Create a new limit to evaluate OnKill, call it "Prohibit Mobile AA", leave Action set to None.

 

Set first_check to this Code:

 

Code:

/* Version 9.16/R4 */
/* SETUP */

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by prohibited weapon/vehicle name, see below
String autoKilled = "{0} AUTO-KILLED for using the PROHIBITED {1}";
String autoKicked = "{0} AUTO-KICKED for using the PROHIBITED {1}";
String tempBan = "{0} TEMP BAN 1 HOUR for using the PROHIBITED {1}";
String yellKilled = "The {1} is prohibited. You will be AUTO-KICKED if you use it again.";

// Times
int yellTime = 20; // seconds
int banTime = 60; // minutes
double multiKillTime = 5; // seconds

// Weapon/vehicle codes

bool isMAA = Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success;

/* CODE */

if (!isMAA) return false;

String prohibited = "Mobile-AA";

String key = "PersistAA_" + prohibited + "_" + killer.Name;

int count = 0;
if (plugin.Data.issetInt(key)) count = plugin.Data.getInt(key);

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

count = count + 1;

String msg = null;

if (count == 1) { // First Violation: Kill

    msg = String.Format(autoKilled, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, prohibited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count == 2) { // Second Violation: Kick

    msg = String.Format(autoKicked, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

} else { // Third or subsequent Violation: TBan

    msg = String.Format(tempBan, killer.Name, prohibited);
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, banTime, msg);

}

plugin.Data.setInt(key, count);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

The second limit in post #1 has been updated so that when a player leaves, the counter is reset, so that they will see the messages again if they rejoin.

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

Originally Posted by PapaCharlie9*:

 

Added multiKillTime window of 5 seconds (you can change it), so that if a single MAA or AA Mine attack kills multiple enemy players (like pilot and gunner in a chopper) at the same time, that's only counted as one for the purposes of warnings, kills and kicks.

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

Originally Posted by IAF-SDS*:

 

Thank you Papa.

 

For reference, below are the requests we previously discussed:

 

1) Please tweak it so that if you kill multiple people within say 5 seconds, it only counts as one for purposes of the punishment to kill versus kick or temp ban. This becomes an issue when the MAA takes out a chopper that has two or more players in it.

 

#1) Multiple kills in 5 seconds is easy, I will add that to both versions.

 

2) I don't know how easy or difficult this may be, but do you think it is possible to add something that will punish the player who fired the two AA-mines first and then used his stinger or igla to finish off the heli within a few seconds from first firing the AA-mines (this is done as a means to circumvent the AA-mine limit)?

 

This is an example of what I mean with two AA-Mines plus stinger combo for one player:

http://www.youtube.com/watch_v=MzKSV27QjMs

 

#2) MAA followed by AA missiles, sorry, I can't think of a way to do that. I'm not saying it is not possible, it's just not obvious to me how to code it. I'll have to think about it. It might turn out to be infeasible, so no promises.

 

3) Please add MAA roadkills to the limit.

 

#3) Roadkill for MAA only -- unfortunately, this is not possible. Procon doesn't know what vehicle caused a road kill, so unless you want to punish road kills by all vehicles, this can't be done.

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

Originally Posted by PapaCharlie9*:

 

Detecting specific kill sequences, like Stinger after an AA Mine or MAA kill, could be tricky. I haven't been able to think up a way to do that reliably. I suspect it's not feasible.

 

It's not possible to distinguish which vehicle did a roadkill, so a punishment for roadkills will apply to all vehicles.

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

Originally Posted by TMiland*:

 

Detecting specific kill sequences, like Stinger after an AA Mine or MAA kill, could be tricky. I haven't been able to think up a way to do that reliably. I suspect it's not feasible.

 

It's not possible to distinguish which vehicle did a roadkill, so a punishment for roadkills will apply to all vehicles.

Okay, i was thinking to allow the MAA to shoot down the Gunship only, as this is impossible to get down if you don't have any jet pilots around. :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ColColonCleaner*:

 

Okay, i was thinking to allow the MAA to shoot down the Gunship only, as this is impossible to get down if you don't have any jet pilots around. :biggrin:

You can't tell what vehicle is killed by the AA.

 

Well....you can, but it's indirect. We can log which vehicle everyone got their last kill with, and only let the MAA get kills on players whose last kill was using the gunship. Obviously you get a multikill when killing a full gunship so you would need to have something that combines the last kills of the group killed to see if it actually was the gunship.

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

Originally Posted by TMiland*:

 

You can't tell what vehicle is killed by the AA.

 

Well....you can, but it's indirect. We can log which vehicle everyone got their last kill with, and only let the MAA get kills on players whose last kill was using the gunship. Obviously you get a multikill when killing a full gunship so you would need to have something that combines the last kills of the group killed to see if it actually was the gunship.

Okay, i understand. Sounds complicated! :smile:

 

*edit

Btw, this limit made players go nuts about how wrong it is to limit the game, BUT for some of the players, it was most welcome! :biggrin:

 

I actually flew a chopper for more than 10 seconds yesterday, and i haven't been able to do that since BF3(!!) :smile:

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

Originally Posted by TMiland*:

 

I have tested this limit, to prohibit the use of Gunship

 

*Edit

Moved to own thread: showthread....ohibit-Gunship*

 

I have this limit running with the rest of the limits in first post. :smile:

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

Originally Posted by ColColonCleaner*:

 

Okay, i understand. Sounds complicated! :smile:

 

*edit

Btw, this limit made players go nuts about how wrong it is to limit the game, BUT for some of the players, it was most welcome! :biggrin:

 

I actually flew a chopper for more than 10 seconds yesterday, and i haven't been able to do that since BF3(!!) :smile:

It is wrong to limit the game if you do it incorrectly, you either gotta get over the hump, or turn back right away. We go based on what the majority of people in our servers want, basically no matter what it is...and after that mindset falls over your regular playerbase they will verbally castrate anyone playing against the rules you set.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

It is wrong to limit the game if you do it incorrectly, you either gotta get over the hump, or turn back right away. We go based on what the majority of people in our servers want, basically no matter what it is...and after that mindset falls over your regular playerbase they will verbally castrate anyone playing against the rules you set.

Yeah, i agree.

 

These limits are added because most players wants them, and the players that use the vehicles goes mad just because they cannot longer get easy kills.

 

I limit the AA, because you can sit in your own base and shoot down the chopper in the enemy base, and that sucks the fun out of the game.

 

And with Naval Strike out for just a few days now, the gunship has raped the whole map round after round, so most players wants this. :smile:

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

Originally Posted by PapaCharlie9*:

 

I have tested this limit, to prohibit the use of Gunship

Looks good. Since it is a completely different purpose from AA Mine/MAA, I suggest that you create a new thread with this limit. It will make it easier for people to find.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Looks good. Since it is a completely different purpose from AA Mine/MAA, I suggest that you create a new thread with this limit. It will make it easier for people to find.

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

Originally Posted by TMiland*:

 

aarrhh man seriously, whats wrong with the mobile AA :sad:

You can sit in your own base and rape the enemy air vehicles, even in the enemy base, that's what's wrong with it. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 year later...
  • 4 weeks later...

Originally Posted by VBK-Clan*:

 

Hi guys

it is possible vehicle spawn times separately to make available a

 

Then i can put the spawn time AA to 15 Min or longer ,then we can play whit out OP AA

then he can shot from a side of map to end of map and we cant destroy hem ,short range of tv gun etc....

 

 

 

 

vars.LAV-ADSpawnDelay 500

vars.TYPE 95 AASpawnDelay 500

vars.AH-1Z VIPERSpawnDelay 25

vars.Z-10WSpawnDelay 25

vars.M1 ABRAMSSpawnDelay 25

vars.TYPE 95 AASpawnDelay 25

vars.UH-1Y VENOMSpawnDelay 25

vars.Z-9 HAITUNSpawnDelay 25

vars.Z-9 HAITUNSpawnDelay 25

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

Originally Posted by BuRockK*:

 

Can anyone change this limit to have kill limits instead of prohibiting?

 

I tried to do it but couldnt know how since it shows death sometimes. I tried using Weapon.VehicleName (i think im using wrong syntax_) upon "death" to be sure its AA or but that didnt help.

 

I need to limit use of both AA to 30 kills max but start warn after 20 kills. Warn Message saying how many kills the player has left and when only 3 left, it will state that player will be killed ONCE after 30 kills and KICKED when has 32 kills with those.

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

Originally Posted by BuRockK*:

 

Okay, heres a question. Although i didnt understand some of the codes on first page, its basicly same thing i need. Only that punishment/warning needs to starts after 20 kills and that its only for current round. So on next round, kill limit will reset for a fresh start.

 

Correct me if im missing anything else:

 

- Change ".Data." to ".RoundData." so it will reset on new round

- Change "if (Count == 1)" to "if (Count >= 20 || Count

- Set additional warning message at "Count = 30" indicating player will be KICKED on his next AA kill.

 

Would this work? But i also want to treat both AA kills as same so player wont have 30 kills with Mobile AA and switch to AA Vehicle. So, ill use the code in first post

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

Originally Posted by Chilace*:

 

Would this work? But i also want to treat both AA kills as same so player wont have 30 kills with Mobile AA and switch to AA Vehicle. So, ill use the code in first post

What do you mean? Mobile AA is the same thing as AA Vehicle. Second weapon in that limit is AA Mine - engineer gadget.

Also pay attention:

- Change "if (Count == 1)" to "if (Count >= 20 && Count

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

Originally Posted by BuRockK*:

 

What do you mean? Mobile AA is the same thing as AA Vehicle. Second weapon in that limit is AA Mine - engineer gadget.

Also pay attention:

As far as i know, Mobile AA is that gadget you deploy on ground that fires missiles when an Air Vehicle is in range and the AA vehicle is the Air defence tank people use mostly.

 

I wanted those to be counted as one.

 

-

 

Well, i couldnt really follow up on the code. Seemed too complex for me for some reason (and that there are some parts i dont know how it works). So i started to write my own. Not finished yet but hopefully will work if i manage to do it right.

 

Heres what ive done so far (didnt had much time to finish it yet):

 

- OnKill

- First_check Expression: ( Regex.Match(kill.Weapon, @"(AA Mine|LAV_AD|Tunguska|PGZ-95)").Success )

- Second_check: code

 

(unfinished)

Code:

double kCount =  limit.Activations(killer.Name);
//if (limit.Activations(killer.Name, TimeSpan.FromSeconds(5)) > 1) { 
//    int kCount = kCount - 1;
//}

double playerAAKillsTotal = 20;
double timesActivated = kCount;
double playerAAKillsLeft = playerAAKillsTotal  - timesActivated;

String msg1 = "AA Mine, LAV_AD, Tunguska and PGZ-95 are limited to 20 kills in total";
String msg2 = plugin.R("You have "+ playerAAKillsLeft +" AA kills left");
String yell1 = "LIMITED: AA Mine / LAV_AD / Tunguska / PGZ-95";


if (timesActivated == 1) {
    //plugin.SendPlayerMessage(killer.Name, plugin.R("+ msg1 +"));
    plugin.PRoConChat(plugin.R("AA Limit msg1 sent to " + killer.Name + ""));
}
EDIT: Yes i meant AA Mine when i said Mobile AA, sorry

 

I also deleted && from code as you can see above.

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

Originally Posted by Chilace*:

 

I tried to modify the first limit, so that it was better suited to you.

 

NOT TESTED

 

Create a new limit to evaluate OnKill, call it "Limit AA", leave Action set to None.

 

Set first_check to this Code:

Code:

/* Version 9.16 */
/* SETUP */

// Message templates
// {0} will be replaced with PlayerName
// {1} will be replaced by limited weapon/vehicle name, see below
// {2} will be replaced with total kills to kick
// {3} will be replaced with kills left to kick
String autoWarned = "{0} AUTO-WARNED for using the LIMITED {1} by {2} kills in total, {3} kills left to kick";
String autoKilled = "{0} AUTO-KILLED as a last warning for using the LIMITED {1}";
String autoKicked = "{0} AUTO-KICKED for {2} kills using the LIMITED {1}";
String yellWarned = "The {1} is limited. You will be AUTO-KICKED upon {2} kills with it, {3} kills left to kick";
String yellKilled = "The {1} is limited. You will be AUTO-KICKED next time you use it again";

// Times
int killsTotal = 30; // kills
int killsThreshold = 10; // kills
int yellTime = 20; // seconds
double multiKillTime = 5; // seconds

/* CODE */

if (!Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95|AA Mine)").Success) return false;

String limited = "AA Vehicle/Mine";

String key = "PersistAA_" + killer.Name;

DateTime last = DateTime.MinValue;
if (server.Data.issetObject(key)) last = (DateTime)server.Data.getObject(key);
if (DateTime.Now.Subtract(last).TotalSeconds <= multiKillTime) return false;
server.Data.setObject(key, (Object)DateTime.Now);

int count = 0;
if (plugin.RoundData.issetInt(key)) count = plugin.RoundData.getInt(key);

count = count + 1;

int killsLeft = 0;
killsLeft = killsTotal - count;

String msg = null;

if (count > killsTotal - killsThreshold && count < killsTotal - 1) { // Warn

    msg = String.Format(autoWarned, killer.Name, limited, killsTotal.ToString(), killsLeft.ToString());
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellWarned, killer.Name, limited, killsTotal.ToString(), killsLeft.ToString()), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");

} else if (count == killsTotal - 1) { // Kill

    msg = String.Format(autoKilled, killer.Name, limited);
    plugin.SendGlobalMessage(msg);
    plugin.SendPlayerYell(killer.Name, String.Format(yellKilled, killer.Name, limited), yellTime);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KillPlayer(killer.Name, 6);

} else if (count >= killsTotal) { // Kick

    msg = String.Format(autoKicked, killer.Name, limited, killsTotal.ToString());
    plugin.SendGlobalMessage(msg);
    plugin.PRoConChat("ADMIN > " + msg);
    plugin.PRoConEvent(msg, "Insane Limits");
    plugin.KickPlayerWithMessage(killer.Name, msg);

}

plugin.RoundData.setInt(key, count);
return false;
* 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.



  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 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.