Jump to content

ProconRulz V44j1 - weapon limits and other event-triggered admin actions


ColColonCleaner

Recommended Posts

Originally Posted by virusdead*:

 

InsaneLimit

 

2015-07-29_120524.jpg

 

Code:

double count = limit.Activations(player.Name);

if (count == 1)
	{
	 plugin.SendPlayerMessage(player.Name, plugin.R ("Kill #1 of #4! Using Mortar! Maximum of 4!"));
	 plugin.SendPlayerYell(player.Name, plugin.R ("Kill #1 of #4! Using Mortar! Maximum of 4!"),5);
	
	}

else if (count == 2)
	{
	 plugin.SendPlayerMessage(player.Name, plugin.R ("Kill #2 of #4! Using Mortar! Maximum of 4!"));
	 plugin.SendPlayerYell(player.Name, plugin.R ("Kill #2 of #4! Using Mortar! Maximum of 4!"),5);
	
	}

else if (count == 3)
	{
	 plugin.SendPlayerMessage(player.Name, plugin.R ("Kill #3 of #4! Using Mortar! Maximum of 4!"));
	 plugin.SendPlayerYell(player.Name, plugin.R ("Kill #4 of #4! Using Mortar! Maximum of 4!"),5);
	
	}

else if (count == 4)
	{
	 plugin.SendPlayerMessage(player.Name, plugin.R ("Kill #4 of #4! Using Mortar! Maximum of 4!"));
	 plugin.SendPlayerYell(player.Name, plugin.R ("Kill #4 of #4! Using Mortar! Maximum of 4!"),5);
	
	}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by k3rMz*:

 

hi guys

 

I wanted to know whether its possible to create anything that will tell me when some one spawns into a jet whether that be in proconrulz or anything else used by procon.

 

For example :

 

some one spawns into a jet , it sends out a /say or /yell message across the server

 

i spent some time reading and searching but couldn't find anything & tbh i doubt this is possible but told the guys i would pop over and ask those more in the know here at Procon.

 

 

Cheers

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

Originally Posted by ColColonCleaner*:

 

hi guys

 

I wanted to know whether its possible to create anything that will tell me when some one spawns into a jet whether that be in proconrulz or anything else used by procon.

 

For example :

 

some one spawns into a jet , it sends out a /say or /yell message across the server

 

i spent some time reading and searching but couldn't find anything & tbh i doubt this is possible but told the guys i would pop over and ask those more in the know here at Procon.

 

 

Cheers

There is no way to tell where a player has spawned nor whether they are in a vehicle.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by soldier1052*:

 

hello

 

I would like to Killstreak the Eod Bot but I can not .

what should I do?

 

 

Sorry for the horrible English

 

____________?

 

#### Accumulate the kill count for each player in a var %server_streak[playername]%

On Kill;Incr %killincr%;Incr %server_streak[%p%]%;

#### Say periodic killstreak messages

On Kill;If %killincr% == 30;Set %killincr% 25;Say GodLike! %p% %___________?[%p%]% KILL STREAK

On Kill;If %___________?[%p%]% == 25;Say GodLike! %p% 25-KILL STREAK

On Kill;If %___________?[%p%]% == 20;Say Unstoppable! %p% 20-KILL STREAK

On Kill;If %___________?[%p%]% == 15;Say Dominating! %p% 15-KILL STREAK

On Kill;If %___________?[%p%]% == 10;Say Rampage! %p% 10-KILL STREAK

On Kill;If %server_streak[%p%]% == 5;Say Killing Spree! %p% 5-KILL STREAK

 

 

___?

Thanks for any help

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

Originally Posted by mimimimi*:

 

bambam,

 

it is possible to implement VictimYell?

or at least can you fix the TargetPlayer?

 

bc right now TargetPlayer works only On Say.

 

With all other trigger (On Kill, On Spawn, etc) TargetPlayer does not work.

 

VictimYell is not implemented, so as per description in your pdf manual i tried to do the same with:

 

Code:

On Kill;TargetPlayer %v%;TargetAction PlayerYell I Got You
"[04:29:52 98] ProconRulz: process_part rule.unparsed_rule = [On Kill;TargetPlayer %v%;TargetAction PlayerYell I Got You]

[04:29:52 98] ProconRulz: process_part player_name = [Crazyhorse333]

[04:29:52 98] ProconRulz: process_part p.part_type = TargetPlayer

[04:29:52 98] ProconRulz: process_part k.Killer.SoldierName = [Crazyhorse333]

[04:29:52 98] ProconRulz: System.Collections.Generic.KeyNotFoundException: The given key was not defined in the dictionary.

bei System.ThrowHelper.ThrowKeyNotFoundException()

bei System.Collections.Generic.Dictionary`2.get_Item(T Key key)

bei PRoConEvents.ProconRulz.process_part(ParsedRule rule, PartClass p, String player_name, Kill k, String msg, Dictionary`2& keywords)"

 

 

 

but as you can see TargetPlayer seems to work only with On Say trigger....

 

even though your pdf manual says otherwise:

"TargetPlayer can conveniently be used with a variable giving the string of the player name, most simply in the case of the victim of a kill, i.e. "TargetPlayer %v%"."

i will not post my effort to hack your code ... ahhaha but i will ahhaha

 

case "victimyell": // e.g. "VictimYell I got you!"

if (part.Length

{

parse_error("VictimYell", parsed_rule.unparsed_rule); rule_fail = true; break;

}

new_action.part_type = PartEnum.VictimYell;

parsed_int = false; // assume parsing yell_delay fails

try

{

new_action.int1 = Int32.Parse(fragments[1]); // try and pick up yell delay (seconds)

new_action.string_list.Add(String.Join(" ", fragments, 2, fragments.Length-2 )); // rest of string

parsed_int = true;

}

catch { }

if (!parsed_int) // we didn't parse a yell delay so use default

{

new_action.int1 = yell_delay;

new_action.string_list.Add(part.Substring(9));

}

new_action.has_count = has_a_count(new_action);

parsed_rule.parts.Add(new_action);

break;

 

 

case PartEnum.VictimYell:

string victim_name = "";

try

{

victim_name = keywords[substEnum.Victim];

}

catch { }

 

if (victim_name != "")

{

ExecuteCommand("procon.protected.send",

"admin.yell", message, "player", victim_name);

ExecuteCommand("procon.protected.chat.write", String.Format("(VictimYell {0}) ",

victim_name) + message);

}

break;

added this to your code, but it messed with the Details and Plugin Settings tabs in procon... now are empty hahaha

so i did not even test it on the field...

 

 

thanks in advice for any input

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

Originally Posted by mimimimi*:

 

hello

 

I would like to Killstreak the Eod Bot but I can not .

what should I do?

 

 

Sorry for the horrible English

 

_________________?

Thanks for any help

#### Accumulate the kill count for each player in a var %server_streak[playername]%

On Kill;Weapon EODBot;Incr %killincr%;Incr %server_streak[%p%]%;

#### Say periodic killstreak messages

On Kill;If %killincr% == 30;Set %killincr% 25;Say GodLike! %p% %server_streak[%p%]% KILL STREAK

On Kill;If %server_streak[%p%]% == 25;Say GodLike! %p% 25-KILL STREAK

On Kill;If %server_streak[%p%]% == 20;Say Unstoppable! %p% 20-KILL STREAK

On Kill;If %server_streak[%p%]% == 15;Say Dominating! %p% 15-KILL STREAK

On Kill;If %server_streak[%p%]% == 10;Say Rampage! %p% 10-KILL STREAK

On Kill;If %server_streak[%p%]% == 5;Say Killing Spree! %p% 5-KILL STREAK

 

 

Unfortunately this wont work anyway.....

 

in hundreds of hours of playing i have seen BF4 giving a proper EODBot weapon key twice....

 

it wont work.

 

if you are sure that in your map there are almost none kills with Death, then replace EODBot with Death...

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

Originally Posted by mimimimi*:

 

guys can anyone help to write a script to limit mortars,according to the principle of sniper rifles

Code:
####################################################
# M224 Mortar limit 
# Slot is reserved by M224 Mortar kill
# Slot is lost by non-M224/non-Death/non-Handgun/non-melee kill
# Max # m224 is set in %server_m224limit% var
####################################################

# DEBUG
On Kill;Log %p% killed %v% with %d% %wk%
On Spawn;Log %p% spawned on %ptk%

# SET THE MAX # OF M224 HERE: // RIGHT NOW 2
On Kill;ServerFirst;Set %server_m224limit% 2
On Say;ServerFirst;Set %server_m224limit% 2

# M224 LOG MESSAGES
On Spawn;If %server_sl_m224[%p%]% == 1;Log M224 %pt% %p% re-spawned. %server_sl_total[%ptk%]% m224s on team %ptk%
On Kill;If %server_sl_m224[%v%]% == 1;Log M224 %vtk% %v% killed. %server_sl_total[%vtk%]% m224s on team %vtk%

# M224 MORTAR KILL CHECKS either over limit (so kill), existing m224 (do nothing), new m224 (reserve slot)
On Kill;Weapon M224,U_M224
    If %server_sl_total[%ptk%]% >= %server_m224limit%;If %server_sl_setm224[%p%]% == 0;if %server_sl_m224[%p%]% == 0;TeamSay %p% killed by M224 LIMIT for %pt%;Log M224 Limit max %server_m224limit% m224s each team !!! (now Kill %p%);Kill
    If %server_sl_m224[%p%]% == 1;Log %ptk% %p% still a m224, %server_sl_total[%ptk%]% m224s on team %ptk%
    If %server_sl_m224[%p%]% == 0;Incr %server_sl_total[%ptk%]%;Set %server_sl_m224[%p%]% 1;Set %server_sl_x% %server_sl_total[%ptk%]%;Set %server_sl_m224name[%ptk%][%server_sl_x%]% %p%;PlayerSay %p% has M224 slot on %pt% %server_sl_total[%ptk%]%/%server_m224limit%;Log %ptk% %p% is new m224, %server_sl_total[%ptk%]%/%server_m224limit% m224s on team %ptk%


# FREE UP M224 SLOT IF M224 HAS NON-M224 KILL OR M224 LEAVES    
On Kill;Not Weapon M224,U_M224,Melee,Death;Not Damage Handgun;If %server_sl_m224[%p%]% == 1;Set %server_sl_m224[%p%]% 0;Decr %server_sl_total[%ptk%]%;TeamSay %pt% %p% gave up M224 slot (used %w%);Log Ex-m224 %p% used %d% %wk%, %server_sl_total[%ptk%]% m224s on team %ptk%
On Leave;If %server_sl_m224[%p%]% == 1;Set %server_sl_m224[%p%]% 0;Decr %server_sl_total[%ptk%]%;TeamSay %pt% %p% gave up M224 slot (left server);Log M224 %pt% %p% left server. %server_sl_total[%ptk%]% m224s on team %ptk%

# !m224s / !m224x / !setm224 INFO MESSAGES

#!m224s tells you the current count for your team and m224 player names
On Say;Text !m224s;
    PlayerSay M224 Mortar limit: Reserve slot with m224 kill, until non-m224/handgun/knife kill.
    If %server_sl_total[%ptk%]% == 0;PlayerSay %pt% 0/%server_m224limit% M224 on team %pt%
    If %server_sl_total[%ptk%]% > 0;PlayerSay %pt% M224[1/%server_m224limit%] is %server_sl_m224name[%ptk%][1]%
    If %server_sl_total[%ptk%]% > 1;PlayerSay %pt% M224[2/%server_m224limit%] is %server_sl_m224name[%ptk%][2]%
    If %server_sl_total[%ptk%]% > 2;PlayerSay %pt% M224[3/%server_m224limit%] is %server_sl_m224name[%ptk%][3]%
    If %server_sl_total[%ptk%]% > 3;PlayerSay %pt% M224[4/%server_m224limit%] is %server_sl_m224name[%ptk%][4]%
    If %server_sl_total[%ptk%]% > 4;PlayerSay %pt% M224[5/%server_m224limit%] is %server_sl_m224name[%ptk%][5]%

#!m224x just gives the m224 counts for both teams
On Say;Text !m224x;
    PlayerSay M224: Team 1: %server_sl_total[1]%/%server_m224limit%, Team 2: %server_sl_total[2]%/%server_m224limit%

#!setm224 <name-substring> is admin-only command to allocate a m224 slot to player. E.g. "!setm224 bam"    
On Say;Admin;Text !setm224;TargetPlayer;Set %server_sl_setm224[%t%]% 1;PlayerSay %t% guaranteed a M224 slot until round end
i wont use it myself ....

reason:

myrcon.net/...proconrulz-v44j1-weapon-limits-and-other-event-triggered-admin-actions#entry15089

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

Originally Posted by mimimimi*:

 

See if it is storing with

On Say;Text GetMode;Say The mode is %ini_gunmode%

 

That returns 0 I think if it wasn't ever set so if 0 then try this and see if not 0

On Say;Text SetMode;Incr %ini_gunmode%

try this

 

Code:

On Say;Text SetMode;Incr %ini_test_gunmode%
On Say;Text GetMode;Say The mode is %ini_test_gunmode%
now what you need to understand is:

 

ini is just to say go write on a file

test is the actual name of the section (usually %p% or the name of a map etc, in a case like yours, where you wanna store a general variable i use a short form of the name of my server)

gunmode is the actual variable in that specific section (test)

 

when you open your ini file you will have:

 

[test]

gunmode=1

 

on the other hand your code:

 

Code:

On Say;Text SetMode;Incr %ini_gunmode%
wont work, bc you cant increase gunmode.... gunmode is the name of the section of your ini file

 

this is what looks like a ini file with many sections:

 

[test]

gunmode=1

[Creaturexx]

kills=145

join=4

reported=4

[lancang]

rounds=330

[lost]

rounds=143

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

Originally Posted by Alexis-Alexander*:

 

bambam,

 

it is possible to implement VictimYell?

or at least can you fix the TargetPlayer?

 

bc right now TargetPlayer works only On Say.

 

With all other trigger (On Kill, On Spawn, etc) TargetPlayer does not work.

 

VictimYell is not implemented, so as per description in your pdf manual i tried to do the same with:

 

Code:

On Kill;TargetPlayer %v%;TargetAction PlayerYell I Got You
"[04:29:52 98] ProconRulz: process_part rule.unparsed_rule = [On Kill;TargetPlayer %v%;TargetAction PlayerYell I Got You]

[04:29:52 98] ProconRulz: process_part player_name = [Crazyhorse333]

[04:29:52 98] ProconRulz: process_part p.part_type = TargetPlayer

[04:29:52 98] ProconRulz: process_part k.Killer.SoldierName = [Crazyhorse333]

[04:29:52 98] ProconRulz: System.Collections.Generic.KeyNotFoundException: The given key was not defined in the dictionary.

bei System.ThrowHelper.ThrowKeyNotFoundException()

bei System.Collections.Generic.Dictionary`2.get_Item(T Key key)

bei PRoConEvents.ProconRulz.process_part(ParsedRule rule, PartClass p, String player_name, Kill k, String msg, Dictionary`2& keywords)"

 

 

 

but as you can see TargetPlayer seems to work only with On Say trigger....

 

even though your pdf manual says otherwise:

 

 

i will not post my effort to hack your code ... ahhaha but i will ahhaha

 

 

 

added this to your code, but it messed with the Details and Plugin Settings tabs in procon... now are empty hahaha

so i did not even test it on the field...

 

 

thanks in advice for any input

Victims don't see yells, unless something has changed in these games. VictimSay will show up.

On Kill;VictimSay I got you!

 

Or if you want the yell try something like:

On Kill;Incr %server_taunt[%v%]%

On Spawn;If %server_taunt[%p%]% > 0; Set %server_taunt[%p%]% = 0;PlayerYell I got you!

 

I'm guessing that this isn't for every kill, but for a particular killer/victim combination. And if that is the case then the on kill could have a condition checked to decide if a yell should happen on the next spawn.

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

Originally Posted by mimimimi*:

 

Your advice could kind of work, thank you

 

what i would like is this

 

you get killed

admin yell at you the stats of the player that killed you

 

on death would be great, but your advice is something, thank you

 

anyone knows what plugin does that?

 

you get killed and immidiately you see the stats of your killer yelled at you

 

kd, kpm hs etc..

 

i can work those stats off of proconrulz, i cant yell though

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

Originally Posted by s1ngular1ty*:

 

Can someone help me?

 

This code isn't working properly. It executes all the count lines even when the count is higher than that line. What am I doing wrong?

 

Code:

On Kill;Not Damage Handgun;Not Damage Melee;Not Weapon dlSHTR;Not Weapon U_BallisticShield
Count 3;Say Level 3
Count 2;Say Level 2
Count 1;Say Level 1
Count 0;Say Kill not allowed %p% [%w%] %v%  PCount %c%
I thought it would only execute Count 0 line when count is 0, count 1 line when count is 1, and so on. But when count is 2 for example it executes count 2 line, count 1 line, and count 0 line.

 

I tried it with PlayerCount instead of count and the same thing happens.

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

Originally Posted by ty_ger07*:

 

Can someone help me?

 

This code isn't working properly. It executes all the count lines even when the count is higher than that line. What am I doing wrong?

 

Code:

On Kill;Not Damage Handgun;Not Damage Melee;Not Weapon dlSHTR;Not Weapon U_BallisticShield
Count 3;Say Level 3
Count 2;Say Level 2
Count 1;Say Level 1
Count 0;Say Kill not allowed %p% [%w%] %v%  PCount %c%
I thought it would only execute Count 0 line when count is 0, count 1 line when count is 1, and so on. But when count is 2 for example it executes count 2 line, count 1 line, and count 0 line.

 

I tried it with PlayerCount instead of count and the same thing happens.

http://www.forsterlewis.com/proconrulz.pdf

Page 21

 

The functionality of Count is essentially the same as PlayerCount in most scenarios.

 

So in a rule

On Kill;PlayerCount 3;Say Player %p% has more than 3 kills

The chat message "Player bambam has more than 3 kills" will appear on each kill by bambam

after the third.

For example, the 3rd kill is "Count 0", "Count 1", and "Count 2" since the logic is Count is MORE THAN N.

 

The built-in count logic is essentially Count > N. ("Count Greater Than N")

 

 

You will have to use your own intermediary tracking variable if you want to remove the "More Than" part of the built-in count logic and change it to "Equal To" logic.

 

See below where we increment the variable %thiscount% each time the violation occurs. %thiscount% starts out as 0 (since all variables are set to zero by the plugin at the beginning of each round) and is then incremented up 1 each time the rule is violated. We then use "equal to" logic to test our actions.

 

Code:

On Kill;Not Damage Handgun;Not Damage Melee;Not Weapon dlSHTR;Not Weapon U_BallisticShield;Incr %thiscount%
If %thiscount% == 1;Say Kill not allowed %p% [%w%] %v%  PCount %thiscount%
If %thiscount% == 2;Say Level 2
If %thiscount% == 3;Say Level 3
Please note that the first applicable kill will now have %thiscount% equal to 1 instead of Count 0 since we are using equal to instead of more than.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by keb2*:

 

Hello.Please help to create a rule.

map Subway.prohibited weapons-c4,m320,rpg,smaw,grenades.

Kill 8 -personal message to the chat

Kill 9 -Player Kill+personal message to the chat

Kill 10 -Player Kill+a message which will see all

Kill 11 -ban round+a message which will see all

 

Sorry for bad english.

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

Originally Posted by ty_ger07*:

 

Hello,

I've seen servers that have a caps censor for example

 

HELLO ALL 99% of your message was in caps armypolice

 

 

Does anyone know that code?

If anything, I think Insane Limits would be your most likely option. This certainly is not a job for ProconRulz.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by GRMaDHoUsE*:

 

Hi everyone..

Spent last 2hrs reading all posts (and yes skipped a few pages)... I know it wasnt possible before to add a GP30 limit rule...has anything changed? I have the rule for M320 and it works great :smile: but the gadget part is still not working?

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

Originally Posted by ColColonCleaner*:

 

Hi everyone..

Spent last 2hrs reading all posts (and yes skipped a few pages)... I know it wasnt possible before to add a GP30 limit rule...has anything changed? I have the rule for M320 and it works great :smile: but the gadget part is still not working?

GP30 cannot be detected in BF3, assuming that's the game you are in.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by carrypotrick*:

 

what is weapon key code for phantom bow?

I want to put in some words for fun kill announcement...

 

and also weapon key code for railgun ~_~

 

thanks all the time with your support!

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

Originally Posted by Sath87*:

 

Have a problem, these rules are not working. I want it to be a pistol and melee only.

 

On Kill;Not Damage Melee;Not Damage Handgun;Say %p% Pistols Only Fool!!!;Kill

On Kill;Not Damage Weapon diSHTR;Not Damage Weapon U_SaddlegunSnp;Say %p% Pistols Only Fool!!!;Kill

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

Originally Posted by ColColonCleaner*:

 

Have a problem, these rules are not working. I want it to be a pistol and melee only.

 

On Kill;Not Damage Melee;Not Damage Handgun;Say %p% Pistols Only Fool!!!;Kill

On Kill;Not Damage Weapon diSHTR;Not Damage Weapon U_SaddlegunSnp;Say %p% Pistols Only Fool!!!;Kill

What about it is not working?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Sath87*:

 

What about it is not working?

It wasn't killing people who would use a primary gun. However it just started working again for some reason.

 

Another question, how do i allow kills with say explosive barrels or pipes?

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

Originally Posted by ColColonCleaner*:

 

It wasn't killing people who would use a primary gun. However it just started working again for some reason.

 

Another question, how do i allow kills with say explosive barrels or pipes?

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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