Need Help With This Script.
remi
remedy [blu.knight] Join Date: 2003-11-18 Member: 23112Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester
<div class="IPBDescription">Clientside Lastinv.</div> Ok, someone said lastinv wasn't clientside, so was effected by your ping. They also said that slot_ commands were instant, and clientside... So i thought I should try to create a lastinv that is completely clientside...
unfortunatly, it's not working.
<!--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 ws_slot1 "slot1; alias ws_last ws_wpn; alias ws_wpn slot1"
alias ws_slot2 "slot2; alias ws_last ws_wpn; alias ws_wpn slot2"
alias ws_slot3 "slot3; alias ws_last ws_wpn; alias ws_wpn slot3"
alias ws_slot4 "slot4; alias ws_last ws_wpn; alias ws_wpn slot4"
alias ws_wpn "slot1"
alias ws_last "slot3"
alias ws_lastinv "ws_last; alias ws_temp ws_wpn; alias ws_wpn ws_last; alias ws_last ws_temp;"
echo ""
echo "Clientside Lastinv loaded."
echo "Bind ws_lastinv to any key."
echo " Have fun."
echo " -remedy"
bind 1 ws_slot1
bind 2 ws_slot2
bind 3 ws_slot3
bind 4 ws_slot4
bind mouse4 ws_lastinv
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Does anyone see any problems with that?
When I use it, it makes the sound like it switches weapons, but nothing else.
unfortunatly, it's not working.
<!--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 ws_slot1 "slot1; alias ws_last ws_wpn; alias ws_wpn slot1"
alias ws_slot2 "slot2; alias ws_last ws_wpn; alias ws_wpn slot2"
alias ws_slot3 "slot3; alias ws_last ws_wpn; alias ws_wpn slot3"
alias ws_slot4 "slot4; alias ws_last ws_wpn; alias ws_wpn slot4"
alias ws_wpn "slot1"
alias ws_last "slot3"
alias ws_lastinv "ws_last; alias ws_temp ws_wpn; alias ws_wpn ws_last; alias ws_last ws_temp;"
echo ""
echo "Clientside Lastinv loaded."
echo "Bind ws_lastinv to any key."
echo " Have fun."
echo " -remedy"
bind 1 ws_slot1
bind 2 ws_slot2
bind 3 ws_slot3
bind 4 ws_slot4
bind mouse4 ws_lastinv
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Does anyone see any problems with that?
When I use it, it makes the sound like it switches weapons, but nothing else.
Comments
<!--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-->// client side lastinv -- romano
// replace 1,2,3,4 with your binds for slot1,2,3,4 respectively
// repace q with your bind for lastinv
bind 1 "kk1a"
bind 2 "kk2a"
bind 3 "kk3a"
bind 4 "kk4a"
alias kk1a "kkslot1"
alias kk1b "kkslot1; bind q kk2a"
alias kk1c "kkslot1; bind q kk3a"
alias kk1d "kkslot1; bind q kk4a"
alias kkslot1 "slot1; bind 1 kk1a; bind 2 kk2a; bind 3 kk3a; bind 4 kk4a"
alias kk2a "kkslot2; bind q kk1b"
alias kk2b "kkslot2"
alias kk2c "kkslot2; bind q kk3b"
alias kk2d "kkslot2; bind q kk4b"
alias kkslot2 "slot2; bind 1 kk1b; bind 2 kk2b; bind 3 kk3b; bind 4 kk4b"
alias kk3a "kkslot3; bind q kk1c"
alias kk3b "kkslot3; bind q kk2c"
alias kk3c "kkslot3"
alias kk3d "kkslot3; bind q kk4c"
alias kkslot3 "slot3; bind 1 kk1c; bind 2 kk2c; bind 3 kk3c; bind 4 kk4c"
alias kk4a "kkslot4; bind q kk1d"
alias kk4b "kkslot4; bind q kk2d"
alias kk4c "kkslot4; bind q kk3d"
alias kk4d "kkslot4"
alias kkslot4 "slot4; bind 1 kk1d; bind 2 kk2d; bind 3 kk3d; bind 4 kk4d"
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
I'm going to need to try that script of yours.
Can anyone confirm that lastinv is serverside and not clientside? and the slot commands <b>are</b> clientside?
I thought you could assign aliases to aliases, and I did think of doing it the way you did it, but tried it my way cause i thought it would be easier...
I shall now try your script.
Here's my weapon bind script that I've been using without one hitch so far:
<!--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-->bind mouse4 weap2
bind mouse5 weap3
bind mouse3 weap4
alias go1st "slot1;alias weap2 go2nd;alias weap3 go3rd;alias weap4 go4th"
alias go2nd "slot2;alias weap2 go1st;alias weap3 go3rd;alias weap4 go4th"
alias go3rd "slot3;alias weap2 go2nd;alias weap3 go1st;alias weap4 go4th"
alias go4th "slot4;alias weap2 go2nd;alias weap3 go3rd;alias weap4 go1st"
go1st<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
maybe it's because I'm not leaving any unneccessary spaces inbetween the semicolon and the next word?
EDIT: Actually it's more likely because you aren't running one of the aliases as soon as you've set it. Notice how I've put "go1st" at the bottom, which goes through and sets all those other alias for me.
What this script does btw is basically bind slots 2-4 to different keys. When I hit the button for that slot, it switches to that weapon. If I hit it again it goes back to slot1, but if I hit one of the other 2 keys it'll go to one of those slots instead.
Thanks for bumping, this is just what I needed! <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
Edit: wow, it's kinda weird how quick this works compared to lastinv. Leap-bite and blink-swipe just got a whole lot easier!