//Quick disguise by Highl@nder for the Spy class in WF team 9 [12/20/98]
//***Playtesting and technical support by [Reconn]***

//creation time: about 20 minutes to make the script and about two hours to trouble shoot
//Zipped files: Extract all these files into your WF directory

First you will need to use the weapons selection and grenade selection 
aliases as well as the spyfire engine and class variable sets below.
Copy and paste these into your spy.cfg file (or whatever you use)
and bind one key to c1 for weapon selection and another to g1 
for grenade selection.  These work as a toggle meaning first press of the 
key bound to c1 will give knife, next press and you get dart, next 
machinegun, then repeats.  Same with grenades, first press of the key 
bound to g1 is concussion and next is normal.  Apart from these
you only need to bind one more key and that is for the disguise selection.
So you will need to bind a key to exec spychange.cfg (in my cfg setup I use 
the kp_slash so it would look like:
	
	bind kp_slash "exec spychange.cfg"

Now within the below aliases you will need to change the bound keys as well.
For my setup I use the mouse2 key for my weapons selection and the 
mouse1 key for the attack (+attack or +spyfire/spyfire2 in this alias).
So if you don't want to use the keys I have bound simply change them but
make sure you are consistent.  The aliases flow a cycle so if you bind 
c1 to v then c2 and c3 also need changed to v.  The +spyfire will be your
normal +attack key.  You would do the same with the grenades.  My 
suggestion is to make up a separate spy.cfg file for just the spy.  
Mine is included.  This way you won't effect your keyboard layout for other
classes you may play.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//weapons 
alias c1 "use knife;bind mouse2 c2;bind mouse1 +spyfire2"
alias c2 "use chaingun;bind mouse2 c3;bind mouse1 +spyfire"
alias c3 "use Machinegun;bind mouse2 c1;bind mouse1 +spyfire2"

//grenades
alias g1 "cmd grenade2;bind kp_pgup g2;bind mouse1 +spyfire2"
alias g2 "cmd grenade3;bind kp_pgup g1;bind mouse1 +spyfire2"

//Spyfire engine
alias +spyfire "+attack;megawait;$class;megawait"
alias -spyfire "-attack"
alias +spyfire2 "+attack;megawait"
alias -spyfire2 "-attack;megawait;$class;megawait"

//Class set variable for use with Spyfire and spychange.cfg
alias recon_c "megawait; disguise 1;echo Recon skin replaced"
alias nurse_c "megawait; disguise 2;echo Nurse skin replaced"
alias engineer_c "megawait; disguise 3;echo Engineer skin replaced"
alias marine_c "megawait; disguise 4;echo Marine skin replaced"
alias cyborg_c "megawait; disguise 5;echo Cyborg skin replaced"
alias arsonist_c "megawait; disguise 6;echo Arsonist skin replaced"
alias gunner_c "megawait; disguise 7;echo Gunner skin replaced"
alias sniper_c "megawait; disguise 8;echo Sniper skin replaced"
alias spy_c "megawait; disguise 9;echo Spy skin replaced"
alias mercenary_c "megawait; disguise 0;echo Mercenary skin replaced"

//Megawait alias for timing
alias megawait "wait;wait;wait;wait;wait;wait;wait;wait;wait;wait"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Now you should be ready to rock.  To use, after you have placed the above
aliases in your cfg file and changed the binds to keys you prefer and
changed the exec spychange.cfg key in your main cfg file simply press the key 
for the spychange.cfg and select a class to disguise as, then press the key you 
will use for weapons selection (you will see an echo on screen) press your attack 
key(the one now +spyfire) and you will fire and on screen you will see:

disguise off
engineer (or whatever class your disguised as) skin replaced
you are disguised

Now each time you fire you will see it say disguise off, X skin replaced, you
are disguised repeat on the screen so you can know "where you are at".  
Nothing worse than to think your disguised and your not :)  You can toggle
through the weapons and grenades and it will repeat on the screen which 
weapon you have.  When you fire you will go back into disguise.  
That should be it!!

**Since everyones computer is different one area that you may need to edit will be 
the megawait alias.  I have an older system so for consistent flow of
operations I found the best results with 10 waits in the megawait.  ReconN
adjusted his to 8 waits.  This is one aspect you will need to experiment with
to get the alias fine tuned to your system.  If you try it and see menus or
you can see "delays" in the flow.  Edit the megawait until you get the correct
number of waits.  Try taking 2 out and test, if still slow take 2 more
out.  Now perhaps the alias doesnt "flow" smooth meaning sometimes you 
dont go back into disguise, then add 1 wait to the megawait, and test.  
Everything back to working then you found the "magic" combination, if
not keep adding a wait then test until you get the right number of waits.  
Overall I would say this alias is 95% effective.  Every once in a while
you may not go back into disguise.  Those may be in relation to the few
bugs listed below, lag (adjusting waits may improve its use on laggy servers),
 or some other unknown varible.  


BUGS:
---------------------------------------------------------------------------

1.) When using the knife you need to hold the attack key for a second or so
before releasing.  This way you will go back into disguise again.  For
some reason the fire rate for the knife is slower so if you just "tap" 
the key you wont go back into disguise.  So just hold the key for a second
or two and there won't be any problems.

2.) If you use an extended burst of the machinegun sometimes you get "out
of sync" and when you stop firing you wont be in disguise.  Simply fire 
short burst and you should go back into disguise.  Again the actions
repeat on the screen so you can tell if you are or are not in disguise.
This one is not a major one and rarely comes up.

3.) If your pressing your attack key like crazy commands will bog up and
you will move around uncontrollably or continue to disguise/un-disguise 
until q2 or your computer catches up. 

My computer is not a speed demon so if you see menus on your screen while
disguising (apart from the menu you use to select your disguise at first
or when you change to another class disguise) then go through and edit 
the megawaits in the aliases.  Usually 3 waits are enough but again I 
got the alias running smooth with the megawaits.  Only by understanding
the alias and testing it on your own will you know how many waits you
need if the megawaits cause the alias to run slow on your system.
I believe the megawaits is the cause of this bug but I prefer to deal 
with the "catch up" time instead of the alias failing when I need it.

That should be it.  After the first time you use the alias when you die
you will still be disguised as the class you were before you died.  You 
will remain disguised as this class unless you change your disguise 
(using the spychange.cfg menu).  

Any problems message me on ICQ [3218011] or email me at jgregg@nmsu.edu

