AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Gift Mod [2.0] - New update! - [7/31/2015] (https://forums.alliedmods.net/showthread.php?t=217529)

Chaosxk 06-03-2013 19:17

[TF2] Gift Mod [2.0] - New update! - [7/31/2015]
 
8 Attachment(s)
[TF2] Gift Mod
Version: 2.0



Introduction:
This plugin will spawn gift boxes at a location from where the player died.
Another player can collect these gifts and gain a temporary effect which can range from good to bad, it's all random.

Effects:
Quote:

The Good:
Godmode - You are immune to all damages!
Toxic - Enemies will die around you!
Low gravity - You have low gravity!
Jarate Swimming - You can swim in the air! No way!
Bumper cars - You can now driver a bumper car!
Scary bullets - Your bullets will scare your enemies!
Knockers - Your bullets do more knock back damage!
Incendiary ammo - Your ammo is laced with flames!
Speed - You are now faster than everyone else!
Jump - You can just higher!

The Bad:
Freeze - You are frozen!
Taunt - You are forced to taunt!
Blind - You are blinded!
One HP - Where'd all my health go?
Explode - You just blew up!
Nostalgia - Your screen just turned black/white!
Drug - Your drugged!
Brain dead - Your pretty much brain dead.
Melee - Your stripped to melee!
Snail - You walk like a snail...

Note: Some of these effects may have compatible issues with other plugins that does similar effects
If there are compatible issues, disable the effect with sm_gift_disabled or disable the other plugin.
Natives:
Quote:

gift_abilities - (Required)
Gift_TotalGood() - Gets the total amount of good abilities available
Gift_TotalBad() - Gets the total amount of bad abilities available
Gift_Remove() - Removes all active abilities on client
Gift_Active(client) - Checks if client has an active effect
Gift_Godmode(client, Float:duration) - Enables godmode on client
Gift_Toxic(client, Float:duration) - Enables toxic on client
Gift_Gravity(client, Float:duration) - Enables gravity on client
Gift_Swimming(client, Float:duration) - Enables jarate swimming on client
Gift_Bumper(client, Float:duration) - Enables bumper cars on client
Gift_Scary(client, Float:duration) - Enables scary bullets on client
Gift_Knockers(client, Float:duration) - Enables knockers on client
Gift_Incendiary(client, Float:duration) - Enables incendiary ammo on client
Gift_Speed(client, Float:duration) - Enables speed on client
Gift_Jump(client, Float:duration) - Enables jump on client
Gift_Freeze(client, Float:duration) - Freezes a client
Gift_Taunt(client, Float:duration) - Force taunt a client
Gift_Blind(client, Float:duration) - Force blind on client
Gift_OneHP(client) - Force OneHP on client
Gift_Explode(client) - Force explode on client
Gift_Nostalgia(client, Float:duration) - Force nostalgia on client
Gift_Drug(client, Float:duration) - Force drug on client
Gift_BrainDead(client, Float:duration) - Force brain dead on client
Gift_Melee(client) - Force melee on client
Gift_Snail(client, Float:duration) - Force snail on client

gift_mode - (Required)
Gift_Spawn(client, Float:posx, Float:posy, Float:posz) - Spawns gift at location (Requies gift_abilities as well)
Dependency:
Quote:

- Sourcemod 1.7+
- Metamod 1.10+
- TF2Attributes

Recompiling the plugin with changes will require:
morecolors.inc
gift.inc
Installation:
Quote:

- Download gift_abilities.smx and gift_mode.smx and place them in sourcemod/plugins directory
- Download gift_abilities.cfg and gift_mode.cfg and place them in tf/cfg/sourcemod, open to configure your values
- Download gift.phrases.txt and place it in sourcemod/translation directory
- Install latest version of Metamod and Sourcemod and TF2Attributes
Convars:
Code:

gift_abiltiies.sp -
gift_abilities_version - Version for gift_abilities
gift_toxic_radius - Radius for toxic ability (Default 275.0)
gift_toxic_damage - Damage for toxic ability (Default 900.0)
gift_gravity_multiplier - Gravity ability multiplier (Default 0.1)
gift_speed_value - Speed value for speed ability (Default 520) - <Between 1-520>
gift_jump_multiplier - Jump ability multiplier (Default 2.0)
gift_snail_value - Snail value for how slow people moves (Default 100) <Between 1-520>

gift_mode.sp -
gift_mode_version - Version of gift_mode
gift_mode_enabled - Enables spawning of gifts (Default 1)
gift_duration - How long abilities last? (Default 20)
gift_mode_chance - Chance for good effect (Default 0.5)
gift_mode_dropchance - Chance to drop a gift (Default 0.65)
gift_mode_duration - How many seconds before gifts disappear? (Default 10)
gift_mode_cooldown - How many seconds before players can see/pickup gifts (Default 30)
gift_mode_suicide - Can players drop gifts if suicide? (Default 1)
gift_mode_team - Which team can see/pickup gifts? (0-None 1-Both 2-Red 3-Blue)
gift_mode_disabled - Which abilities are disabled ("godmode,toxic,gravity,swimming,bumper,scary,knockers,incendiary,speed,jump,freeze,taunt,blind,onehp,explode,nostalgia,drug,braindead,melee,snail")

Version:
Code:

2.0 -
- Complete rewrite of this mod
- Uses natives to call abilities
- Function is split into 2 files (gift_abilities.smx and gift_mode.smx), requires both to run giftmod
- gift_abilities is just used as native calling, other plugins can be created to use this
- Requires TF2Attributes to run
- Since this was a rewrite, all abilities/convars/commands were changed
- Updated translation file
- Everything should be working with no errors (Hopefully)
- Also players under cooldown can no longer see gifts until the cooldown timer is over

Known Issue:
Under cooldown, even though you may not see any gifts spawn there will be particle and sounds created. Couldn't find an easy way to fix this...May just remove the sound/particles.

Thanks:
Code:

- pheadxdll for his rtd mod which this plugin uses some of his implementations.
Got an idea for an effect? Post it here!

Join the Steam Group if you have any problems/issues or suggestions.
http://steamcommunity.com/groups/giftmod

SOURCE

Enjoy! :bacon!::fox:

lyric 06-03-2013 19:49

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
man.. all i can say is thank you so much for this. i requested something like this awhiel ago and good to see this now xD

Rads 06-03-2013 19:53

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
will have to test and play I think, nice work though

Chaosxk 06-03-2013 19:56

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
Reuploaded the files, the default values were wrong

lyric 06-03-2013 20:22

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
Quote:

Originally Posted by Chaosxk (Post 1964050)
Reuploaded the files, the default values were wrong

you mean were you had the respawn gift chance set to 0? that's the only oddity i saw and managed to fix it.

Chaosxk 06-03-2013 20:24

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
yea, and sm_gift_disable should be "", not "dance".

AeroAcrobat 06-03-2013 21:06

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
I request a cvar for restricting a team from picking up gift boxes. For example RED can pickup gifts and BLU can't.
Would you please do so? :3

Rads 06-03-2013 21:20

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
Quote:

Originally Posted by AeroAcrobat (Post 1964066)
I request a cvar for restricting a team from picking up gift boxes. For example RED can pickup gifts and BLU can't.
Would you please do so? :3

+1 on that AeroAcrobat

And what about MvM

have this running on MvM server just for fun
is the away to have the robots pick the gifts up as well.. may be

Mr. Man 06-03-2013 21:30

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
Does this apply to bots? I am considering putting on my MvM server.

Rads 06-03-2013 21:31

Re: [TF2] Gift Mod (Gain effects from collecting gift boxes)
 
Quote:

Originally Posted by Mr. Man (Post 1964078)
Does this apply to bots? I am considering putting on my MvM server.

Bots don't pick them up :( from what I seen


All times are GMT -4. The time now is 23:28.

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