Help - Search - Members - Calendar
Full Version: Need A Bit Of Help Re-writing My Scripts...
Unknown Worlds Forums > Natural Selection > Natural Selection Creation > Scripting Discussion
Church
My computer went screwy, and I had no computer gaming for over 2 months. Now, I've reinstalled Natural Selection again, and hope to start having fun again!

The problem is I don't have any of the nice utility scripts I used to have. I remember the gist of it and the basics of scripting, but I can't remember the exact name of most of the command (and I'd also like romano's last inv script as well).

Can someone give me a few pointers on what I need to do to write scripts to do:

1) I want to make +showscores toggle instead of hold.

2) A way to execute a script whenever I get in the comm chair (say...comm.txt) and then whenever I get out, execute "marine.txt" or something

3) Execute scripts whenever I evolve into an alien class. Something like: alias GoFade "impulse xx; exec Fade.txt" bind kp_8 GoFade(is that correct for keypad 8?) or something right? Gotta remember the impulses again

4) Refresh my memory on how to cycle between a few scripts. I use mwheelup for switching to blink or leap, depending on class and # of hives, so mwheelup will need to switch between slot2 and slot3 at the touch of a button. mwheeldown is always slot1. Good for leap/bite.

5) I think I remember how to do a 3-jump script, but I'm dead tired right now...darned dumber of wait is frame-rate dependant. I can get 75 FPS.

6) +popupmenu for the popupmenu right? I need mouse2 for 3-jump so I'll probably rebind the menu to "c" or something.

7) I want 2 simple scripts that ask for meds/ammo and also call for them. I forgot the impulses for that.

8) Not scripting related, but where can I get transparent minimaps with area names?

9) Most importantly. A toggle script that mutes all voice communication and of course can restore them.

IF anyone can help out it'd be great! smile-fix.gif
TheDestroyer
CODE
//ToggleTab 1.0
alias tton "+showscores; bind tab ttoff"
alias ttoff "-showscores; bind tab tton"
bind tab "tton"

//Script Changer
bind f9 "exec marines.cfg"
bind f10 "exec aliens.cfg"
bind f11 "exec comm.cfg"
bind f12 "exec config-normal.cfg"

//Alien Gestator
//skulk
alias goskulk "impulse 113; exec skulk.txt"
bind kp_uparrow goskulk
//Gorge
alias gogorge "impulse 114; exec gorge.txt"
bind kp_leftarrow gogorge
//Lerk
alias golerk "impulse 115; exec lerk.txt"
bind kp_5 golerk
//Fade
alias gofade "impulse 116; exec fade.txt"
bind kp_rightarrow gofade
//Onos
alias goono "impulse 117; exec ono.txt"
bind kp_downarrow goono

//SlotSwitch
alias ss2 "bind mwheelup slot2; bind \ ss3"
alias ss3 "bind mwheelup slot3; bind \ ss2"
bind \ "ss2"
bind mwheelup "slot2"

//JunkDrop Notification
alias healthplz "impulse 10; say_team Need Medpack."
bind - healthplz
alias ammoplz "impulse 11; say_team Need Ammopack."
bind = ammoplz


1- I give you ToogleTab 1.0. Only problem with it is you cant attack with a mouseclick while the scores are up. sad-fix.gif You can move and do everything else, though.
2- Is ScriptChanger what you need?
3- Alien Gestator should do the trick. I think I'm gonna start using that too.
4- SlotSwitch should do it for ya. I think thats what you wanted. It starts mwheelup as slot2, and you press \ to have mwheelup swtich to slot3. Is that what you were talking about?
5- http://www.unknownworlds.com/forums/index....ic=87104&st=75#
6- bind c "+popupmenu"
7- JunkDrop Notification is both Impulse and will say_team for you.
8- Check NSArmsLab
9- Don't know how to

If something is wrong or you want me to make it do something else, just let me know.

Enjoy!
Church
Thanks! And you're sure that kp_downarrow and stuff are the correct key names? smile-fix.gif

The mute all script is often used by competitive players when they play on pubs due to all the...extraneous chatter.

Script changer isn't *exactly* what I'm looking for. I'm looking for somethat auto executes a script whenever I actually get into a comm chair automatically, without me having to press a button, and then executes the normal marine config when I get out. I always forget to press the button to change configs when I'm worried about jumping out to kill the skulk munching the Adv Armory.

Oh yeah, and can some of you guys post the comm configs you have?
stallioN
CODE
alias "+orly" "+use;exec commander.cfg"
alias "-orly" "-use"
bind "x" "+orly"


CODE
alias "tbh" "stopcommandermode;exec marine.cfg"
bind "z" "tbh"
TheDestroyer
QUOTE (Church @ Jul 6 2005, 01:53 PM)
Thanks! And you're sure that kp_downarrow and stuff are the correct key names? smile-fix.gif

Positive. I went and tested it out myself and am adding it to my collection of scripts.

Yea, sorry about the Script Changer...wasn't positive on what you wanted, but it looks like someone beat me to it.
Church
Thanks Stallion! The only problrm is I now need to make two versions of like everything sad-fix.gif One to work in a bs_0 server and one for a bs_1 server. If I execute marine.cfg and it's for a bs_0 server but I'm playing on a bs_1 server when I jump outta the chair with blocked controls I'm gonna get munched.

Let's see...what else do I need...oh yeah. I need the script that fires when you press mouse1, and fires when you release mouse1.
Church
Ok I wrote the double-fire script myself...now all I need is romano's lastinv script...

EDIT: which is the NSArmslab website?
MrRadicalEd
This is in my mega slot script Form, but here is a very short and sweet last slot script

QUOTE

alias ?lastslot "is.slot1"
alias lastslot "slot1"

alias slot1# "slot1;?lastslot;!lastslot;alias ?lastslot is.slot1"
alias is.slot1 "alias !lastslot !@slot1"
alias !@slot1 "alias lastslot slot1#"

alias slot2# "slot2;?lastslot;!lastslot;alias ?lastslot is.slot2"
alias is.slot2 "alias !lastslot !@slot2"
alias !@slot2 "alias lastslot slot2#"

alias slot3# "slot3;?lastslot;!lastslot;alias ?lastslot is.slot3"
alias is.slot3 "alias !lastslot !@slot3"
alias !@slot3 "alias lastslot slot3#"

alias slot4# "slot4;?lastslot;!lastslot;alias ?lastslot is.slot4"
alias is.slot4 "alias !lastslot !@slot4"
alias !@slot4 "alias lastslot slot4#"


replace slots1 through slot4 with slot1#, slot2#, slot3#, and slot4#, and "lastslot" selects the last used slot.
Yes, mp_bs safe
Church
Thanks. I'll give it a try sometime.
2_of_Eight
CODE

// config.cfg
bind kp_uparrow "voicetoggle"

// autoexec.cfg
alias voicetoggle quiet
alias quiet "voice_scale 0.2; developer 1; motd_write Reduced Voice; MOTD; developer 0; alias voicetoggle normal"
alias normal "voice_scale 0.5; developer 1; motd_write Normal Voice; MOTD; developer 0; alias voicetoggle quiet"


And if you want to completely remove voice:

CODE

// config.cfg
bind kp_uparrow "voicetoggle"

// autoexec.cfg
alias voicetoggle quiet
alias quiet "voice_enabled 0; developer 1; motd_write Disabled Voice; MOTD; developer 0; alias voicetoggle normal"
alias normal "voice_enabled 1; developer 1; motd_write Normal Voice; MOTD; developer 0; alias voicetoggle quiet"


And if you want to toggle through 3 settings.

CODE

// config.cfg
bind kp_uparrow "voicetoggle"

// autoexec.cfg
alias voicetoggle quiet
alias quiet "voice_scale 0.2; developer 1; motd_write Reduced Voice; MOTD; developer 0; alias voicetoggle off"
alias off "voice_scale 0.5; voice_enabled 0; developer 1; motd_write Disabled Voice; MOTD; developer 0; alias voicetoggle normal"
alias normal "voice_enabled 1; developer 1; motd_write Normal Voice; MOTD; developer 0; alias voicetoggle quiet"


That should work.
Church
Thanks.

Crud I tried Uzgoz's lastinv script and it's not working for some reason! I need to find romano's original version.
2_of_Eight
Can someone please explain to me what your special lastinv scripts do?
MrRadicalEd
QUOTE (MrRadicalEd @ Jul 6 2005, 11:15 PM)
This is in my mega slot script Form, but here is a very short and sweet last slot script

QUOTE

alias ?lastslot "is.slot1"
alias lastslot "slot1"

alias slot1# "slot1;?lastslot;!lastslot;alias ?lastslot is.slot1"
alias is.slot1 "alias !lastslot !@slot1"
alias !@slot1 "alias lastslot slot1#"

alias slot2# "slot2;?lastslot;!lastslot;alias ?lastslot is.slot2"
alias is.slot2 "alias !lastslot !@slot2"
alias !@slot2 "alias lastslot slot2#"

alias slot3# "slot3;?lastslot;!lastslot;alias ?lastslot is.slot3"
alias is.slot3 "alias !lastslot !@slot3"
alias !@slot3 "alias lastslot slot3#"

alias slot4# "slot4;?lastslot;!lastslot;alias ?lastslot is.slot4"
alias is.slot4 "alias !lastslot !@slot4"
alias !@slot4 "alias lastslot slot4#"


replace slots1 through slot4 with slot1#, slot2#, slot3#, and slot4#, and "lastslot" selects the last used slot.
Yes, mp_bs safe

That above works like the normal lastinv function.. only client side, but it's stripped down from my slot script Form.
2_of_Eight
If your long scripts works just like lastinv, why would someone use it? Is there an advantage to using it?
Explain, I don't get it sad-fix.gif
goldenrod
I think it's supposed to reduce the lag from lastinv..I use one, but I don't notice any difference.
MrRadicalEd
as crazy as it might seem.. some people prefer the scripted way because the last slot is always remembered and never defaults.

http://www.unknownworlds.com/forums/index....=lastinv+script

it just so happens my method is a bit shorter.
Uzguz
QUOTE (Church @ Jul 8 2005, 02:08 PM)
Thanks.

Crud I tried Uzgoz's lastinv script and it's not working for some reason!  I need to find romano's original version.

Since I can't be arsed digging up the version I posted several months ago, here's the one I use now, taken right out of my config and guaranteed to be bug-free*:

CODE
// Romano's Lastinv script without mousewheel support
// Extended to include +/- floodguards and the reset functionality from my lastinv script

// Executing this config will set up all necessary binds

alias +kk1a "kkslot1"
alias +kk1b "kkslot1; bind q +kk2a"
alias +kk1c "kkslot1; bind q +kk3a"
alias +kk1d "kkslot1; bind q +kk4a"
alias -kk1a ""
alias -kk1b ""
alias -kk1c ""
alias -kk1d ""
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 -kk2a ""
alias -kk2b ""
alias -kk2c ""
alias -kk2d ""
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 -kk3a ""
alias -kk3b ""
alias -kk3c ""
alias -kk3d ""
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 -kk4a ""
alias -kk4b ""
alias -kk4c ""
alias -kk4d ""
alias kkslot4 "slot4; bind 1 +kk1d; bind 2 +kk2d; bind 3 +kk3d; bind 4 +kk4d"

// Uzguz's awesome reset feature

alias kkra "kkslot1; bind q +kk1a"
alias kkrb "kkslot1; bind q +kk2a"
alias kkrc "kkslot1; bind q +kk3a"
alias kkrd "kkslot1; bind q +kk4a"

alias +kkrsa "alias +lastinv_reset kkra"
alias +kkrsb "alias +lastinv_reset kkrb"
alias +kkrsc "alias +lastinv_reset kkrc"
alias +kkrsd "alias +lastinv_reset kkrd"
alias -kkrsa ""
alias -kkrsb ""
alias -kkrsc ""
alias -kkrsd ""

// The actual reset alias is given a generic name for compatibility with
// Uzguz's team-join configs (they rebind mouse2, which, for Aliens, is +lastinv_reset).
alias +lastinv_reset "kkrb"
alias -lastinv_reset ""
alias lastinv_reset "kkrb"
alias lastinv_reinit "kkrb; alias +lastinv_reset kkrb; alias lastinv_reset kkrb"

bind q "+kk2a"

bind 1 "+kk1a"
bind 2 "+kk2a"
bind 3 "+kk3a"
bind 4 "+kk4a"

bind f9  "+kkrsa"
bind f10 "+kkrsb"
bind f11 "+kkrsc"
bind f12 "+kkrsd"

bind ] "+lastinv_reset"

*Depending on whether or not you call Marine slot4 problems a bug. Unfortunately, there isn't a remotely clean workaround.

You might want to change some of the keys - specifically, if you're planning on using it, you'll want +lastinv_reset on a mouse button. Hijacking the F9-F12 keys might conflict with your config too.

The only other thing you'll want to do is add lastinv_reinit to your team-join binds/configs. Other than that, copy this in and you're good to go.
MrRadicalEd
What does all that do actually? I've never used it before, but appears to do more then use the last selected slot for any given weapon slot.
Uzguz
When +lastinv_reset is executed, it switches weapon to slot1 and overwrites the lastinv slot with something else. By default, that something else is slot2, but it can be changed with the +kkrsa-d commands. It looks bloated because of the +/- floodguards.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.