Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by dyn*:

 

I understand the overall goal, but I'm not sure I understand the details. What is the purpose of the !here command?

 

Wouldn't it be better to spam everyone and allow an opt-out command, like !mute or !stfu? :smile:

Thank you for your question and suggestions!!

 

Trying to give a little bit of advertising to our clan members who are currently streaming to twitch that are currently playing in the game server, assuming conditions above are met (player currently running specific clan tags & in specific list). For example, not every time player dyn is in the server will he be streaming so some command needs to be available to tell the limit what the streamers current status is (streaming, or not).

 

Player dyn (assuming he has specific clan tag and is in a custom list) upon typing !here / !stream (I changed the trigger above, my mistake) will be telling the limit that: player dyn is currently streaming and it should fire off a spam message that sends a message to the entire server notifying everyone that they're streaming live. This message is then sent out on a per-defined or pseudo random interval as to not flood the server should multiple streamers be on.

 

The idea of a trigger to mute the spam is a good thought as well. Could add it to the list of available commands for our players to use.

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

Originally Posted by Level*:

 

And you want that in plugin log or in chat?

Something I mean.

 

End of Roud works, and Next Map too

 

Current round, not works? Can you please help me?

 

Code:

String[] factionName = new String[]{"US", "RU", "CN"};
int winTeam = (team1.RemainTickets > team2.RemainTickets) _ 1 : 2;
int loseTeam = (winTeam == 1) _ 2 : 1;
int winFaction = (winTeam == 1) _ team1.Faction : team2.Faction;
int loseFaction = (loseTeam == 1) _ team1.Faction : team2.Faction;

if((server.CurrentRound+1) > server.TotalRounds)

plugin.ConsoleWrite("^b[End of Round] > ^9Round Ends with winning team " + GetTeamName + "" + factionName[(winFaction)] + "");
plugin.PRoConChat("^b[End of Round] > ^9Round Ends with winning team " + GetTeamName + "" + factionName[(winFaction)] + "");

plugin.ConsoleWrite("^b[Current round] > ^9" + (server.CurrentRound+1) + ", time in round = " + GetTimeInRoundMinutes().ToString("F0") + ", tickets = " + server.RemainTickets(winTeam).ToString("F0") + "/" + server.RemainTickets(loseTeam).ToString("F0") + "")
plugin.PRoConChat("^b[Current round] > ^9" + (server.CurrentRound+1) + ", time in round = " + GetTimeInRoundMinutes().ToString("F0") + ", tickets = " + server.RemainTickets(winTeam).ToString("F0") + "/" + server.RemainTickets(loseTeam).ToString("F0") + "")

plugin.ConsoleWrite("^b[Next Map] > ^9The next map is " + plugin.FriendlyMapName(server.NextMapFileName) + " " );
plugin.PRoConChat("^b[Next Map] > ^9The next map is " + plugin.FriendlyMapName(server.NextMapFileName) + " " );


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

Originally Posted by vazabisong*:

 

I want to limit XM25 to 10 kills per round if more than 10 he get kick.

 

My problem is in the new round it still count that he already kill 10 people with XM25.

 

What I want after 10 kills this map he get kick

New map start count as 0 kill again.

--------

Sorry for my english. :biggrin:

 

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 == 10) {
        msg = plugin.R("Attention %k_n%! Do not use %w_n%! more than 15 times"); // First warning message
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
        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 == 15) {
        msg = plugin.R("FINAL WARNING %k_n%! Do not use %w_n%!"); // Second warning message
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
} else if (warnings >= 20) {
        msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%! more than 20 times");
        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;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by avengedthedead*:

 

Hello Sir PC9,

 

Need you help, is there any way for insane limit to create a message for the kick when a [in game] player were randomly chosen for reserved list player [joining in]. Because alot of gamers coming back to me asking why there were kicked as there's no reason stated for the kicked.

 

Thank you.

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

Originally Posted by PapaCharlie9*:

 

Sorry for lack of response, guys. I've been taking time off for the holidays, no access to coding tools! When I get caught up with work again I'll come back and help you all. As a reminder to myself, I left off at post #2190.

 

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

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

Originally Posted by TMiland*:

 

Just a quick question; Is it possible to determine if a player is baseraping by:

 

1. If player dies x seconds after spawn x amount of times

2. Enemy must have all flags, determine ticket rate or something?

3. If the player is killed 5 times in a row, in x amount of time --> do action on the baseraper (warn/punish/kick)

 

The idea just popped up, so i had to ask. :smile:

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

Originally Posted by PapaCharlie9*:

 

MULTIbalancer > All: Winner was team 1 (US)

MULTIbalancer > All: Map = Lost Islands, mode = Conquest Large, time in round = 00:19:47, tickets = 329/0

 

both would be nice :ohmy:

 

Thx

I'm assuming BF4, since I'm taking advantage of after-round chat. This won't work on BF3.

 

Create a limit to evaluate OnRoundOver, call it "Round Over Stats".

 

Set first_check to this Code:

 

Code:

String[] factionNames = new String[3]{"US", "RU", "CN"};
int winner = server.WinTeamId;
int faction = server.GetFaction(winner);
String teamName = "__";
if (faction >= 0 && faction <= 2) 
    teamName = factionNames[faction];

String msg = "Winner is team " + winner + " (" + teamName + ")";
plugin.SendGlobalMessage(msg);
plugin.ConsoleWrite(msg);

String map = plugin.FriendlyMapName(server.MapFileName);
String mode = plugin.FriendlyModeName(server.Gamemode);
int hours = Convert.ToInt32(server.TimeRound/60/60);
int mins = (Convert.ToInt32(server.TimeRound) / 60) % 60;
int secs = (Convert.ToInt32(server.TimeRound) % 60);
//Map = Lost Islands, mode = Conquest Large, time in round = 00:19:47, tickets = 329/0 <- [858]
msg = "Map = " + map + ", mode = " + mode + ", time in round = " + hours.ToString("D2") + ":" + mins.ToString("D2") + ":" + secs.ToString("D2") + ", tickets = " + team1.Tickets + "/" + team2.Tickets + " [" + team1.StartTickets + "]";
plugin.SendGlobalMessage(msg);
plugin.ConsoleWrite(msg);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Hello Sir PC9,

 

Need you help, is there any way for insane limit to create a message for the kick when a [in game] player were randomly chosen for reserved list player [joining in]. Because alot of gamers coming back to me asking why there were kicked as there's no reason stated for the kicked.

 

Thank you.

No, that information is not available. I don't even think a plugin gets told that a kick happened, just that a player left.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Level*:

 

I'm assuming BF4, since I'm taking advantage of after-round chat. This won't work on BF3.

 

Create a limit to evaluate OnRoundOver, call it "Round Over Stats".

 

Set first_check to this Code:

 

Code:

String[] factionNames = new String[3]{"US", "RU", "CN"};
int winner = server.WinTeamId;
int faction = server.GetFaction(winner);
String teamName = "__";
if (faction >= 0 && faction <= 2) 
    teamName = factionNames[faction];

String msg = "Winner is team " + winner + " (" + teamName + ")";
plugin.SendGlobalMessage(msg);
plugin.ConsoleWrite(msg);

String map = plugin.FriendlyMapName(server.MapFileName);
String mode = plugin.FriendlyModeName(server.Gamemode);
int hours = Convert.ToInt32(server.TimeRound/60/60);
int mins = (Convert.ToInt32(server.TimeRound) / 60) % 60;
int secs = (Convert.ToInt32(server.TimeRound) % 60);
//Map = Lost Islands, mode = Conquest Large, time in round = 00:19:47, tickets = 329/0 <- [858]
msg = "Map = " + map + ", mode = " + mode + ", time in round = " + hours.ToString("D2") + ":" + mins.ToString("D2") + ":" + secs.ToString("D2") + ", tickets = " + team1.Tickets + "/" + team2.Tickets + " [" + team1.StartTickets + "]";
plugin.SendGlobalMessage(msg);
plugin.ConsoleWrite(msg);
return false;
with the time in round something wrong, more than 30 min, it shows 01:31:25

 

THX

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

Originally Posted by PapaCharlie9*:

 

PC9,

 

This is an edit of post #2178 with new punishments added...

appears there was a little confusion, as I do not know how to use multiple quotes ...yet...

 

Thanks for "knife only" server code you did do. Will save it for future use.

 

""...This Code would be for BF3 GunMaster with a little SQDM and Scavenger played also ...""

 

_gp?

 

PapaCharlie9,

 

if you have some time

 

Had a thought for a new twist for GunMaster, make it a little harder and perhaps more interesting...(might work with other modes as well)...

 

I run and maintain -WalkInDead- GunMaster server. Would be able to give you what ever access to it you might need.

 

Not sure if this can be done with an Insane Limit or better as a stand alone plug-in.

In time I might be able to figure out how to code it, but do not think I would do it justice.

 

Main thought:

 

Anytime a player is killed by a knife, would need to get a knife kill before getting a kill with any other weapon...

 

 

Explanation:

 

When player is killed by a knife, he would be added to an 'IT' list.

 

Player would be given a YELL warning "You are 'IT'... You must get Knife Kill..."

 

Player would remain on 'IT' list until he got a Knife Kill...

 

If 'IT' player kills with any other weapon punishments would be ...

 

1st non knife kill would be admin killed with Yell warning message "You are 'IT'...knife kill needed"

2nd non knife kill would be admin killed with Yell warning "You are 'IT'...knife kill needed or be kicked"

3rd non knife kill would be round banned with message stating "You were 'IT'...knife kill was needed"

 

When 'IT' player gets knife kill, he would be removed from 'IT' list with Yell

"You are Free to Kill with All Weapons"

 

At end of Round 'IT' list would be reset...

 

Not sure what would be best way for this to be enabled , by vote or by admin in game...

My thinking is by admin in game, so it can be shut off again if needed...

 

The biggest draw back is this might turn server into a knife only server,

but I am sure there will be players still trying to win with all weapons...

 

_gp?

Sorry for getting confused before. I'm on it now.

 

Check out new thread here:

 

myrcon.net/.../insane-limits-game-of-tag-youre-it-knife-kills

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

Originally Posted by PapaCharlie9*:

 

with the time in round something wrong, more than 30 min, it shows 01:31:25

 

THX

Try this code instead:

 

Code:

String[] factionNames = new String[3]{"US", "RU", "CN"};
int winner = server.WinTeamId;
int faction = server.GetFaction(winner);
String teamName = "__";
if (faction >= 0 && faction <= 2) 
    teamName = factionNames[faction];

String msg = "Winner is team " + winner + " (" + teamName + ")";
plugin.SendGlobalMessage(msg);
plugin.ConsoleWrite(msg);

String map = plugin.FriendlyMapName(server.MapFileName);
String mode = plugin.FriendlyModeName(server.Gamemode);
int hours = Convert.ToInt32(server.TimeRound)/60/60;
int mins = (Convert.ToInt32(server.TimeRound) / 60) % 60;
int secs = (Convert.ToInt32(server.TimeRound) % 60);
//Map = Lost Islands, mode = Conquest Large, time in round = 00:19:47, tickets = 329/0 <- [858]
msg = "Map = " + map + ", mode = " + mode + ", time in round = " + hours.ToString("D2") + ":" + mins.ToString("D2") + ":" + secs.ToString("D2") + ", tickets = " + team1.Tickets + "/" + team2.Tickets + " [" + team1.StartTickets + "]";
plugin.SendGlobalMessage(msg);
plugin.ConsoleWrite(msg);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Thank you for your question and suggestions!!

 

Trying to give a little bit of advertising to our clan members who are currently streaming to twitch that are currently playing in the game server, assuming conditions above are met (player currently running specific clan tags & in specific list). For example, not every time player dyn is in the server will he be streaming so some command needs to be available to tell the limit what the streamers current status is (streaming, or not).

 

Player dyn (assuming he has specific clan tag and is in a custom list) upon typing !here / !stream (I changed the trigger above, my mistake) will be telling the limit that: player dyn is currently streaming and it should fire off a spam message that sends a message to the entire server notifying everyone that they're streaming live. This message is then sent out on a per-defined or pseudo random interval as to not flood the server should multiple streamers be on.

 

The idea of a trigger to mute the spam is a good thought as well. Could add it to the list of available commands for our players to use.

Still need a few more details. What exactly would the spam message be and is it the same for all players who type in !here, or different? If different, that's a problem, unless the names of the players get coded into a table or something. Otherwise there's no way to know which message applies to which typer of !here.

 

For example, if players manny, moe or jack might type !here, and each needs a custom message, I'd need code like this:

 

Code:

Dictionary<String,String> messageTable = new Dictionary<String,String>();
messageTable["manny"] = "Follow my Twitch channel MannyPwns123";
messageTable["moe"] = "Twitch live on MoeMoar1999!";
messageTable["jack"] = "Watch me t-bag manny and moe on JackMihoffer69";
Whichever messages are in play will be spammed every X minutes.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

I want to limit XM25 to 10 kills per round if more than 10 he get kick.

 

My problem is in the new round it still count that he already kill 10 people with XM25.

 

What I want after 10 kills this map he get kick

New map start count as 0 kill again.

--------

Sorry for my english. :biggrin:

 

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 == 10) {
        msg = plugin.R("Attention %k_n%! Do not use %w_n%! more than 15 times"); // First warning message
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
        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 == 15) {
        msg = plugin.R("FINAL WARNING %k_n%! Do not use %w_n%!"); // Second warning message
        plugin.SendGlobalMessage(msg);
        plugin.PRoConChat("ADMIN > " + msg);
} else if (warnings >= 20) {
        msg = plugin.R("Kicking %k_n% for ignoring warnings and killing with %w_n%! more than 20 times");
        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;
Find everywhere in the code that has .Data. and change it to .RoundData.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

Just a quick question; Is it possible to determine if a player is baseraping by:

 

1. If player dies x seconds after spawn x amount of times

2. Enemy must have all flags, determine ticket rate or something?

3. If the player is killed 5 times in a row, in x amount of time --> do action on the baseraper (warn/punish/kick)

 

The idea just popped up, so i had to ask. :smile:

1 and 3 yes, but not 2.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

I'll do it, but probably not until the weekend.

Nice! :smile:

 

In AdKats Col has a way to determine tickrate, is that possible to adapt for option 2 maybe?

 

Another idea! Regarding this reddit post: http://www.reddit.com/r/battlefield_...n_battlefield/

 

How about setting a random vars.serverMessage with quotes from that post to teach players how to play on the loading screen? :cool:

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

Originally Posted by PapaCharlie9*:

 

Nice! :smile:

 

In AdKats Col has a way to determine tickrate, is that possible to adapt for option 2 maybe?

 

Another idea! Regarding this reddit post: http://www.reddit.com/r/battlefield_...n_battlefield/

 

How about setting a random vars.serverMessage with quotes from that post to teach players how to play on the loading screen? :cool:

I'm pretty sure AdKats has a base rape/camp detector. Check with CCC.

 

How random and change when? Different for each joining player or what?

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

Originally Posted by TMiland*:

 

I'm pretty sure AdKats has a base rape/camp detector. Check with CCC.

 

How random and change when? Different for each joining player or what?

Okay.

 

Well, maybe set it on round end maybe, so a different line is set for each map load randomly? :smile:

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

Originally Posted by avengedthedead*:

 

fixed something.

 

Code:

String playerTag = player.Tag;
if (String.IsNullOrEmpty(playerTag)) return false;

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);

List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

foreach (PlayerInfoInterface p in all) {
  String clanTag = p.Tag;
  if (String.IsNullOrEmpty(clanTag)) continue;
  if (clanTag != playerTag) continue;
  // Found a clan member!
  clan.Add(p);
}

String Counter = player.Tag + "_Count";
    
int current = 0;
if (server.RoundData.issetInt(Counter)) current = server.RoundData.getInt(Counter);

if (clan.Count > 1 && limit.Activations(player.Name) == 1 && clan.Count != current) {
    server.RoundData.setInt(Counter, clan.Count);
    String message = plugin.R ("^b ^3" + clan.Count + " [^6" + playerTag + "^3] Clan members are online ^0 ^n");
    plugin.PRoConChat("ADMIN > " + message);
    }
Hello HexaCanon,

 

This message "Clan members are online" only display in Procon chat. How do i display in server chat visible to everyone.

This is for BF4. Thanks.

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

Originally Posted by TMiland*:

 

Hello HexaCanon,

 

This message "Clan members are online" only display in Procon chat. How do i display in server chat visible to everyone.

This is for BF4. Thanks.

Try this:

Code:

String playerTag = player.Tag;
if (String.IsNullOrEmpty(playerTag)) return false;

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);

List<PlayerInfoInterface> clan = new List<PlayerInfoInterface>();

foreach (PlayerInfoInterface p in all) {
	String clanTag = p.Tag;
	if (String.IsNullOrEmpty(clanTag)) continue;
	if (clanTag != playerTag) continue;
	// Found a clan member!
	clan.Add(p);
}

String Counter = player.Tag + "_Count";
    
int current = 0;
if (server.RoundData.issetInt(Counter)) current = server.RoundData.getInt(Counter);

if (clan.Count > 1 && limit.Activations(player.Name) == 1 && clan.Count != current) {
	server.RoundData.setInt(Counter, clan.Count);
	String message = plugin.R ("^b ^3" + clan.Count + " [^6" + playerTag + "^3] Clan members are online ^0 ^n");
	plugin.PRoConChat("ADMIN > " + message);
	plugin.SendGlobalMessage(message);
    }
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

hi

you can create a limit that would collect in a log all violations md5 multihack aimbot gamehack gamehook Wallack PBhack server?

thanks

As a stop-gap you could try looking in your sv_viol.log or sv_cheat.log log files. Though it does seem like these log files are missing quite a few entries as I'm sure we've had people get kicked for Disallowed Driver but they're not listed in the log files... maybe a limit would be better after all? =(
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

Still need a few more details. What exactly would the spam message be and is it the same for all players who type in !here, or different?

The easiest way to maintain, program, and update would be for everyone to have the SAME message, but with their own unique name. I think this would then further allow an admin to simply update an external text file with player names for the custom list?

 

Examples: "dyn is streaming live on Twitch" or "PapaCharlie9 is streaming live on Twitch".

The names 'dyn' and PapaCharlie9' would be separate entries in a custom list.

 

This message could then be sent every X minutes for a max of Y minutes, until the streamer types the 'stop' command, or leaves the server.

 

One item not sure how to address would be to ensure that, for example, if there are multiple streamers in the same server that all messages (5, for instance) would not be sent at the same time.

 

Thanks again for your consideration, PC9.

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

Originally Posted by PapaCharlie9*:

 

Okay.

 

Well, maybe set it on round end maybe, so a different line is set for each map load randomly? :smile:

Easy! Assuming you can set vars.serverMessage outside of startup.txt ... have you tried it?

 

Create a new limit to evaluate OnRoundOver, call it "Tips for noobs".

 

Set first_check to this Code:

 

Code:

List<String> tips = new List<String>();
tips.Add("PTFO = Play The F-ing Objective!");
tips.Add("Watch your corners!");
tips.Add("Kill all the nearby enemies before rezing your squad mate.");
// Add more here

// Pick the next tip
String key = "index for tips";
int i = 0;
if (!plugin.Data.issetInt(key)) {
    Random r = new Random();
    i = r.Next(tips.Count);
} else {
    i = plugin.Data.getInt(key);
}
i = (i + 1) % tips.Count;
plugin.Data.setInt(key, i);

// Set it
plugin.SendGlobalMessage("TIP: " + tips[i]);
plugin.ServerCommand("vars.serverMessage", tips[i]);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

The easiest way to maintain, program, and update would be for everyone to have the SAME message, but with their own unique name. I think this would then further allow an admin to simply update an external text file with player names for the custom list?

 

Examples: "dyn is streaming live on Twitch" or "PapaCharlie9 is streaming live on Twitch".

The names 'dyn' and PapaCharlie9' would be separate entries in a custom list.

 

This message could then be sent every X minutes for a max of Y minutes, until the streamer types the 'stop' command, or leaves the server.

 

One item not sure how to address would be to ensure that, for example, if there are multiple streamers in the same server that all messages (5, for instance) would not be sent at the same time.

 

Thanks again for your consideration, PC9.

Hmmm. How many people are we talking about? It might be better to just have separate limits for each person.

 

I'll just do one generic limit, but you can duplicate that to be specific to a player by changing first_check to this:

 

Code:

(player.Name == "xxx")
Then the rest of the limit only applies to the player with that name, and make one for each player.

 

I'll make sure the messages are at least 1 minute apart, that's not a problem.

 

You'll need at least two limits, one to spamming the messages on a timer, the other for the command.

 

Spammer

 

Create a limit to evaluate OnServerInterval, set the interval to 60 seconds, call it "Twitch spammer".

 

Set first_check to this Code:

 

Code:

double MinutesBetweenSpams = 10; // CHANGE

String key = "Twitcher";
List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);

foreach (PlayerInfoInterface twitcher in all) {
    if (!twitcher.Data.issetObject(key))
        continue;
    DateTime last = (DateTime)twitcher.Data.getObject(key);
    if (DateTime.Now.Subtract(last).TotalMinutes >= MinutesBetweenSpams) {
        // reset timer
        twitcher.Data.setObject(key, (object)DateTime.Now);
        // Send message
        plugin.SendGlobalMessage(twitcher.Data.getString(key));
        // Bail out now to make sure two spam messages don't happen back to back
        return false;
    }
}
return false;
Message and player command (Generic)

 

Create a limit to evaluate OnAnyChat, call it "Twitch commander". This is the one you would duplicate if you want to do it per player.

 

Set first_check to this Expression (change for per player):

 

Code:

(true)
Set second_check to this Code:

 

Code:

if (!Regex.Match(player.LastChat, @"(!here|!stream)", RegexOptions.IgnoreCase).Success)
    return false;
if (!plugin.isInList(player.Name, "twitchers")) {
    plugin.SendPlayerMessage(player.Name, "You are not allowed to use that command!");
    return false;
}

String key = "Twitcher";
player.Data.setString(key, player.Name + ": Generic message goes here"); // CHANGE
player.Data.setObject(key, (object)DateTime.Now);
// Send initial message
plugin.SendGlobalMessage(player.Data.getString(key));
return false;
Notice the that items with // CHANGE are stuff you should edit to customize.

 

IMPORTANT: The value of MinutesBetweenSpams should be AT LEAST twice the maximum total number of simultaneous twitchers. Otherwise, some messages might get lost. I have set the default to 10, so the maximum number of simultaneous twitchers that can use that value without change is 5. If you have 6, you need to set it to at least 12, etc.

 

EDIT: I forgot to add the custom list. Create a custom list called "twitchers", CaseSensitive, and fill with the list of player names allowed to use the command, separated by commas.

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

Originally Posted by TMiland*:

 

Easy! Assuming you can set vars.serverMessage outside of startup.txt ... have you tried it?

 

Create a new limit to evaluate OnRoundOver, call it "Tips for noobs".

 

Set first_check to this Code:

 

Code:

List<String> tips = new List<String>();
tips.Add("PTFO = Play The F-ing Objective!");
tips.Add("Watch your corners!");
tips.Add("Kill all the nearby enemies before rezing your squad mate.");
// Add more here

// Pick the next tip
String key = "index for tips";
int i = 0;
if (!plugin.Data.issetInt(key)) {
    Random r = new Random();
    i = r.Next(tips.Count);
} else {
    i = plugin.Data.getInt(key);
}
i = (i + 1) % tips.Count;
plugin.Data.setInt(key, i);

// Set it
plugin.SendGlobalMessage("TIP: " + tips[i]);
plugin.ServerCommand("vars.serverMessage", tips[i]);
return false;
Thank you! I'll add and test it right away. :biggrin:

 

Edit:

Works! Here's the full version:

Code:

/* Create a new limit to evaluate OnRoundOver, call it "Tips for noobs".

Set first_check to this Code: */
List<String> tips = new List<String>();
	tips.Add("Hitting a Tank straight on with a flat 90° angle rocket will do more damage than a regular hit to the side!");
	tips.Add("Hold down <key> to charge the defibrillator, you will earn more points and revive allies with more health!");
	tips.Add("When suppressed it becomes harder to aim as firing your weapon is less accurate");
	tips.Add("Mortars are great for taking out people who are sitting still, use them to takeout gunners and snipers!");
	tips.Add("The PLD and SOFLAM allow your entire team to preform a powerful Top-Down Lock-on attack with launchers!");
	tips.Add("Flags on the battlefield provide your team with powerful war assets like Tanks and Cruise Missiles, Capture them!");
	tips.Add("You can disarm an MCOM by using the EOD bot, It's what they're designed for soldier!");
	tips.Add("Suppressing your weapon will prevent you from appearing on the map when you shoot, but reduces your hip-fire accuracy");
	tips.Add("Laser sights will shine through the smoke and reveal where you are if you point it at someone, Turn it off with <Key>");
	tips.Add("After firing the SRAW, quickly let go of ADS to prevent it from aiming off target if you happen to die");
	// Add more here

// Pick the next tip
String key = "index for tips";
int i = 0;
if (!plugin.Data.issetInt(key)) {
    Random r = new Random();
    i = r.Next(tips.Count);
} else {
    i = plugin.Data.getInt(key);
}
i = (i + 1) % tips.Count;
plugin.Data.setInt(key, i);

// Set it
plugin.SendGlobalMessage("TIP: " + tips[i]);
plugin.ServerCommand("vars.serverMessage", tips[i]);
return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by w262035635*:

 

HI,PapaCharlie9

I am searching a plug-in..

Player spawn after, check battlelog loadout.

If this weapon is limit, the player will be kill.

This is how to do?

Can you help me?

* 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.