User panel stuff on forum
  7 posts on 1 page  1
Advanced Configuration
2006-01-14, 13:42
Member
1433 posts

Registered:
Jan 2006
Work's fine, like this:
Quote:
As an example, suppose we collect rl on 47 seconds. Type "7", "4", "7" and the script will report that the next rl is on 17.

To make it absolutely clear (there are people that don't understand what such script does):
I press keys [7], [4], [7] and the script will do exactly this for me: "say_team $joh 17 rl 17"

I've added support for any gameclock mode (1/3 = clockwise = from 0:00 to 20:00 vs. 2/4 = counter-clockwise = from 20:00 to 0:00), 1.13 version supported only cl_gameclock 1/3
Haven't found any newer version than this because i couldn't find the author on IRC (haven't emailed him though, email is in the comments)
Works in both ezQuake & FuhQuake.

// ***** BEGIN LICENSE BLOCK *****
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
//
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
//
// The Original Code is the toekk.org QuakeWorld timer script.
//
// The Initial Developer of the Original Code is
// Alexander Ahern - toekk at toekk dot org.
// Portions created by the Initial Developer are Copyright (C) 2005
// the Initial Developer. All Rights Reserved.
//
// Contributor(s):
//
// Alternatively, the contents of this file may be used under the terms of
// either the GNU General Public License Version 2 or later (the "GPL"), or
// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
// in which case the provisions of the GPL or the LGPL are applicable instead
// of those above. If you wish to allow use of your version of this file only
// under the terms of either the GPL or the LGPL, and not to allow others to
// use your version of this file under the terms of the MPL, indicate your
// decision by deleting the provisions above and replace them with the notice
// and other provisions required by the GPL or the LGPL. If you do not delete
// the provisions above, a recipient may use your version of this file under
// the terms of any one of the MPL, the GPL or the LGPL.
//
// ***** END LICENSE BLOCK *****

// $Id: timer.cfg,v 1.13j 2006/01/14 12:00:00 aja Exp $

// Bindings:
// The variables "__kt_X" indicate the keys you should bind.
// __kt_reset - resets the timer, if you make a mistake entering a time.
// __kt_spam - tell your teammates the time on the currently selected timer.
// __kt_nudgeup - increment current item's time by 1.
// __kt_nudgedown - you can guess!
// __kt_zero/one... - typically these are the the numeric keypad.

// Installation:
// Put the timer.cfg in your quakeworld/id1 directory, and then place
// "exec timer.cfg" in your config somewhere. This will bind all the
// keys and set your timers to zero. The script will not be much use unless
// you also set "cl_gameclock 1" in your config!

// Usage:
// At the moment, the timer only records quad, rl, pent, ra and ya times.
// To enter a time, first select the item you wish to record:
// 1: yellow armour
// 2: red armour
// 4: quad
// 6: pent
// 7: rocket launcher
// Then type the time you took the item. As an example, suppose we collect rl
// on 47 seconds. Type "7", "4", "7" and the script will report that the next
// rl is on 17.
//
// (these instructions assume you have the standard numeric keypad bindings)

// Customisation:
// To change your message, the alias __kt_spam can be redefined.

// Contact:
// The author, toekk, can usually be found on QuakeNet IRC,
// channel #knockback.
// JohnNy_cz, 1.13->1.13j updater - #qw.cz

set __kt_reset "kp_enter"
set __kt_spam "kp_star"
set __kt_nudgeup "kp_plus"
set __kt_nudgedown "kp_minus"
set __kt_zero "kp_0"
set __kt_one "kp_1"
set __kt_two "kp_2"
set __kt_three "kp_3"
set __kt_four "kp_4"
set __kt_five "kp_5"
set __kt_six "kp_6"
set __kt_seven "kp_7"
set __kt_eight "kp_8"
set __kt_nine "kp_9"

set __t_quad "00"
set __t_rl "00"
set __t_pent "00"
set __t_ra "00"
set __t_ya "00"

set __t_tens 0
set __t_units 0
set __t_item 0
set __t_tmp 0

// Save the temporary time __t_tmp into the correct item's time
alias _t_save "if $qt,$__t_item,$qt isin $qt,quad,rl,pent,ya,ra,$qt then set __t_$__t_item $__t_tmp"

// Load the selected item's time into the temporary time __t_tmp
alias _t_load "if $qt,$__t_item,$qt isin $qt,quad,rl,pent,ya,ra,$qt then _t_load$__t_item"
alias _t_loadquad "set __t_tmp $__t_quad"
alias _t_loadrl "set __t_tmp $__t_rl"
alias _t_loadpent "set __t_tmp $__t_pent"
alias _t_loadra "set __t_tmp $__t_ra"
alias _t_loadya "set __t_tmp $__t_ya"

// Show the current time as an echo
alias _t_echo "echo $__t_item on $__t_tmp"

// Spam the current time
alias _t_spam "say_team $$nick $__t_tmp $__t_item $__t_tmp; _t_bindselect"

// Panic button to stop setting a time if you make a mistake
alias _t_reset "bf; echo reset - selection mode; _t_bindselect"

// Select item to set/report it's time
alias _ts_ya "echo yellow selected; _t_save; set __t_item ya; _t_load; _t_bindtens;"
alias _ts_ra "echo red selected; _t_save; set __t_item ra; _t_load; _t_bindtens;"
alias _ts_quad "echo quad selected; _t_save; set __t_item quad; _t_load; _t_bindtens"
alias _ts_rl "echo rl selected; _t_save; set __t_item rl; _t_load; _t_bindtens"
alias _ts_pent "echo pent selected; _t_save; set __t_item pent; _t_load; _t_bindtens"

// Bind all the keys to item selection
alias _t_bindselect "unbind $__kt_zero; bind $__kt_one _ts_ya; bind $__kt_two _ts_ra; unbind $__kt_three; bind $__kt_four _ts_quad; unbind $__kt_five; bind $__kt_six _ts_pent; bind $__kt_seven _ts_rl; unbind $__kt_eight; unbind $__kt_nine;"

// Bind all the keys to unit selection
alias _t_bindunits "bind $__kt_zero _tu_zero; bind $__kt_one _tu_one; bind $__kt_two _tu_two; bind $__kt_three _tu_three; bind $__kt_four _tu_four; bind $__kt_five _tu_five; bind $__kt_six _tu_six; bind $__kt_seven _tu_seven; bind $__kt_eight _tu_eight; bind $__kt_nine _tu_nine"

// Bind keys to tens selection
alias _t_bindtens "bind $__kt_zero _tt_zero; bind $__kt_one _tt_one; bind $__kt_two _tt_two; bind $__kt_three _tt_three; bind $__kt_four _tt_four; bind $__kt_five _tt_five; unbind $__kt_six; unbind $__kt_seven; unbind $__kt_eight; unbind $__kt_nine"

// Take a weapon, this adds 30 seconds
// this works for any gameclock settings the same - JohnNy_cz
alias _t_weapon "inc __t_tmp 30; if $__t_tmp >= 60 then inc __t_tmp -60; _t_pad"

// Take an armour, this adds 20 seconds
// <JohnNy_cz>
alias _t_armour "if $cl_gameclock == 1 _t_armour_cw else if $cl_gameclock == 3 _t_armour_cw else _t_armour_ccw"
alias _t_armour_cw "inc __t_tmp 20; if $__t_tmp >= 60 then inc __t_tmp -60; _t_pad"
alias _t_armour_ccw "inc __t_tmp -20; if $__t_tmp < 0 then inc __t_tmp 60; _t_pad"
// </JohnNy_cz>

// Pad with leading zeros
alias _t_pad "if $__t_tmp < 10 then set __t_tmp 0$__t_tmp"

// Set the time
alias _t_settime "set __t_tmp $qt$__t_tens$__t_units$qt; if $__t_item == rl then _t_weapon else if $qt,$__t_item,$qt isin $qt,ra,ya,$qt then _t_armour"
alias _t_nudgeup "inc __t_tmp; if $__t_tmp >= 60 then inc __t_tmp -60; _t_pad; _t_echo"
alias _t_nudgedown "inc __t_tmp -1; if $__t_tmp < 0 then inc __t_tmp 60; _t_pad; _t_echo"

// Units
alias _tu_zero "set __t_units 0; _t_settime; _t_spam; _t_bindselect"
alias _tu_one "set __t_units 1; _t_settime; _t_spam; _t_bindselect"
alias _tu_two "set __t_units 2; _t_settime; _t_spam; _t_bindselect"
alias _tu_three "set __t_units 3; _t_settime; _t_spam; _t_bindselect"
alias _tu_four "set __t_units 4; _t_settime; _t_spam; _t_bindselect"
alias _tu_five "set __t_units 5; _t_settime; _t_spam; _t_bindselect"
alias _tu_six "set __t_units 6; _t_settime; _t_spam; _t_bindselect"
alias _tu_seven "set __t_units 7; _t_settime; _t_spam; _t_bindselect"
alias _tu_eight "set __t_units 8; _t_settime; _t_spam; _t_bindselect"
alias _tu_nine "set __t_units 9; _t_settime; _t_spam; _t_bindselect"

// Tens
alias _tt_zero "echo 0...; set __t_tens 0; _t_bindunits"
alias _tt_one "echo 1...; set __t_tens 1; _t_bindunits"
alias _tt_two "echo 2...; set __t_tens 2; _t_bindunits"
alias _tt_three "echo 3...; set __t_tens 3; _t_bindunits"
alias _tt_four "echo 4...; set __t_tens 4; _t_bindunits"
alias _tt_five "echo 5...; set __t_tens 5; _t_bindunits"

// Setup

_t_bindselect
bind $__kt_reset "_t_reset"
bind $__kt_spam "_t_spam"
bind $__kt_nudgeup "_t_nudgeup"
bind $__kt_nudgedown "_t_nudgedown"

echo "timer.cfg $Revision&#58; 1.13j $"
2006-01-14, 14:38
Member
790 posts

Registered:
Jan 1970
Hi!

Kalma had a really good idea for his timer.cfg, you should implement it too.
Players use different cl_clock values, some count up and some cound down.
Use two messages with two different filters so everyone, regardless cl_clock value, can type in theire time and get messages fitered to suit theire clock.
2006-01-14, 14:46
Member
1433 posts

Registered:
Jan 2006
Quote:
... and get messages fitered to suit theire clock.
Oh, sorry but how can they filter a message?
2006-01-14, 15:32
Member
47 posts

Registered:
Jan 2006
Seems like I forgot to login in the last post...

filter #up
or
filter #down

say_team "$nick xx quad on 45 #down "
say_team "$nick xx quad on 15 #up "
2006-01-23, 17:48
Member
518 posts

Registered:
Jan 2006
nice script, but can it be modified so it works with ruleset smackdown?
2006-01-23, 17:52
Member
2259 posts

Registered:
Jan 2006
this works good with ruleset smackdown:

alias t1-0 "set t1 0;timer2"
alias t1-1 "set t1 1;timer2"
alias t1-2 "set t1 2;timer2"
alias t1-3 "set t1 3;timer2"
alias t1-4 "set t1 4;timer2"
alias t1-5 "set t1 5;timer2"
alias t1-6 "set t1 6;timer2"
alias t1-7 "set t1 7;timer2"
alias t1-8 "set t1 8;timer2"
alias t1-9 "set t1 9;timer2"

alias t2-0 "set t2 0;timer1"
alias t2-1 "set t2 1;timer1"
alias t2-2 "set t2 2;timer1"
alias t2-3 "set t2 3;timer1"
alias t2-4 "set t2 4;timer1"
alias t2-5 "set t2 5;timer1"
alias t2-6 "set t2 6;timer1"
alias t2-7 "set t2 7;timer1"
alias t2-8 "set t2 8;timer1"
alias t2-9 "set t2 9;timer1"

bind kp_0 t1-0
bind kp_1 t1-1
bind kp_2 t1-2
bind kp_3 t1-3
bind kp_4 t1-4
bind kp_5 t1-5
bind kp_6 t1-6
bind kp_7 t1-7
bind kp_8 t1-8
bind kp_9 t1-9

bind kp_enter "say_team -$sas „„ QUAD on $[:$t1$t2$]

alias timer1 "bind kp_0 t1-0;bind kp_1 t1-1;bind kp_2 t1-2;bind kp_3 t1-3;bind kp_4 t1-4;bind kp_5 t1-5;bind kp_6 t1-6;bind kp_7 t1-7;bind kp_8 t1-8;bind kp_9 t1-9"

alias timer2 "bind kp_0 t2-0;bind kp_1 t2-1;bind kp_2 t2-2;bind kp_3 t2-3;bind kp_4 t2-4;bind kp_5 t2-5;bind kp_6 t2-6;bind kp_7 t2-7;bind kp_8 t2-8;bind kp_9 t2-9"
echo quadExeced!
2006-01-23, 18:17
Member
1433 posts

Registered:
Jan 2006
Quote:
nice script, but can it be modified so it works with ruleset smackdown?

Hm? It does. (ezQuake >= 1318). Try 'wait-hack' for older ezQuake version (most prolly 1144) (pasting some 'wait' command in the middle of the config). Dunno about FuhQuake, haven't tried yet but it should work.
  7 posts on 1 page  1