More Scripting Help

devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
edited June 2003 in Tech Support
<div class="IPBDescription">Gorge + builds dont mix</div> <b>Main File:</b>
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
//Many of the binds are in these, don't remove these lines
exec commbuildbinds.cfg
exec alienbinds.cfg

//Misc. Stuff
unbind kp_minus
bind kp_minus "gorgemode"
alias devon "developer 1"
alias devoff "developer 0"
devon
echo "Gorge/Comm Script v1.00 Active"
echo "Press - on the numpad to toggle"
devoff


//Unbind all numpad keys
alias unbindnumpad "unbind kp_end; unbind kp_downarrow; unbind kp_pgdn; unbind kp_leftarrow; unbind kp_5; unbind kp_rightarrow; unbind kp_home; unbind kp_uparrow; unbind kp_pgup; unbind kp_plus"

//Change to gorge binds
alias gorgemode "devon; echo "Gorge Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "commmode"; gorgebind"

//Change to comm binds
alias commmode "devon; echo "Comm Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "gorgemode"; commbind"

// |------------------|
// |Num--X---X---gorge|
// |Tur---JP---HA--HMG|
// |Med----Amm----Weld|
// |Res----PG-----Scan|
// |------------------|
//      Comm Mode


alias commbind "bind kp_end "com_kpend"; bind kp_downarrow "com_kpdown"; bind kp_pgdn "com_kppgdn"; bind kp_leftarrow "com_kpleft"; bind kp_5 "com_kp5"; bind kp_rightarrow "com_kpright"; bind kp_home "com_kphome" bind  kp_uparrow "com_kpup"; bind kp_pgup "com_kppgup" bind kp_plus "com_kpplus; devon; echo "Comm Binds"; devoff""

// |------------------|
// |Num---X---X---Comm|
// |X-------X--------X|
// |MC-----Hive-----SC|
// |Res-----OT------DC|
// |------------------|
//       Gorge Mode
alias gorgebind "bind kp_end "gg_kpend"; bind kp_downarrow "gg_kpdown"; bind kp_pgdn "gg_kppgdn"; bind kp_leftarrow "gg_kpleft"; bind kp_5 "gg_kp5; say_team "Hive Going Up""; bind kp_rightarrow "gg_kpright; devon; echo "Gorge Binds"; devoff""
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
<b>Alienbinds.cfg:</b>
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
~~~All these art, oc and stuff are bound correctly~~~
alias gg_kpend "art"
alias gg_kpdown "oc"
alias gg_kppgdn "dc"
alias gg_kpleft "mc"
alias gg_kp5 "hive"
alias gg_kpleft "sc"
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

I know the commbinds don't work, I'm hoping it'll be fixed in 1.1
But with the gorge binds it will only sucessfully bind kp_end, kp_downarrow, and kp_pgdn
I have another problem, when I join a server, it echos half the code.. like
Gorge Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "commmode"; gorgebind"
I'm not sure if it sucessfully binds the rest, but I'm not havving much luck with echos, as you can see...

Comments

  • TucoTuco Join Date: 2002-12-21 Member: 11257Members
    Alias used incorrectly again.

    (your code) alias gorgemode "devon; echo "Gorge Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "commmode"; gorgebind"
    Won't work because HL thinks the gorgemode alias ends after the second ".
    So in this case gorgemode="devon; echo ", the rest is interpreted as new commands.

    (correct one) alias gorgemode "devon; echo Gorge Mode Active; devoff; unbindnumpad; unbind kp_minus; bind kp_minus commmode; gorgebind"
    This way gorgemode will be as you want it.
    Commmode, commbind and gorgebind got the same problem.
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    I had an idea for the comm part, what if I did this:
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    alias restower hotkey##
    alias build hotkey##
    alias restowerremap "unbind kp_end; bind kp_end restower; buildmenurt"
    alias buildmenurt "unbind kp_end; bind kp_end build;  restowerremap"
    bind kp_end "build; restowerremap"
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
    so I have to double tap it, (I know the #'s are wrong)
    This way, the button only has one hotkey per it, and it switches to the acutal structure when pressed
    I want to see if this would work before I triple the amount of code for the comm part
  • ThansalThansal The New Scum Join Date: 2002-08-22 Member: 1215Members, Constellation
    umm, I unortunatly don't remember if you are alowed to have more than one command with a Hotkey

    the simply way to do it is to make a tiny little script that will build a restower with a 2x tap and test it <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    thats what I was trying to do in the above post, is that the way to do it? Or is there a different way?
Sign In or Register to comment.