Server Info

Enemy Territory Scripting: Scripte

Inhaltsverzeichnis

Namenswechsel

bind "0" "$nameswitch"
// NAME SCRIPT										clandooc.de
set "name1" "ui_name '^1nick^31'; ui_clanTag '^1[DooC]*'; nameswitch vstr name2"
set "name2" "ui_name '^1nick^32'; ui_clanTag ''; nameswitch vstr name1"
set "nameswitch" "vstr name1"

Wenn man nun die Taste "0" drückt, wird der Nick gewechselt.

Dieses Script ist auf beliebig viele Nicks erweiterbar.

Vollbild/Fenster Wechsel

bind "f11" "vstr fSc" "ALT" "default"
// Vollbild-/Fenster-Wechsel										clandooc.de
set fSc "vstr fSc1"
seta fSc1 "r_fullscreen 0; vid_restart; set fSc 'vstr fSc2'"
seta fSc2 "r_fullscreen 1; vid_restart; set fSc 'vstr fSc1'"

Wenn man nun die Tasten "ALT F11" drückt, wird zwischen Fenster- und Vollbildmodus gewechselt.

FOV-Toggle

bind MOUSE4 "vstr fov_toggle"
// FOV-Toggle										clandooc.de
seta fov_toggle "vstr fov_toggle1"
seta fov_toggle1 "g_fov 120; fov_toggle 'vstr fov_toggle2'; addChatLine 'fov now 120'"
seta fov_toggle2 "g_fov 90; fov_toggle 'vstr fov_toggle1'; addChatLine 'fov now 90'"

Drückt man nun die Taste Mouse4, so wird die Sichtbreite gewechselt (g_fov) und ausgegeben (echo).

DemoToggle

bind "BACKSPACE" "toggleNetDemo"

Oder mit Ausgabe:

bind BACKSPACE "$demo_toggle"
seta demo_toggle "vstr demo_on"
seta demo_on "echo ^c**^7Recording: Started^c**; recordNetDemo; set demo_toggle vstr demo_off"
seta demo_off "echo ^c**^7Recording: Stopped^c**; stopNetDemo; set demo_toggle vstr demo_on"

Mit Backspace wird das Aufnehmen einer Demo gestartet / gestoppt.

TeamWechsel

(etpro only)

bind "DOWNARROW" "clientTeam spectator; echo '^g-->^0[^2Spec^0]'" "" "default"
bind LEFTARROW "clientTeam gdf; echo '^g-->^0[^4Gl^7D^1F^0]'"
bind RIGHTARROW "clientTeam strogg; echo '^g-->^0[^4S^7t^1rogg^0]'"

Pfeil Runter: Spectator (Zuschauer)

Pfeil Links: GDF

Pfeil Rechts: Strogg

Klassenwechsel

Wir belegen für dieses Script die Tasten F6 bis F12.

Dabei werden F8 bis F12 für die 5 Klassen, eine Taste für jede Klasse, inklusive Durchschalt-Funktion für die verschiedenen Waffen (sofern vorhanden), belegt.
Dazu F6 als Schnelltaste zum direkten Engi/Constructor-Spawn und F7 um die Klasse seinem Team zu melden.
Denkbar ist hierbei die F6 Taste je nach Karte zu ändern, welche Klasse dort später schnell gebraucht wird.

Da Strogg und GDF ganz andere Klassenbezeichnungen haben nutzen wir das Kontext-Binding um möglichst wenig Code zu brauchen.

// set Strogg and GDF contexts
seta g_class_context_aggressor "team_strogg"
seta g_class_context_technician "team_strogg"
seta g_class_context_constructor "team_strogg"
seta g_class_context_oppressor "team_strogg"
seta g_class_context_infiltrator "team_strogg"
seta g_class_context_soldier "team_gdf"
seta g_class_context_medic "team_gdf"
seta g_class_context_engineer "team_gdf"
seta g_class_context_fieldops "team_gdf"
seta g_class_context_covertops "team_gdf"
seta g_bind_context_anansi "team_gdf"        // Anansi Attack'Copter
seta g_bind_context_badger "team_gdf"        // Armadillo Truck, Badger
seta g_bind_context_bumblebee "team_gdf"     // bumblebee
seta g_bind_context_desecrator "team_strogg" // Desecrator, strogg tank
seta g_bind_context_goliath "team_strogg"    // Cyclops, Goliath, "walker"
seta g_bind_context_hog "team_strogg"        // hog scout
seta g_bind_context_hornet "team_strogg"     // Tormentor, strogg flyer
seta g_bind_context_husky "team_gdf"         // Husky
seta g_bind_context_icarus "team_strogg"     // Icarus "jetpack"
seta g_bind_context_mcp "team_gdf"           // MCP
seta g_bind_context_platypus "team_gdf"      // platypus gdf boat
seta g_bind_context_titan "team_gdf"         // Titan tank
seta g_bind_context_trojan "team_gdf"        // trojan APC

seta myclass “currently ^cSp^3ectator” bind F6 “clientClass engineer; kill; addchatline ‘^g***^1Engineer^3*^2Assault Rifle’; seta myclass ‘^g***^1Engineer^3*^2Assault Rifle’” "" “team_gdf” bind F6 “clientClass constructor; kill; addchatline ‘^g***^2Constructor^c*^3Lacerator’; seta myclass ‘^g***^2Constructor^c*^3Lacerator’” "" “team_strogg”

bind F7 “sayTeam $myClass” "" “default”

// //// GDF //——— //Soldier seta class_soldier1 “ClientClass Soldier 0; addChatLine ‘^g***^1Soldier^3*^23Assault Rifle’; bind F8 $class_soldier2 '' ‘team_gdf’; myClass ‘^g***^1Soldier^3*^2Assault Rifle’” seta class_soldier2 “ClientClass Soldier 1; addChatLine ‘^g***^1Soldier^3*^2Rocket Launcher’; bind F8 $class_soldier3 '' ‘team_gdf’; myClass ‘^g***^1Soldier^3*^2Rocket Launcher’” seta class_soldier3 “ClientClass Soldier 2; addChatLine ‘^g***^1Soldier^3*^2GPMG’; bind F8 $class_soldier4 '' ‘team_gdf’; myClass ‘^g***^1Soldier^3*^2GPMG’” seta class_soldier4 “ClientClass Soldier 3; addChatLine ‘^g***^1Soldier^3*^2Shotgun’; bind F8 $class_soldier1 '' ‘team_gdf’; myClass ‘^g***^1Soldier^3*^2Shotgun’” bind F8 $class_soldier1 "" “team_gdf” //Medic seta class_medic1 “ClientClass Medic 0; addChatLine ‘^g***^1Medic^3*^2Assault Rifle’; bind F9 $class_medic2 '' ‘team_gdf’; myClass ‘^g***^1Medic^3*^2Assault Rifle’” seta class_medic2 “ClientClass Medic 1; addChatLine ‘^g***^1Medic^3*^2Shotgun’; bind F9 $class_medic1 '' ‘team_gdf’; myClass ‘^g***^1Medic^3*^2Shotgun’” bind F9 $class_medic1 "" “team_gdf” //Engineer seta class_engineer1 “ClientClass Engineer 0; addChatLine ‘^g***^1Engineer^3*^2Assault Rifle’; bind F10 $class_engineer2 '' ‘team_gdf’; myClass ‘^g***^1Engineer^3*^2Assault Rifle’” seta class_engineer2 “ClientClass Engineer 1; addChatLine ‘^g***^1Engineer^3*^2Shotgun’; bind F10 $class_engineer3 '' ‘team_gdf’; myClass ‘^g***^1Engineer^3*^2Shotgun’” seta class_engineer3 “ClientClass Engineer 2; addChatLine ‘^g***^1Engineer^3*^2Grenade Rifle’; bind F10 $class_engineer1 '' ‘team_gdf’; myClass ‘^g***^1Engineer^3*^2Grenade Rifle’” bind F10 $class_engineer1 "" “team_gdf” //FieldOp seta class_fieldop1 “ClientClass FieldOps 0; addChatLine ‘^g***^1FieldOps^3*^2Assault Rifle’; bind F11 $class_fieldop2 '' ‘team_gdf’; myClass ‘^g***^1FieldOps^3*^2Assault Rifle’” seta class_fieldop2 “ClientClass FieldOps 1; addChatLine ‘^g***^1FieldOps^3*^2Scoped Assault Rifle’; bind F11 $class_fieldop1 '' ‘team_gdf’; myClass ‘^g***^1FieldOps^3*^2Scoped Assault Rifle’” bind F11 $class_fieldop1 "" “team_gdf” //CovertOp seta class_covops1 “ClientClass CovertOps 0; addChatLine ‘^g***^1Covert Ops^3*^2Scoped Assault Rifle’; bind F12 $class_covops2 '' ‘team_gdf’; myClass ‘^g***^1Covert Ops^3*^2Scoped Assault Rifle’” seta class_covops2 “ClientClass CovertOps 1; addChatLine ‘^g***^1Covert Ops^3*^2Sniper Rifle’; bind F12 $class_covops1 '' ‘team_gdf’; myClass ‘^g***^1Covert Ops^3*^2Sniper Rifle’” bind F12 $class_covops1 "" “team_gdf” // //// STROGG //———— //Aggressor seta class_aggressor1 “clientClass aggressor 0; addchatline ‘^g***^2Aggressor^c*^3Lacerator’; bind F8 $class_aggressor2 '' ‘team_strogg’; myClass ‘^g***^2Aggressor^c*^3Lacerator’”" seta class_aggressor2 “clientClass aggressor 1; addchatline ‘^g***^2Aggressor^c*^3Obliterator’; bind F8 $class_aggressor3 '' ‘team_strogg’; myClass ‘^g***^2Aggressor^c*^3Obliterator’” seta class_aggressor3 “ClientClass Aggressor 2; addChatLine ‘^g***^2Aggressor^c*^3Hyperblaster’; bind F8 $class_aggressor4 '' ‘team_strogg’; myClass ‘^g***^2Aggressor^c*^3Hyperblaster’” seta class_aggressor4 “ClientClass Aggressor 3; addChatLine ‘^g***^2Aggressor^c*^3Nailgun’; bind F8 $class_aggressor1 '' ‘team_strogg’; myClass ‘^g***^2Aggressor^c*^3Nailgun’” bind F8 $class_aggressor1 "" “team_strogg” //Technician seta class_technician1 “ClientClass Technician 0; addChatLine ‘^g***^2Technician^c*^3Lacerator’; bind F9 $class_technician2 '' ‘team_strogg’; myClass ‘^g***^2Technician^c*^3Lacerator’” seta class_technician2 “ClientClass Technician 1; addChatLine ‘^g***^2Technician^c*^3Nailgun’; bind F9 $class_technician1 '' ‘team_strogg’; myClass ‘^g***^2Technician^c*^3Nailgun’” bind F9 $class_technician1 "" “team_strogg” //Constructor seta class_constructor1 “ClientClass Constructor 0; addChatLine ‘^g***^2Constructor^c*^3Lacerator’; bind F10 $class_constructor2 '' ‘team_strogg’; myClass ‘^g***^2Constructor^c*^3Lacerator’” seta class_constructor2 “ClientClass Constructor 1; addChatLine ‘^g***^2Constructor^c*^3Nailgun’; bind F10 $class_constructor3 '' ‘team_strogg’; myClass ‘^g***^2Constructor^c*^3Nailgun’” seta class_constructor3 “ClientClass Constructor 2; addChatLine ‘^g***^2Constructor^c*^3Plasma Launcher’; bind F10 $class_constructor1 '' ‘team_strogg’; myClass ‘^g***^2Constructor^c*^3Plasma Launcher’” bind F10 $class_constructor1 "" “team_strogg” //Oppressor seta class_oppressor1 “ClientClass Oppressor 0; addChatLine ‘^g***^2Oppressor^c*^3Lacerator’; bind F11 $class_oppressor2 '' ‘team_strogg’; myClass ‘^g***^2Oppressor^c*^3Lacerator’” seta class_oppressor2 “ClientClass Oppressor 1; addChatLine ‘^g***^2Oppressor^c*^3Accurized Lacerator’; bind F11 $class_oppressor1 '' ‘team_strogg’; myClass ‘^g***^2Oppressor^c*^3Accurized Lacerator’” Bind F11 $class_oppressor1 "" “team_strogg” //Infiltrator seta class_infiltrator1 “ClientClass Infiltrator 0; addChatLine ‘^g***^2Infiltrator^c*^3Accurized Lacerator’; bind F12 $class_infiltrator2 '' ‘team_strogg’; myClass ‘^g***^2Infiltrator^c*^3Accurized Lacerator’” seta class_infiltrator2 “ClientClass Infiltrator 1; addChatLine ‘^g***^2Infiltrator^c*^3Railgun’; bind F12 $class_infiltrator1 '' ‘team_strogg’; myClass ‘^g***^2Infiltrator^c*^3Railgun’” bind F12 $class_infiltrator1 "" “team_strogg”

echo “^g***^1class-Scripts loaded”