Need Help With This Script.

remiremi 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.

Comments

  • remiremi remedy [blu.knight] Join Date: 2003-11-18 Member: 23112Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester
    I also don't know how to check what the alias's contain.... so i can't debug it.
  • PhycoPhyco Omnipotent Join Date: 2003-12-24 Member: 24730Members
    what is this supposed to do?
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    iirc the problem is that you can't put one alias into another alias.... <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
  • romanoromano Join Date: 2002-11-02 Member: 4296Members
    CaptainPanaka is correct, can't transfer an alias to another alias (essentially making a variable). I wrote this one is a few minutes and just tested it for a few seconds, seems to work as advertised...

    <!--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-->
  • remiremi remedy [blu.knight] Join Date: 2003-11-18 Member: 23112Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester
    ::thinks:: Oh right... see, i used the alias to alias thing in another script of mine, but in that one, i wasn't changing the second alias, just using the first so that the script knew which thing to execute after the player was done choosing.

    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?
  • bioshockbioshock Join Date: 2003-05-20 Member: 16538Members
    can't really confirm either way, but romano's is a LOT faster than lastinv
  • DelarosaDelarosa Naturally Custom Join Date: 2002-11-29 Member: 10214Members, NS1 Playtester
    confermed, lastinv is serverside.. weaponslots are client side
  • remiremi remedy [blu.knight] Join Date: 2003-11-18 Member: 23112Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester
    Awesome, Romano, thanks a bunch. I think I probably could have done it, but you saved me the headache <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

    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.
  • RokiyoRokiyo A.K.A. .::FeX::. Revenge Join Date: 2002-10-10 Member: 1471Members, Constellation
    edited February 2004
    Um I've never had any problems putting an alias into another alias...

    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.
  • ForlornForlorn Join Date: 2002-11-01 Member: 2634Banned
    edited March 2004
    wow romano good stuff.
  • CForresterCForrester P0rk(h0p Join Date: 2002-10-05 Member: 1439Members, Constellation
    <!--QuoteBegin-Forlorn+Mar 9 2004, 07:19 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Forlorn @ Mar 9 2004, 07:19 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> wow romano good stuff. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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-->
  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    edited March 2004
    Sweet, I was going to try and do exactly this tomorrow. Thanks for saving me the bother!

    Edit: wow, it's kinda weird how quick this works compared to lastinv. Leap-bite and blink-swipe just got a whole lot easier!
  • Diablo_fxDiablo_fx Join Date: 2003-02-21 Member: 13793Members
    This sure does help alot. Thanks
  • coriscoris Join Date: 2003-07-08 Member: 18034Members, Constellation
    I Wub you romano. Sticky ffs <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html//emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
Sign In or Register to comment.