git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6812 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+34
-34
@@ -6,9 +6,9 @@ const removebans [ callvote 2 $arg1 ]
|
||||
const mastermode [ callvote 3 $arg1 ]
|
||||
const autoteam [ callvote 4 $arg1 ]
|
||||
const forceteam [ callvote 5 $arg1 ]
|
||||
const forceme [ forceteam (findcn $curname) ]
|
||||
const ignoreall [ if $connected [ ingall = 1; loop ia 21 [ ignore $ia ]; echo (c 1)NOTE: (c 5)All clients currently on the server were ignored. ] ]
|
||||
const unignoreall [ if $connected [ ingall = 0; clearignored ]; echo (c 1)NOTE: (c 5)All clients currently on the server were unignored. ]
|
||||
const forceme [ forceteam (player1 cn) ]
|
||||
const ignoreall [ if $connected [ ingall = 1; loop ia 21 [ ignore $ia ]; echo (blue)NOTE: (white)All clients currently on the server were ignored. ] ]
|
||||
const unignoreall [ if $connected [ ingall = 0; clearignored ]; echo (blue)NOTE: (white)All clients currently on the server were unignored. ]
|
||||
const giveadmin [ callvote 6 $arg1 ]
|
||||
const map [ callvote 7 $arg1 $arg2 ]
|
||||
const recorddemo [ callvote 8 1 ]
|
||||
@@ -29,25 +29,25 @@ const demo [
|
||||
]
|
||||
|
||||
// Kick/Ban/Reason menu script begins below.
|
||||
tmpKBR = ""; tmpVic = ""; if (! (checkalias tmpKBP)) [ tmpKBP = "" ]; if (! (checkalias tmpKBMM)) [ tmpKBMM = 0 ]
|
||||
tmpKBR = ""; tmpVic = 0; if (! (checkalias tmpKBP)) [ tmpKBP = "" ]; if (! (checkalias tmpKBMM)) [ tmpKBMM = 0 ]
|
||||
|
||||
selKBItem = [ tmpVic = (getalias arg1); tmpKBR = ""; showmenu reason ]
|
||||
genKBItem = [
|
||||
if (> $numargs 0) [
|
||||
tmpArg1 = $arg1; tmpKArg = (concat selKBItem $tmpArg1)
|
||||
if (&& (> $numargs 0) (isclient $arg1)) [
|
||||
tmpArg1 = $arg1; tmpKArg = (format "execute %1" (addpunct (concat selKBItem $tmpArg1)))
|
||||
if (curmodeattr team) [
|
||||
menuitem (concatword (findpn $arg1) (c 2) " (" $arg1 ")" (c 5) " - " (c 4) (at (concat (concatword (c 3) CLA (c 4)) (concatword (c 1) RVSF (c 4))) (at (pstat_score $arg1) 4)) (c 5)) (addpunct $tmpKArg 2)
|
||||
menuitem (concatword (player $arg1 name) (yellow) " (" $arg1 ")" (white) " - " (gray) (at (concat (concatword (red) CLA (gray)) (concatword (blue) RVSF (gray))) (player $arg1 team)) (white)) (addpunct $tmpKArg 2)
|
||||
] [
|
||||
menuitem (concatword (findpn $arg1) (c 2) " (" $arg1 ")" (c 5)) (addpunct $tmpKArg 2)
|
||||
menuitem (concatword (player $arg1 name) (yellow) " (" $arg1 ")" (white)) (addpunct $tmpKArg 2)
|
||||
]
|
||||
]
|
||||
]
|
||||
genKBMenu = [ loop gbl (curplayers) [ if (&& (! (strcmp (findpn $gbl) "")) (!= (findcn $curname) $gbl)) [ genKBItem $gbl ] ] ]
|
||||
genKBMenu = [ loop gbl (curplayers) [ if (&& (! (strcmp (player $gbl name) "")) (&& (!= (player1 cn) $gbl) (isclient $gbl))) [ genKBItem $gbl ] ] ]
|
||||
refreshKBM = [ if (!= $arg1 0) [ closemenu reason; sleep 0 [ showmenu reason ] ] [ closemenu kick/ban; sleep 0 [ showmenu kick/ban ] ] ]
|
||||
|
||||
hasValidClients = [
|
||||
hvcOutput = 0
|
||||
loop hvl (curplayers) [ if (&& (! (strcmp (findpn $hvl) "")) (!= $hvl (findcn $curname))) [ hvcOutput = 1; break ] ]
|
||||
loop hvl (curplayers) [ if (&& (! (strcmp (player $hvl name) "")) (&& (!= $hvl (player1 cn)) (isclient $hvl))) [ hvcOutput = 1; break ] ]
|
||||
result $hvcOutput
|
||||
]
|
||||
kickBanMenu = [
|
||||
@@ -56,9 +56,9 @@ kickBanMenu = [
|
||||
menuitem "Refresh list" [ refreshKBM ]
|
||||
menuitem "Remove all bans" [ removebans; refreshKBM ]
|
||||
menuitemtextinput "Admin password: " "" [ tmpKBP = $arg1 ] 0 256
|
||||
menuitem "Toggle admin status" [ if $connected [ if (currole) [ setadmin; echo you dropped admin status ] [ if (&& (strlen $tmpKBP) (! (strcmp $tmpKBP ""))) [ setadmin 1 $tmpKBP ] ]; refreshKBM ] ]
|
||||
menuitem "Toggle autoteam" [ if $connected [ if (curautoteam) [ autoteam 0 ] [ autoteam 1 ]; refreshKBM ] ]
|
||||
menuitemtextinput "Mastermode: " (getalias tmpKBMM) [ if (< $arg1 3) [ tmpKBMM = $arg1 ] [ echo (c 3)Error: (c 5)Valid range for mastermode is 0-2.; tmpKBMM = 0 ] ] 0 1
|
||||
menuitem "Toggle admin status" [ if $connected [ if (currole) [ setadmin; echo you dropped admin status ] [ if (&& (strlen $tmpKBP) (! (strcmp $tmpKBP ""))) [ setadmin 1 $tmpKBP ] ] ]; refreshKBM ]
|
||||
menuitem "Toggle autoteam" [ if $connected [ if (curautoteam) [ autoteam 0 ] [ autoteam 1 ] ]; refreshKBM ]
|
||||
menuitemtextinput "Mastermode: " (getalias tmpKBMM) [ if (< $arg1 3) [ tmpKBMM = $arg1 ] [ echo (red)Error: (white)Valid range for mastermode is 0-2.; tmpKBMM = 0 ] ] 0 1
|
||||
menuitem "Change mastermode" [ if (&& (< $tmpKBMM 3) (!= (curmastermode) $tmpKBMM)) [ if $connected [ mastermode $tmpKBMM ] ]; refreshKBM ]
|
||||
menuitem "" -1
|
||||
menuitem "OK" [ closemenu kick/ban ]
|
||||
@@ -70,44 +70,44 @@ kickBanMenu = [
|
||||
kickBanMenu
|
||||
|
||||
newmenu reason
|
||||
menuitemvar [ if (currole) [ concat (c 1)Note: (c 5)You currently have admin status. Your vote will be forced. ] ]
|
||||
menuitemvar [ if (! (strcmp (findpn $tmpVic) "")) [ if (curmodeattr team) [ concat (c 9) Target client: " " (concatword (c 5) (findpn $tmpVic) " - cn: " (c 2) $tmpVic (c 5) " - team: " (at (concat (concatword (c 3) CLA) (concatword (c 1) RVSF)) (at (pstat_score $tmpVic) 4)) (c 5) " - tks: " (c 2) (at (pstat_score $tmpVic) 5)) ] [ concat (c 9) Target client: " " (concatword (c 5) (findpn $tmpVic) " - cn: " (c 2) $tmpVic (c 5)) ] ] ] [ showmenu stats ]
|
||||
menuitemvar [ if (> (strlen $tmpKBR) 3) [ concat (c 9) Current reason: (concatword (c 5) $tmpKBR) ] ]
|
||||
menuitemvar [ if (currole) [ concat (blue)Note: (white)You currently have admin status. Your vote will be forced. ] ]
|
||||
menuitemvar [ if (! (strcmp (player $tmpVic name) "")) [ if (curmodeattr team) [ concat (orange) Target client: " " (concatword (white) (player $tmpVic name) " - cn: " (yellow) $tmpVic (white) " - team: " (at (concat (concatword (red) CLA) (concatword (blue) RVSF)) (player $tmpVic team)) (white) " - tks: " (yellow) (player $tmpVic tks)) ] [ concat (orange) Target client: " " (concatword (white) (player $tmpVic name) " - cn: " (yellow) $tmpVic (white)) ] ] ] [ showmenu stats ]
|
||||
menuitemvar [ if (> (strlen $tmpKBR) 3) [ concat (orange) Current reason: (concatword (white) $tmpKBR) ] ]
|
||||
menuitemtextinput "Enter a reason: " "" [ tmpKStr = ""; loop gkl $numargs [ if (> $numargs 0) [ tmpKStr = (concatword $tmpKStr (getalias (format arg%1 $gkl)) " ") ] ]; if (< $numargs 2) [ tmpKBR = $arg1 ] [ tmpKBR = $tmpKStr ]; refreshKBM 1 ] 0 256
|
||||
menuitem "" -1
|
||||
menuitemvar [ concat (c 9) Use a predefined reason: ]
|
||||
menuitemvar [ concat (orange) Use a predefined reason: ]
|
||||
menuitem "" -1
|
||||
menuitem "Lag" [ tmpKBR = "lagging"; refreshKBM 1 ]
|
||||
menuitem "Away from keyboard" [ tmpKBR = "AFK/not playing"; refreshKBM 1 ]
|
||||
menuitem "Vote abuse" [ tmpKBR = "kick/ban/other vote abuse"; refreshKBM 1 ]
|
||||
menuitem "Avoiding kicks/bans" [ tmpKBR = "avoiding kicks/bans"; refreshKBM 1 ]
|
||||
menuitem "Private match" [ tmpKBR = (concat sorry, organizing a private (concatword match ", " (findpn $tmpVic))); refreshKBM 1 ]
|
||||
menuitem "Private match" [ tmpKBR = (concat sorry, organizing a private (concatword match ", " (player $tmpVic name))); refreshKBM 1 ]
|
||||
menuitem "Obvious cheat" [ tmpKBR = "blatant cheating"; refreshKBM 1 ]
|
||||
menuitem "Friendly fire/TK" [ if (curmodeattr team) [ tmpKBR = "intentional teamkills/team damage" ] [ echo (c 3)Error: (c 5) (getmodeacr) is not a team mode. ]; refreshKBM 1 ]
|
||||
menuitem "Friendly fire/TK" [ if (curmodeattr team) [ tmpKBR = "intentional teamkills/team damage" ] [ echo (red)Error: (white) (getmode 1) is not a team mode. ]; refreshKBM 1 ]
|
||||
menuitem "Spamming" [ tmpKBR = "spamming chat/voicecoms/etc."; refreshKBM 1 ]
|
||||
menuitem "Poor/abusive behaviour" [ tmpKBR = "poor/abusive behaviour"; refreshKBM 1 ]
|
||||
menuitem "Inappropriate language" [ tmpKBR = "inappropriate language"; refreshKBM 1 ]
|
||||
menuitem "Inappropriate name" [ tmpKBR = (concat inappropriate name (addpunct (findpn $tmpVic) 2)); refreshKBM 1 ]
|
||||
menuitem "Inappropriate name" [ tmpKBR = (concat inappropriate name (addpunct (player $tmpVic name) 2)); refreshKBM 1 ]
|
||||
menuitem "" -1
|
||||
menuitemvar [ concat (c 9) Action: ]
|
||||
menuitemvar [ concat (orange) Action: ]
|
||||
menuitem "" -1
|
||||
menuitemvar [ concat (c 2)Kick ] [ if (> (strlen $tmpKBR) 3) [ if $votepending [ if (currole) [ vote 2 ]; sleep 250 [ kick $tmpVic $tmpKBR ] ] ] [ kick $tmpVic $tmpKBR ] ]
|
||||
menuitemvar [ concat (c 3)Ban ] [ if (> (strlen $tmpKBR) 3) [ if $votepending [ if (currole) [ vote 2 ]; sleep 250 [ ban $tmpVic $tmpKBR ] ] ] [ ban $tmpVic $tmpKBR ] ]
|
||||
menuitemvar [ concat (c 9)Forceteam ] [ if (curmodeattr team) [ forceteam $tmpVic ] [ echo (c 3)Error: (c 5) (getmodeacr) is not a team mode. ] ]
|
||||
menuitemvar [ concat (c 1)Whois ] [ whois $tmpVic ]
|
||||
menuitem "Spectate" [ if (&& $connected (> (curplayers) 1)) [ spectate; setfollowplayer $tmpVic ] [ echo (c 3)Error: (c 5)Not connected or not enough players. ] ]
|
||||
menuitemvar [ concat (c 0)Refresh] [ refreshKBM 1 ]
|
||||
menuitemvar [ concat (yellow)Kick ] [ if (> (strlen $tmpKBR) 3) [ if $votepending [ if (currole) [ vote 2 ]; sleep 250 [ kick $tmpVic $tmpKBR ] ] ] [ kick $tmpVic $tmpKBR ] ]
|
||||
menuitemvar [ concat (red)Ban ] [ if (> (strlen $tmpKBR) 3) [ if $votepending [ if (currole) [ vote 2 ]; sleep 250 [ ban $tmpVic $tmpKBR ] ] ] [ ban $tmpVic $tmpKBR ] ]
|
||||
menuitemvar [ concat (orange)Forceteam ] [ if (curmodeattr team) [ forceteam $tmpVic ] [ echo (red)Error: (white) (getmode 1) is not a team mode. ] ]
|
||||
menuitemvar [ concat (blue)Whois ] [ whois $tmpVic ]
|
||||
menuitem "Spectate" [ if (&& $connected (> (curplayers) 1)) [ spectate; setfollowplayer $tmpVic ] [ echo (red)Error: (white)Not connected or not enough players. ] ]
|
||||
menuitemvar [ concat (green)Refresh] [ refreshKBM 1 ]
|
||||
menuitem "" -1
|
||||
menuitem "Back" [ closemenu reason ]
|
||||
|
||||
newmenu stats
|
||||
menuitemvar [ concat (c 9)Current statistics for client: (c 5) (findpn $tmpVic) (c 2) (addpunct $tmpVic 2) ]
|
||||
menuitemvar [ if (curmodeattr team) [ concat Team: (at (concat (concatword (c 3) CLA) (concatword (c 1) RVSF)) (at (pstat_score $tmpVic) 4)) ] [ concat Mode: (c 2) (getmodeacr) ] ]
|
||||
menuitemvar [ if (curmodeattr team) [ concat Teamkills: (c 3) (at (pstat_score $tmpVic) 5) ] ]
|
||||
menuitemvar [ if (curmodeattr flag) [ concat Flags: (at (pstat_score $tmpVic) 0) ] [ concat Flags: N/A ] ]
|
||||
menuitemvar [ concat Frags: (at (pstat_score $tmpVic) 1) ]
|
||||
menuitemvar [ concat Deaths: (at (pstat_score $tmpVic) 2) ]
|
||||
menuitemvar [ if $connected [ concat Score: (at (pstat_score $tmpVic) 3) ] [ concat Score: N/A ] ]
|
||||
menuitemvar [ concat (orange)Current statistics for client: (white) (player $tmpVic name) (yellow) (addpunct $tmpVic 2) ]
|
||||
menuitemvar [ if (curmodeattr team) [ concat Team: (at (concat (concatword (red) CLA) (concatword (blue) RVSF)) (player $tmpVic team)) ] [ concat Mode: (yellow) (getmode 1) ] ]
|
||||
menuitemvar [ if (curmodeattr team) [ concat Teamkills: (red) (player $tmpVic tks) ] ]
|
||||
menuitemvar [ if (curmodeattr flag) [ concat Flags: (player $tmpVic flags) ] [ concat Flags: N/A ] ]
|
||||
menuitemvar [ concat Frags: (player $tmpVic frags) ]
|
||||
menuitemvar [ concat Deaths: (player $tmpVic deaths) ]
|
||||
menuitemvar [ if $connected [ concat Score: (player $tmpVic score) ] [ concat Score: N/A ] ]
|
||||
menuitem "" -1
|
||||
menuitem "Refresh" [ closemenu stats; sleep 0 [ showmenu stats ] ]
|
||||
menuitem "Back" [ closemenu stats ]
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ const autoSaveCheck [ sleep $timeBetAutoSaves [ doAutoSave ] ]
|
||||
|
||||
const doAutoSave [
|
||||
if (&& (! (strstr $defaultmaps (curmap 1))) (! (strcmp (curmap 1) ""))) [
|
||||
if (|| $editing (= $gamemode 1)) [
|
||||
if (|| $editing (= $gamemode (coop -1))) [
|
||||
if $autosavemap [
|
||||
+= numAutoSaves 1
|
||||
oldmapbackups = $mapbackupsonsave
|
||||
|
||||
+3
-3
@@ -21,9 +21,9 @@ const setgamma [
|
||||
add2list ofc_gamma_list (at $tmp_gamma_list $sgl)
|
||||
]
|
||||
]
|
||||
echo (c 1)Note: (c 5) $arg1 has been set as your default gamma for (c 2) (curmap 1)
|
||||
] [ echo (c 3)Error: (c 5)You are not on a official map! ]
|
||||
] [ echo (c 3)Error: (c 5)gamma has a minimum value of 30 and maximum value of 300! ]
|
||||
echo (blue)Note: (white) $arg1 has been set as your default gamma for (yellow) (curmap 1)
|
||||
] [ echo (red)Error: (white)You are not on a official map! ]
|
||||
] [ echo (red)Error: (white)gamma has a minimum value of 30 and maximum value of 300! ]
|
||||
]
|
||||
|
||||
// Plugin to mapstartalways on every run if it doesn't already exist.
|
||||
|
||||
+3
-3
@@ -4,12 +4,12 @@ delayed_firstrun = [
|
||||
music "pingpong/Ping_Pong_-_Kamikadze.ogg" 89000 " " // 90 secs, fade
|
||||
|
||||
new_gfx_quality 3
|
||||
echo (c 9)Welcome to AssaultCube
|
||||
echo Developed by (c 1)'Rabid Viper Productions'
|
||||
echo (orange)Welcome to AssaultCube
|
||||
echo Developed by (blue)'Rabid Viper Productions'
|
||||
echo ""
|
||||
echo Use the below menu to change some necessary settings...
|
||||
echo ""
|
||||
echo Further help & information can be found in your (concatword (c 3) README (c 5) ,) which is inside your AssaultCube directory.
|
||||
echo Further help & information can be found in your (concatword (red) README (white) ,) which is inside your AssaultCube directory.
|
||||
showmenu "QUICK setup"
|
||||
]
|
||||
|
||||
|
||||
+3
-3
@@ -65,14 +65,14 @@ menuitem "Stop recording a demo" "stopdemo"
|
||||
menuitem "Download demos from the server" [ listdemos; showmenu "Download demo" ] // Lists the demos, then asks which would like to be downloaded.
|
||||
|
||||
newmenu "Download demo"
|
||||
menuinit [ echo (c 4)Choose the demo number you wish to download, as shown below in the console. ]
|
||||
menuinit [ echo (gray)Choose the demo number you wish to download, as shown below in the console. ]
|
||||
menuitem "9 Download the latest demo..." [ getdemo "" ]
|
||||
menuitem [] -1
|
||||
menuitemtextinput "Demo number: " "" [ dldemo = $arg1 ]
|
||||
menuitem "2 [ Download ] " [ getdemo $dldemo ]
|
||||
|
||||
newmenu "Play demo" // If not in-game (recording/downloading demos isn't needed)
|
||||
menuinit [ echo To stop demo playback, type: (c 3)/stopdemo ]
|
||||
menuinit [ echo To stop demo playback, type: (red)/stopdemo ]
|
||||
menudirlist "demos" "dmo" "demo $arg1"
|
||||
|
||||
// in-game menu that opens when pressing escape while watching a demo.
|
||||
@@ -110,7 +110,7 @@ menuitem "Keyboard controls" [ showmenu controls ]
|
||||
menuitem "Demo tutorial" [ tutstart 1 ]
|
||||
menuitem "View the FAQ" [ showmenu faq ]
|
||||
menuitem "" -1
|
||||
menuitem "...for further information/help see the README" [ echo (c 2)The readme can be found in the base AssaultCube directory. ]
|
||||
menuitem "...for further information/help see the README" [ echo (yellow)The readme can be found in the base AssaultCube directory. ]
|
||||
|
||||
newmenu "Reference search"
|
||||
menuinit [ docsearchstring = "" ]
|
||||
|
||||
@@ -10,7 +10,7 @@ menuitem "Arches and slopes..." [ showmenu Arches ]
|
||||
menuitem "Map operations..." [ showmenu "Map operations" ]
|
||||
menuitem "Bots..." [ showmenu "Creating bot waypoints" ]
|
||||
menuitem "Settings..." [ showmenu "Editing settings" ]
|
||||
menuitem "Help?" [ echo (c 2)Please read the AssaultCube README which has a detailed guide on mapediting... ]
|
||||
menuitem "Help?" [ echo (yellow)Please read the AssaultCube README which has a detailed guide on mapediting... ]
|
||||
|
||||
tmp_cradius = 12
|
||||
|
||||
@@ -23,7 +23,7 @@ menuitem "" -1
|
||||
menuitemcheckbox "Enable fullbright: " "$fullbright" [ fullbright $arg1 ]
|
||||
menuitem "" -1
|
||||
menuitem "Random coloured light: " -1
|
||||
menuitemtextinput "Radius: " [ result $tmp_cradius ] [ if (&& (! (> $arg1 32)) (! (< $arg1 1))) [ tmp_cradius = $arg1 ] [ echo (c 3)Error: (c 2) $arg1 (c 5)is not a valid radius for a light entity. ] ]
|
||||
menuitemtextinput "Radius: " [ result $tmp_cradius ] [ if (&& (! (> $arg1 32)) (! (< $arg1 1))) [ tmp_cradius = $arg1 ] [ echo (red)Error: (yellow) $arg1 (white)is not a valid radius for a light entity. ] ]
|
||||
menuitem "Place random light..." [ gencl $tmp_cradius ]
|
||||
menuitem "Update random light..." [ gencl ]
|
||||
|
||||
@@ -105,7 +105,7 @@ menuitem "" -1
|
||||
menuitem "Fix heightfielding" "solid 0; slope 0 0"
|
||||
|
||||
newmenu skymaps
|
||||
menuinit [ echo Please read: (c 3)/docs/mapediting5.html to find out how to PERMANENTLY add a custom skymap to your map... ]
|
||||
menuinit [ echo Please read: (red)/docs/mapediting5.html to find out how to PERMANENTLY add a custom skymap to your map... ]
|
||||
menuitem "Steini2 skymap" [ loadsky "textures/skymaps/steini/steini2" ]
|
||||
menuitem "Steini3 skymap" [ loadsky "textures/skymaps/steini/steini3" ]
|
||||
menuitem "Steini4 skymap" [ loadsky "textures/skymaps/steini/steini4" ]
|
||||
|
||||
@@ -89,7 +89,7 @@ menuitem "2 [ Connect ] " [ connect $cc1 $cc2 $cc3 ]
|
||||
// Connect to a menu as admin.
|
||||
newmenu "Admin connect"
|
||||
|
||||
menuinit [ acc1 = ""; acc2 = ""; acc3 = ""; echo (c 3)To use this menu to connect as administrator, you will need to know the admin password for the server. ] // Resets the aliases
|
||||
menuinit [ acc1 = ""; acc2 = ""; acc3 = ""; echo (red)To use this menu to connect as administrator, you will need to know the admin password for the server. ] // Resets the aliases
|
||||
menuitemtextinput "Server IP/DNS: " "" [ acc1 = $arg1 ] "" 255
|
||||
menuitemtextinput "Server port (optional): " "" [ acc2 = $arg1 ] "" 6
|
||||
menuitemtextinput "Server admin password: " "" [ acc3 = $arg1 ] "" 128
|
||||
|
||||
@@ -600,7 +600,7 @@ menuitemcheckbox "Awesome (1): " "(soundmuted 97)" [ mutesound 97 (!
|
||||
menuitemcheckbox "Awesome (2): " "(soundmuted 98)" [ mutesound 98 (! $arg1) ]
|
||||
|
||||
newmenu "Kill Messages"
|
||||
menuitemvar [concat (c 9)Frag messages: ] [] []
|
||||
menuitemvar [concat (orange)Frag messages: ] [] []
|
||||
menuitemtextinput [Pistol: ] [fragmessage 1] [ fragmessage 1 $arg1 ] [] 15
|
||||
menuitemtextinput [Carbine: ] [fragmessage 2] [ fragmessage 2 $arg1 ] [] 15
|
||||
menuitemtextinput [Shotgun: ] [fragmessage 3] [ fragmessage 3 $arg1 ] [] 15
|
||||
@@ -610,7 +610,7 @@ menuitemtextinput [AR: ] [fragmessage 6] [ fragmessage 6 $arg1 ] [] 15
|
||||
menuitemtextinput [CPistol: ] [fragmessage 7] [ fragmessage 7 $arg1 ] [] 15
|
||||
menuitemtextinput [Akimbo: ] [fragmessage 9] [ fragmessage 9 $arg1 ] [] 15
|
||||
menuitem [] -1
|
||||
menuitemvar [concat (c 9)Gib messages: ] [] []
|
||||
menuitemvar [concat (orange)Gib messages: ] [] []
|
||||
menuitemtextinput [Knife: ] [gibmessage 0] [ gibmessage 0 $arg1 ] [] 15
|
||||
menuitemtextinput [Shotgun: ] [gibmessage 3] [ gibmessage 3 $arg1 ] [] 15
|
||||
menuitemtextinput [Sniper: ] [gibmessage 5] [ gibmessage 5 $arg1 ] [] 15
|
||||
|
||||
+13
-4
@@ -103,16 +103,23 @@ const resetbinds [ run resetbinds; echo (c 3)All binds have been reset to defaul
|
||||
|
||||
const changeteam [ if (< (curteam) 4) [ team (at "RVSF CLA RVSF-SPECT CLA-SPECT" (curteam)) ] ]
|
||||
|
||||
const NUM_WEAPONS 10
|
||||
const NUM_MODES 22
|
||||
|
||||
const WEAPONS "KNIFE PISTOL CARBINE SHOTGUN SMG SNIPER AR CPISTOL GRENADES AKIMBO"
|
||||
const NUM_WEAPONS (listlen $WEAPONS)
|
||||
const MODES "tdm coop dm surv ts ctf pf btdm bdm lss osok tosok bosok htf tktf ktf tpf tlss bpf blss bts btosok"
|
||||
const NUM_MODES (listlen $NUM_MODES)
|
||||
// ktf ac_mines - calls a vote for keep the flag ac_mines
|
||||
// echo (ktf -1) = returns 15
|
||||
|
||||
loop d $NUM_WEAPONS [ const (at $WEAPONS $d) $d ]
|
||||
loop r $NUM_MODES [ const (at $MODES $r) (addpunct (concat votemap $r (addpunct arg1 3)) 2) ]
|
||||
loop r $NUM_MODES [ const (at $MODES $r) (addpunct (format "if (= $arg1 -1) [ result %1 ] [ votemap %1 %2 ]" $r (addpunct arg1 3)) 2) ]
|
||||
loop f $NUM_MODES [ const (toupper (at $MODES $f)) $f ]
|
||||
|
||||
const PUNCTUATION "quotes brackets parenthesis _$_ quote percent"
|
||||
loop g (listlen $PUNCTUATION) [ const (at $PUNCTUATION $g) $g ]
|
||||
// echo (addpunct "hello world" $parenthesis) - output: (hello world)
|
||||
// echo (addpunct "hello world" $brackets) - output: [hello world]
|
||||
|
||||
const MAX_BOT_MATCH_LENGTH 60
|
||||
|
||||
// Mode/map-setting aliases.
|
||||
@@ -122,7 +129,9 @@ const lms [ votemap 3 $arg1 ]
|
||||
const vip [ votemap 13 $arg1 ]
|
||||
|
||||
// Helper aliases for (c) - easy color insertion. (e.g. echo (red)Hello (blue)world! (white)My fov today is: (orange) $fov)
|
||||
loop k 10 [ const (at "green blue yellow red gray white dbrown dred purple orange" $k) (format "result %1" (addpunct (concat c $k) 2)) ]
|
||||
loop k 10 [ const (at "green blue yellow red gray white dbrown dred purple orange" $k) (format "if (= $arg1 -1) [ result %1 ] [ result %2 ]" $k (addpunct (concat c $k) 2)) ]
|
||||
// echo (blue -1) - returns 1
|
||||
// echo (purple -1) - returns 8
|
||||
|
||||
// Weapon switching/action utilities.
|
||||
const primary [ weapon (currentprimary) ]
|
||||
|
||||
+17
-17
@@ -7,7 +7,7 @@
|
||||
// * If the player has not found the "zone" within the set timeframe, they are automatically teleported there.
|
||||
// * The difficulty is "increased" over time, by spawning more and increasing the skill level of bots at "checkpoints".
|
||||
// * If the player dies, or leaves the "zone" for too long of a duration, the game ends.
|
||||
// * Total seconds survived, total number of enemies killed during, and average amount of time between kills are reported as stats when the game ends.
|
||||
// * Total seconds survived, total number of enemies killed during, average amount of time between kills, and total damage dealt while alive are reported as stats when the game ends.
|
||||
|
||||
const survResetAliases "gotCheckPoint lastCheckPoint survIsFinished startedSurvival startedOBCount startPreSurvMillis startSurvMillis survKills survTeleported survTotalDmg"
|
||||
|
||||
@@ -24,7 +24,7 @@ if (! (strstr $afterinit resetSurvAliases)) [
|
||||
|
||||
const genSurvDifStr [
|
||||
if $nonSurvDefaults [ result "[CUSTOM]" ] [
|
||||
tmpstrlist = (concat (concatword (c 0) "[EASY]") (concatword (c 2) "[INTERMEDIATE]") (concatword (c 9) "[HARD]") (concatword (c 7) "[IMPOSSIBLE]"))
|
||||
tmpstrlist = (concat (concatword (green) "[EASY]") (concatword (yellow) "[INTERMEDIATE]") (concatword (orange) "[HARD]") (concatword (dred) "[IMPOSSIBLE]"))
|
||||
if (&& $numargs (checkrange $arg1 0 3)) [ result (at $tmpstrlist $arg1) ] [ result (at $tmpstrlist $survDifficulty) ]
|
||||
]
|
||||
]
|
||||
@@ -36,7 +36,7 @@ const survival [
|
||||
if (! (strstr $onKill survKills)) [
|
||||
add2alias onKill [ // Use onKill for enemies killed counter and other stats
|
||||
if $startedSurvival [ //
|
||||
if (&& (= $arg1 (findcn $curname)) (!= $arg1 $arg2)) [ // Player1 was actor and was not suicide
|
||||
if (&& (= $arg1 (player1 cn)) (!= $arg1 $arg2)) [ // Player1 was actor and was not suicide
|
||||
+= survKills 1 // Increment enemies killed counter
|
||||
if (! (listlen $survTimeBetKills)) [ // First kill
|
||||
survTimeBetKills = (- (millis) $startSurvMillis) //
|
||||
@@ -56,17 +56,17 @@ const survival [
|
||||
]
|
||||
add2alias mapstartonce [
|
||||
startPreSurvMillis = (millis); add2list tmpSurvSets (curmap 1)
|
||||
echo (genSurvDifStr) (c 2)Bot survival mode prepared, gather items and find the arena to start! (c 9)You have (c 5) (div $timeUntilTele 1000) (c 9)seconds to prepare!
|
||||
echo (genSurvDifStr) (yellow)Bot survival mode prepared, gather items and find the arena to start! (orange)You have (white) (div $timeUntilTele 1000) (orange)seconds to prepare!
|
||||
if (strstr $defaultmaps (curmap 1)) [ survMap = (findlist $defaultmaps (curmap 1)) ]
|
||||
setOfcZones; checkzone
|
||||
]
|
||||
setbottimeout 2 $MAX_BOT_MATCH_LENGTH
|
||||
votemap 7 $arg1
|
||||
votemap (btdm 1) $arg1
|
||||
]
|
||||
|
||||
const startSurvival [
|
||||
startedSurvival = 1; startSurvMillis = (millis); addnbot $survNumBots CLA bad
|
||||
sleep 1000 [ if $survTeleported [ echo (c 9)You were teleported to the zone. ]; echo (c 3)Starting survival mode, good luck! ]
|
||||
sleep 1000 [ if $survTeleported [ echo (orange)You were teleported to the zone. ]; echo (red)Starting survival mode, good luck! ]
|
||||
sleep $timeBetChkPts [ gotCheckPoint = 1; increaseDifficulty ]
|
||||
]
|
||||
|
||||
@@ -109,7 +109,7 @@ const survOfcZones [
|
||||
|
||||
const setOfcZones [
|
||||
survMapIndex = (findlist $survOfcZones (curmap 1))
|
||||
if $survMapIndex [ tmpSurvZone = ""; loop soz 4 [ add2list tmpSurvZone (at $survOfcZones (+ $survMapIndex (+ $soz 1))) ]; setzone $tmpSurvZone ]
|
||||
if (!= $survMapIndex -1) [ tmpSurvZone = ""; loop soz 4 [ add2list tmpSurvZone (at $survOfcZones (+ $survMapIndex (+ $soz 1))) ]; setzone $tmpSurvZone ]
|
||||
]
|
||||
|
||||
const findCenter [
|
||||
@@ -123,21 +123,21 @@ const isInZone [ if (&& (checkrange (player1 x) (at $zone 0) (at $zone 1)) (chec
|
||||
|
||||
const checkzone [
|
||||
if (! $survIsFinished) [
|
||||
if (&& $startedSurvival (&& (>= (- (millis) $startSurvMillis) 500) (|| (|| (idlebots 2) (! (botsshoot 2))) (|| $editing (!= $gamespeed 100))))) [ endSurvival (concatword (genSurvDifStr) (c 3) " Error: " (c 1) editmode (c 5) ", " (c 3) gamespeed (c 5) ", " (c 2) idlebots (c 5) ", and " (c 0) botsshoot (c 5) " are not allowed in Survival Mode.") ]
|
||||
if (&& $startedSurvival (&& (>= (- (millis) $startSurvMillis) 500) (|| (|| (idlebots 2) (! (botsshoot 2))) (|| $editing (!= $gamespeed 100))))) [ endSurvival (concatword (genSurvDifStr) (red) " Error: " (blue) editmode (white) ", " (red) gamespeed (white) ", " (yellow) idlebots (white) ", and " (green) botsshoot (white) " are not allowed in Survival Mode.") ]
|
||||
if (&& (isInZone) (! $startedSurvival)) [ startSurvival ]
|
||||
if (&& (! $startedSurvival) (>= (- (millis) $startPreSurvMillis) $timeUntilTele)) [ teleportPlayer ]
|
||||
if (&& (>= (- (millis) $lastCheckPoint) $timeBetChkPts) (&& $startedSurvival $gotCheckPoint)) [ increaseDifficulty ]
|
||||
if (&& (! $startedOBCount) (&& (! (isInZone)) $startedSurvival)) [ startOBCount ]
|
||||
if (&& $startedSurvival (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500))) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (c 3) " You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, killed " (c 5) $survKills (c 3) " enemies. Average: " (c 5) (divf (listaverage $survTimeBetKills) 1000) (c 3) " seconds between kills. Total Damage Dealt: " (white) $survTotalDmg) ]
|
||||
if (&& $startedSurvival (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500))) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (red) " You survived for " (white) (divf $finalSurvMillis 1000) (red) " seconds, killed " (white) $survKills (red) " enemies. Average: " (white) (divf (listaverage $survTimeBetKills) 1000) (red) " seconds between kills. Total Damage Dealt: " (white) $survTotalDmg) ]
|
||||
if (&& (! (curteam)) (! $startedSurvival)) [ team RVSF ]; sleep 0 [ checkzone ]
|
||||
]
|
||||
]
|
||||
|
||||
const startOBCount [
|
||||
startedOBCount = 1; startOBMillis = (millis); backInZone = 0; tmpSCtr = 5
|
||||
echo (c 3)Get back into the arena! (c 5)You only have (c 3)5 (c 5)seconds to return.
|
||||
loop soc 5 [ sleep (* $soc 1000) [ if (&& (! $survIsFinished) (&& (! (isInZone)) (! $backInZone))) [ if $spamSurvMsgs [ hudecho (concatword (c 9) $tmpSCtr ...) ] [ echo (concatword (c 9) $tmpSCtr ...) ]; -= tmpSCtr 1 ] [ backInZone = 1 ] ] ]
|
||||
sleep 5000 [ if (&& (! (isInZone)) (&& (! $backInZone) (>= (- (millis) $startOBMillis) 5000))) [ endSurvival (concatword (genSurvDifStr) (c 3) " You took too long to return to the arena!") ] [ startedOBCount = 0 ] ]
|
||||
echo (red)Get back into the arena! (white)You only have (red)5 (white)seconds to return.
|
||||
loop soc 5 [ sleep (* $soc 1000) [ if (&& (! $survIsFinished) (&& (! (isInZone)) (! $backInZone))) [ if $spamSurvMsgs [ hudecho (concatword (orange) $tmpSCtr ...) ] [ echo (concatword (orange) $tmpSCtr ...) ]; -= tmpSCtr 1 ] [ backInZone = 1 ] ] ]
|
||||
sleep 5000 [ if (&& (! (isInZone)) (&& (! $backInZone) (>= (- (millis) $startOBMillis) 5000))) [ endSurvival (concatword (genSurvDifStr) (red) " You took too long to return to the arena!") ] [ startedOBCount = 0 ] ]
|
||||
]
|
||||
|
||||
const increaseDifficulty [
|
||||
@@ -150,15 +150,15 @@ const endSurvival [
|
||||
tmp_survstr = $arg1; survIsFinished = 1; startedSurvival = 0; survNumBots = (at $tmpSurvSets 0)
|
||||
add2alias mapstartonce [
|
||||
if (&& (strstr $tmp_survstr " You survived for ") (strstr $tmp_survstr " enemies. Average: ")) [
|
||||
echo (c 0)Bot Survival results for map: (c 5) (at $tmpSurvSets 1)
|
||||
echo (green)Bot Survival results for map: (white) (at $tmpSurvSets 1)
|
||||
if (!= (at $tmpSurvSets 2) (at $tmpSurvSets 3)) [
|
||||
if (= (at $tmpSurvSets 5) 1) [ sleep 5 [ echo (concatword (c 2) (format "you were %1 by %2" (gibmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ] ] [
|
||||
sleep 5 [ echo (concatword (c 2) (format "you were %1 by %2" (fragmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ]
|
||||
if (= (at $tmpSurvSets 5) 1) [ sleep 5 [ echo (concatword (yellow) (format "you were %1 by %2" (gibmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ] ] [
|
||||
sleep 5 [ echo (concatword (yellow) (format "you were %1 by %2" (fragmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ]
|
||||
]
|
||||
] [ sleep 5 [ echo (concatword (c 2) "you suicided!") ] ]
|
||||
] [ sleep 5 [ echo (concatword (yellow) "you suicided!") ] ]
|
||||
]
|
||||
echo $tmp_survstr
|
||||
if (&& $spamSurvMsgs $survKills) [ hudecho (c 0)GG ]
|
||||
if (&& $spamSurvMsgs $survKills) [ hudecho (green)GG ]
|
||||
]
|
||||
tdm (rndmap)
|
||||
]
|
||||
|
||||
+5
-5
@@ -14,7 +14,7 @@ const endtutorial [
|
||||
]
|
||||
const tut [
|
||||
sleep 50 [ paused 1; showmenu "AC Tutorial - Welcome"; sleep 20 [ add2alias mapstartonce = [ endtutorial ] ] ]
|
||||
consize 1; echo (c 2)Live tutorial information will appear here.
|
||||
consize 1; echo (yellow)Live tutorial information will appear here.
|
||||
]
|
||||
const tut2 [ sleep 9000 [ paused 1; showmenu "AC Tutorial - Basic Movement" ] ] // Need echoes timed with the movement before the paused 1
|
||||
const tut3 [ sleep 8000 [ paused 1; showmenu "AC Tutorial - More Movement" ] ] // ibid
|
||||
@@ -36,7 +36,7 @@ const tut5 [ sleep 10 [ paused 1; showmenu "AC Tutorial - Weapon Info" ] ]
|
||||
|
||||
const tut6 [
|
||||
sleep 6000 [ consize 2; echo Someone is about to get splattered with the shotgun... ]
|
||||
sleep 18000 [ consize 2; echo (c 3)BOOM HEADSHOT! (c 5)The sniper was scoping. ]
|
||||
sleep 18000 [ consize 2; echo (red)BOOM HEADSHOT! (white)The sniper was scoping. ]
|
||||
sleep 26000 [ consize 2; echo Slice and dice with the knife. ]
|
||||
sleep 41000 [ consize 2; echo Fire in the hole! Grenades, grenades, grenades... ]
|
||||
sleep 50000 [ paused 1; showmenu "AC Tutorial - CTF" ]
|
||||
@@ -54,16 +54,16 @@ const tut8 [
|
||||
sleep 50 [ echo They are now edge jumping. These are popular spots to edgejump. ]
|
||||
sleep 18500 [ echo To rifle sprint, face opposite to where you want to go, and jump backwards while shooting. ]
|
||||
sleep 32500 [ echo Similar to the rifle sprint, rifle jump by jumping, facing down, and shooting. ]
|
||||
sleep 49000 [ echo That was a (c 3)bad (c 5)attempt at grenade jumping. You are not supposed to suicide. ]
|
||||
sleep 49000 [ echo That was a (red)bad (white)attempt at grenade jumping. You are not supposed to suicide. ]
|
||||
sleep 50000 [ echo A good grenade jump will give you height and distance. ]
|
||||
sleep 65000 [ echo (c 0)Time for the combat demonstration! ]
|
||||
sleep 65000 [ echo (green)Time for the combat demonstration! ]
|
||||
sleep 200000 [ paused 1; showmenu "AC Tutorial - GG" ]
|
||||
]
|
||||
|
||||
newmenu "Tutorial Menu"
|
||||
menuitem "Go back to tutorial" [ closemenu "Watching Tutorial"; paused 0 ]
|
||||
menuitem "Restart tutorial" "tutstart 1"
|
||||
menuitem "3Stop 5tutorial" [ endtutorial; tdm (at $defaultmaps (rnd (listlen $defaultmaps))) ]
|
||||
menuitem "3Stop 5tutorial" [ endtutorial; tdm (rndmap) ]
|
||||
|
||||
newmenu "AC Tutorial - Welcome"
|
||||
menuitem "1Thank you for downloading and trying 2AssaultCube!" -1
|
||||
|
||||
@@ -288,7 +288,8 @@ void playerinfo(const char *cn, const char *attr)
|
||||
playerent *p = clientnum < 0 ? player1 : getclient(clientnum);
|
||||
if(!p)
|
||||
{
|
||||
conoutf("invalid clientnum");
|
||||
if(!m_botmode && multiplayer(false)) // bot clientnums are still glitchy, causing this message to sometimes appear in offline/singleplayer when it shouldn't??? -Bukz 2012may
|
||||
conoutf("invalid clientnum cn: %s attr: %s", cn, attr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -328,7 +329,7 @@ void playerinfo(const char *cn, const char *attr)
|
||||
ATTR_INT(alive, p->state == CS_ALIVE ? 1 : 0);
|
||||
ATTR_INT(spec, p->team == TEAM_SPECT || p->spectatemode == SM_FLY ? 1 : 0);
|
||||
ATTR_INT(cn, p->clientnum); // only useful to get player1's client number.
|
||||
conoutf("invalid attribute");
|
||||
conoutf("invalid attribute: %s", attr);
|
||||
}
|
||||
|
||||
void playerinfolocal(const char *attr)
|
||||
@@ -345,7 +346,7 @@ void teaminfo(const char *team, const char *attr)
|
||||
int t = atoi(team); // get player clientnum
|
||||
if(!team_isactive(t))
|
||||
{
|
||||
conoutf("invalid team");
|
||||
conoutf("invalid team: %s", team);
|
||||
return;
|
||||
}
|
||||
int t_flags = 0;
|
||||
@@ -389,7 +390,7 @@ void teaminfo(const char *team, const char *attr)
|
||||
ATTR_INT(points, t_points);
|
||||
ATTR_STR(name, team_string(t));
|
||||
ATTR_STR(players, teammembers);
|
||||
conoutf("invalid attribute");
|
||||
conoutf("invalid attribute: %s", attr);
|
||||
}
|
||||
|
||||
COMMAND(teaminfo, ARG_2STR);
|
||||
|
||||
Reference in New Issue
Block a user