Scripting Help.

MelatoninMelatonin Babbler Join Date: 2003-03-15 Member: 14551Members, Constellation
<div class="IPBDescription">legit purpose :P toggle crouch</div> My keyboard has a 2 key limit, hence holding crouch togeather with left/ right and pressing jump becomes hard.

I want to make my crouch button toggelable.

Is this possible?
can anyone tell me the relevent commands, and/ or give me a code which will do the job.

thanks.

Comments

  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    edited July 2004
    hmm i supose i could make you one,

    alias d1 "+duck; bind ctrl d2"
    alias d2 "-duck; bind ctrl d1"
    bind ctrl d1

    I'm not sure it's working but i hope <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo--> (i dont use one my self)
    also try search the forums for duck script if you can get search to work :/
  • MelatoninMelatonin Babbler Join Date: 2003-03-15 Member: 14551Members, Constellation
    works perfectly.
    thanks alot
  • makemake Join Date: 2003-07-14 Member: 18154Members, Constellation
    While that works, it is not looked upon as good coding.
    If you were to change the button which you toggle with, you would have to change the script in several places.
    The correct snippet would be this:
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias d1 "+duck; alias ducktoggle d2"
    alias d2 "-duck; alias ducktoggle d1"
    alias ducktoggle d1
    bind ctrl ducktoggle<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->





    I think that should work <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • MrMojoMrMojo Join Date: 2002-11-25 Member: 9882Members, Constellation
    This is what I use, I think I got it from ampednews.com

    alias duck_t "duck_on"
    alias duck_on "alias duck_t duck_off; +duck; developer 1; echo Ducking enabled; developer 0"
    alias duck_off "alias duck_t duck_on; -duck; developer 1; echo Standing enabled; developer 0"
    bind "x" "duck_t"


    Bind x to any key you want. The developer part will simply say Ducking or standing enabled in console.
  • ThansalThansal The New Scum Join Date: 2002-08-22 Member: 1215Members, Constellation
    hmmm

    2 key limit?

    generaly these do not include Meta keys (ctrl, alt, shift)

    combine that with binding jump to mouse... <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> (try popupmenu on alt)

    I just suggest this b/c getting ussed to a duck toggle can be a pain (I tried ussing one for when I was sniping in DoD but eventualy had to bind it to another key so I could still have my normal duck)
  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    <!--QuoteBegin-make+Jul 24 2004, 03:09 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (make @ Jul 24 2004, 03:09 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> While that works, it is not looked upon as good coding.
    If you were to change the button which you toggle with, you would have to change the script in several places.
    The correct snippet would be this:
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias d1 "+duck; alias ducktoggle d2"
    alias d2 "-duck; alias ducktoggle d1"
    alias ducktoggle d1
    bind ctrl ducktoggle<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->





    I think that should work <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    well i'm not used to make scripts i just made what i could <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • Bait_BoyBait_Boy Join Date: 2004-05-14 Member: 28672Members
    my head hurts just looking at it, its so complex :/
  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    edited July 2004
    <!--QuoteBegin-Bait-Boy+Jul 24 2004, 06:34 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Bait-Boy @ Jul 24 2004, 06:34 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> my head hurts just looking at it, its so complex :/ <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    not realy, i'll explain xD

    Start simple, a bind is function that tells HL what the key you're pressing dose.
    Binds work like this "bind "KEY" "function"(more functions can be seperated be a ; )

    An alias is something to replace a command with, like you don't go around saying "laughing out loud" you say "lol" which is shorter, hl does the same thing.
    Simply when it hears "test" it refers to what you aliased to it.
    Works like "alias "alias name(what you call it)" "function of alias2
    with the lol exsample
    alias lol "Laughing out load"

    now try look at it again <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->

    alias d1 "+duck; alias ducktoggle d2"
    alias d2 "-duck; alias ducktoggle d1"
    alias ducktoggle d1
    bind ctrl ducktoggle
  • Bait_BoyBait_Boy Join Date: 2004-05-14 Member: 28672Members
    Copy and pasteage into notepad for future reference <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> Thanks I get it a little better now
  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    <!--QuoteBegin-Bait-Boy+Jul 24 2004, 08:50 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Bait-Boy @ Jul 24 2004, 08:50 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Copy and pasteage into notepad for future reference <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> Thanks I get it a little better now <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • SariselSarisel .::&#39; ( O ) &#39;;:-. .-.:;&#39; ( O ) &#39;::. Join Date: 2003-07-30 Member: 18557Members, Constellation
    A model example of how scripting is useful.
  • God_KillerGod_Killer Join Date: 2004-02-16 Member: 26592Members
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> A model example of how scripting is useful.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    Wow yeah <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    edited July 2004
    Wow that made me feel usefull :O



    ...

    lol
    (whos gonna make the official script help topic? :o)
  • explodingheadboyexplodingheadboy Join Date: 2003-04-18 Member: 15636Members, Constellation
    edited July 2004
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->more functions can be seperated be a <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo--><!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    That is leat. People will look at your code and ask, "Did you code that yourself?"
  • Seph_KimaraSeph_Kimara Join Date: 2003-08-10 Member: 19359Members
    <!--QuoteBegin-Diablo_fx+Jul 24 2004, 10:46 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Diablo_fx @ Jul 24 2004, 10:46 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Wow that made me feel usefull :O



    ...

    lol
    (whos gonna make the official script help topic? :o) <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Nobody, because people who are ignorant on the functionality of scripts always come in and spout off how bad they are, followed by flamewars, followed by lockage. Happens every time.
  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    <!--QuoteBegin-explodingheadboy+Jul 25 2004, 12:17 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (explodingheadboy @ Jul 25 2004, 12:17 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->more functions can be seperated be a <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo--><!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    That is leat. People will look at your code and ask, "Did you code that yourself?" <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    edited <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • God_KillerGod_Killer Join Date: 2004-02-16 Member: 26592Members
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Nobody, because people who are ignorant on the functionality of scripts always come in and spout off how bad they are, followed by flamewars, followed by lockage. Happens every time.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    Lets give a prize to the first anti-scripter that says something!
Sign In or Register to comment.