Knife Script
Barlow
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-->
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
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-->
press 3, press mouse1, press q
easy peasy !
PS mot stay out of our forum plz
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.
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.
<!--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...