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

[TF2]TauntCrits


Post New Thread Reply   
 
Thread Tools Display Modes
Author
HeMe3iC
Member
Join Date: Sep 2008
Location: Яussia
Plugin ID:
1931
Plugin Version:
2.1
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Award for taunting
    Old 09-03-2010 , 14:05   [TF2]TauntCrits
    Reply With Quote #1

    Discription:
    Be or not to be. Taunt on battlefield and die or humiliate everyone with aftertaunt award.
    This plugin provides you with such choice. Theres 3 types of award:crits, mini-crits and ubercharge. Award type is defined by cvar and can be changed by admins at any time. Its also possible to set different award durations for each class, so it can be well-balanced or not.
    Type tauntcrits_info or tauntcrits_help in console to get plugin info and cvar list.


    ConVars:
    tauntcrits_[classname][0.0-360.0]- Award durations (after finishing the taunt). (example: tauntcrits_demoman 20, full classes list could be found in tauntcrits_help)
    tauntcrits_award[1.0-4.0](default 1.0) - Award for taunting. 1=crits 2=mini-crits 3=ubercharge 4=upgradable buff(minicrits to crits by default)
    tauntcrits_switch[0.0-1.0](default 1.0) - 0 disables plugin. Any other value will enable plugin
    tauntcrits_notify[0.0-2048.0](default 600.0) - Delay between notifications in chat. Setting it to 0.0 will disable notifications
    tauntcrits_hpcheck[0.0-1.0](default 1.0) - Whether to check target hp or not. If the targets hp is above 500 then there will be no award for target. Useful for plugins like VS Saxton Hale.
    tauntcrits_buffupgr[string](default "0") - Two condition numbers with '-' between them, first condition will be upgraded to the second on taunt if tauntcrits_award==4; If is equal to 0 it will upgrade from minicrits to full crits(16-33).

    Change Log:
    v1.0
    -initial release

    v1.1
    -fixed bug with failng taunt and getting crit
    -now you will get crits in end of taunt, not at its start
    -added new award-ubercharge
    -optimized code
    -changed pyro default crits duration(decreased)

    v1.2
    -New cvar; tc_switch[0.0-1.0](default 1.0) 0 disables plugin. Any other value will enable plugin

    v1.3
    -partly changed code. Now its easier to understand and does not contains unused stuff
    -tc_mode is now tauntcrits_award
    -tc_ prefix changed to tauntcrits_
    -2 new cvars: tauntcrits_notify and tauntcrits_hpcheck
    -tauntcrits_help and tauntcrits_info commands will print plugin info in your console. Both of them have the same result.
    -changed plugin filename to "tauntcrits" dont forget to remove old version.

    v1.4
    -added "players" list. Actually its just an array with 32 cells and players id's in it. Added to fix "client number random changes" bug.
    -added tauntcrits_debug cvar. I dont think you may need to use it.
    a)
    -fixed all compilation warnings, minor changes.

    v1.5
    -Replaced self-made condcheck with TF2_IsPlayerInCondition
    -replaced "9001" and "8999" with #define NULL_VALUE

    v1.6
    -Fixed "Array index is out of bounds" and "Entity -1 (-1) is invalid" errors.

    v2.0
    -plugin is now using TF2_OnConditionAdded and TF2_OnConditionRemoved instead of timers
    -no award if airblasted or damaged while taunting
    -added "upgadeble buff" mode (tauntcrits_award 4)-requested by Eggman
    which allows to upgrade current buff to another one, defined by server admin(by default its mini-crits, upgradable to full crits)
    -added tauntcrits_buffupgr cvar, which cotrols conditions, given by tauntcrits_award 4. default-0, else it should be something like "16-33"(thoose values are equal to the default value) i.e. "cond A-cond B". On taunt: Cond A upgraded to cond B, Cond B extended if already in cond B or awarded with Cond A, if not in Cond A or Cond B. Be careful using this function, theres no fool-protection, so use it on your own risk, it may crash client if he awarded with invalid cond.
    v2.1
    -tauntcrits_switch cvar is now working.

    Known issues:
    -If you start taunting while under invalid cond(dazed or bonked) and end taunt while in valid cond you will be awarded
    -Cond A and Cond be could be found in tf2.inc . You shoud use integer values(for example 0 for slowed, 33 for TFCond_HalloweenCritCandy) instead of TFCond vars.
    I wont remove old version of plugin for a while, if you want to use 2.0 you should remove tauntcrits.smx from plugins folder first. tauntcrits.smx is 1.6 and tauntcrits2.smx is 2.0 versions of plugins


    Quote:
    Originally Posted by tf2.inc
    enum TFCond
    {
    TFCond_Slowed = 0,
    TFCond_Zoomed,
    TFCond_Disguising,
    TFCond_Disguised,
    TFCond_Cloaked,
    TFCond_Ubercharged,
    TFCond_TeleportedGlow,
    TFCond_Taunting,
    TFCond_UberchargeFading,
    TFCond_Unknown1, //9
    TFCond_CloakFlicker = 9,
    TFCond_Teleporting,
    TFCond_Kritzkrieged,
    TFCond_Unknown2, //12
    TFCond_TmpDamageBonus = 12,
    TFCond_DeadRingered,
    TFCond_Bonked,
    TFCond_Dazed,
    TFCond_Buffed,
    TFCond_Charging,
    TFCond_DemoBuff,
    TFCond_CritCola,
    TFCond_InHealRadius,
    TFCond_Healing,
    TFCond_OnFire,
    TFCond_Overhealed,
    TFCond_Jarated,
    TFCond_Bleeding,
    TFCond_DefenseBuffed,
    TFCond_Milked,
    TFCond_MegaHeal,
    TFCond_RegenBuffed,
    TFCond_MarkedForDeath,
    TFCond_NoHealingDamageBuff,
    TFCond_SpeedBuffAlly,
    TFCond_HalloweenCritCandy,

    TFCond_CritHype = 36,
    TFCond_CritOnFirstBlood,
    TFCond_CritOnWin,
    TFCond_CritOnFlagCapture,
    TFCond_CritOnKill,
    TFCond_RestrictToMelee
    };
    What to do:
    -need some more award types.
    -test it more after release
    -fool-proof cvar tauntcrits_buffupgr (do i really need this?)

    Thanks to:
    Eggman - for lot of help
    Glubbable - for grammar help
    Attached Files
    File Type: sp Get Plugin or Get Source (tauntcrits.sp - 6158 views - 19.9 KB)
    File Type: sp Get Plugin or Get Source (tauntcrits2.sp - 7641 views - 14.0 KB)

    Last edited by HeMe3iC; 07-06-2012 at 01:30. Reason: updated description
    HeMe3iC is offline
    Send a message via ICQ to HeMe3iC
    PieOnEar
    Member
    Join Date: Jul 2010
    Old 09-03-2010 , 18:45   Re: [TF2]TauntCrits
    Reply With Quote #2

    Quote:
    Originally Posted by HeMe3iC View Post
    tc_mode[1.0-2.0] - mode of crits: 1-crits 2-mini-crits.

    I wanted something like this



    Oh, small-yet-recommended tip:
    Don't use ". , -" or any other non-letter/number character in a filename, it can cause a problem

    Last edited by PieOnEar; 09-03-2010 at 19:12.
    PieOnEar is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 09-04-2010 , 02:19   Re: [TF2]TauntCrits
    Reply With Quote #3

    Humm. Ok couple quick issues and suggestions before I head off...

    - First. Trying to understand how its supposed to work but, you shouldnt need a repeating timer for this... AddCommandListener for taunt....Thats way more efficient than a repeat timer looping through all clients. Seems unnessesary.

    - Your global floats are screwed up. You cant get the convar values in OnPluginStart(). That needs to be in OnConfigsExecuted. All thats gonna do is get the default values of the original convars....

    - I am not sure why you are filtering out sandvich, bonk, crita-cola, dalokohs bar. I dont think you can taunt with those anyways...... Maybe sandvich only. I dont see what the harm would be though of allowing those.
    __________________

    Last edited by retsam; 09-04-2010 at 02:31.
    retsam is offline
    haet
    Junior Member
    Join Date: Sep 2009
    Old 09-05-2010 , 17:25   Re: [TF2]TauntCrits
    Reply With Quote #4

    this is interesting.
    __________________
    haet is offline
    HeMe3iC
    Member
    Join Date: Sep 2008
    Location: Яussia
    Old 09-10-2010 , 01:43   Re: [TF2]TauntCrits
    Reply With Quote #5

    Updated.

    Quote:
    Originally Posted by retsam View Post
    Humm. Ok couple quick issues and suggestions before I head off...

    - First. Trying to understand how its supposed to work but, you shouldnt need a repeating timer for this... AddCommandListener for taunt....Thats way more efficient than a repeat timer looping through all clients. Seems unnessesary.

    - Your global floats are screwed up. You cant get the convar values in OnPluginStart(). That needs to be in OnConfigsExecuted. All thats gonna do is get the default values of the original convars....

    - I am not sure why you are filtering out sandvich, bonk, crita-cola, dalokohs bar. I dont think you can taunt with those anyways...... Maybe sandvich only. I dont see what the harm would be though of allowing those.
    1) nah, it cant hook taunt command
    2)Thanks, fixed
    3)All of them are taunts, think about crit-o-cola, valve made him earn mini-crits, but if ill add crits to him it will be unfair-his taunt too fast and he almost have no chance to get killed during him
    HeMe3iC is offline
    Send a message via ICQ to HeMe3iC
    JOSHBOX
    Junior Member
    Join Date: Sep 2010
    Old 09-19-2010 , 20:04   Re: [TF2]TauntCrits
    Reply With Quote #6

    Great idea! One suggestion... Can you add a cvar so we can enable or disable taunt crits all together?
    JOSHBOX is offline
    PieOnEar
    Member
    Join Date: Jul 2010
    Old 10-07-2010 , 15:57   Re: [TF2]TauntCrits
    Reply With Quote #7

    Mann-conomy update broke this plugin, and we need an enable/disable cvar
    PieOnEar is offline
    HeMe3iC
    Member
    Join Date: Sep 2008
    Location: Яussia
    Old 10-18-2010 , 08:09   Re: [TF2]TauntCrits
    Reply With Quote #8

    Updated to 1.2
    All what you need to fix errors caused by MANN-conomy update is to recompile plugin.
    Also added an enable/disable cvar, requested by PieOnEar
    HeMe3iC is offline
    Send a message via ICQ to HeMe3iC
    nineteeneleven
    Veteran Member
    Join Date: Nov 2010
    Old 02-23-2011 , 16:25   Re: [TF2]TauntCrits
    Reply With Quote #9

    Code:
    L 02/21/2011 - 17:58:05: Info (map "arena_nucleus") (file "errors_20110221.log")
    L 02/21/2011 - 17:58:05: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
    L 02/21/2011 - 17:58:05: [SM] Displaying call stack trace for plugin "tauntcrits_12.smx":
    L 02/21/2011 - 17:58:05: [SM]   [0]  Line 388, /home/groups/alliedmodders/forums/files/4/1/9/8/1/75680.attach::ValidWeapons()
    L 02/21/2011 - 17:58:05: [SM]   [1]  Line 350, /home/groups/alliedmodders/forums/files/4/1/9/8/1/75680.attach::Check()
    L 02/21/2011 - 17:58:05: [SM]   [2]  Line 157, /home/groups/alliedmodders/forums/files/4/1/9/8/1/75680.attach::HookTauntEnd()
    anyone know what could be causing this?
    __________________
    nineteeneleven is offline
    XaxaXoxo
    Senior Member
    Join Date: Feb 2011
    Old 03-19-2011 , 19:37   Re: [TF2]TauntCrits
    Reply With Quote #10

    Quote:
    L 03/20/2011 - 01:17:52: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
    L 03/20/2011 - 01:17:52: [SM] Displaying call stack trace for plugin "tauntcrits_12.smx":
    L 03/20/2011 - 01:17:52: [SM] [0] Line 388, tauntcrits_12.sp::ValidWeapons()
    L 03/20/2011 - 01:17:52: [SM] [1] Line 123, tauntcrits_12.sp::Hook_taunt()
    on vs saxton hale mode
    XaxaXoxo is offline
    Reply



    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 02:18.


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