by Captain Darling » Tue Nov 25, 2003 4:29 pm
I'm doing this from my head, so don't shoot me if it's not 100% accurate. I also don't have a wolf installed here to try it. I'll post a fully functional one later tonight (or tomorow). I only done it for 3 keys at the moment
First of all these are the name to use for the numeric keypad
KP_INS - 0
KP_END - 1
KP_DOWNARROW - 2
KP_PGDN - 3
KP_LEFTARROW - 4
KP_5 - 5
KP_RIGHTARROW - 6
KP_HOME - 7
KP_UPARROW - 8
KP_PGUP - 9
and here's some script (the white lines are comment. You can put those in the script file to make it more easy to read. Just remember to add the leading //. The red text is the actuall script & the green text is an attempt to explain what it does)
//bind key1 so the other keys will be bound to vsays when you press it (it will also bind key1 to unbind so you can cancel the vsay by pressing 1 again)
bind KP_END "vstr prepbinds"
This will bind the numeric 1 key to execute 'prepbinds' (defined below)
//prepare the vsays by binding the numeric keys
set prepbinds "bind KP_END vstr unbindvsays; bind KP_RIGHTARROW vstr vsay_key2;bind KP_PGDN vstr vsay_key3; bind KP_LEFTARROW vstr vsay_key4"
when we execute 'prepbinds', the 1 key will be bound to 'unbind', the 2 key will be bound to 'vsay_key2' (defined later), and so on
//for each key, do a vsay & unbind the keys when done
set vsay_key2 "vsay thanks; vstr unbindvsays"
set vsay_key3 "vsay sorry; vstr unbindvsays"
set vsay_key4 "vsay oops; vstr unbindvsays"
when vsay_key2 is executed, it will do a vsay (thanks/danke) and then will unbind all the keys, so you can start again by pressing the 1 key, same goes for the other keys
//this will remove the binds after you done a vsay, or when you press the 1 key again
set unbindvsays "bind KP_END vstr prepbinds;unbind KP_DOWNARROW; unbind KP_PGDN; unbind KP_LEFTARROW"
this will be executed after a vsay (through the vsay_keyx vstrs) or when we press the 1 key for the second time. It rebinds key1 to 'prepbinds' so we can start again
Captain Darling