Board index DeFRaG How to DeFRaG

Useful Scripts

Users helping users.

Useful Scripts

Postby <hk> » Nov 1st, '09, 6:09 pm

I just reorganised my config file and adapted some of the scripts i use. I picked out everything that could be useful to others and post it here. Why don't you guys do the same?



Since i am spectating a lot i wrote some scripts to make use of the miniview.
Code: Select all
bind UPARROW "vstr miniview_mode"
bind LEFTARROW "vstr miniview_prev"
bind RIGHTARROW "vstr miniview_next"
seta miniview_mode "varcycle df_ghosts_miniviewdraw 0 8 4 0; varcommand echo $df_ghosts_miniviewdraw" // minniview tristate (off, self, others)
seta miniview_prev "varmath df_mp_trackplayernum - 1; varcommand echo Tracking ^1(^7 $df_mp_TrackPlayerNum ^1)^7 $chsinfo(192)"
seta miniview_next "varmath df_mp_trackplayernum + 1; varcommand echo Tracking ^1(^7 $df_mp_TrackPlayerNum ^1)^7 $chsinfo(192)"



I don't have that many buttons on my mouse. That's why i rebind mouse4 on demand. Note that the key "AUX1" is my 4th mousebutton on linux.
Code: Select all
// //rebindmouse
bind AUX1 "kill" // mouse4
bind KP_5 "vstr rebindmouse"

seta rebindmouse "bind AUX1 vstr pos;bind kp_5 vstr rebindmouse1; echo ^2mouse4^7 BOUND TO ^2TELEPORT^7"
seta rebindmouse1 "bind AUX1 kill;bind kp_5 vstr rebindmouse2;echo ^2mouse4^7 BOUND TO ^2KILL^7"
seta rebindmouse2 "bind AUX1 +button5;bind kp_5 vstr rebindmouse;echo ^2mouse4^7 BOUND TO ^2HOOK^7"



I don't use a serverbrowser. I just type "vstr fs" into the console.
Code: Select all
// Server binds
seta vq31 "connect gameserver.q3df.org:27961" // vq3 I
seta cpm1 "connect gameserver.q3df.org:27960" // cpm I
seta 2337 "connect gameserver.q3df.org:2337"  // 2337
seta fc1 "connect gameserver.q3df.org:27962" // fastcap I

seta fs "connect kexe.org:27963" // fs
seta ameisen "connect kexe.org:27964" // run

seta a51 "connect 216.12.96.39:27960" //a51
seta a512 "connect 216.12.96.39:27961"
seta rn "connect 62.212.66.94:27965" // rainbow
seta event    "connect 70.84.181.106:27960"// event
seta test "connect 85.214.45.69:27970" // testserver



I want to have the Gauntlet as the equipped weapon always. This automatically executes the respawn.cfg on every respawn event. This one is a bit tricky with the new rules. I don't know any map where this would give you an advantage. Also it's before the starttrigger, where you have all the time in the world to change weapons. I think i have to drop this for fairness reasons.

Code: Select all
seta df_script_onRespawn "1"

/defrag/respawn.cfg:
Code: Select all
wait 10; weapon 1
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Useful Scripts

Postby Arcaon » Nov 1st, '09, 7:04 pm

I don't use a serverbrowser. I just type "vstr fs" into the console.


Good idea, I'ma steal it.
Arcaon
 
Posts: 325
Joined: Oct 16th, '09, 1:36 am

Re: Useful Scripts

Postby [gt]glm » Dec 13th, '09, 12:31 pm

some binds for volume
Code: Select all
bind INS "varmath s_volume - 0.05"
bind home "s_volume 0.5"
bind PGUP  "varmath s_volume + 0.05"

same for watching demos (if it need)
Code: Select all
bind DEL "varmath timescale - 0.3"
bind PGDN "varmath timescale + 0.3"
bind END "timescale 1"
User avatar
[gt]glm
 
Posts: 46
Joined: May 8th, '09, 4:53 am

Re: Useful Scripts

Postby <hk> » Dec 17th, '09, 4:30 pm

I always play at s_volume 0 because i have more than one instance of quake3 running most of the time.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Useful Scripts

Postby -O-marky » Feb 13th, '10, 5:35 am

Code: Select all
bind , "varCycle r_gamma 1 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0"
bind INS "VarCycle df_ghosts_miniviewdraw 3 3 4 7 8 "
bind PGDN "varMath df_mp_TrackPlayerNum = $PreviousPlayerNum"
bind PGUP "varMath df_mp_TrackPlayerNum = $NextPlayerNum"
bind HOME "varCycle timescale .1 .1 .2 .3 .4 .5 .6 .7 .8 .9 1"
-O-marky
 
Posts: 43
Joined: May 2nd, '09, 4:55 am

Re: Useful Scripts

Postby <hk> » Feb 22nd, '11, 4:33 pm

For doing freestyle tricks over and over again I use this handy line:

Code: Select all
//record
seta recordonsavepos "stoprecord; vstr pos; record"

pos is the position savepos wrote to

Update on my serverbinds
Code: Select all
// ##########
// Server binds
seta vq31    "connect mdd-vq3.q3df.org:27960"     // vq3 I
seta cpm1    "connect mdd-cpm.q3df.org:27960"     // cpm I
seta 2337    "connect mdd-mixei.q3df.org:27960"   // 2337
seta fc      "connect mdd-fastcap.q3df.org:27960" // fastcap I

seta vq32    "connect kexe.org:27960" // vq3 II
seta ameisen "connect kexe.org:27964" // mixed run
seta fsv     "connect kexe.org:27970" // vq3 fs
seta fsc     "connect kexe.org:27971" // cpm fs

seta a51     "connect 216.12.96.39:27960"   // a51
seta a512    "connect 216.12.96.39:27961"   // a51
seta rn      "connect 62.212.66.94:27965"   // rainbow
seta event   "connect 70.84.181.106:27960"  // event horizon
seta test    "connect kexe.org:28000"       // my testserver
seta lovet   "connect 89.253.98.102:27960"  // $$-Gorgonzola Defrag Megahouse
seta gtkv    "connect 93.157.127.135:27961" // GTK russian server
seta gtkc    "connect 93.157.127.135:27960" //
seta gtkfs   "connect 93.157.127.135:27962" //
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Useful Scripts

Postby MidiMightyMoe » Feb 22nd, '11, 4:39 pm

My demo recording script, I got it on OPC, I don't know who MKL is but he did a good job on this one :

Code: Select all
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// demorecording script (demo record und stop auf tastendruck - für 10 demos
// (c) 2003 by AciDBurN aka MKL
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

set recdemo "vstr demonum; set rectoggle vstr stoprec"
set stoprec "stoprecord; set rectoggle vstr recdemo"
set rectoggle vstr recdemo

set demonum vstr demo_01
set demotoggle vstr d01
set demo_01 "record demo_01"
set demo_02 "record demo_02"
set demo_03 "record demo_03"
set demo_04 "record demo_04"
set demo_05 "record demo_05"
set demo_06 "record demo_06"
set demo_07 "record demo_07"
set demo_08 "record demo_08"
set demo_09 "record demo_09"
set demo_10 "record demo_10"
set d01 "set demonum vstr demo_02; set demotoggle vstr d02; echo next recording to demo_02."
set d02 "set demonum vstr demo_03; set demotoggle vstr d03; echo next recording to demo_03."
set d03 "set demonum vstr demo_04; set demotoggle vstr d04; echo next recording to demo_04."
set d04 "set demonum vstr demo_05; set demotoggle vstr d05; echo next recording to demo_05."
set d05 "set demonum vstr demo_06; set demotoggle vstr d06; echo next recording to demo_06."
set d06 "set demonum vstr demo_07; set demotoggle vstr d07; echo next recording to demo_07."
set d07 "set demonum vstr demo_08; set demotoggle vstr d08; echo next recording to demo_08."
set d08 "set demonum vstr demo_09; set demotoggle vstr d09; echo next recording to demo_09."
set d09 "set demonum vstr demo_10; set demotoggle vstr d10; echo next recording to demo_10."
set d10 "set demonum vstr demo_01; set demotoggle vstr d01; echo next recording to demo_01. WARNING: demo_01 will be overwritten."

// startet bzw. stoppt die Aufnahme:
bind v vstr rectoggle

// wechselt zur nächsten Demo:
bind b vstr demotoggle


Its pretty useful, you stop/record with one bind on a specific demo, and when you're happy with a trick or you want to save a concept or whatever, you press the "nextdemo" button and it recors on a new demo. This way I dont end up having hundreds of demos that I cant remember wich one is good, wich one is trash.
MidiMightyMoe
 
Posts: 68
Joined: Jan 3rd, '10, 2:05 pm

Re: Useful Scripts

Postby Nt.run » Oct 10th, '11, 2:52 am

con_filters setup that removes pretty much all the spam from the console:
http://pastebin.com/aNhCVRVB
Code: Select all
con_filter0   "(?!.*(entered the game.|spectators.|connected)$)(^\.\.\.loading|^E:\\Games|^(\.\.\.[\w\s]*?)?W?GL_|^OpenAL\s|^loaded\s|^-{3,7}[\w\s\(\)]{8,}-{3,7}?$|^-{0,40}-$|^[\w\s]{0,18}?Devices?:|^Hostname|^IP:|^  ALC? Ext|^Loading (vm|dll)|^File \x22vm|VM file|^\w*? loaded in|^\d* \w*s \w*d|^Opening IP|^Winsock |^Sound init|^WaveIn on|^Wave File|^DirectSound|^Allocated |^=+ \w+ =+$|^RE_Shut|^Hunk_|^PIXELFORMAT|^MODE: -?\d|^GAMMA:|^rendering pr|^texturemode|^picmip: |^texture bits|^multitexture|^compiled vertex|^texenv add|^compressed tex|^Forcing gl|^\d+\.?\d* (shader|code|MB s|seconds|files in)|^gamename:|^gamedate|^\d teams with|^stitched |^\.\.\.loaded|^CL_Init|^Com_Touch|^AAS shutdown|^\d+ msec to draw|resolved to \d+\.\d+\.\d+\.\d+\:\d+$|^Gametype chang|^defrag\/[\w-]+\.pk3$|^\*+$|^Initializing|^CPU: Intel|^Current sea|^handle \d+|^Shader[\w\s]+mage$|^Server: [\w-_]+$|^Resolving\s)"
con_filter1   "(?!.*(entered the game.|spectators.|connected)$)(^Com_QueueEvent: overflow$|^ERROR: Disc|^Not found: demos|^WARNING: |^Warning: Server reports|^Trying to load|^\w+ doesn't have a spawn function$|^\w+ skin load fail|^Failed to load (skin|dll|model)|^trying (textures|models|icons)|You might not be able to join the game$|^Go to the setti|^ignoring )|^Com_sprintf: Output length 4096 too short"
con_filter2   "^(\s)+(JOY|AUX|WORLD)"
con_filter3   "(?!.*(entered the game.|spectators.|connected)$)(^Couldn't|^Dumped console|^execing|^Restored:|^Delta from |^Stopped demo|^recording to|^Wrote screenshots|^Issuing Command:|^Delta parseEntitiesNum too old.$)"
con_filter4   "(?!.*(entered the game.|spectators.|connected)$)(^Cvar: )"
con_filter5   "^$|^\d\d:\d\d:\d\d\s*$"


simple autologin cfg, be careful with third-party servers
http://pastebin.com/XvxN2f8d
Code: Select all
set activeaction "exec cfgs/loginaa;"
loginaa.cfg:
Code: Select all
varcommand echo $chsinfo(228) $chsinfo(226) $chsinfo(101) $chsinfo(108) $chsinfo(116)
login name pass
set activeaction "silent exec loginaa;"

Image
Last edited by Nt.run on Mar 18th, '12, 1:53 am, edited 1 time in total.
Nt.run
 
Posts: 38
Joined: Oct 19th, '09, 2:25 pm

Re: Useful Scripts

Postby AL!EN » Oct 10th, '11, 9:56 pm

Nice com_filter scripts, thx !
"strafe is the most important 'weapon' in defrag" - <hk>
User avatar
AL!EN
 
Posts: 282
Joined: May 2nd, '09, 8:26 am
Location: Poland

Re: Useful Scripts

Postby Arcaon » Oct 12th, '11, 11:55 am

That is awesome Run. Didn't know con_filter supported Regex? :o

Nice work!
Arcaon
 
Posts: 325
Joined: Oct 16th, '09, 1:36 am

Next

cron