Jump to content

Insane Limits Requests


ImportBot

Recommended Posts

Originally Posted by HexaCanon*:

 

is it possible to have a commands like !whowins that tells us based on ticket loss ratio who will win the round and in how many minutes ?

 

if i am right PC9 you did have a limit that records ticket loss?

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

Originally Posted by Singh400*:

 

is it possible to have a commands like !whowins that tells us based on ticket loss ratio who will win the round and in how many minutes ?

 

if i am right PC9 you did have a limit that records ticket loss?

We'd have to work out the ticket bleed.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

another question, can i repeat an action multiple times without writing the action all over again ?

 

like instead of

 

Code:

foreach (string Rule in Rules) {
		plugin.ServerCommand("admin.say", Rule, "player", player.Name);
		plugin.ServerCommand("admin.yell", Rule, "12", "player", player.Name);
	}
	foreach (string Rule in Rules) {
		plugin.ServerCommand("admin.say", Rule, "player", player.Name);
		plugin.ServerCommand("admin.yell", Rule, "12", "player", player.Name);
	}
is there an easier way ?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by supermillhouse*:

 

A little help please

 

Code:

List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
players.AddRange(team1.players);
players.AddRange(team2.players);
if (team3.players.Count > 0) players.AddRange(team3.players);
if (team4.players.Count > 0) players.AddRange(team4.players);

foreach (PlayerInfoInterface p in players)
  {
//  plugin.ConsoleWrite(p.Name);
//  plugin.ConsoleWrite(p.Tag);
  if ((!plugin.isInList(p.Name, "Res")) && (p.Tag != "SLAG"))
........
Having a bit of a problem with the above code.

Is there a chance with an on join that "p.Tag" may not actualy contain their tag even tho the player stats are coming from the cache plugin, and how often is the cached info re-freshed. Is it ditching the cache info on some requests and leaving it null.

 

i also have the same problem with the first spawn

Code:

if (limit.Activations(player.Name) > 1) return false;
.............
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by supermillhouse*:

 

A little help please

 

Code:

List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
players.AddRange(team1.players);
players.AddRange(team2.players);
if (team3.players.Count > 0) players.AddRange(team3.players);
if (team4.players.Count > 0) players.AddRange(team4.players);

foreach (PlayerInfoInterface p in players)
  {
//  plugin.ConsoleWrite(p.Name);
//  plugin.ConsoleWrite(p.Tag);
  if ((!plugin.isInList(p.Name, "Res")) && (p.Tag != "SLAG"))
........
Having a bit of a problem with the above code.

Is there a chance with an on join that "p.Tag" may not actualy contain their tag even tho the player stats are coming from the cache plugin, and how often is the cached info re-freshed. Is it ditching the cache info on some requests and leaving it null.

 

i also have the same problem with the first spawn

Code:

if (limit.Activations(player.Name) > 1) return false;
.............
Just ignore this, i just remembered our website went down the last few days and that is where the database is hosted, oops
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

is it possible to have a commands like !whowins that tells us based on ticket loss ratio who will win the round and in how many minutes ?

 

if i am right PC9 you did have a limit that records ticket loss?

I wrote a plugin to do that, not a limit. It's a bit harder to do with a limit since you can't get an update on the number of tickets remaining as quickly as with a plugin. The best you can do is something close to a 10 second interval on updates, whereas my plugin was getting updates every 5 seconds or less.

 

Once you have established a reliable way to get ticket count updates, sure, you can write a command that would make some kind of prediction based on who is losing tickets faster.

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

Originally Posted by PapaCharlie9*:

 

another question, can i repeat an action multiple times without writing the action all over again ?

 

like instead of

 

Code:

foreach (string Rule in Rules) {
		plugin.ServerCommand("admin.say", Rule, "player", player.Name);
		plugin.ServerCommand("admin.yell", Rule, "12", "player", player.Name);
	}
	foreach (string Rule in Rules) {
		plugin.ServerCommand("admin.say", Rule, "player", player.Name);
		plugin.ServerCommand("admin.yell", Rule, "12", "player", player.Name);
	}
is there an easier way ?
Yes. You can use a pre-defined delegate, which is effectively a function declaration, though your choice of parameters and return values is limited to the pre-defined delegate.

 

For example, for a function with one parameter and no return (void), you can use the Action delegate. Here's one I use to send a chat message to everyone and to log it in the chat log:

 

Code:

Action<String> ChatAll = delegate(String txt) {
	plugin.SendGlobalMessage("*** " + txt);
	plugin.PRoConChat("ADMIN > *** " + txt);
};
You then just call it like a function:

 

Code:

ChatAll("Hello, world!");
In your case, you can pass Rule as the string parameter.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by PapaCharlie9*:

 

A little help please

 

Code:

List<PlayerInfoInterface> players = new List<PlayerInfoInterface>();
players.AddRange(team1.players);
players.AddRange(team2.players);
if (team3.players.Count > 0) players.AddRange(team3.players);
if (team4.players.Count > 0) players.AddRange(team4.players);

foreach (PlayerInfoInterface p in players)
  {
//  plugin.ConsoleWrite(p.Name);
//  plugin.ConsoleWrite(p.Tag);
  if ((!plugin.isInList(p.Name, "Res")) && (p.Tag != "SLAG"))
........
Having a bit of a problem with the above code.

Is there a chance with an on join that "p.Tag" may not actualy contain their tag even tho the player stats are coming from the cache plugin, and how often is the cached info re-freshed. Is it ditching the cache info on some requests and leaving it null.

 

i also have the same problem with the first spawn

Code:

if (limit.Activations(player.Name) > 1) return false;
.............
I'm surprised that p.Tag is null. It should be String.Empty if there isn't one or if the stats lookup hasn't happened yet or has failed. There might be a bug if it is null.

 

Is your if statement throwing an exception?

 

In general, if you are using an property based on stats fetching, you should include a test for StatsError:

 

Code:

foreach (PlayerInfoInterface p in players)
{
String tag = p.Tag;
if (p.StatsError) tag = String.Empty; //  stats fetch failed, set tag to empty string
if (!plugin.isInList(p.Name, "Res") && tag != "SLAG") ...
If you still get a null ref exception with tag, you could do this as a workaround:

 

Code:

foreach (PlayerInfoInterface p in players)
{
String tag = p.Tag;
if (p.StatsError || tag == null) tag = String.Empty; //  stats fetch failed, set tag to empty string
if (!plugin.isInList(p.Name, "Res") && tag != "SLAG") ...
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

I wrote a plugin to do that, not a limit. It's a bit harder to do with a limit since you can't get an update on the number of tickets remaining as quickly as with a plugin. The best you can do is something close to a 10 second interval on updates, whereas my plugin was getting updates every 5 seconds or less.

 

Once you have established a reliable way to get ticket count updates, sure, you can write a command that would make some kind of prediction based on who is losing tickets faster.

well gonna use it on metro which lasts more than hour for each round, i think 10 seconds interval will be fine.

 

i have a basic idea how i will do it now.

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

Originally Posted by PapaCharlie9*:

 

well gonna use it on metro which lasts more than hour for each round, i think 10 seconds interval will be fine.

 

i have a basic idea how i will do it now.

You need to keep a series of samples. You can do it with a List, but I preferred using a Queue. I created a class that has the ticket count for each team and the number of seconds since the last update. I kept Queue length fixed at 30 entries. After the queue was full (had 30 items), on every new update I would Enqueue the new value and Dequeue the old value. Then I would foreach through the Queue and compute ticket loss per update (ticketCountUS[n] - ticketCountUS[n+1]) and divide by the number of seconds since the last update to get tickets lost per second for that team. I added up all those rate samples, divided by 30 (Length of Queue) and got an average for each team.

 

If you use a shorter length, like 6 (6x10 second interval is 1 minute), you'll notice changes in the rate faster, but you'll also get more spurious spikes, like the winning team could have a Vodnik full of players get blown up and make them look like they have a high rate of ticket loss, when that is only an isolated incident.

 

You can't make a class, so you will either need separate Queues or use a Dictionary as the Queue item, with keys for teamUS, teamRU and secondsSinceLastUpdate.

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

Originally Posted by Paladinenser*:

 

Hi Support. I have a question. in find nothing in search mod..

 

i want to make a Flag Run server (no Killing). an now its possible white insane Limits to make a limit.

 

US player 1 kills RUS player 1. i want that the killer be baned für 30 minutes ..

 

i hope someone can help me..

 

cheers.

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

Originally Posted by PapaCharlie9*:

 

Hi Support. I have a question. in find nothing in search mod..

 

i want to make a Flag Run server (no Killing). an now its possible white insane Limits to make a limit.

 

US player 1 kills RUS player 1. i want that the killer be baned für 30 minutes ..

 

i hope someone can help me..

 

cheers.

You should probably read this thread:

page1/index.html*

 

My short answer: Sorry, I can't in good conscious help people with stat padding.

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

Originally Posted by Paladinenser*:

 

i use my server for a bether "usefull" game play.. but thx 4 informatio. its now a only matro or Sniper map... brings more fun..

whit level limit an no rpg..

 

thx 4 the insen limits tutorials..

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

Originally Posted by PapaCharlie9*:

 

Hey I just want to ask again, is it possibe after the Patch to evaluate how long a player is idle?

 

abridgment of Patchnotes

Latest news posts - News - Battlelog Battlefield 3 - Google Chrome.jpg

 

M4thioTiX

I think the answer is likely to be yes. It will depend on exactly how the player.idleDuration command works, but it seems that it was added for specifically this purpose.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

I think the answer is likely to be yes. It will depend on exactly how the player.idleDuration command works, but it seems that it was added for specifically this purpose.

i already have limit ideas that i will create, such as longer idle period for admins and shorter periods for 0 score players if the server is full.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by M4thoTiX*:

 

i already have limit ideas that i will create, such as longer idle period for admins and shorter periods for 0 score players if the server is full.

this is exactliy the thing I`m thinking of
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by HexaCanon*:

 

this is exactliy the thing I`m thinking of

although i would actually prefer a stand alone plugin that handles all kind of idle situations instead of oninterval limit, i dont like oninterval limits at all.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by supermillhouse*:

 

Could some one write a limit to use the new player.ping commant to kick any grater than 200 and use interval server 30 seconds, would give it a shot myself but im off to bed.

:biggrin:

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

Originally Posted by HexaCanon*:

 

Could some one write a limit to use the new player.ping commant to kick any grater than 200 and use interval server 30 seconds, would give it a shot myself but im off to bed.

:biggrin:

yeah when procon and insane limits are updated.

 

 

Edit : relating to ping, i would advice you to wait for a stand-alone plugin made by Zaeed, as i said before, i hate using OnInterval limits -.-

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

Originally Posted by Terrier*:

 

Hi,

 

I have search examples list but dont find it there..

 

I have successfully deployed clan-tag kicker to auto kick annoying clan from my server. However, how can I check on players that wear my clan tag without permission?

 

I find the solution is quite similar to clan-tag kicker as long I add my members into the whitelist and the expression to check the whitelist and find whoever using the tag and not inside the whitelist will be kick or ban.

 

but how can I do?

 

the expression only allows plugin.isInList but plugin.isNotInList is invalid..

 

Anyone can help?

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

Originally Posted by HexaCanon*:

 

Hi,

 

I have search examples list but dont find it there..

 

I have successfully deployed clan-tag kicker to auto kick annoying clan from my server. However, how can I check on players that wear my clan tag without permission?

 

I find the solution is quite similar to clan-tag kicker as long I add my members into the whitelist and the expression to check the whitelist and find whoever using the tag and not inside the whitelist will be kick or ban.

 

but how can I do?

 

the expression only allows plugin.isInList but plugin.isNotInList is invalid..

 

Anyone can help?

you will need to create a list by setting "use_custom_list" to true at the top, and then in the list manager create new list.

Posted Image

 

at the bottom a new section will appear

Posted Image

 

List state : enabled

List name : any name you like

List comparison : caseinsensitive

List Data : put your clan member names in this format "player1, player2, player3"

 

 

and then add this limit

 

OnSpawn set first check expression to

Code:

(!player.StatsError)
set second check code

Code:

if (plugin.isInList(player.Name, "Special_List")) return false;
if (!player.Tag == "XYZ") return false;
plugin.KickPlayerWithMessage(player.Name, plugin.R("Reason"));
replace the Red parts :

 

Special_List : replace it with your List name

XYZ : replace it with your clan tag

Reason : add a reason to the kick (i think it is limited to 80 characters)

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

Originally Posted by PapaCharlie9*:

 

the expression only allows plugin.isInList but plugin.isNotInList is invalid..

 

Anyone can help?

Just put ! in front:

 

Code:

(!plugin.isInList(...))
The ! symbol means "not".
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by CaptCourage*:

 

Yes, that's easy. I'll assume you know how to use Insane Limits, but if not: watch the video in post #1 of this thread: www.phogue.net/forumvb/showth...-JAN-2013)-BF3*

 

The video is a bit outdate, but will show you how to use Insane Limits.

 

All the career (ignore resets) expressions are listed here:

 

www.phogue.net/forumvb/showth...Premium-resets*

 

So for KDR, you want (OnJoin):

 

Code:

(!player.StatsError  && (player.Kills/player.Deaths) > 1.5 )
Then an Action like Kick or Ban.
Its a bit late...but Thank you.....This is working really well for me...Just have to get my head around the rest of the concept of this plugin....When I get the time that is..

 

CC

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

Originally Posted by Tomgun*:

 

can someone write a script so when a player has played say 10 (can edit) full rounds in the server (not in a row but in total) then they win a reserved slot for the server and it updates the reserved slot list automatically (also tell that player either by say/yell/both and the other players who has won a reserved slot via say/yell/both and why) but after say 20 (can edit) days of not joining the server it clears that name..

 

I think people should be rewarded for populating your server

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

Originally Posted by supermillhouse*:

 

can someone write a script so when a player has played say 10 (can edit) full rounds in the server (not in a row but in total) then they win a reserved slot for the server and it updates the reserved slot list automatically (also tell that player either by say/yell/both and the other players who has won a reserved slot via say/yell/both and why) but after say 20 (can edit) days of not joining the server it clears that name..

 

I think people should be rewarded for populating your server

I have already done a similar thing and it is being tested on our server.

 

How it works:

When the server hits 11 players it adds the first six players who helped start the server that are currently still in the server and it omits any white listed players that have permanent slots on the server.

So if there is 1 permanent resident helping start the server then 5 people are added in to a list.

If one of the 6 players come back to the server within 4 days and helps again it adds them to the reserve list which has a day by day expiry. If they don't help again then they lose their slot.

 

I think that rewarding for number of rounds played is the wrong thing to do because you will have players that play allot on your server but only when its full, so they aint helping at all to start it.

 

Our server testing:

http://battlelog.battlefield.com/bf3...f-caf7759cd0c2

http://battlelog.battlefield.com/bf3...6-55ce3ed746f5

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

Archived

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




×
×
  • Create New...

Important Information

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