favourites.cfg added
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4511 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
// basic favourites category definitions
|
||||
//
|
||||
// to add your own, it's best to copy this file to your home directory tree
|
||||
// (where saved.cfg is located), and then edit that copy
|
||||
// another way is to put additional categories into your autoexec.cfg
|
||||
|
||||
// every category has the following attributes:
|
||||
// "weight", "tag", "desc", "red", "green", "blue", "alpha", "keys", "ignore"
|
||||
// weight: positive weights list a server higher in the list, negative weights list lower
|
||||
// tag: short category description, shows in serverbrowser, can use escaped color commands (for example: \f3)
|
||||
// desc: detailed category desription
|
||||
// red, green, blue, alpha: background color for servers of this category, use values from 0..100, use alpha = 0 to disable background color
|
||||
// keys: keywords to describe, which servers are in this category
|
||||
// ignore: 1: disable this category, 0: enable it
|
||||
|
||||
// possible key types:
|
||||
// IP IP address of a server, partial addresses can be used
|
||||
// IP:port IP & port address of a server
|
||||
// serverdescription Description of a server, partial strings are possible
|
||||
// %mapname Map name, partial names possible
|
||||
// #gamemode Number of a game mode
|
||||
// >ping Matches servers with ping above the given number
|
||||
// $cubescript Name of an alias to check, if the server should be in the category
|
||||
// you can prefix a key with '!' to invert it's meaning
|
||||
// you can prefix a key with '+' to match only populated servers
|
||||
// if several keys are specified (separated by spaces) every server that matches _any_ of the keys is in the category
|
||||
|
||||
// example keys:
|
||||
// ABC matches all servers that have "ABC" as a part of the server description
|
||||
// 11.22.33.44:28763 matches the server with that IP & port address
|
||||
// 11.22.33 matches all servers whose IP starts with that string
|
||||
// %desert matches all servers with "desert" in the currently played map's name (for example, ac_desert, ac_desert2, ac_desert3, apollo_desertcity)
|
||||
// %gema matches all servers with gema maps currently played
|
||||
// >350 matches all servers with ping > 350
|
||||
// #5 #13 #14 #15 matches all servers with flag modes currently played
|
||||
// $mpmap matches all servers with a map from your installed mappack currently played
|
||||
// $offmap matches all servers with an official map currently played
|
||||
|
||||
// cubescript aliases can be used to check more complicated conditions
|
||||
// the alias gets the server properties as arguments and has to return non-zero, if the server should be in the category
|
||||
// arg1: mapname, arg2: gamemode number, arg3: ping, arg4: minutesremaining, arg5: number of players, arg6: maxclients, arg7: IP, arg8: port, arg9: pongflags
|
||||
// pongflags is bit-coded: bit 0: passworded, bit 1: banned, bit 2: blacklisted, bit 6: mastermode
|
||||
|
||||
// these two example scripts check, if the server plays a map from either the official list or the mappack list
|
||||
alias mpmap [(+ 1 (findlist $mappack_maps $arg1))]
|
||||
alias offmap [(+ 1 (findlist $defaultmaps $arg1))]
|
||||
|
||||
|
||||
// basic categories
|
||||
addfavcategory LOVE
|
||||
sbfavourite_LOVE_desc = "Your real favourites"
|
||||
sbfavourite_LOVE_alpha = 20
|
||||
sbfavourite_LOVE_red = 0
|
||||
sbfavourite_LOVE_green = 100
|
||||
sbfavourite_LOVE_blue = 0
|
||||
sbfavourite_LOVE_weight = 255 // because love trumps hate, sheldon
|
||||
|
||||
addfavcategory LIKE
|
||||
sbfavourite_LIKE_desc = "Nice, too"
|
||||
sbfavourite_LIKE_alpha = 10
|
||||
sbfavourite_LIKE_red = 0
|
||||
sbfavourite_LIKE_green = 100
|
||||
sbfavourite_LIKE_blue = 0
|
||||
sbfavourite_LIKE_weight = 50
|
||||
|
||||
addfavcategory HATE
|
||||
sbfavourite_HATE_desc = "Servers of hell"
|
||||
sbfavourite_HATE_alpha = 20
|
||||
sbfavourite_HATE_red = 100
|
||||
sbfavourite_HATE_green = 0
|
||||
sbfavourite_HATE_blue = 0
|
||||
sbfavourite_HATE_weight = -250
|
||||
|
||||
addfavcategory GOOD
|
||||
sbfavourite_GOOD_desc = "Good maprot, nice admins"
|
||||
sbfavourite_GOOD_alpha = 0
|
||||
sbfavourite_GOOD_weight = 40
|
||||
|
||||
addfavcategory BAD
|
||||
sbfavourite_BAD_desc = "Bad ping, maprot, admins, etc."
|
||||
sbfavourite_BAD_alpha = 0
|
||||
sbfavourite_BAD_weight = -30
|
||||
sbfavourite_BAD_keys = "+>2000" // automatically add populated servers with ping > 2000 to this category
|
||||
|
||||
addfavcategory MAP
|
||||
sbfavourite_MAP_desc = "Nice maps"
|
||||
sbfavourite_MAP_alpha = 0
|
||||
sbfavourite_MAP_weight = 1
|
||||
sbfavourite_MAP_keys = "$mpmap" // automatically add servers with mappack maps
|
||||
|
||||
addfavcategory MODE
|
||||
sbfavourite_MODE_desc = "Favourite game modes"
|
||||
sbfavourite_MODE_alpha = 0
|
||||
sbfavourite_MODE_weight = 1
|
||||
sbfavourite_MODE_keys = "#42" // automatically add servers playing towel mode
|
||||
|
||||
|
||||
@@ -202,4 +202,5 @@ exec config/menus_bot.cfg
|
||||
exec config/menus_edit.cfg
|
||||
exec config/menus_settings.cfg
|
||||
exec config/menus_multiplayer.cfg
|
||||
exec config/favourites.cfg
|
||||
|
||||
|
||||
@@ -135,27 +135,15 @@ menuitemslider "Server IP & port: " 0 2 "$serverbrowserhideip" 1 [ "Show" "Show
|
||||
menuitemslider "Sort servers by: " 0 7 "$serversort" 1 [ "Ping" "Number of players" "Max players" "Minutes remaining" "Map name" "Gamemode" "IP address" "Server description"] "serversort $arg1"
|
||||
menuinitselection 1
|
||||
|
||||
addfavcategory 1
|
||||
sbfavourite_1_alpha = 0
|
||||
sbfavourite_1_weight = 10
|
||||
|
||||
addfavcategory 2
|
||||
sbfavourite_2_alpha = 0
|
||||
sbfavourite_2_weight = 0
|
||||
|
||||
addfavcategory 3
|
||||
sbfavourite_3_alpha = 0
|
||||
sbfavourite_3_weight = -10
|
||||
|
||||
alias addfavcatmenu [
|
||||
i = (+ 1 (findlist (listfavcats) $arg1))
|
||||
newmenu "edit favourites"
|
||||
if (< $i 11) [
|
||||
menuitemvar (concatword "concat " (mod $i 10) ": $" sbfavourite_ $arg1 _desc) (concatword "showmenu [favourites " $i "]")
|
||||
menuitemvar (concatword "concat " (mod $i 10) ": $" sbfavourite_ $arg1 _desc " (concatword <s $" sbfavourite_ $arg1 _tag " r>)") (concatword "showmenu [favourites " $i "]")
|
||||
newmenu "serverbrowser help"
|
||||
menuitemvar (concatword "concat " $i ": Toggle category $" sbfavourite_ $arg1 _desc) -1
|
||||
menuitemvar (concatword "concat " $i ": Toggle category $" sbfavourite_ $arg1 _desc " (concatword <s $" sbfavourite_ $arg1 _tag " r>)") -1
|
||||
][
|
||||
menuitemvar (concatword "result $" sbfavourite_ $arg1 _desc) (concatword "showmenu [favourites " $i "]")
|
||||
menuitemvar (concatword "result $" sbfavourite_ $arg1 _desc " (concatword <s $" sbfavourite_ $arg1 _tag " r>)") (concatword "showmenu [favourites " $i "]")
|
||||
]
|
||||
newmenu (concat favourites $i)
|
||||
menuitemtextinput "Tag: " (concatword "result $" sbfavourite_ $arg1 _tag) (concatword sbfavourite_ $arg1 _tag " = $arg1") "" 15
|
||||
@@ -181,7 +169,6 @@ alias addallfavcatmenus [
|
||||
menuitem "Keys to add/remove servers from categories:" -1
|
||||
loop ii (listlen (listfavcats)) [addfavcatmenu (at (listfavcats) $ii)]
|
||||
]
|
||||
alias mpmap [(+ 1 (findlist $mappack_maps $arg1))]
|
||||
|
||||
alias lastsearchname ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user