Check out Phil25's updated RTD plugin based on this one!
TF2: Roll the Dice Introduction:
NEW VERSION 0.4!
This plugin is purely a fun plugin. I had loads of fun playing on a TS server with a roll the dice plugin. Now I've ported it to TF2. It lets a user "roll the dice" by typing rtd in chat to win one of the effects listed below. After a player runs rtd they have to wait a period of time before they can do so again. Everything is configurable. The wait time, the duration of the effect, you can even disable an effect if you wish.
Effects are seperated between good and bad. They are:
- godmode - Invulnerability to bullets, falling, and map traps.
- toxic - Your horrible breath kills anyone near you.
- lucky sandvich - An instant health boost and the next shot will be a crit. Good luck!
- faster speed - Faster move speed.
- noclip - Fly through and walls and terrorize the other team.
- low gravity - Lower gravity than everyone else.
- unlimited uber - A couple seconds of uber to show the other team who's boss.
- invisibility - Now you see me - now you don't. Go invisible - even to sentries!
- cloak - Your spy watch won't run out for the duration of this effect.
- crits - Constant crits without the requirement of hacks!
- infinite ammo - No need to reload - we've got you covered!
- scary bullets - Any players you hurt become scared like tiny babies.
- instant sentry - Point at a spot and call for a medic to spawn a sentry.
- homing projectiles - Rockets/arrows/flares will fly at enemies to save the bother the aiming.
- instant charge - Your sniper rifle and bow charge up instantly.
- dispenser pop-up - Point at a spot and call for a medic to spawn a dispenser. Stays after the effect has ended.
- infinite double jump - The scout is no longer limited by 2 or 3 jumps.
- instant kills - Bringin' it back, any damage you cause is fatal!
- tiny player - You have shrunk! Use this advantage to sneak past the enemy.
- explode - Sorry, you exploded where you stood. Just bad luck.
- snail - Your move speed is slowed. Might win in a race against a cozy camper sniper.
- frozen - All movement is frozen and you become an ice sculpture.
- timebomb - You have seconds to live. Run towards the other team to deal damage when you die.
- spontaneous combustion - Surprise, you're on fire!
- low health - All your health is gone. Where did it go?
- drugged - Flashes of color and tilted vision overtake your screen to distract you.
- blind - Who turned the lights out?
- stripped to melee - You lose your primary and secondary weapons.
- beacon - An energy ring and pinging sound let the enemy know where you are.
- taunt - You can't stop taunting.
- nostalgia - Black and white vision.
- earthquake - A rumble shakes your screen and affects those around you.
- funny feeling - Increases your FOV to 160. Woooah..
- mystery sauce - You are covered in jarate and milk and bleeding out.
- big head - Hey big head!
The cvars available to you are:
- sm_rtd_enabled 1 // <0/1> Enable/Disable Roll The Dice.
- sm_rtd_timelimit 120 // - Seconds before a player can roll again.
- sm_rtd_mode 1 // <0/1/2> See below for a description.
- sm_rtd_duration 20.0 // - Seconds that rtd effects last.
- sm_rtd_teamlimit 1 // Team limit for mode 2.
- sm_rtd_chance 0.5 // - <0.0-1.0> Change of a good effect.
- sm_rtd_distance 275.0 // - Death radius for toxic kills.
- sm_rtd_health 1000 // - Amount of health given upon health award.
- sm_rtd_gravity 0.1 // Low gravity multiplier.
- sm_rtd_snail 50.0 // Speed for snail effect.
- sm_rtd_trigger "rollthedice,roll" // Chat triggers seperated by commas.
- sm_rtd_admin "" // Set the flag required to roll the dice. (must have all flags 'o' or 'ao')
- sm_rtd_donator "" // Set the admin flag required for donators. (must have all flags 'o' or 'ao') Activates the increased chance below.
- sm_rtd_dchance 0.8 // Chance for a good effect if you are a donator.
- sm_rtd_timebomb_tick 10 // Number of timebomb ticks (each a second long).
- sm_rtd_timebomb_damage 180 // Health damage to do to enemies when timebomb goes off.
- sm_rtd_timebomb_radius 600.0 // Radius for timebomb effect.
- sm_rtd_blind 255 // Blind amount. Set between 0 - 255.
- sm_rtd_beacon_radius 375 // Radius for beacon effect.
- sm_rtd_scary 3.0 // Seconds of stun that scary bullets will deal.
- sm_rtd_sentry_level 2 // Sentry level to be spawned during the sentry effect.
- sm_rtd_sentry_count 1 // Number of sentries that can be spawned during the sentry effect.
- sm_rtd_homing_speed 0.5 // Speed multiplier for homing rockets.
- sm_rtd_homing_reflect 0.1 // Speed multiplier increase for each reflection.
- sm_rtd_homing_crits 1 // 0/1 - Whether homing projectiles should be crits.
- sm_rtd_fov 160 // The value to change the FOV to on the funny feeling effect.
- sm_rtd_dispenser_level 3 // Dispenser level to spawn for effect.
- sm_rtd_dispenser_count 1 // Number of dispensers that can be spawned during the dispenser effect.
- sm_rtd_disabled "" // Enter the effects you'd like to disable, seperated by commas. Below are the effect keys:
godmode,toxic,goodhealth,speed,noclip,lowgrav ity,uber,invis,cloak,crits,ammo,scary,sentry, homing,charge,explode,snail,freeze,timebomb,i gnite,badhealth,drug,blind,melee,beacon,taunt ,nostalgia,earthquake,feeling,sauce,dispenser ,jump,instant,bighead,tinyplayer
- sm_rtd_buddah 1 // 0 - Normal godmode (no blast damage force) 1 - Buddah, takes self damage force.
- sm_rtd_sentry_keep 0 // 0/1 - Keep the sentry after the effect is over.
- sm_rtd_dispenser_keep 1 // 0/1 - Keep the dispenser after the effect is over.
- sm_rtd_bighead_scale 3.0 // Multipler to scale the player's head for the 'big head' perk. 1.0 is regular size.
- sm_rtd_tinyplayer_scale 0.1 // Multiple to scale the player model for the 'tiny player' perk. 1.0 is regular size.
- sm_rtd_respawn_stuck 1 // 0/1 - Respawn if player is stuck after 'noclip' or 'tiny player' perks.
- sm_rtd_setup 1 // 0/1 - Enable or disable RTD rolls during setup.
- sm_rtd_debug_effects 0 // 0/1 - Enable or disable logging effects on roll.
A config file: configs/rtd_effects.cfg is now included to give you more control:
- Disable individual effects
- Set a specific duration for an effect. For example to make godmode shorter than other effects.
- Name or description
Regular chat command that players can use to roll the device. Checks for ! in front automatically. Set more triggers with sm_rtd_trigger.
Chat command that players can type to bring up a menu with each perk with it's description.
- sm_forcertd <target/#userid> perk_index/perk_key
Example: sm_forcertd @me 0 or sm_forcertd @me godmode do the same thing.
Forces a player to RTD. Perk_index is a number, leave it blank to randomly choose. Perk indices can be found in configs/rtd_effects.cfg.
- sm_randomrtd <target/#userid>
Forces a random player to roll the dice.
Reloads rtd_effects.cfg so you do not have to restart the server.
Natives are available for other plugins in rtd.inc:
- forward Action:RTD_CanRollDice(client);
- native RTD_Roll(client, g_eCurrentPerk:nPerk=g_eCurrentPerk:-1);
Roll The Dice Modes:
- Example: Restricts players rolling the dice to only one team. Red or blue. Uses the cvar: sm_rtd_team 2 // 2 - red or 3 - blu to set the team. download source
Useful for gamemodes like VSH where you want only one side that can rtd.
There are three different modes (0/1/2) that govern when users can Roll The Dice during the game. Read each one and change sm_rtd_mode to the one you want:
- 0 : Roll the Dice free for all. Players can roll anytime they want, as long as they don't exceed sm_rtd_timelimit.
- 1 : Legacy mode. Only one player can roll the dice at a time.
- 2 : Team limit mode. Only a certain amount of players can roll at a given time, on a given team. Set sm_rtd_teamlimit for your team limit amount. Default teamlimit value is 1.
Translation support! It'll be easier to translate rtd into the language that your server runs on. If you speak another language, please post your translation file. Add your language without replacing/removing the english lines.
Go ahead and post here for feedback. No promises! As always, post bugs and errors in this thread so that they can be fixed.
Hope you enjoy this release!
- Fixed ammo bug for infinite ammo perk.
- Added cvar sm_rtd_debug_effects to log when players roll. Default off, set to 1 to enable.
- Added improvements to homing rocket code.
- sm_forcertd now can take a perk key in addition to the numerical index to reference a forced perk. Ex: sm_forcertd @me godmode
- Added sm_rtd_homing_crits to change whether homing projectiles should be crits. Default 1 (on).
- Fixed arena round logic and tweaked the round detection code. Added a cvar sm_rtd_setup to set whether you can roll during Setup. Default is 1 (yes).
- Added two cvars: sm_rtd_dispenser_keep & sm_rtd_sentry_keep to set whether dispensers and sentries spawned during their respective perks will stay after the effect is over. By default the dispensers will stay, sentries will not. (1 and 0).
- Added two perks: big head and tiny player. You can set the size by sm_rtd_bighead_scale and sm_rtd_tinyplayer_scale. (Default 3.0 and 0.1 respectively).
- Added a cvar sm_rtd_respawn_stuck to set whether the plugin should respawn players if they appear to be stuck after the tiny player or noclip perks. Default is yes (1).
- Fixed a bug where deaths by non-player causes did not trigger the RTD effect termination.
- Fixed advert on round start showing when the rtd is disabled or when the round isn't ready.
- Added a small bug fix to homing rockets.
- Fixed powerup canteens not becoming invisible with player perk.
- Fixed conflict with the aimbot module of SMAC.
- Fixed a small logic bug that caused an error during homing rocket detection.
- Added two good perks: Instant Kills & Infinite Scout Jumps
- Changed infinite ammo to include energy weapons & engineer metal.
- Changed godmode to default to buddah. Added a cvar sm_rtd_buddah to let you set this value back to before.
- Changed how frozen works and set scary bullets attacker to 0.
- Added back the sm_rtd_disabled cvar used to disable certain rtd effects. Update rtd_effects.cfg!
- Fixed a bug where rtd got stuck in the waiting for players period.
- New effects: sentry/dispenser pop-up, homing rockets, infinite ammo, scary bullets, nostalgia, earthquake, funny feeling, lucky sandvich, infinite charge, timebomb (now hurts enemies), freeze (turns you into an icicle), sauce, and others. Incorporated effects from the old Presents plugin.
- Updated to make use of features from the latest version of SourceMod.
- Fixed invisibility bugs and made sentries not target invisible players.
- Cannibalized timebomb, beacon, and drug code into this plugin to avoid bugs with instant respawn.
- Updated to make use of the new chat color possibilities.
- Added a description menu so players can learn what each perk does. Chat command: effects
- Changed to a chat listener to read chat. Now reads both with the ! in front and without for any chat trigger.
- Added the ability to force a specific perk for testing. Requires the perk index in rtd_effects.cfg.
- Added new particles and sound for better notification.
- Noclip now checks to see if you are stuck and will respawn you accordingly.
- Uses SDKHooks for TakeDamage and changes the death icons & weapon_logclassname in the death event.
- Added a config file: rtd_effects.cfg to let you set a custom time for a perk or disable any as you see fit.
- Added some natives.
- Complete code rewrite.
Custom admin menu made by panchoman here
- Install SDKHooks.
- Place rtd.smx into your plugins/ folder.
- Place rtd.phrases.txt into your translation/ folder.
- Place rtd_effects.cfg into your configs/ folder.
- Restart server.
Last edited by pheadxdll; 03-21-2016 at 17:23.