Scripts

2»

Comments

  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    That's the point though, your method would arse up your two slots which are currently in lastinv. Also, you don't always want it to switch back to slot1, you sometime want it to switch back to other slots. If there was a shorter way of doing it I'd have done it that way. Trust me.
  • KaliasKalias Superskulk Join Date: 2002-11-01 Member: 2560Members
    edited November 2004
    Here be the implementation I cooked up. (Didn't look at any of the other scripts as it'd probably ruin the challenge... I don't like using other peoples scripts anyway.)

    <!--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-->
    //kalias lastinv script

    //BINDS
    //Replace q with lastinv key
    //Replace 1-4 with your weapon selection keys
    //Replace [ and ] with your invnext and invprev keys
    bind 1 kslot1
    bind 2 kslot2
    bind 3 kslot3
    bind 4 kslot4
    bind ] knext
    bind [ kprev
    bind q kstore1

    //ALIAS
    alias "kstore" "kslot1"
    alias "kstore1" "kslot1"
    alias "kstore2" "kslot1"
    alias "knext" "knext1"
    alias "kprev" "kprev1"
    alias "knext1" "kslot4;kslot1;kslot3;kslot1;kslot2"
    alias "kprev1" "kslot2;kslot1;kslot3;kslot1;kslot4"
    alias "knext2" "kslot1;kslot1;kslot4;kslot1;kslot3"
    alias "kprev2" "kslot3;kslot1;kslot4;kslot1;kslot1"
    alias "knext3" "kslot2;kslot1;kslot1;kslot1;kslot4"
    alias "kprev3" "kslot4;kslot1;kslot1;kslot1;kslot2"
    alias "knext4" "kslot3;kslot1;kslot2;kslot1;kslot1"
    alias "kprev4" "kslot1;kslot1;kslot2;kslot1;kslot3"
    alias "kswitch1" "alias kslot1 kslot1b;alias kslot2 kslot2b;alias kslot3 kslot3b;alias kslot4 kslot4b"
    alias "kswitch2" "alias kslot1 kslot1a;alias kslot2 kslot2a;alias kslot3 kslot3a;alias kslot4 kslot4a"
    alias "kslot1" "kslot1a"
    alias "kslot2" "kslot2a"
    alias "kslot3" "kslot3a"
    alias "kslot4" "kslot4a"
    alias "kslot1a" "slot1;alias kstore kslot1;alias kstore2 kslot1;bind q kstore1;alias kslot1 kslot1a;alias knext knext1;alias kprev kprev1;kswitch1"
    alias "kslot2a" "slot2;alias kstore kslot2;alias kstore2 kslot2;bind q kstore1;alias kslot2 kslot2a;alias knext knext2;alias kprev kprev2;kswitch1"
    alias "kslot3a" "slot3;alias kstore kslot3;alias kstore2 kslot3;bind q kstore1;alias kslot3 kslot3a;alias knext knext3;alias kprev kprev3;kswitch1"
    alias "kslot4a" "slot4;alias kstore kslot4;alias kstore2 kslot4;bind q kstore1;alias kslot3 kslot4a;alias knext knext4;alias kprev kprev4;kswitch1"
    alias "kslot1b" "slot1;alias kstore kslot1;alias kstore1 kslot1;bind q kstore2;alias kslot1 kslot1b;alias knext knext1;alias kprev kprev1;kswitch2"
    alias "kslot2b" "slot2;alias kstore kslot2;alias kstore1 kslot2;bind q kstore2;alias kslot1 kslot2b;alias knext knext2;alias kprev kprev2;kswitch2"
    alias "kslot3b" "slot3;alias kstore kslot3;alias kstore1 kslot3;bind q kstore2;alias kslot1 kslot3b;alias knext knext3;alias kprev kprev3;kswitch2"
    alias "kslot4b" "slot4;alias kstore kslot4;alias kstore1 kslot4;bind q kstore2;alias kslot1 kslot4b;alias knext knext4;alias kprev kprev4;kswitch2"


    //kalias non-lastinv slotx command
    //Replace mouse2 with your non-lastinv-slotx key
    //Replace kp_ins with your set-slotx key

    //BINDS
    bind mouse2 +kspecslotx
    bind kp_ins +ksetspecslotx

    //ALIAS
    //Change +kspecslotx to use kspecslot1/2/3/4 here if you wish to have a different default special slot
    alias "+ksetspecslotx" "bind 1 ksetspecslot1;bind 2 ksetspecslot2;bind 3 ksetspecslot3;bind 4 ksetspecslot4"
    alias "-ksetspecslotx" "bind 1 kslot1;bind 2 kslot2;bind 3 kslot3;bind 4 kslot4"
    alias "+kspecslotx" "kspecslot3"
    alias "-kspecslotx" "-attack;kstore"
    alias "ksetspecslot1" "alias +kspecslotx kspecslot1"
    alias "ksetspecslot2" "alias +kspecslotx kspecslot2"
    alias "ksetspecslot3" "alias +kspecslotx kspecslot3"
    alias "ksetspecslot4" "alias +kspecslotx kspecslot4"

    //No autoattack
    //alias "kspecslot1" "slot1"
    //alias "kspecslot2" "slot2"
    //alias "kspecslot3" "slot3"
    //alias "kspecslot4" "slot4"

    //With autoattack
    alias "kspecslot1" "slot1;wait;+attack"
    alias "kspecslot2" "slot2;wait;+attack"
    alias "kspecslot3" "slot3;wait;+attack"
    alias "kspecslot4" "slot4;wait;+attack"
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    I havent set it to automatically attack when I hold the button, due to it being on mouse2 and I quite like the idea of holding mouse two and then clicking to activate it exactly when I want... the autofire version is there though, commented out.

    Also features an inbuilt invnext and invprev, and the ability to change the "quickslot" in-game to anything you like. (KP_INS -> number)

    <span style='color:gray'>I've not tested this completely yet... will do later tonight, I'll leave it here in case anyone else wants to and as a reminder to myself.</span>
    <span style='color:red'>Managed to test it, didn't work completely, I've fixed it now and it should be fully functional.</span>

    Will probably shorten the alias names a bit as well. <span style='color:red'>-done</span>
  • ForlornForlorn Join Date: 2002-11-01 Member: 2634Banned
    Mintman that would be an awesome script for any game besides NS, since the only really useful attack to have is slot3 next to slot2, so there's no need for reassignment. But for a game like S&I it would be really cool.
  • Swift_IdiotSwift_Idiot Join Date: 2003-01-05 Member: 11883Members
    this compliment has been brought to you by the left hand

    lol
  • KaliasKalias Superskulk Join Date: 2002-11-01 Member: 2560Members
    Just wondering, does Romano's script recognise whether you last used a welder or mines? I say this as I just though about combat and its ability to have two weapons in one slot... I can't think of a way of storing that information reliably.
  • ForlornForlorn Join Date: 2002-11-01 Member: 2634Banned
    <!--QuoteBegin-Kalias+Nov 2 2004, 03:02 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Kalias @ Nov 2 2004, 03:02 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Just wondering, does Romano's script recognise whether you last used a welder or mines? I say this as I just though about combat and its ability to have two weapons in one slot... I can't think of a way of storing that information reliably. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    No, it doesn't.
  • KaliasKalias Superskulk Join Date: 2002-11-01 Member: 2560Members
    ...bugger.

    Oh well, suppose I'll stop coding there then... I can think of methods to do it... but the script would likely break after a few weapon changes.
  • ForlornForlorn Join Date: 2002-11-01 Member: 2634Banned
    <!--QuoteBegin-Kalias+Nov 2 2004, 03:07 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Kalias @ Nov 2 2004, 03:07 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ...bugger.

    Oh well, suppose I'll stop coding there then... I can think of methods to do it... but the script would likely break after a few weapon changes. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    What you can do, however is call weapon_name like that, and allows you to select one weapon amongst several.

    like weapon_shotgun
    or weapon_bite
  • KaliasKalias Superskulk Join Date: 2002-11-01 Member: 2560Members
    edited November 2004
    <!--QuoteBegin-Forlorn+Nov 2 2004, 08:20 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Forlorn @ Nov 2 2004, 08:20 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin-Kalias+Nov 2 2004, 03:07 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Kalias @ Nov 2 2004, 03:07 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ...bugger.

    Oh well, suppose I'll stop coding there then... I can think of methods to do it... but the script would likely break after a few weapon changes. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    What you can do, however is call weapon_name like that, and allows you to select one weapon amongst several.

    like weapon_shotgun
    or weapon_bite <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    Indeed... selecting the weapon isn't the trouble though... the problem is you can't work out whether you have drawn the welder or mines with slot4 via scripting... which means you can't store it in a pseudo-variable to be recalled.

    Anyway, put up my fully updated version up... I'm pretty sure I've ripped all the bugs off it now.

    <span style='color:gray'>- Or not... *fiddles with the invnext*</span> <span style='color:red'>-fixed.</span>
  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    <!--QuoteBegin-Forlorn+Nov 2 2004, 05:54 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Forlorn @ Nov 2 2004, 05:54 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Mintman that would be an awesome script for any game besides NS, since the only really useful attack to have is slot3 next to slot2, so there's no need for reassignment. But for a game like S&I it would be really cool. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Yeah, I just figured I'd build in the ability to do that as I'd realised it was possible. I was using blink on the quickswitch but now I've found it better to use metab on it. I've been setting it to be heal on gorge which is quite useful as you can heal someone instantly and setting it for welder when HA or just when you've got a welder is good as you can weld someone without losing pistol and primary weapon from lastinv.

    Also in the early game as skulk you basically have parasite on one mouse button and bite on the other which makes for easy parasiting without having to worry about getting caught with parasite out.
  • Swift_IdiotSwift_Idiot Join Date: 2003-01-05 Member: 11883Members
    <!--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 +s1 "slot1;wait;+attack;"
    alias -s1 "-attack;"

    alias +s2 "slot2;wait;+attack;
    alias -s2 "-attack;wait;wait;slot1"

    alias +s3 "slot3;wait;+attack;
    alias -s3 "-attack;wait;wait;slot1"

    alias +s4 "slot4;wait;+attack;
    alias -s4 "-attack;wait;wait;slot1"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    ^^^ This turned out to be exactly what I was looking for. With a tap, "+s3" does all the work of switching to leap, leaping, and switching back to bite while providing maximum control for a script. It's leap at the push of a button. Works great for blink and metabolizing too. It even makes xenoleaping easier since you just hit one button to autostart the xeno, then hit the leap button and you're done.

    The downside, of course, is that you will need to find two or three more buttons to bind the scripts to, since instead of hitting the number keys to select your attacks, you just hit or hold the appropriate button to use your attack. I have +s3 bound to three different spots on my keyboard, q, x, and mouse5, it's that useful.

    DoublePlus thread here.
  • ForlornForlorn Join Date: 2002-11-01 Member: 2634Banned
    <!--QuoteBegin-Swift Idiot+Nov 5 2004, 04:22 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Swift Idiot @ Nov 5 2004, 04:22 PM)</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 +s1 "slot1;wait;+attack;"
    alias -s1 "-attack;"

    alias +s2 "slot2;wait;+attack;
    alias -s2 "-attack;wait;wait;slot1"

    alias +s3 "slot3;wait;+attack;
    alias -s3 "-attack;wait;wait;slot1"

    alias +s4 "slot4;wait;+attack;
    alias -s4 "-attack;wait;wait;slot1"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    ^^^ This turned out to be exactly what I was looking for. With a tap, "+s3" does all the work of switching to leap, leaping, and switching back to bite while providing maximum control for a script. It's leap at the push of a button. Works great for blink and metabolizing too. It even makes xenoleaping easier since you just hit one button to autostart the xeno, then hit the leap button and you're done.

    The downside, of course, is that you will need to find two or three more buttons to bind the scripts to, since instead of hitting the number keys to select your attacks, you just hit or hold the appropriate button to use your attack. I have +s3 bound to three different spots on my keyboard, q, x, and mouse5, it's that useful.

    DoublePlus thread here. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    When I first stumbled across it many times ago, I thought it was useful, I tried it with all sorts of attacks, but ultimately I've found it doesn't give me enough control. The only useful one is a meta/blink/swipe switch, you can do all three practically simultanousely.
Sign In or Register to comment.