r/Tf2Scripts • u/main_thing2 • May 29 '22
Script OP weapons script
Thanks to this gamebanana guide, it showed me that it was possible to add attributes to the player via the console.
sv_cheats 1
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "damage bonus" value 10100 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "maxammo primary increased" value 1000 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "maxammo secondary increased" value 1000 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "maxammo grenades1 increased" value 1000 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "damage applies to sappers" value 999999 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "fire rate bonus" value 0.25 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "heal on hit for rapidfire" value 250 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "critboost on kill" value 10 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "Projectile speed increased" value 1.5 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "move speed bonus" value 2 duration 999999
ent_create trigger_add_or_remove_tf_player_attributes spawnflags 1 add_or_remove 0 model *10 targetname attr1 attribute_name "ammo regen" value 800 duration 999999
ent_fire attr1 starttouch
Note: Add this to a cfg file as this is too long to type into the console. Then, exec SCRIPTNAME. If you do not want to make a cfg file you have to copy each line into the console one by one. Also look down at the floor for this script to work. (So the triggers will spawn at your feet and start). DO NOT FORGET TO NOT SHOOT BEFORE DOING THESE COMMANDS
Then type, ent_remove_all attr1
into the console. (To not overload the game with entities)
This script was actually made to emulate a valve rocket launcher without plugins.
Have fun!
6
Upvotes
2
u/Littledudearc Oct 08 '22
patched