Disguise Weapon Changer

Your disguise will wield the same weapon as you are!

//IN SPY.CFG
exec undisguised
bind 1 fslot1
bind 2 fslot2
bind 3 fslot3
bind 4 fslot4
bind q flastinv
bind mwheelup upslot
bind mwheeldown downslot
primary

//IN UNDISGUISED.CFG
-attack
alias execprim ""
alias execseco ""
alias execmele ""
alias execpda1 "disguisemodifier"

bind mouse1 +attack
bind b "lastdisguise; disguisemodifier"

alias fslot1 primary
alias fslot2 secondary
alias fslot3 melee
alias fslot4 pda1
alias flastinv primary_to_secondary
alias upslot primary_to_pda1
alias downslot primary_to_secondary

alias primary "execprim; slot1; alias fslot1 primary; alias fslot2 primary_to_secondary; alias fslot3 primary_to_melee; alias fslot4 primary_to_pda1; alias upslot primary_to_pda1; alias downslot primary_to_secondary"
alias secondary "execseco; slot2; alias fslot2 secondary; alias fslot4 secondary_to_pda1; alias fslot1 secondary_to_primary; alias fslot3 secondary_to_melee; alias upslot secondary_to_primary; alias downslot secondary_to_melee"
alias melee "execmele; slot3; alias fslot3 melee; alias fslot4 melee_to_pda1; alias fslot2 melee_to_secondary; alias fslot1 melee_to_primary; alias upslot melee_to_secondary; alias downslot melee_to_pda1"
alias pda1 "execpda1; slot4; alias fslot4 pda1; alias fslot3 pda1_to_melee; alias fslot2 pda1_to_secondary; alias fslot1 pda1_to_primary; alias upslot pda1_to_melee; alias downslot pda1_to_primary"

alias primary_to_secondary "alias flastinv secondary_to_primary; secondary"
alias primary_to_melee "alias flastinv melee_to_primary; melee"
alias primary_to_pda1 "alias flastinv pda1_to_primary; pda1"

alias secondary_to_primary "alias flastinv primary_to_secondary; primary"
alias secondary_to_melee "alias flastinv melee_to_secondary; melee"
alias secondary_to_pda1 "alias flastinv pda1_to_secondary; pda1"

alias melee_to_primary "alias flastinv primary_to_melee; primary"
alias melee_to_secondary "alias flastinv secondary_to_melee; secondary"
alias melee_to_pda1 "alias flastinv pda1_to_melee; pda1"

alias pda1_to_primary "alias flastinv primary_to_pda1; primary"
alias pda1_to_secondary "alias flastinv secondary_to_pda1; secondary"
alias pda1_to_melee "alias flastinv melee_to_pda1; melee"

alias disguisemodifier "exec disguised"

//IN DISGUISED.CFG
alias execprim "lastdisguise;bind mouse1 +dattack"
alias execseco "lastdisguise;bind mouse1 +attack"
alias execmele "lastdisguise;bind mouse1 +dattack"
alias execpda1 ""

bind mouse1 "+dattack"
bind b "lastdisguise; undisguisemodifier"

alias +dattack "+attack"
alias -dattack "-attack;undisguisemodifier"
alias undisguisemodifier "exec undisguised"

//IN EVERY OTHER CLASS .CFG
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind 4 slot4
bind mwheelup invprev
bind mwheeldown invnext
bind q lastinv
bind mouse1 +attack

This script makes whatever you're disguised as switch weapons at the same time as you do, instead of switching to a weapon and pressing B.

This is kind of based on my Weapon Aliasing script, but a bit more complex because it's pretty much is two of those scripts in one. So if you use the original Weapon Aliasing script (which I doubt) and want this, you'll have to modify it a bit.

You need to create two more .cfgs to make this work, disguised.cfg and undisguised.cfg and will also require you to fix your binds in every other class .cfg.

To use in game: Nothing at all, this will work without any user interaction, but, you can press B to toggle whether or not you want the disguise to switch weapons. (Until you press B again, or disguise again)

The only bug in this script is that scrolling up twice while undisguised will put on whatever your last disguise was. Unfortunately I can't see a way around this.

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Script.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Script a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Script.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

None found

Credits

Submitter
Wofiel's Levels
  • P1: Beggar
    Points: 128
  • A5: Veteran
    Account Age: 5 years
Wofiel (Creator/Co-creator)
Key Authors
Wofiel
Author

Rating

?/10
Not yet rated.

Stats

Post Count
0
ViewCount
1,308
Date Added
4 years ago
Date Modified
4 years ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share