Raised This Month: $12 Target: $400
 3% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
4112
Plugin Version:
1.3.6
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    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.
    Old 02-27-2014 , 12:44   [Any] Super Targeting (Filters) |Updated 2/25/16|
    Reply With Quote #1

    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

    Last edited by Mitchell; 02-25-2016 at 10:37.
    Mitchell is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 02-27-2014 , 17:41   Re: [TF] Super Targeting (Filters)
    Reply With Quote #2

    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. =\
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-27-2014 , 20:07   Re: [TF] Super Targeting (Filters)
    Reply With Quote #3

    Quote:
    Originally Posted by Root_ View Post
    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_ View Post
    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_ View Post
    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.

    Last edited by Mitchell; 02-27-2014 at 20:23.
    Mitchell is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-27-2014 , 21:49   Re: [TF] Super Targeting (Filters)
    Reply With Quote #4

    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

    Last edited by Mitchell; 02-27-2014 at 22:02.
    Mitchell is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 02-28-2014 , 07:10   Re: [TF] Super Targeting (Filters)
    Reply With Quote #5

    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 }
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    Tank Missile
    Member
    Join Date: Aug 2013
    Old 03-01-2014 , 12:42   Re: [TF] Super Targeting (Filters)
    Reply With Quote #6

    Is it possible to add free2play and premium filters? I tried that a while back, but I could never figure it out.
    Tank Missile is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 03-04-2014 , 10:41   Re: [TF] Super Targeting (Filters)
    Reply With Quote #7

    Quote:
    Originally Posted by Tank Missile View Post
    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 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 03-08-2014 , 00:54   Re: [Any] Super Targeting (Filters) |Updated 3/7/14|
    Reply With Quote #8

    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.
    Mitchell is offline
    nerdy97
    Member
    Join Date: Jul 2013
    Location: Sydney, Australia
    Old 04-14-2015 , 23:27   Re: [Any] Super Targeting (Filters) |Updated 3/7/14|
    Reply With Quote #9

    Hey, just a very useful suggestion to add @!(group) as well. So it can also exec for everyone besides that group.

    Thanks
    __________________
    nerdy97 is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 04-15-2015 , 10:10   Re: [Any] Super Targeting (Filters) |Updated 3/7/14|
    Reply With Quote #10

    @random
    @randomX X = amount of players to [try to] find
    __________________
    Chdata is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:43.


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