<?xml version="1.0" ?><rss version="2.0">
    <channel>
	<title>ETF2L &#8211; Latest activity in &#8220;4&#039;s Script Setup/Collection&#8221;</title>
	<link>https://staging.etf2l.org/forum/customise/topic-26172/</link>
	<description><![CDATA[The latest posts to this topic.]]></description>
    	<item>
    	    <title>Reply by XKshinzo</title>
    	    <link>https://staging.etf2l.org/forum/customise/topic-26172/page-1/?recent=455069#post=455069</link>
    	    <description><![CDATA[neat]]></description>
    	    <guid isPermaLink="false">generator=rsdiscuss&#038;baseurl=https://staging.etf2l.org&#038;feed=forum&#038;forum=customise&#038;topic=26172&#038;post=455069</guid>
    	    <pubDate>Sun, 02 Jun 2013 16:07:46 +0200</pubDate>
    	</item>
    	<item>
    	    <title>Created by four</title>
    	    <link>https://staging.etf2l.org/forum/customise/topic-26172/page-1/?recent=455069#post=455060</link>
    	    <description><![CDATA[(copied from http://teamfortress.tv/forum/thread/8863)

Since I've a kinda advanced script setup I decided to post here what I scripted and what I does.

<strong>Zoom with viewmodel enable/disable</strong>
Normally if you write a zoom script like this it would simply change the value of r_drawviewmodel which wouldn't allow you to turn fully viewmodels off because unzooming would reset them. So I wrote this alternative.

<code>-------------------------
//Use viewmOn and viewmOff instead of r_drawviewmodel 1/0
//Use viewmT to toggle between both
alias viewmOn "alias viewmT viewmOff; alias viewmA r_drawviewmodel 1; viewmA"
alias viewmOff "alias viewmT viewmOn; alias viewmA r_drawviewmodel 0; viewmA"
alias viewmT "viewmOff;"
alias viewmA "r_drawviewmodel 1;"

//This is the zoom command + bind
alias +zoomt "fov_desired 70; r_drawviewmodel 0;"
alias -zoomt "fov_desired 90; viewmA;"
bind SHIFT "+zoomt"
-------------------------</code>

<strong>Advanced weapon switch</strong>
I was annoyed that I always had to select the weapons in a specific order so I could select the right one with Q. I decided that always having that in mind keeps your attention away from the game for no reason so I wrote this to get an easier weapon switch. Put this into every classes's file or into clear.cfg if you use the class specific scripts toggle.

Pressing F will select slot 1. If slot 1 is already selected then slot 2.
Pressing E will select slot 3. If slot 3 is already selected then slot 2.

<code>-------------------------
alias mw "mw2"
alias mw1 "alias mw mw2; slot1;"
alias mw2 "alias mw mw1; slot2;"

bind F "mw" //TF2 default would be Q but I like this one more
bind E "mw2; slot3" //normally 3 or something
//I bound Q to saying medic
-------------------------</code>

With this script I don't even use the Mouse wheel anymore.

<strong>Advanced weapon switch (Spy)</strong>
On spy F will switch between slot1/slot3 instead of slot1 and slot2 and will disable viewmodels in slot 1. E will select the knife and holding MOUSE5 saps.

<code>-------------------------
alias mw "mw2"
alias mw1 "alias mw mw2; slot1; viewmOff;"
alias mw2 "alias mw mw1; slot3; viewmOn;"
//Using viewmOff/viewmOn makes it fully compatible with the zoom script and will not reset viewmodels in slot1!
//If you don't want the viewmodel script above use r_drawviewmodel

alias +sap "slot2; +attack"
alias -sap "-attack; mw; mw;"

bind F "mw"
bind E "mw2"
bind MOUSE5 "+sap" //saps while holding this button
-------------------------</code>

<strong>Change disguises selected weapon</strong>
This probably already exists a couple times but I'll post it anyways. It relies on the advanced weapon switch script.

<code>-------------------------
bind 1 "+redis1"
bind 2 "+redis2"
bind 3 "+redis3"

alias +redis1 "slot1; lastdisguise;"
alias +redis2 "slot2; lastdisguise;"
alias +redis3 "slot3; lastdisguise;"
alias -redis1 "mw; mw;"
alias -redis2 "mw; mw;"
alias -redis3 "mw; mw;"
-------------------------</code>

<strong>Class specific scripts toggle</strong>
I don't want my spy script to work on Randomizer servers. This is more of a setup than a single script. It allows you to toggle between executing class specific files or not. 

So I put this in autoexec.cfg
<code>-------------------------
alias adv "advOn"
alias advOn ""
alias advOff ""
alias advTOn "alias advT advTOff; alias adv advOn; setClass" //this enables scripts
alias advTOff "alias advT advTOn; alias adv advOff; setClass"//this disables scripts
alias advT "advTOff" //this toggles scripts
-------------------------</code>

For the next step I recommend to use <a href="http://teamfortress.tv/forum/thread/8782">4Script</a> and batch add this to every class file:
<code>-------------------------
alias setClass "exec {name}"
exec clear
alias advOn "exec {name}_adv"
adv
-------------------------</code>

You can also add this to every file with the class name insted of {name} but it's easier with 4Script. Then create a file called classname_adv.cfg and put the class specific code in there like this: <a href="http://puu.sh/35Uhd.png">http://puu.sh/35Uhd.png</a>

You don't need to create a class_adv.cfg if you don't need it. You can also put the class specific code into advOn alias of the class.
You can bind "bind 7 "advT"" to switch between both.



I hope these scripts can help you, cheers :3]]></description>
    	    <guid isPermaLink="false">generator=rsdiscuss&#038;baseurl=https://staging.etf2l.org&#038;feed=forum&#038;forum=customise&#038;topic=26172&#038;post=455060</guid>
    	    <pubDate>Sun, 02 Jun 2013 15:09:41 +0200</pubDate>
    	</item>
    </channel>
</rss>