Add custom movement and gameplay features
This commit is contained in:
+2
-2
@@ -29,7 +29,7 @@ const __maps_tktf [ac_africa ac_alcove ac_aqueous ac_arabian ac_arctic2 ac_arid
|
||||
// Start maps.
|
||||
const __genmapitems [
|
||||
looplisti $arg1 m [
|
||||
menuitemmapload $m [map @m]
|
||||
menuitemmapload $m [map @m; if (= (curmastermode) 2) [ showmenu [Match Settings] ] ]
|
||||
[nextmap_@m] = (at $arg1 (mod (+ $i 1) @(listlen $arg1)))
|
||||
]
|
||||
]
|
||||
@@ -37,7 +37,7 @@ const __genmapitems [
|
||||
newmenu all_custom_maps
|
||||
menutitle "custom maps"
|
||||
menurenderoffset -20 0
|
||||
menudirlist "packages/maps" cgz [map $arg1]
|
||||
menudirlist "packages/maps" cgz [map $arg1; if (= (curmastermode) 2) [ showmenu [Match Settings] ] ]
|
||||
|
||||
newmenu maps
|
||||
__genmapitems $__maps_all
|
||||
|
||||
@@ -4,7 +4,7 @@ newmenu botmaps
|
||||
|
||||
const genbotmaps [
|
||||
looplist $arg1 listmapname [
|
||||
menuitemmapload $listmapname (concat "tmp_botmap =" $listmapname "; startbotmap")
|
||||
menuitemmapload $listmapname (concat "tmp_botmap =" $listmapname "; showmenu [Match Settings]")
|
||||
]
|
||||
]
|
||||
// problems with quite a number of maps when playing against bots (waypoints simply flooded) have lead to generating lists to avoid these
|
||||
|
||||
+116
-13
@@ -84,6 +84,7 @@ menuinit [
|
||||
menuitem "Kick/ban player\i\3" [ showmenu kick/ban ]
|
||||
menuitem "Adjust teams\i\3" [ showmenu [Team adjustment] ]
|
||||
menuitem "Change mastermode\i\3" [ showmenu Mastermode ]
|
||||
menuitem "Match Settings\i\3" [ showmenu [Match Settings] ]
|
||||
menuitem "Change the server description\i\3" [ saycommand "/serverdesc " ]
|
||||
menuitem "Find a players IP address\i\3" [ saycommand "/whois " ]
|
||||
menuitem "Give admin\i\3" [ showmenu [give admin] ]
|
||||
@@ -159,7 +160,114 @@ menuitem [Turn auto-team off] [ autoteam 0 ]
|
||||
newmenu Mastermode
|
||||
menuitem [Unlock the server (open)] [ mastermode 0 ]
|
||||
menuitem [Lock the server (private)] [ mastermode 1 ]
|
||||
menuitem [Lock the server (match mode)] [ mastermode 2 ]
|
||||
menuitem [Lock the server (match mode)] [ mastermode 2; showmenu [Match Settings] ]
|
||||
|
||||
//// In-Game admin > Match Settings ////
|
||||
|
||||
newmenu [Match Settings]
|
||||
menuinit [ ]
|
||||
menuitemslider "Recoil Multiplier: " 50 500 "$matchrecoilmul" 10 [ matchrecoilmul $arg1 ]
|
||||
menuitemslider "Spread Multiplier: " 50 500 "$matchspreadmul" 10 [ matchspreadmul $arg1 ]
|
||||
menuitemslider "Speed Multiplier: " 50 500 "$matchspeedmul" 10 [ matchspeedmul $arg1 ]
|
||||
menuitemslider "Gravity Multiplier: " 50 500 "$matchgravity" 10 [ matchgravity $arg1 ]
|
||||
menuitem "" -1
|
||||
menuitemcheckbox "Enable Assists: " "$matchassist" [ matchassist $arg1 ]
|
||||
menuitem "" -1
|
||||
menuitem "Friendly Fire\i\3" [ showmenu [Match Friendly Fire] ]
|
||||
menuitem "" -1
|
||||
menuitem "Spawn Weapons\i\3" [ showmenu [Match Spawn Weapons] ]
|
||||
menuitem "" -1
|
||||
menuitem "\f2Start Bot Match" [ startbotmap ]
|
||||
menuitem "" -1
|
||||
menuitem "Reset to defaults (100%)" [ matchrecoilmul 100; matchspreadmul 100; matchspeedmul 100; matchgravity 100; matchassist 1; matchfriendlyfire 1; matchspawnprimary 6; matchspawnsecondary 1; matchspawntertiary 0; matchspawnquaternary -1 ]
|
||||
menuitem "Back" [ showmenu Mastermode ]
|
||||
|
||||
//// In-Game admin > Match Settings > Friendly Fire ////
|
||||
|
||||
newmenu [Match Friendly Fire]
|
||||
menuinit [ ]
|
||||
menuitem "Off (no damage)" [ matchfriendlyfire 0; showmenu [Match Settings] ]
|
||||
menuitem "On (normal)" [ matchfriendlyfire 1; showmenu [Match Settings] ]
|
||||
menuitem "Off + no shoot teammates" [ matchfriendlyfire 2; showmenu [Match Settings] ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ showmenu [Match Settings] ]
|
||||
|
||||
//// In-Game admin > Match Settings > Spawn Weapons ////
|
||||
|
||||
newmenu [Match Spawn Weapons]
|
||||
menuinit [ ]
|
||||
menutitle "Select weapons to spawn with (order = priority)"
|
||||
menuitem "Primary Weapon\i\3" [ showmenu [Match Spawn Primary] ]
|
||||
menuitem "Secondary Weapon\i\3" [ showmenu [Match Spawn Secondary] ]
|
||||
menuitem "Tertiary Weapon\i\3" [ showmenu [Match Spawn Tertiary] ]
|
||||
menuitem "Quaternary Weapon\i\3" [ showmenu [Match Spawn Quaternary] ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ showmenu [Match Settings] ]
|
||||
|
||||
//// In-Game admin > Match Settings > Spawn Weapons > Primary ////
|
||||
|
||||
newmenu [Match Spawn Primary]
|
||||
menuinit [ ]
|
||||
menuitem "Knife" [ matchspawnprimary 0; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Pistol" [ matchspawnprimary 1; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Carbine" [ matchspawnprimary 2; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Shotgun" [ matchspawnprimary 3; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Subgun" [ matchspawnprimary 4; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Sniper" [ matchspawnprimary 5; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Assault" [ matchspawnprimary 6; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Grenade" [ matchspawnprimary 7; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Akimbo" [ matchspawnprimary 8; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ showmenu [Match Spawn Weapons] ]
|
||||
|
||||
//// In-Game admin > Match Settings > Spawn Weapons > Secondary ////
|
||||
|
||||
newmenu [Match Spawn Secondary]
|
||||
menuinit [ ]
|
||||
menuitem "Knife" [ matchspawnsecondary 0; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Pistol" [ matchspawnsecondary 1; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Carbine" [ matchspawnsecondary 2; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Shotgun" [ matchspawnsecondary 3; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Subgun" [ matchspawnsecondary 4; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Sniper" [ matchspawnsecondary 5; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Assault" [ matchspawnsecondary 6; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Grenade" [ matchspawnsecondary 7; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Akimbo" [ matchspawnsecondary 8; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ showmenu [Match Spawn Weapons] ]
|
||||
|
||||
//// In-Game admin > Match Settings > Spawn Weapons > Tertiary ////
|
||||
|
||||
newmenu [Match Spawn Tertiary]
|
||||
menuinit [ ]
|
||||
menuitem "Knife" [ matchspawntertiary 0; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Pistol" [ matchspawntertiary 1; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Carbine" [ matchspawntertiary 2; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Shotgun" [ matchspawntertiary 3; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Subgun" [ matchspawntertiary 4; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Sniper" [ matchspawntertiary 5; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Assault" [ matchspawntertiary 6; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Grenade" [ matchspawntertiary 7; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Akimbo" [ matchspawntertiary 8; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ showmenu [Match Spawn Weapons] ]
|
||||
|
||||
//// In-Game admin > Match Settings > Spawn Weapons > Quaternary ////
|
||||
|
||||
newmenu [Match Spawn Quaternary]
|
||||
menuinit [ ]
|
||||
menuitem "Knife" [ matchspawnquaternary 0; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Pistol" [ matchspawnquaternary 1; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Carbine" [ matchspawnquaternary 2; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Shotgun" [ matchspawnquaternary 3; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Subgun" [ matchspawnquaternary 4; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Sniper" [ matchspawnquaternary 5; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Assault" [ matchspawnquaternary 6; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Grenade" [ matchspawnquaternary 7; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "Akimbo" [ matchspawnquaternary 8; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "None" [ matchspawnquaternary -1; showmenu [Match Spawn Weapons] ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ showmenu [Match Spawn Weapons] ]
|
||||
|
||||
//// In-Game admin > give admin ////
|
||||
// hardcoded
|
||||
@@ -179,12 +287,11 @@ menuitem [Force serverlist update] [ updatefrommaster 1; ifauthsetup joinserverm
|
||||
//// Main > Multiplayer > Custom connect ////
|
||||
|
||||
newmenu [Custom connect]
|
||||
menuinit [ tempalias cc1 []; tempalias cc2 []; tempalias cc3 [] ] // Resets the aliases
|
||||
menuinit [ tempalias cc1 []; tempalias cc2 [] ] // Resets the aliases
|
||||
menuitemtextinput "Server IP/DNS: \t\t" [] [ cc1 = $arg1 ] [] 255
|
||||
menuitemtextinput "Server port (optional): \t" [] [ cc2 = $arg1 ] [] 6
|
||||
menuitemtextinput "Server password (optional): \t" [] [ cc3 = $arg1 ] [] 128 1
|
||||
menuitem "" -1
|
||||
menuitem "\f2\t\t [ Connect ]\t\t\t" [ connect $cc1 $cc2 $cc3 ]
|
||||
menuitem "\f2\t\t [ Connect ]\t\t\t" [ connect $cc1 $cc2 ]
|
||||
|
||||
//// Main > Multiplayer > Admin connect ////
|
||||
|
||||
@@ -304,21 +411,17 @@ menuitem "(type just names of categories, and not tags)." -1
|
||||
menuinitselection 2
|
||||
|
||||
|
||||
// connecting from the serverbrowser to a password-protected server
|
||||
// connecting from the serverbrowser to a server with restricted access
|
||||
// called by sbconnect
|
||||
|
||||
newmenu [password required]
|
||||
newmenu [server restricted]
|
||||
menuinit [
|
||||
resetcurmenu
|
||||
sbpwd = ""
|
||||
menuitem $sbmsg -1
|
||||
menuitem "You need a password to join it." -1
|
||||
menuitem "" -1
|
||||
menuitemtextinput "Password: \t" [] [ sbpwd = $arg1 ] [] 128 1
|
||||
menuitem "" -1
|
||||
menuitem "\f2\t\t [ Connect ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport $sbpwd ]
|
||||
menuitem "\f2\t\t [ Connect without password ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport ]
|
||||
menuinitselection 3
|
||||
menuitem "\f2\t\t [ Connect ]\t\t" [ echo connecting to $sbdesc ; connect $sbdns $sbport ]
|
||||
menuitem "\f2\t\t [ Cancel ]\t\t" [ showmenu "" ]
|
||||
menuinitselection 2
|
||||
]
|
||||
|
||||
newmenu getmap
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// =====================================
|
||||
// WARNING: You can NOT use CubeScript in here!!
|
||||
|
||||
// accept nickname [IP range ...] [password ...] // add this nickname to the whitelist
|
||||
// (if IP ranges are specified, only connects from that ranges are allowed; if one or more passwords are specified, the connect password has to match)
|
||||
// accept nickname [IP range ...] // add this nickname to the whitelist
|
||||
// (if IP ranges are specified, only connects from that ranges are allowed)
|
||||
// block nicknamefragment1 [nicknamefragment2 ...] // block nicknames that contain all specified fragments (up to 5)
|
||||
// blocki nicknamefragment1 [nicknamefragment2 ...] // block nicknames that contain all specified fragments (up to 5), ignore cases
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
// clan whitelist example: a clan named 'DEV' with two members, 'foo' and 'bar'
|
||||
// accept DEV|foo 1.2.3.4 // foo has a static IP; no password required
|
||||
// accept DEV|bar 192.168.0.0/16 pwdpwd // bar has a dynamic IP from that range; in addition, the connect password has to match 'pwdpwd'
|
||||
// accept DEV|bar 192.168.0.0/16 // bar has a dynamic IP from that range
|
||||
// block DEV| // don't allow anyone else to wear the clan tag
|
||||
|
||||
|
||||
+5
-9
@@ -278,19 +278,15 @@ const toggleshowmap [ showmap 1; onrelease [ showmap 0 ] ]
|
||||
// arg6 1: banned, 2: blacklisted 3: both
|
||||
// arg7 "server description"
|
||||
const sbconnect [
|
||||
tempalias sbdns $arg1; tempalias sbport $arg2; tempalias sbdesc $arg7; tempalias sbpwd []; tempalias sbmsg []
|
||||
tempalias sbdns $arg1; tempalias sbport $arg2; tempalias sbdesc $arg7; tempalias sbmsg []
|
||||
if (>= $arg5 1) [
|
||||
sbmsg = [This server is set to private.]; showmenu [password required]
|
||||
sbmsg = [This server is set to private.]; showmenu [server restricted]
|
||||
] [
|
||||
if (>= $arg6 1) [
|
||||
sbmsg = [You are banned from this server.]; showmenu [password required]
|
||||
sbmsg = [You are banned from this server.]; showmenu [server restricted]
|
||||
] [
|
||||
if (= $arg4 1) [
|
||||
sbmsg = [This server is password-protected.]; showmenu [password required]
|
||||
] [
|
||||
if (> (strlen $arg7) 0) [ echo connecting to $arg7 ]
|
||||
connect $arg1 $arg2
|
||||
]
|
||||
if (> (strlen $arg7) 0) [ echo connecting to $arg7 ]
|
||||
connect $arg1 $arg2
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
|
||||
// rarely used switches:
|
||||
|
||||
// -p // serverpassword, for passworded servers
|
||||
// -N // syslog identity string
|
||||
// -F // syslog facility, 0..7, default 6
|
||||
// -x // adminpasswd, don't use, use serverpwd.cfg instead
|
||||
|
||||
Reference in New Issue
Block a user