AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Super Targeting (Filters) |Updated 2/25/16| (https://forums.alliedmods.net/showthread.php?t=236118)

Mitchell 02-27-2014 12:44

[Any] Super Targeting (Filters) |Updated 2/25/16|
 
Super Targeting
=========

Super Targeting adds in a config for server operators to make their own filter for the ProcessTargetString which is used in many of the SM commands.

Future Work
-----------

I plan on adding in a way to check to see if the following conditions are met to the list of filters a operator can set.
• Check active weapon, (index number, class name, slot #)
• Check to see if a player has a certain wearable (type, quality, level)
• Check all weapons to look for: index number, class name, quality, level.
If you have any filter you would like to see added onto this please post below!
• Premium Check
• Flag checking [DONE!]
• Alive Checking [DONE!]
• Bot Checking [DONE!]
• Multi-Game Class Checking [DONE!]
• Invert Check [DONE!]
• Random Player [DONE!]

Installation & Setup
===========

Code:

SuperTargeting.smx -> Sourcemod/plugins/
SuperTargeting.cfg -> Sourcemod/configs/

Configuration
------------

The format is so:
Code:

"@<filtername>"
{
        "text"                "<language text>"
        "team"                "<team>"
        "class"        "<class>" //TF2|DOD:S|L4D|L4D2
        "alive"        "<0/1>"
        "bots"        "<0/1>"
        "cond"        "<condition #>" //TF2 ONLY!
        "flag"        "<a/z>"
        "invert"        "<0/1>"
        "random"        "<#>"
}

Here is what can be put into each one:
Code:

<filtername> : this can be anything, but i would refrain from making it anything that is already in use. Start it off with an exclamation point (!) to negate the filter
<team>  : this can be 0 to 3, anything else it will ignore the filter. Set to 0 to ignore the team number.
<class> : this is a number from 0 to 9, anything other than that the filter will be ignored.
<language text> : This is the text that is printed out when a plugin uses this filter
<alive> : -1 ignores this filter (or just dont add the filter.), 0 - Only dead players, 1 - Only alive players
<bots> : -1 ignores this filter (or just dont add the filter.), 0 - Only Players, 1 - Only Bots
<cond> : Full list below, checks to see if a player is in a certain condition.
<flag> : Any flags to check for. (For root admins that just have the 'z' flag make sure you add the z in the flag string so if you wanted to check for admins do: "flag"    "bz" (cont below)
<invert> : This will invert the entire check, if you need to do so, without using a '!' at the beginning.
<random> : This will compile all players that meet the conditions and then choose X amount of players from that list at random.

List of all the class/team/cond numbers:
Code:

Classes:
0 : Any Class
1 : Scout
2 : Sniper
3 : Soldier
4 : Demoman
5 : Medic
6 : Heavy
7 : Pyro
8 : Spy
9 : Engineer

Teams:
0 : Any team
1 : Spectator
2 : RED/T
3 : BLU/CT

Conditions:
There are just too many conditions to check so ill only post ones that would be good to use.
-1 : Ignore (this is the default)
0 : Slowed
1 : Zoomed // Snipers zooming in.
3 : Disguised //Spys that are disguised.
4 : Cloaked //Player is cloaked.
5 : Ubercharged
6 : TeleportedGlow // a user that had just teleported.
7 : Taunting
11 : Kritzkrieged
14 : Bonked
15 : Dazed
16 : Buffed
17 : Charging
19 : CritCola
21 : Healing
22 : OnFire
23 : Overhealed
24 : Jarated
25 : Bleeding
27 : Milked
30 : MarkedForDeath
32 : SpeedBuffAlly
36 : CritHype // scout's hype?
77 : HalloweenGhostMode

Flags:
a-t, z: All flags
If you add a # this means that players must ONLY have those flags so "#ab" cleints must ONLY have flags A and flag B. Normal "ab" means that they only have to have that in the mix.

Below this is an example that will target all scouts
Code:

"@scout"
{
        "text"                "all Scouts"
        "team"                "0"
        "class"                "1"
}
When used it will display: ***** all Scouts.
i.e.: [SM] Slayed all Scouts.

Updater
-----------
This plugin doesn't require Updater, but it does support it.
to disable Updating on the specific plugin go here: tf/cfg/sourcemod/plugin.SuperTargeting.cfg
and change sm_supertargeting_update to 0

Credit where it's due
-----------
- ReFlexPoison : Created the base of the code and most of the filters syntax for the config. [Class Target Filters]
- ddhoward : He also made a similar plugin of ReFlexPoison's, it had a few custom filters that I appended onto the config. [Class Targeting]

DOWNLOAD
=========
These are all the current version on the main branch in bitbucket.
PLUGIN
CONFIG -right click -> save as...
SOURCE

Root_ 02-27-2014 17:41

Re: [TF] Super Targeting (Filters)
 
Interesting. Do you mind to make it for every game? Also a few notes:
Pls dont check game folder anymore. Use GetEngineVersion() instead (or even better remove that check at all in your plugin due to <tf2_stocks> is included with its extension, so plugin wont be loaded on non-tf2 game anyways).
Also there are no point of using #tryinclude <updater> unless you also add #if defined _updater_included and #endif appropriately in code. So plugin wont be compiled without that include. =\

Mitchell 02-27-2014 20:07

Re: [TF] Super Targeting (Filters)
 
Quote:

Originally Posted by Root_ (Post 2105179)
Interesting. Do you mind to make it for every game?

Seems the only thing not tf2 related is the team filter check. I guess l4d/2 would have some class checks.

Quote:

Originally Posted by Root_ (Post 2105179)
Also a few notes:
Pls dont check game folder anymore. Use GetEngineVersion() instead (or even better remove that check at all in your plugin due to <tf2_stocks> is included with its extension, so plugin wont be loaded on non-tf2 game anyways).

Seems to be little to no information about this function. I haven't looked very deep though.
I guess it would help having the latest includes.
Not sure how i would go about making it so that the plugin will load with out tf2_stocks thus make it so i can fire TF2_IsPlayerInCondition only if the game is tf2..

Quote:

Originally Posted by Root_ (Post 2105179)
Also there are no point of using #tryinclude <updater> unless you also add #if defined _updater_included and #endif appropriately in code. So plugin wont be compiled without that include. =\

Ah, ill fix it by tonight.

Mitchell 02-27-2014 21:49

Re: [TF] Super Targeting (Filters)
 
Updated to 1.2.0 Includes:
• Removed any tf2 dependency

Also tf2's condition checking works but this plugin needs to be tested in another game before i consider it to be [ANY]. If some one would help me out on that I would appreciate it.

Official documentation of the conditions, i have only tried cloak, but im sure it will work with the rest of the conditions.
Spoiler

Root_ 02-28-2014 07:10

Re: [TF] Super Targeting (Filters)
 
AFAIK l4d/2 and dods are using m_iPlayerClass netprop.
However tf2 are using m_iDesiredPlayerClass, which will work for either dods and l4d/2, so you can try adding this instead.
Here are some DoD:S class enum
Code:
enum {     PlayerClass_Random = -2,     PlayerClass_None,     PlayerClass_Rifleman,     PlayerClass_Assault,     PlayerClass_Support,     PlayerClass_Sniper,     PlayerClass_Machinegunner,     PlayerClass_Rocket,         PlayerClass_Size }

Tank Missile 03-01-2014 12:42

Re: [TF] Super Targeting (Filters)
 
Is it possible to add free2play and premium filters? I tried that a while back, but I could never figure it out.

Mitchell 03-04-2014 10:41

Re: [TF] Super Targeting (Filters)
 
Quote:

Originally Posted by Tank Missile (Post 2105928)
Is it possible to add free2play and premium filters? I tried that a while back, but I could never figure it out.

Yes i could, ill add it to my todo list, along with Admin flag checking.

I have yet to be able to test this for any other game besides tf2, if some one would do that for me i would love it.

If anybody is intrested in the developement branch of this plugin it is located here: http://bitbucket.snbx.info/super-targeting/src/dev

Mitchell 03-08-2014 00:54

Re: [Any] Super Targeting (Filters) |Updated 3/7/14|
 
Update to 1.3.5:
• Added in Bots condition.
• Added in flag supporting.

This update now makes the following plugins obsolete:
https://forums.alliedmods.net/showthread.php?p=2108829
https://forums.alliedmods.net/showthread.php?p=1744949

I have thought about making this into the mix: https://forums.alliedmods.net/showthread.php?p=1983726
But i have figure that i should only mess with the simple stuff first.

nerdy97 04-14-2015 23:27

Re: [Any] Super Targeting (Filters) |Updated 3/7/14|
 
Hey, just a very useful suggestion to add @!(group) as well. So it can also exec for everyone besides that group.

Thanks

Chdata 04-15-2015 10:10

Re: [Any] Super Targeting (Filters) |Updated 3/7/14|
 
@random
@randomX X = amount of players to [try to] find


All times are GMT -4. The time now is 02:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.