AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2]TauntCrits (https://forums.alliedmods.net/showthread.php?t=137220)

HeMe3iC 09-03-2010 14:05

[TF2]TauntCrits
 
3 Attachment(s)
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

PieOnEar 09-03-2010 18:45

Re: [TF2]TauntCrits
 
Quote:

Originally Posted by HeMe3iC (Post 1290098)
tc_mode[1.0-2.0] - mode of crits: 1-crits 2-mini-crits.

:mrgreen:
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

retsam 09-04-2010 02:19

Re: [TF2]TauntCrits
 
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.

haet 09-05-2010 17:25

Re: [TF2]TauntCrits
 
this is interesting.

HeMe3iC 09-10-2010 01:43

Re: [TF2]TauntCrits
 
Updated.

Quote:

Originally Posted by retsam (Post 1290654)
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

JOSHBOX 09-19-2010 20:04

Re: [TF2]TauntCrits
 
Great idea! One suggestion... Can you add a cvar so we can enable or disable taunt crits all together?

PieOnEar 10-07-2010 15:57

Re: [TF2]TauntCrits
 
Mann-conomy update broke this plugin, and we need an enable/disable cvar

HeMe3iC 10-18-2010 08:09

Re: [TF2]TauntCrits
 
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

nineteeneleven 02-23-2011 16:25

Re: [TF2]TauntCrits
 
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?

XaxaXoxo 03-19-2011 19:37

Re: [TF2]TauntCrits
 
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

Drixevel 03-31-2011 08:15

Re: [TF2]TauntCrits
 
I just uninstalled this mod until those errors are fixed.

MaloModo 05-01-2011 12:53

Re: [TF2]TauntCrits
 
Anyone think they can fix this if original creator not around? :):bacon!:

Drixevel 05-01-2011 13:34

Re: [TF2]TauntCrits
 
Seriously...Hate getting the error spam.
Code:

L 05/01/2011 - 10:41:34: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 05/01/2011 - 10:41:34: [SM] Displaying call stack trace for plugin "TauntCritz.smx":
L 05/01/2011 - 10:41:34: [SM]  [0]  Line 388, TauntCritz.sp::ValidWeapons()
L 05/01/2011 - 10:41:34: [SM]  [1]  Line 350, TauntCritz.sp::Check()
L 05/01/2011 - 10:41:34: [SM]  [2]  Line 157, TauntCritz.sp::HookTauntEnd()


Drixevel 05-26-2011 11:50

Re: [TF2]TauntCrits
 
http://forums.alliedmods.net/showpos...&postcount=998

Keep this plugin updated on it's thread. Credits to Nineteeneleven. :3

HeMe3iC 06-25-2011 11:07

Re: [TF2]TauntCrits
 
http://i149.photobucket.com/albums/s...readrevive.jpg
finally updated this plugin. Sorry for being too lazy. Now its easier to modify, and adding/removing "no award" weapons

soon i will be away for a week, but when ill be bak ill try to fix all found bugs so please post bug reports

XaxaXoxo 06-26-2011 06:14

Re: [TF2]TauntCrits
 
Quote:

L 06/26/2011 - 13:24:41: [SM] [0] Line 195, tauntcrits.sp::HookTauntEnd()
L 06/26/2011 - 13:24:41: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
L 06/26/2011 - 13:24:41: [SM] Displaying call stack trace for plugin "tauntcrits.smx":
L 06/26/2011 - 13:24:41: [SM] [0] Line 195, tauntcrits.sp::HookTauntEnd()
L 06/26/2011 - 13:24:41: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
L 06/26/2011 - 13:24:41: [SM] Displaying call stack trace for plugin "tauntcrits.smx":
L 06/26/2011 - 13:24:41: [SM] [0] Line 195, tauntcrits.sp::HookTauntEnd()
L 06/26/2011 - 13:24:42: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
L 06/26/2011 - 13:24:42: [SM] Displaying call stack trace for plugin "tauntcrits.smx":
L 06/26/2011 - 13:24:42: [SM] [0] Line 195, tauntcrits.sp::HookTauntEnd()
L 06/26/2011 - 13:24:42: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
L 06/26/2011 - 13:24:42: [SM] Displaying call stack trace for plugin "tauntcrits.smx":
L 06/26/2011 - 13:24:42: [SM] [0] Line 195, tauntcrits.sp::HookTauntEnd()

ghare 07-01-2011 20:40

Re: [TF2]TauntCrits
 
Hi there,

In my server, running Saxton Hale mod, people donot get critcs when they taunt, especially pyro, why?

Thanks,
GhaRe

HeMe3iC 07-02-2011 09:31

Re: [TF2]TauntCrits
 
okay, trying to fix it.

ghare 07-02-2011 10:42

Re: [TF2]TauntCrits
 
I think only the secondary weap can have critcs when we taunt D:. I want all of them to give critcs.

My server uses VS Saxton Hale mode.

HeMe3iC 07-02-2011 15:36

Re: [TF2]TauntCrits
 
Alright, uploaded update. It works perfectly on Random Fortress server, but I cant get error logs so i dont know if it spams with errors.
Sorry if theres lot of this spam.

ghare 07-03-2011 18:42

Re: [TF2]TauntCrits
 
Yes, now its working perfectly ;D!

Thank you!

clutchh 07-08-2011 16:21

Re: [TF2]TauntCrits
 
When compiling:

Code:

tauntcrits.sp(670) : warning 234: symbol "TF2_GetPlayerConditionFlags" is marked as deprecated: Use TF2_IsPlayerInCondition instead.

tauntcrits.sp(680) : warning 234: symbol "TF2_GetPlayerConditionFlags" is marked as deprecated: Use TF2_IsPlayerInCondition instead.


HeMe3iC 07-09-2011 10:24

Re: [TF2]TauntCrits
 
Fixed.

Drixevel 07-13-2011 08:53

Re: [TF2]TauntCrits
 
Code:

L 07/13/2011 - 06:37:07: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 07/13/2011 - 06:37:07: [SM] Displaying call stack trace for plugin "TG_TauntCritz.smx":
L 07/13/2011 - 06:37:07: [SM]  [0]  Line 692, TG_TauntCritz.sp::ValidWeapons()
L 07/13/2011 - 06:37:07: [SM]  [1]  Line 639, TG_TauntCritz.sp::Check()
L 07/13/2011 - 06:37:07: [SM]  [2]  Line 453, TG_TauntCritz.sp::HookTauntEnd()

Anything? Need to update again? bug? O-O

HeMe3iC 07-13-2011 10:44

Re: [TF2]TauntCrits
 
Im not sure, but it seems you are using different version, so I cant find whats going on on Line 962.
In last version Line 962 is "return bool:false;" also my .sp file is called "tauntcrits.sp".
Could you upload this .sp file so i can check whats wrong?

Drixevel 07-13-2011 12:02

Re: [TF2]TauntCrits
 
I usually edit the plugins i download and change around a few things for my servers but don't release them. I could try getting the latest version you have up and seeing if it works for me. :shock:

HeMe3iC 07-13-2011 12:29

Re: [TF2]TauntCrits
 
if (!(client > 0 && IsValidEdict(client) && IsClientInGame(client) && IsPlayerAlive(client)))
return bool:false;

client is target entity for
new weaponind=GetEntProp(GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon"), Prop_Send, "m_iItemDefinitionIndex");

so theres no way it can display this error i think
Quote:

[SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid

HeMe3iC 07-15-2011 01:18

Re: [TF2]TauntCrits
 
So, does downloading latest version helped?

Drixevel 07-21-2011 19:55

Re: [TF2]TauntCrits
 
I just installed the new version and it works fully but this error popped up ONCE in the console after 24 hours and the rest of the errors was from another plugin.

Code:

L 07/21/2011 - 18:03:54: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
L 07/21/2011 - 18:03:54: [SM] Displaying call stack trace for plugin "TG_TauntCrits.smx":
L 07/21/2011 - 18:03:54: [SM]  [0]  Line 683, TG_TauntCrits.sp::ValidWeapons()
L 07/21/2011 - 18:03:54: [SM]  [1]  Line 640, TG_TauntCrits.sp::Check()
L 07/21/2011 - 18:03:54: [SM]  [2]  Line 454, TG_TauntCrits.sp::HookTauntEnd()

Take a note: I compiled it myself yesterday and it works. If that's an issue then i have no idea.

Mistaken, there's another error.
Code:

L 07/21/2011 - 17:48:53: [SM] Plugin encountered error 15: Array index is out of bounds
L 07/21/2011 - 17:48:53: [SM] Displaying call stack trace for plugin "TG_TauntCrits.smx":
L 07/21/2011 - 17:48:53: [SM]  [0]  Line 308, TG_TauntCrits.sp::OnClientDisconnect()


HeMe3iC 07-26-2011 06:42

Re: [TF2]TauntCrits
 
oh sorry, ive fixed thoose bugs week ago and forgot to update this thread. Now its updated.

Drixevel 08-08-2011 00:58

Re: [TF2]TauntCrits
 
Installed the new version and i have yet to see an error. Good Job. ^_^

Drixevel 08-11-2011 19:30

Re: [TF2]TauntCrits
 
Code:

L 08/11/2011 - 03:09:30: [SM] Native "GetEntProp" reported: Property "m_iItemDefinitionIndex" not found (entity 319/instanced_scripted_scene)
L 08/11/2011 - 03:09:30: [SM] Displaying call stack trace for plugin "TG_TauntCritz.smx":
L 08/11/2011 - 03:09:30: [SM]  [0]  Line 693, TG_TauntCritz.sp::ValidWeapons()
L 08/11/2011 - 03:09:30: [SM]  [1]  Line 366, TG_TauntCritz.sp::Hook_taunt()

Not sure if that's a problem on my end but that just appeared once in my errors, Don't worry about it for now unless it appears again. :3

Antithasys 08-12-2011 17:35

Re: [TF2]TauntCrits
 
Seems like your still underdevelopment so approval will wait a bit.

Quote:

-If you have been awarded with crits and then healed by medic or dispenser your crit buff will disappear. It is bug of sourcemod, not the plugin.
This issue appears to me to be solveable. It is definitely not a SourceMod issue.

Drixevel 08-16-2011 08:46

Re: [TF2]TauntCrits
 
Same error as i posted above. -_-

I'm getting them once in a blue moon now. #32

HeMe3iC 08-18-2011 00:11

Re: [TF2]TauntCrits
 
r3dw3r3w0lf, have you modified anything but name? because theres no such error in logs of RandomFortress. I even have no ideas how could this possible for player to have weapon entity "(entity 319/instanced_scripted_scene)" because theres no error in "new weaponent=GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");" line
but there is in "new weaponind=GetEntProp(weaponent, Prop_Send, "m_iItemDefinitionIndex");"

Code:

  if (!(client > 0 && IsValidEdict(client) && IsClientInGame(client) && IsPlayerAlive(client)))
        return bool:false;
       
    new weaponent=GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
    if (!(weaponent> MaxClients && IsValidEdict(weaponent)))
        return bool:false;
       
    new weaponind=GetEntProp(weaponent, Prop_Send, "m_iItemDefinitionIndex");

can you send me your source code? ill try comparing it to mine. Anwyays, thanks for report

Drixevel 08-18-2011 02:53

Re: [TF2]TauntCrits
 
Eh, probably a mod i have installed on my server to make the error pop up.

FlaminSarge 08-27-2011 15:05

Re: [TF2]TauntCrits
 
1 Attachment(s)
Quote:

Originally Posted by Antithasys (Post 1531250)
Seems like your still underdevelopment so approval will wait a bit.

-If you have been awarded with crits and then healed by medic or dispenser your crit buff will disappear. It is bug of sourcemod, not the plugin.

This issue appears to me to be solveable. It is definitely not a SourceMod issue.

Agreed, it's not a sourcemod issue.

Valve actually IMPLEMENTED a fix for this in TF2, you just haven't used it.

Change TFCond_Kritzkrieged to TFCond_HalloweenCritCandy (or any other new tf2.inc crit defines except TFCond_CritHype).

Tada.

I've also included a possible fix for redwerewolf's error. It checks in ValidWeapon to make sure that the client's weapon is one of their 6 weapons.

You will need to compile it yourself using the new tf2.inc here

Crowley 08-27-2011 16:01

Re: [TF2]TauntCrits
 
The only problem is: how to compile? I have no idea :shock:

Drixevel 08-27-2011 16:45

Re: [TF2]TauntCrits
 
Updated tf2.inc file you gave and tried to compile the plugin and it says...

Code:

// C:\Users\Administrator\Desktop\Script\include\tf2.inc(94) : error 010: invali
d function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(185) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(539) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(566) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(593) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(626) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(656) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(686) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(728) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(755) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(794) : error 010: inval
id function or declaration
// C:\Users\Administrator\Desktop\Script\include\tf2.inc(824) : error 010: inval
id function or declaration

No Idea.

Taz532 08-27-2011 23:18

Re: [TF2]TauntCrits
 
2 Attachment(s)
Compiled plugin attached.

It's the same source code as what FlaminSarge linked (I didn't have that problem, werewolf) but I figured you gotta provide source and such with everything so why not....


All times are GMT -4. The time now is 14:18.

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