Marine + Kharaa Upgrade Script
cortex
Join Date: 2003-11-28 Member: 23707Members
<div class="IPBDescription">need a lil help</div> Hey, I need some help with my script, can't quite figure out what's wrong.
Basicly what it does is, i press a button and then one of two-four mouse buttons to select an upgrade, would be great if i could get this to work.
well anyway heres the marine.cfg
<!--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 "v" "+upgrade1"
bind "b" "+upgrade2"
bind "n" "+upgrade3"
bind "t" "+upgrade4"
bind "m" "+upgrade5"
bind "mouse3" "+upgrade5"
alias "Armour 1" "impulse 20; dev1; motdfile echo.txt; motd_write :: Armour 1 Selected ::; dev0"
alias "Armour 2" "impulse 21; dev1; motdfile echo.txt; motd_write :: Armour 2 Selected ::; dev0"
alias "Armour 3" "impulse 22; dev1; motdfile echo.txt; motd_write :: Armour 3 Selected ::; dev0"
alias "Weapons 1" "impulse 23; dev1; motdfile echo.txt; motd_write :: Weapons 1 Selected ::; dev0"
alias "Weapons 2" "impulse 24; dev1; motdfile echo.txt; motd_write :: Weapons 2 Selected ::; dev0"
alias "Weapons 3" "impulse 25; dev1; motdfile echo.txt; motd_write :: Weapons 3 Selected ::; dev0"
alias "Catalyst" "impulse 27; dev1; motdfile echo.txt; motd_write :: Catalyst Selected ::; dev0"
alias "Resupply" "impulse 31; dev1; motdfile echo.txt; motd_write :: Resupply Selected ::; dev0"
alias "Motion" "impulse 33; dev1; motdfile echo.txt; motd_write :: Motion Tracking Selected ::; dev0"
alias "HandGren" "impulse 37; dev1; motdfile echo.txt; motd_write :: Hand Grenade Selected ::; dev0"
alias "HeavyArmour" "impulse 38; dev1; motdfile echo.txt; motd_write :: Heavy Armour Selected ::; dev0"
alias "Jetpack" "impulse 39; dev1; motdfile echo.txt; motd_write :: Jetpack Selected ::; dev0"
alias "Scan" "impulse 53; dev1; motdfile echo.txt; motd_write :: Scan Team Selected ::; dev0"
alias "Mines" "impulse 61; dev1; motdfile echo.txt; motd_write :: Mines Selected ::; dev0"
alias "Welder" "impulse 62; dev1; motdfile echo.txt; motd_write :: Welder Selected ::; dev0"
alias "Shotgun" "impulse 64; dev1; motdfile echo.txt; motd_write :: Shotgun Selected ::; dev0"
alias "HMG" "impulse 65; dev1; motdfile echo.txt; motd_write :: HMG Selected ::; dev0"
alias "GL" "impulse 66; dev1; motdfile echo.txt; motd_write :: GL Selected ::; dev0"
alias "+upgrade1" "unbind mouse4;unbind mouse5;bind mouse4 Resupply;bind mouse5 Shotgun"
alias "-upgrade1" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade2" "unbind mouse4;unbind mouse5;bind mouse4 Armour 1;bind mouse5 Weapons 1"
alias "-upgrade2" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade3" "unbind mouse4;unbind mouse5;bind mouse4 Armour 2;bind mouse5 Weapons 2"
alias "-upgrade3" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade4" "unbind mouse4;unbind mouse5;bind mouse4 Jetpack;bind mouse5 Motion"
alias "-upgrade4" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade5" "unbind mouse4;unbind mouse5;bind mouse4 Armour 3;bind mouse5 "weapons 3"
alias "-upgrade5" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
aaand... the kharaa.cfg
<!--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 "mouse2" "+aupgrades1"
bind "v" "+aupgrades2"
bind "b" "+aupgrades3"
bind "n" "+aupgrades4"
bind "t" "+aupgrades5"
alias "OC" "impulse 91; dev1; motDfile echo.txt; motd_write :: OC Placed ::; dev0"
alias "DC" "impulse 91; dev1; motdfile echo.txt; motd_write :: DC Placed ::; dev0"
alias "MC" "impulse 91; dev1; motdfile echo.txt; motd_write :: MC Placed ::; dev0"
alias "SC" "impulse 91; dev1; motdfile echo.txt; motd_write :: SC Placed ::; dev0"
alias "RT" "impulse 91; dev1; motdfile echo.txt; motd_write :: RT Placed ::; dev0"
alias "Hive" "impulse 91; dev1; motdfile echo.txt; motd_write :: Hive Placed ::; dev0"
alias "Skulk" "impulse 91; dev1; motdfile echo.txt; motd_write :: Skulking ::; dev0"
alias "Gorge" "impulse 91; dev1; motdfile echo.txt; motd_write :: Gorging ::; dev0"
alias "Lerk" "impulse 91; dev1; motdfile echo.txt; motd_write :: Lerking ::; dev0"
alias "Fade" "impulse 91; dev1; motdfile echo.txt; motd_write :: Fading ::; dev0"
alias "Onos" "impulse 91; dev1; motdfile echo.txt; motd_write :: Onosing ::; dev0"
alias "Carapace" "impulse 91; dev1; motdfile echo.txt; motd_write :: Carapace Selected ::; dev0"
alias "Regeneration" "impulse 91; dev1; motdfile echo.txt; motd_write :: Regeneration ::; dev0"
alias "Redemption" "impulse 91; dev1; motdfile echo.txt; motd_write :: Redemption ::; dev0"
alias "Adrenaline" "impulse 91; dev1; motdfile echo.txt; motd_write :: Adrenaline ::; dev0"
alias "Celerity" "impulse 91; dev1; motdfile echo.txt; motd_write :: Celerity ::; dev0"
alias "Silence" "impulse 91; dev1; motdfile echo.txt; motd_write :: Silence ::; dev0"
alias "Cloaking" "impulse 91; dev1; motdfile echo.txt; motd_write :: Cloaking ::; dev0"
alias "Focus" "impulse 91; dev1; motdfile echo.txt; motd_write :: Focus ::; dev0"
alias "Scent of Fear" "impulse 91; dev1; motdfile echo.txt; motd_write :: Scent of Fear ::; dev0"
alias "+aupgrade1" "bind mouse3 Silence;bind mouse2 Celerity;bind mouse4 Adrenaline;bind mouse5 Redemption"
alias "-aupgrade1" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade2" "bind mouse3 Carapace;bind mouse2 Regeneration bind mouse4 Scent of Fear;bind mouse5 Cloaking"
alias "-aupgrade2" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade3" "bind mouse3 Focus;bind mouse2 Skulk;bind mouse4 Gorge; bind mouse5 RT"
alias "-aupgrade3" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade4" "bind mouse3 DC;bind mouse2 OC;bind mouse4 SC; bind mouse5 MC"
alias "-aupgrade4" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade5" "bind mouse3 Lerk;bind mouse2 Fade;bind mouse4 Onos;"
alias "-aupgrade5" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
any help would be appreciated, have a feeling i mucked something up with the +'s and -'s <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
EDIT:sry for the huge post too <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink-fix.gif' border='0' style='vertical-align:middle' alt='wink-fix.gif' /><!--endemo-->
Basicly what it does is, i press a button and then one of two-four mouse buttons to select an upgrade, would be great if i could get this to work.
well anyway heres the marine.cfg
<!--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 "v" "+upgrade1"
bind "b" "+upgrade2"
bind "n" "+upgrade3"
bind "t" "+upgrade4"
bind "m" "+upgrade5"
bind "mouse3" "+upgrade5"
alias "Armour 1" "impulse 20; dev1; motdfile echo.txt; motd_write :: Armour 1 Selected ::; dev0"
alias "Armour 2" "impulse 21; dev1; motdfile echo.txt; motd_write :: Armour 2 Selected ::; dev0"
alias "Armour 3" "impulse 22; dev1; motdfile echo.txt; motd_write :: Armour 3 Selected ::; dev0"
alias "Weapons 1" "impulse 23; dev1; motdfile echo.txt; motd_write :: Weapons 1 Selected ::; dev0"
alias "Weapons 2" "impulse 24; dev1; motdfile echo.txt; motd_write :: Weapons 2 Selected ::; dev0"
alias "Weapons 3" "impulse 25; dev1; motdfile echo.txt; motd_write :: Weapons 3 Selected ::; dev0"
alias "Catalyst" "impulse 27; dev1; motdfile echo.txt; motd_write :: Catalyst Selected ::; dev0"
alias "Resupply" "impulse 31; dev1; motdfile echo.txt; motd_write :: Resupply Selected ::; dev0"
alias "Motion" "impulse 33; dev1; motdfile echo.txt; motd_write :: Motion Tracking Selected ::; dev0"
alias "HandGren" "impulse 37; dev1; motdfile echo.txt; motd_write :: Hand Grenade Selected ::; dev0"
alias "HeavyArmour" "impulse 38; dev1; motdfile echo.txt; motd_write :: Heavy Armour Selected ::; dev0"
alias "Jetpack" "impulse 39; dev1; motdfile echo.txt; motd_write :: Jetpack Selected ::; dev0"
alias "Scan" "impulse 53; dev1; motdfile echo.txt; motd_write :: Scan Team Selected ::; dev0"
alias "Mines" "impulse 61; dev1; motdfile echo.txt; motd_write :: Mines Selected ::; dev0"
alias "Welder" "impulse 62; dev1; motdfile echo.txt; motd_write :: Welder Selected ::; dev0"
alias "Shotgun" "impulse 64; dev1; motdfile echo.txt; motd_write :: Shotgun Selected ::; dev0"
alias "HMG" "impulse 65; dev1; motdfile echo.txt; motd_write :: HMG Selected ::; dev0"
alias "GL" "impulse 66; dev1; motdfile echo.txt; motd_write :: GL Selected ::; dev0"
alias "+upgrade1" "unbind mouse4;unbind mouse5;bind mouse4 Resupply;bind mouse5 Shotgun"
alias "-upgrade1" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade2" "unbind mouse4;unbind mouse5;bind mouse4 Armour 1;bind mouse5 Weapons 1"
alias "-upgrade2" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade3" "unbind mouse4;unbind mouse5;bind mouse4 Armour 2;bind mouse5 Weapons 2"
alias "-upgrade3" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade4" "unbind mouse4;unbind mouse5;bind mouse4 Jetpack;bind mouse5 Motion"
alias "-upgrade4" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "+upgrade5" "unbind mouse4;unbind mouse5;bind mouse4 Armour 3;bind mouse5 "weapons 3"
alias "-upgrade5" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
aaand... the kharaa.cfg
<!--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 "mouse2" "+aupgrades1"
bind "v" "+aupgrades2"
bind "b" "+aupgrades3"
bind "n" "+aupgrades4"
bind "t" "+aupgrades5"
alias "OC" "impulse 91; dev1; motDfile echo.txt; motd_write :: OC Placed ::; dev0"
alias "DC" "impulse 91; dev1; motdfile echo.txt; motd_write :: DC Placed ::; dev0"
alias "MC" "impulse 91; dev1; motdfile echo.txt; motd_write :: MC Placed ::; dev0"
alias "SC" "impulse 91; dev1; motdfile echo.txt; motd_write :: SC Placed ::; dev0"
alias "RT" "impulse 91; dev1; motdfile echo.txt; motd_write :: RT Placed ::; dev0"
alias "Hive" "impulse 91; dev1; motdfile echo.txt; motd_write :: Hive Placed ::; dev0"
alias "Skulk" "impulse 91; dev1; motdfile echo.txt; motd_write :: Skulking ::; dev0"
alias "Gorge" "impulse 91; dev1; motdfile echo.txt; motd_write :: Gorging ::; dev0"
alias "Lerk" "impulse 91; dev1; motdfile echo.txt; motd_write :: Lerking ::; dev0"
alias "Fade" "impulse 91; dev1; motdfile echo.txt; motd_write :: Fading ::; dev0"
alias "Onos" "impulse 91; dev1; motdfile echo.txt; motd_write :: Onosing ::; dev0"
alias "Carapace" "impulse 91; dev1; motdfile echo.txt; motd_write :: Carapace Selected ::; dev0"
alias "Regeneration" "impulse 91; dev1; motdfile echo.txt; motd_write :: Regeneration ::; dev0"
alias "Redemption" "impulse 91; dev1; motdfile echo.txt; motd_write :: Redemption ::; dev0"
alias "Adrenaline" "impulse 91; dev1; motdfile echo.txt; motd_write :: Adrenaline ::; dev0"
alias "Celerity" "impulse 91; dev1; motdfile echo.txt; motd_write :: Celerity ::; dev0"
alias "Silence" "impulse 91; dev1; motdfile echo.txt; motd_write :: Silence ::; dev0"
alias "Cloaking" "impulse 91; dev1; motdfile echo.txt; motd_write :: Cloaking ::; dev0"
alias "Focus" "impulse 91; dev1; motdfile echo.txt; motd_write :: Focus ::; dev0"
alias "Scent of Fear" "impulse 91; dev1; motdfile echo.txt; motd_write :: Scent of Fear ::; dev0"
alias "+aupgrade1" "bind mouse3 Silence;bind mouse2 Celerity;bind mouse4 Adrenaline;bind mouse5 Redemption"
alias "-aupgrade1" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade2" "bind mouse3 Carapace;bind mouse2 Regeneration bind mouse4 Scent of Fear;bind mouse5 Cloaking"
alias "-aupgrade2" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade3" "bind mouse3 Focus;bind mouse2 Skulk;bind mouse4 Gorge; bind mouse5 RT"
alias "-aupgrade3" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade4" "bind mouse3 DC;bind mouse2 OC;bind mouse4 SC; bind mouse5 MC"
alias "-aupgrade4" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"
alias "+aupgrade5" "bind mouse3 Lerk;bind mouse2 Fade;bind mouse4 Onos;"
alias "-aupgrade5" "bind mouse3 +jump;unbind mouse2;unbind mouse4;unbind mouse5"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
any help would be appreciated, have a feeling i mucked something up with the +'s and -'s <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
EDIT:sry for the huge post too <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink-fix.gif' border='0' style='vertical-align:middle' alt='wink-fix.gif' /><!--endemo-->
Comments
<!--QuoteBegin-Cut down code+ moved into more logical order--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Cut down code @ moved into more logical order)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
bind "v" "+upgrade1"
...
alias "+upgrade1" "unbind mouse4;unbind mouse5;bind mouse4 Resupply;bind mouse5 Shotgun"
alias "-upgrade1" "unbind mouse4;unbind mouse5;bind mouse4 Xenoform;bind mouse5 Follow me"
alias "Resupply" "impulse 31; dev1; motdfile echo.txt; motd_write :: Resupply Selected ::; dev0"
alias "Shotgun" "impulse 64; dev1; motdfile echo.txt; motd_write :: Shotgun Selected ::; dev0"
..
<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
You press <b>AND HOLD</b> V, upgrade1 up is called
Mouse 4 is rebound to "resupply", and mouse5 to "shotgun"
At this point you must press mouse4 or mouse5 <b>BEFORE YOU RELEASE V</b> in order to select these aliases.
We'll come back to that.
You could now release V, and mouse4 becomes "Xenoform" and mouse 5 "follow me"
Points to notice so far:<ul>
</li><li>"Xenoform" is not aliased. Presumeably it's aliased elsewhere or you've been doing too much copying+pasting. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
</li><li>"follow me" contains a space. :S Avoid! There's a chance mouse5 will be bound to simply "follow". In my experience, sometimes it happens, sometimes it does not.
</li><li>"Follow me" is not aliased either!
</li></ul>
Pressing mouse4 before releasing V:
"Resuply"
<!--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 "Resupply" "impulse 31; dev1; motdfile echo.txt; motd_write :: Resupply Selected ::; dev0"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Gack.
For the purposes of debugging, can't we change this to:
alias "Resupply" "impulse 31;developer 1;echo Resupply_Selected;developer 0"
Pressing mouse5 before releasing V
Shotgun
<!--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-->impulse 64; dev1; motdfile echo.txt; motd_write :: Shotgun Selected ::; dev0"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
As above. Alter to:
alias "Shotgun" "impulse 64;developer 1;echo Shotgun_Selected;developer 0"
Pressing mouse4 after releasing V
Xenoform is triggered, but there is no code for it.
Pressing mouse5 after releasing V
"Follow me" is triggered, but there is no code for it and the space in its alias name may cause problems.
---
Whew.
Good luck, take it step by step, and stop using spaces in aliases!
HTH
EDIT: Oh yeah, afaik echo doesnt work since steam...
you dont check the console when you want statusmessages like that
so you have to use the motd-trick
Resupply
Weapons 1
Shotgun
Armour 1
Armour 2
Jp
Dmg 2
bind <key> "impulse 31; wait; impulse 23; wait; impulse 64; wait; impulse 20; wait; impulse 21; wait; impulse 39; wait; impulse 24"
Only issue is that if you have one too few levels to get a jetpack with that sequence, you'll get weapons 2 instead.
bind <key> "impulse 31; wait; impulse 23; wait; impulse 64; wait; impulse 20; wait; impulse 21; wait; impulse 39; wait; impulse 24"
Only issue is that if you have one too few levels to get a jetpack with that sequence, you'll get weapons 2 instead. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
I can live with that. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink-fix.gif' border='0' style='vertical-align:middle' alt='wink-fix.gif' /><!--endemo-->
Thanks a lot civ!
alias weap1 "impulse 23; alias rineUps shirtgun; dev1; motdfile echo.txt; motd_write Weapons 1; dev0"
alias shirtgun "impulse 64; alias rineUps arm1; dev1; motdfile echo.txt; motd_write Shotgun; dev0"
alias arm1 "impulse 20; alias rineUps arm2; dev1; motdfile echo.txt; motd_write Armour 1; dev0"
alias arm2 "impulse 21; alias rineUps jp; dev1; motdfile echo.txt; motd_write Armour 2; dev0"
alias jp "impulse 39; alias rineUps weap2"; dev1; motdfile echo.txt; motd_write Jetpack; dev0
alias weap2 "impulse 24; alias rineUps done; dev1; motdfile echo.txt; motd_write Weapons 2; dev0"
alias done "dev1; motdfile echo.txt; motd_write Upgrades finished; dev0"
alias reset "alias rineUps resup"
reset
bind "key" "rineUps"
bind "key" "reset"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Try that, would work better imo. Change the first bind to the upgrade key, change the second to a key that will reset it, incase you order your jp with only 1 point, for example. Note that it will reset to resup, so you'll have to cycle through again.