Jump to content

Home

post your scripts here!


nabroc

Recommended Posts

Due to lacking servers to play on with my newly patched game, I was a little bored yesterday and decided to write a little weapon script which might be useful for others as well. Maybe this thread can serve as an exchange platform for scripts or just some useful settings people have stumbled upon, I'll start of with the ones I use ...

btw, I'm new to scripting on the quake engine - so if you think ther's a more elagant solution I'm grateful for any constructive criticism heading my way :).

 

Ok 1st thing make a BACKUP of your single/multiplayer and autoexec config files just to be on the safe side

 

I've place all my scripts into the autoexec.cfg file (if it ain't there yet, create an empty file), though seperate script files could be an alternative.

 

***

 

Ever wonder how to increase the chat msg display time (thanks to ScribeJC for this one)?

place this in the autoexec.cfg (I was told it needs to be executed every time and mpconf file ain't an option)

//

// chat-msgtime x4 (default=3):

set con_notifytime 12

---

A Run-Walk toggle (not my creation either, forgot where I've seen this though):

This will bind it to the TAB key, change to your liking

 

// walk-run toggle

set speedn "+speed;wait;set speedtoggle vstr speedf"

set speedf "-speed;wait;set speedtoggle vstr speedn"

set speedtoggle "vstr speedf"

bind TAB "vstr speedtoggle"

---

A FPS meter toggle:

 

// show FPS toggle

set fpson "cg_drawFPS 1;wait;set fpstoggle vstr fpsoff"

set fpsoff "cg_drawFPS 0;wait;set fpstoggle vstr fpson"

set fpstoggle "vstr fpsoff"

bind KP_END "vstr fpstoggle"

---

A lagometer toggle:

 

// show lagometer toggle

set lagomon "cg_lagometer 1;wait;set lagomtoggle vstr lagomoff"

set lagomoff "cg_lagometer 0;wait;set lagomtoggle vstr lagomon"

set lagomtoggle "vstr lagomon"

bind KP_DOWNARROW "vstr lagomtoggle"

---

A weapon script, this might deserve some explaining (experienced scripters might just read the script ...). I wanted a fast way to select weapons and tabing different keys for each weapon nor browsing all of em to get a specific gun, seemed innefficient to me. What I did is to place the different weapons in categories and assign a key for each group, which in addition to a group selection also serves as a toggle key for individual weapons in that group. While browsing the cmd-list for JO, I've also stumbled upon a cmd which can be used for a zoom mode (yeah I know, prolly old news for the ol scripters ;)). What I did is to assign a single key for toggling lightsaber stances and that key will also function as a zoom toggle if certain weapons (those of the accurate weapon class) are selected via the script (it will not work if you call a weapon by a key you've assigned to ingame).

The way it's set up now

 

Key Function

1 Lightsaber

2 call accurate weapon group, toggle between Pistol, Bowcaster, Disrupter (in that order)

3 call assault weapon group, toggle between Repeater, Flechette, Blaster rifle, Merr_Sonn

4 call grenades and demolishion group, toggle Thermal Detonator,Trip Mine,Detonator Pak

SPACE toggle light-saber stances (if Saber is current weapon), toggle zoom mode for the accurate weapon group

 

notes: The script will alway call the 1st weapon in the list (providing atleast one of em is in the inventory), upon changing weapon groups with a single keypress cause I don't like to be surprised with the weapon that'll pop up once I select a group :D (the 'pointer' will be reset after each group change - example: if you have all weapons in the assault group the Repeater will always be the weapon selected upon activating that group, if the Repeater is missing it'll be the Flechette etc.). However it might be necessary to press the key multiple times to toggle guns therafter if some weapons in the group aren't in the inventory (I haven't found a way arround this yet).

 

Zoom Mode will also change the mouse sensitivity and CrosshairSize as long as it's active, users might want to check the line for the regular view (set zoom2 ....) and ajust the values to the ones they've used before (check your jk2mpconf.cfg). If Zoom mode is active it'll automatically be disabled upon group and or weapon switches via this script assigned weapon keys and zoom can only be activated for the accurate group (e.g. if you have turned zoom on, switched to the saber for example by any other key then the one assigned to the lighsaber in this script you'll have to saber fight with binocs glued to your face :D lol). And one more thing, upon joining a server you'll need to hit the "2" key once before the zoom mode toggle will function for the pistol after the player has spawned (this is a one time operation on a 'per server' basis, subsequent spawns after being killed does not require this. It can be changed for players who only play on servers with guns, but if you'll also play on saber only, altering this would put up the need to call saber group befor the saber stances could be toggled; this way it made more sense to me).

 

toy with this script to your own likings (which keys stuff is bound too, zoom magification etc.), my primary intension was to give an example ;).

 

//

// Weapon Sript by nabroc

//

// zoomtoggle

set zoom1 "set cg_fov 15;sensitivity 2;set cg_crosshairSize 96;set zoom vstr zoom2"

set zoom2 "set cg_fov 100;sensitivity 16.8;set cg_crosshairSize 24;set zoom vstr zoom1"

set zoom "vstr zoom2"

// disable the anoying autoaim feature (it's on by default)

set cg_dynamicCrosshair "0"

//

// weapon toggles

//

// Light-Saber

bind Y "weapon 1;vstr zoom2;set sniper vstr sniper1;set throw vstr throw1;set skirm vstr skirm1;unbind SPACE;bind SPACE saberAttackCycle"

bind 1 "weapon 1;vstr zoom2;set sniper vstr sniper1;set throw vstr throw1;set skirm vstr skirm1;unbind SPACE;bind SPACE saberAttackCycle"

bind SPACE "saberAttackCycle"

//

// Accurate: blaster pistol(2) - bowcaster(5) - Disrupter(4), zoomtoggle to SPACE

set sniper1 "weapon 5;vstr sniper2;unbind SPACE;bind SPACE vstr zoom;vstr zoom2;set throw vstr throw1;set skirm vstr skirm1;set sniper vstr sniper2"

set sniper2 "weapon 4;vstr zoom2;set sniper vstr sniper03"

set sniper3 "weapon 2;vstr zoom2;set sniper vstr sniper01"

set sniper "vstr sniper1"

bind 2 "weapon 2;weapon 4;vstr sniper"

//

// Assault: Repeater(6) - Flechette(8)- Blaster rifle(3) - Merr_Sonn(9)

set skirm1 "weapon 6;unbind SPACE;vstr zoom2;set throw vstr throw1;set sniper vstr sniper1;set skirm vstr skirm2"

set skirm2 "weapon 8;set skirm vstr skirm3"

set skirm3 "weapon 3;set skirm vstr skirm4"

set skirm4 "weapon 9;set skirm vstr skirm1"

set skirm "vstr skirm1"

bind 3 "weapon 9;weapon 3;weapon 8;wait;vstr skirm"

//

// Throwing: Thermal Detonator(10) - Trip Mine(11) - Detonator Pak(12)

set throw1 "weapon 10;vstr throw2;unbind SPACE;vstr zoom2;set sniper vstr sniper1;set skirm vstr skirm1;set throw vstr throw2"

set throw2 "weapon 11;set throw vstr throw3"

set throw3 "weapon 12;set throw vstr throw1"

set throw "vstr throw1"

bind 4 "weapon 12;weapon 11;vstr throw"

Link to comment
Share on other sites

// script for key 2 --- 8 flachette, 5 bowcaster

set weap2a "echo ****^3FLACHETTE; weapon 8; bind 2 vstr weap2b; bind 3 vstr weap3a; bind 4 vstr weap4a"

set weap2b "echo ****^3BOW; weapon 5; bind 2 vstr weap2a"

bind 2 "vstr weap2a"

 

// script for key 3 --- 6 repeater, 3 blaster rifle, 2 bryar blaster

set weap3a "echo ****^3REPEATER; weapon 6; bind 3 vstr weap3b; bind 2 vstr weap2a; bind 4 vstr weap4a"

set weap3b "echo ****^3BLASTER ^4RIFLE; weapon 3; bind 3 vstr weap3c"

set weap3c "echo ****^3BRYAR ^4BLASTER; weapon 2; bind 3 vstr weap3a"

bind 3 "vstr weap3a"

 

// script for key 4 --- 9 Rocket, , 4 disruptor, 7 demp2

set weap4a "echo ****^3ROCKETS; weapon 9; bind 4 vstr weap4b; bind 2 vstr weap2a; bind 3 vstr weap3a;"

set weap4b "echo ****^3DISRUPTOR; weapon 4; bind 4 vstr weap4c"

set weap4c "echo ****^3DEMP2; weapon 7; bind 4 vstr weap4a"

bind 4 "vstr weap4a"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...