Knife Script

BarlowBarlow Join Date: 2005-02-10 Member: 40597Members
Hey, I posted this in the wrong forum before <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html/emoticons/nerd-fix.gif' border='0' style='vertical-align:middle' alt='nerd-fix.gif' /><!--endemo--> oops.

Ive just about managed to fix the original problem that I had which was that it didn't work... at all <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

Like I said in the other post, my game of choice is DoD, and in that I have a script whereby when you press the mousewheel (mouse3) down I get out my knife/spade and attack with it until I release the button, it then switches back to my <b>last</b> weapon.

Now the problem I have with this script is that it seems to switch to knife no problem, and attack no problem. but... when mouse 3 is released I cant seem to get it to switch back to the last weapon I had out at the time. I minor problem, but a problem nonetheless. I have to impulse 1 it back to whatever weapon I have in slot 1 as 'lastinv' doesnt seem to work. I have hudswitch set as 1 if this makes a difference.

Any help would be greatly appreciated.

Here it is:

<!--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-->alias "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
alias "-getmaknife" "-attack;wait;impulse 1"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

Comments

  • ThreeLeggedSkulkThreeLeggedSkulk Join Date: 2005-01-18 Member: 36305Members
    <!--QuoteBegin-Barlow+Feb 11 2005, 08:47 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Barlow @ Feb 11 2005, 08:47 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-->alias "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
    alias "-getmaknife" "-attack;wait;<b>lastinv</b>"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
  • BarlowBarlow Join Date: 2005-02-10 Member: 40597Members
    The 'lastinv' doesnt seem to do anything, it doesnt switch back to anything when I have it there, it just stays on the knife. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
  • motsewmotsew Join Date: 2003-10-26 Member: 22001Members
    here's another way of doing it :

    press 3, press mouse1, press q

    easy peasy !
  • DragonMechDragonMech Join Date: 2003-09-19 Member: 21023Members, Constellation, Reinforced - Shadow
    Try adding another 'wait' or two in the -getmaknife command.
  • Swift_IdiotSwift_Idiot Join Date: 2003-01-05 Member: 11883Members
    I think I can come up with a script for this. I already have one that switches back to the LMG. I don't know if that's an ok alternative to lastinv.

    PS mot stay out of our forum plz
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver
    edited February 2005
    <!--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 "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
    alias "-getmaknife" "-attack;wait;slot1"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    since, in ns, your last used weapon is almost always slot1 (lmg, sg, hmg or gl), just do this. then hit 2 for the pistol if you really want.

    Alternatively, if you use a scripted lastinv, like romanos, you can just call something from inside the script that will switch you back.
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver
    edited February 2005
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    <!--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 "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
    alias "-getmaknife" "-attack;wait;lastinv;lastinv"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    You need 2 lastinv commands for it to work, not sure why.
  • Krazy_GlueKrazy_Glue Join Date: 2003-05-16 Member: 16393Members
    my script uses lastinv fine...

    <!--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 +knife "slot3; wait; +attack"
    alias -knife "-attack; wait; lastinv"
    bind <key> +knife<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    mabey its because i use slot3...
  • BarlowBarlow Join Date: 2005-02-10 Member: 40597Members
    Hmmm. Cheers for all the help guys. The 2 'lastinv' commands only seems to work if i swap from lmg to pistol and then press mouse3. I'll try that one bound to slot 3 <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
Sign In or Register to comment.