Auto-search on startup/exec script, searches for players in a predefined list of names at a predefined rate automatically upon launching AC/executing the command. Comes with a menu and "on-the-fly" list managing features to make life easier:
NOTE: This script requires tools.cfg!
...command and/or viewing it from the Settings > Misc menu. From here you can enable/disable the script, set the search frequency interval, perform the searches, and access the other menu which helps you manage your list of auto-search names on-the-fly.
The list of commands are:
Basically, the script will make it easy for you to search for multiple people/clans by using a predefined list of names to search for and allowing you to configure how the script behaves on-the-fly.
NOTE: This script requires tools.cfg!
[SELECT ALL] Code:
// Auto-Search script by DES|Bukz - Automatically searches for players on servers by looping through a list of names.
// With "on-the-fly" list managing features and a menu. Requires tools.cfg!
if (checkalias names_to_search) [] [alias names_to_search []]
if (checkalias auto_search) [] [alias auto_search 0]
if (checkalias time_between_searches) [] [alias time_between_searches 10000]
if $auto_search [init_search] []
// alias names_to_search ["{FOO}" "John" "Jane" "Doe" "DEV|"]
// add2initsearch - Adds an entry to your auto-search list if it doesn't already exist.
alias add2initsearch [
alias found 0
loop tmp_search (listlen $names_to_search) [
if (strcmp (at $names_to_search $tmp_search) $arg1) [found = 1] []
]
if $found [] [
add2list names_to_search $arg1
echo (c 1)Successfully added (c 5) $arg1 (c 1)to your auto-search list.
]
]
// updateinitsearch - Updates an entry within your auto-search list.
alias updateinitsearch [
tmp_list = []
loop tmp_search (listlen $names_to_search) [
if (strcmp (at $names_to_search $tmp_search) $arg1) [add2list tmp_list $arg2] [add2list tmp_list (at $names_to_search $tmp_search)]
]
names_to_search = $tmp_list
echo (c 1)Successfully updated (c 5) $arg1 (c 1)to (c 5) (concatword $arg2 ".")
]
// delfrominitsearch - Deletes an entry from your auto-search list.
alias delfrominitsearch [
tmp_list = []
loop tmp_search (listlen $names_to_search) [
if (strcmp (at $names_to_search $tmp_search) $arg1) [] [add2list tmp_list (at $names_to_search $tmp_search)]
]
names_to_search = $tmp_list
echo (c 1)Successfully deleted (c 5) $arg1 (c 1)from your auto-search list.
]
// dumpinitsearch - Shows all entries in your auto-search list.
alias dumpinitsearch [
if (> (listlen $names_to_search) 0) [
loop tmp_search (listlen $names_to_search) [
echo (c 2)Auto-search entry (concatword "#" (+ $tmp_search 1) ":") (c 5) (at $names_to_search $tmp_search)
]
] [echo (c 3)There are no entries in your auto-search list. Use /add2initsearch to add some!]
]
// init_search - Search sequence, sleeps a specified amount of time between query switches, loops through the entire
// names_to_search list.
alias init_search [
tmp_search_int = -1
tmp_counter = 0
loop search_loop (listlen $names_to_search) [
sleep $tmp_counter [closemenu search; sleep 0 [+= tmp_search_int 1; searchnickname (at $names_to_search $tmp_search_int)]]
+= tmp_counter $time_between_searches
]
]
newmenu [Auto Search]
menuitemcheckbox [Enable init search?] [$auto_search] [auto_search = $arg1]
menuitemslider [Milliseconds between searches: ] 2500 15000 [$time_between_searches] 2500 [] [time_between_searches = $arg1]
menuitemvar [concat (c 2)Manage search list] [showmenu "Manage Auto Search List"]
menuitem [] -1
menuitem [ Search!] [init_search]
menuitem [ OK] [closemenu "Auto Search"]
newmenu [Manage Auto Search List]
menuitemvar [concat (c 0)Add to the search list...] [saycommand /add2initsearch ""]
menuitemvar [concat (c 3)Delete from the search list...] [saycommand /delfrominitsearch ""]
menuitemvar [concat (c 2)Update an entry in the search list...] [saycommand /updateinitsearch ""]
menuitemvar [concat (c 1)Show the contents of your search list...] [dumpinitsearch]
menuitem [] -1
menuitem [ OK] [closemenu "Manage Auto Search List"]
add2menu Misc [menuitemvar [concat (c 2)Auto-Search settings...] [showmenu "Auto Search"]]
alias as [showmenu "Auto Search"]
docsection [Auto-Search];
docident [init_search] [When enabled; automatically executed on startup, searching for all names in a list.];
docremark [Loops through the entire contents of alias "names_to_search" and searches for people currently online that are using those names.];
docident [add2initsearch] [Adds an entry to your auto-search list.];
docargument [N] [The name to add.];
docident [updateinitsearch] [Updates an entry in your auto-search list.];
docargument [O] [The old entry to replace.];
docargument [N] [The new entry (name).];
docexample [/updateinitsearch FOO foo] [Result: Replaces "FOO" with "foo" in your auto-search list.];
docident [delfrominitsearch] [Deletes an entry from your auto-search list.];
docargument [N] [The name (entry) to delete.];
docident [dumpinitsearch] [Shows the entire contents of your auto-search list.];
docident [as] [Shows the auto-search menu.];
...command and/or viewing it from the Settings > Misc menu. From here you can enable/disable the script, set the search frequency interval, perform the searches, and access the other menu which helps you manage your list of auto-search names on-the-fly.
The list of commands are:
[SELECT ALL] Code:
/init_search - Performs the automatic searching of players in your auto-search list.
/add2initsearch - Adds entries to your auto-search list.
/as - Shows the auto-search menu.
/delfrominitsearch - Deletes entires from your auto-search list.
/dumpinitsearch - Shows the entire contents of your auto-search list.
/updateinitsearch - Updates entires in your auto-search list.
Basically, the script will make it easy for you to search for multiple people/clans by using a predefined list of names to search for and allowing you to configure how the script behaves on-the-fly.