Board index DeFRaG How to DeFRaG

Useful Scripts

Users helping users.

Re: Useful Scripts

Postby tuhmapoika » May 25th, '14, 1:19 pm

Le another black niger wrote:some optimization:

bind f "toggle cg_autoswitch;cg_autoswitch"

:dance:

cool :dance:
tuhmapoika
 
Posts: 7
Joined: Feb 15th, '14, 12:03 pm

Re: Useful Scripts

Postby TittenIgnition » Jun 10th, '14, 4:20 am

tuhmapoika wrote:
Le another black niger wrote:some optimization:

bind f "toggle cg_autoswitch;cg_autoswitch"

:dance:

cool :dance:

Erm... toggle = boolean = on or off = "toggle cg_autoSwitch" will change it back and forth = no need for "cg_autoSwitch;cg_autoSwitch" = more optimization.
wtf i have a signature?
User avatar
TittenIgnition
 
Posts: 455
Joined: Jun 4th, '10, 1:24 am
Location: QuakeNet

Re: Useful Scripts

Postby Le another black niger » Jun 10th, '14, 9:00 am

Erm... may be try it? my 'not optimized' version
Le another black niger
 
Posts: 392
Joined: May 17th, '11, 5:08 pm

Re: Useful Scripts

Postby TittenIgnition » Jun 10th, '14, 1:08 pm

Le another black niger wrote:Erm... may be try it? my 'not optimized' version

Ah, I forgot how semicolons worked in Q3. I feel silly now. I'm going to go cry in a hole.
wtf i have a signature?
User avatar
TittenIgnition
 
Posts: 455
Joined: Jun 4th, '10, 1:24 am
Location: QuakeNet

Re: Useful Scripts

Postby amt-morbus » Jun 11th, '14, 12:06 am

Savepos/Restore bind
Code: Select all
\bind U "set saveposname pos1; savepos 0" // Save current position

\bind O "stoprecord; vstr pos1; varjoin user_demoname <0> $mapname [FS. $chsinfo(226) ] TRICK $chsinfo(118) . $chsinfo(219) . $chsinfo(108) ); varcommand record $user_demoname" // Restore saved position

It will record a demo with the upon restore.
Mapname[FS.physics]TRICK(Nickname.Country.Date)
amt-freestyle6[FS.vq3]TRICK(AMT-Morbus.Austria.20140516)

All other binds from the tutorials in AMT-Freestyle6 are also in the readme file.
Last edited by amt-morbus on Jul 24th, '14, 6:15 pm, edited 3 times in total.
Image
User avatar
amt-morbus
 
Posts: 231
Joined: Jun 4th, '10, 8:28 pm

Re: Useful Scripts

Postby amt-morbus » Jul 24th, '14, 5:25 pm

Firemissile bind
This command shoots missiles from it's origin to a specified direction.

Code: Select all
bind F1 varcommand set MFire1 "$chsInfo(3045) $chsInfo(3183)"
bind F2 varcommand set MFire2 "$chsInfo(3045) $chsInfo(3183)"
bind F3 vstr Mpos1
bind F4 vstr Mpos2
bind F5 "vstr Mpos1; vstr Mpos2"
bind F6 varCycle fmw 4 4 5 8 9

set MPos1 "varcommand firemissile $MFire1 $fmw $fmq $fms"
set MPos2 "varcommand firemissile $MFire2 $fmw $fmq $fms"
set MFire1 ""
set MFire2 ""
seta fmw 4
seta fmq 0
seta fms 0

F1 or F2 = Saves the position and direction for projectile 1 or 2
F3 or F4 = Fires projectile 1 or 2
F5 = Fires projectile 1 and 2
F6 = cycles the projectile type (grenade, rocket, plasma, bfg)

If you want to get quaded projectiles, change fmq to 1: \seta fmq 1

Note that this bind won't work on mdd servers since the command is disabled (fps drops when overused). Cheats muste be enabled.
Last edited by amt-morbus on Jul 24th, '14, 6:14 pm, edited 3 times in total.
Image
User avatar
amt-morbus
 
Posts: 231
Joined: Jun 4th, '10, 8:28 pm

Re: Useful Scripts

Postby amt-morbus » Jul 24th, '14, 5:39 pm

Defrag Ghosts
Code: Select all
\bind kp_end "ghost #1 record $mapname_ghostnum"
\bind kp_downarrow "df_ghost1_PlayTimescale 1.00; ghost #1 stop"
\bind kp_pgdn "df_ghost1_PlayTimescale 1.00; ghost #1 play"
\bind kp_leftarrow "varMath df_ghost1_PlayTimescale - .1"
\bind kp_5   "varMath df_ghost1_PlayTimescale + .1"

Numpad 1 = Start recording the ghost
Numpad 2 = Stop recording
Numpad 3 = Play ghost
Numpad 4 = Decrease playback timescale -0.1
Numpad 5 = Increase playback timescale +0.1
Last edited by amt-morbus on Jul 24th, '14, 6:13 pm, edited 3 times in total.
Image
User avatar
amt-morbus
 
Posts: 231
Joined: Jun 4th, '10, 8:28 pm

Re: Useful Scripts

Postby amt-morbus » Jul 24th, '14, 5:46 pm

Miniview or PiP (Picture in Picture)
Code: Select all
\bind LEFTARROW "varMath df_mp_TrackPlayerNum = $PreviousTeamPlayerNum; varcommand echo Tracking ^1(^7 $df_mp_TrackPlayerNum ^1)^7 $chsinfo(192)"
\bind RIGHTARROW "varMath df_mp_TrackPlayerNum = $NextTeamPlayerNum; varcommand echo Tracking ^1(^7 $df_mp_TrackPlayerNum ^1)^7 $chsinfo(192)"
\bind UPARROW "varCycle df_ghost1_PlayCameraMode 0 1 0"
\bind DOWNARROW "varcycle df_ghosts_miniviewdraw 0 8 7 6 5 4 3 2 1 0"

Left arrow = Switch to previous team-player
Right arrow = Switch to next team-player
Up arrow = Cycles through a few camera modes
Down arrow = Cycles through the miniview draw modes

Note: The bind only considers team players and therefor skips empty player slots.
Last edited by amt-morbus on Jul 24th, '14, 6:12 pm, edited 1 time in total.
Image
User avatar
amt-morbus
 
Posts: 231
Joined: Jun 4th, '10, 8:28 pm

Re: Useful Scripts

Postby amt-morbus » Jul 24th, '14, 5:57 pm

OB Offset Bind
This can be used to find new OB heights, such as determining if landing on another player will cause a new OB height. The bind cycles through some hitbox heights and its combinations:

Code: Select all
\bind PGUP "varCycle df_ob_OffsetStartPosZ 0 0 56.25 40 112.5 96.25"
\bind PGDN "varCycle df_ob_OffsetStopPosZ 0 0 56.25 40 112.5 96.25"

Page UP = Offset of the starting position
Page Down = Offset of the landing position

0 = no offset
56.25 = hitbox height standing
40 = hitbox height crouched
112.5 = 2 hitboxes stacked
96.25 = 2 hitboxes stacked, one crouched and one standing
Last edited by amt-morbus on Jul 24th, '14, 6:12 pm, edited 1 time in total.
Image
User avatar
amt-morbus
 
Posts: 231
Joined: Jun 4th, '10, 8:28 pm

Re: Useful Scripts

Postby amt-morbus » Jul 24th, '14, 6:12 pm

Timescale cycle
Code: Select all
\bind kp_home "varMath timescale - .1"
\bind kp_uparrow "varMath timescale + .1"

Keypad 7 = Decrease timescale -0.1
Keypad 8 = Increase timescale +0.1

Strafe bind (often used for DOB/ZWOB)
Code: Select all
\bind ctrl +strafe

CTRL = Holding CTRL and moving the mouse will accelerate the player slightly

Bind for holdables
Code: Select all
\bind kp_enter give speed
\bind kp_plus give quad damage
\bind kp_minus give flight

Numpad Enter = Give Haste
Numpad Plus = Give Quad Damage
Numpad Minus = Give Flight

Screenshot bind
Code: Select all
\bind F11 "cg_draw2d 0 ; cg_drawgun 0 ; wait 20 ; screenshotJPEG ; wait 20 ; cg_draw2d 1 ; cg_drawgun 1"
\bind F12 "screenshotJPEG"

F11 = Clean JPEG screenshot. Disables hud > screenshot > enables hud
F12 = JPEG screenshot with hud.

Jump Speeds Chat bind
Code: Select all
\bind j "varCommand say ^1Jumps [ups] ^7 $chsinfo(140)"


Backup Config
Code: Select all
\bind F7 "varjoin user_configname <0> MyConfig_ $chsinfo(108); varcommand writeconfig $user_configname"


Condump console chat to a .txt file
Code: Select all
\bind F8 "varjoin user_condumptext <0> Condump_ $chsinfo(108) _ $chsinfo(109)  .txt; varcommand condump $user_condumptext; echo Saved_to_defrag folder"
Image
User avatar
amt-morbus
 
Posts: 231
Joined: Jun 4th, '10, 8:28 pm

PreviousNext

cron