Scripts
What about simply not kicking those players? I'm sure you can do that yourself and save some time to the scripters...
Thanks given by:
Take the challenge, script it yourself.
here's some tips:

1- Make a list of names.
[cubescript]alias dont_kick_list [unarmed armed unarmored unskilled xxXXXXXX_I_SNIPE_U_DEAD_XXXXXxx][/cubescript]

2- You need something to check your kick (it isn't possible through /kick), like /ckick (bind it to a key if you like: /saycommand "ckick ", or simply make a menu)
[cubescript]alias ckick [...][/cubescript]

3- you will need a loop to match and check if your argument with the names on the list.
[cubescript]alias ckick [
loop i (listlen $dont_kick_list) [if (strcmp (findpl $arg1) (at $dont_kick_list $i)) [] []]
][/cubescript]"loop" restarts to check the "body", adding +1 to "i" (starts on 0) in every loop until "i" = the number of names
"listlen" counts the number of names on your list
"findpl" returns the name of the client number
"strcmp" matches the exact name from the client number with one name from the list
"at" returns the name in the "i" position
"if" executes the first order if the names match, if not execute the second
"arg1" is the first argument given

4- now you need a way to know if the name you are trying to kick was found on the list after the loops. (created "dont_kick")
[cubescript]alias ckick [
dont_kick = 0;
loop i (listlen $dont_kick_list) [if (strcmp $arg1 (at $dont_kick_list $i)) [dont_kick = 1] [
if (= $dont_kick 1) [echo "Cannot kick, name on the dont_kick_list!"] [kick $arg1]
][/cubescript]"dont_kick" is checked on every loop, if the result is 0 we are free to kick.

5- I always rename and save $arg1 in this situations because it might change when you execute another command giving another argument (renamed it "someone").
[cubescript]alias ckick [
someone = $arg1;
dont_kick = 0;
loop i (listlen $dont_kick_list) [if (strcmp $someone (at $dont_kick_list $i)) [dont_kick = 1] []];
if (= $dont_kick 1) [echo "Cannot kick, name on the dont_kick_list!"] [kick $someone]
][/cubescript]

I did not test it, i'm not sure if it'll work. Test it youself, fix it if necessary. :D
Thanks given by:
Ok ty;)
Thanks given by:
|BC|Wolf, its becuz i play gema's and i have autogemakick
Thanks given by:
Hey guys,
i'm trying to make a list with friends and if you click on the name you search on that name, but it doesn't work and i don't know exactly how to make. please help me.
Thanks given by:
Yai!
* Orynge loves menus.

The command to search is "searchnickname".
To make a menu, take a look at this one, for example. It's part of a clan roster I'm scripting for my clan (B}) in my spare time.
newmenu "cr-Orynge"
menuitemvar [concatword (c 5) "Alias: " (c 1) "Orynge"] -1
menuitem "" -1
menuitemvar [concatword (c 5) "Country: " (c 2) "Aus" (c 0) "tra" (c 2) "lia"] -1
menuitem "" -1
menuitemvar [concatword (c 5) "Status: " (c 1) "Member"] -1
menuitem "" -1
menuitem "Bio: Heya, I'm Orynge, and I started playing AssaultCube in October, 2009. I only" -1
menuitem "started getting into the community in July 2010, though, when the AC forums" -1
menuitem "came back from hiatus." -1
menuitem "That lead to me being invited to apply to Exile Unit by DrauL, a clan that I've" -1
menuitem "spent most of my AC career in since I was accepted by Cactus, DrauL (now KH)," -1
menuitem "and MaiMeeTur (now eQ). I became a leader of the clan when DrauL left the clan" -1
menuitem "for the first time in December. Unfortunately, all good things must come to an" -1
menuitem "end, as one did in September 2011, after my holiday to New Zealand; Xu was" -1
menuitem "closed by Cactus and I after a very inactive period. I was then convinced to" -1
menuitem "apply to B} (that convincing was mainly ShadowZ saying "B}Orynge" over and" -1
menuitem "over again, as well as Nightmare making an awesome shirt with the letters " -1
menuitem ""B}Orynge" on it, with a picture of the Annoying Orange). I was accepted a" -1
menuitem "month later, which is why you're reading this bio here on the B} website (or" -1 menuitem "script)." -1
menuitem "Onto something completely different. Ever since DrauL introduced me to IRC, I've" 1
menuitem "spent a great deal of each day there. #xuclan was where I met a bunch of" -1
menuitem "awesome guys, such as DrauL, Lightning, Anarchist (now Nukpwr)," -1
menuitem "Ronald_Reagan, Huntsman, the_andyman, and many more." -1
menuitem "Here are my favourite weapons to this point:" -1
menuitem "- 1.0.2: SMG" -1
menuitem " - 1.0.4-1.1.0.3: Shotgun" -1
menuitem " - 1.1.0.4: Assault Rifle/SMG" -1
menuitem "For more personal info, my real name is Tim, and I've been in this world for over" -1
menuitem "14 and a half years. I come from one of the laggy Land Down Under's (with New" -1
menuitem "Zealand being the other one)." -1
menuitem "So, in short, I've been playing since 1.0.2, and I lag. ;D" -1
menuitem "" -1
menuitemslider "How cool is he? " 1 3 "" 1 "AWESOME AWESOME AWESOMER"
menuitem "" -1
menuitemvar [concatword (c 2) "[ Is Orynge online? ]"] [searchnickname orynge]

Remember that menus don't automatically make a new line if that line is too big. Also, that "-1" means no command, and if it wasn't there and you clicked on that line, the menu would close.

* Orynge still has to find "menuitemslider" in the docs.
Thanks given by:
Yeh, I noticed that, so I made some. Feel free to copy this into your docs.cfg file. :D

[code=CubeScript]
docsection [Menus]

docident [menuitemcheckbox] [Creates a menu checkbox.];
docargument [N] [Menu item name] [];
docargument [D] [Display checked or not] [1 or 0 (checked or unchecked)];
docargument [A] [Action when selected] [];
docremark [Usually the value of a binary alias is used for the second argument.];

docident [menuitemimage] [Creates a menu item with an accompanying image.];
docargument [P] [Path and filename of image to be used] [];
docargument [D] [Description] [];
docargument [A] [Action when selected] [];
docargument [H] [Hover action] [];
docremark [Displays a tiny (text-line-sized) square image, P, along with normal menu item behavior.];

docident [menuitemkeyinput] [Creates a menu item which will bind a key to a command or alias.];
docargument [D] [The description of the command to be bound];
docargument [A] [The command or alias to be bound to the user-input key];

docident [menuitemslider] [Creates a menu item which utilizes a slider to output values.];
docargument [D] [Description];
docargument [Min] [Minimum value];
docargument [Max] [Maximum value];
docargument [C] [Current display value];
docargument [S] [Step value];
docargument [V] [Values to display when adjusting];
docargument [A] [Action to take on change];
docremark [The step value determines how big each step in the slider is.];

docident [menuitemtextinput] [Creates a text box for user string input.];
docargument [D] [Description];
docargument [V] [Value displayed];
docargument [A] [Action to perform when used];
docargument [H] [Action to perform when hovered over];
docargument [M] [Max characters allowed as input];
docexample [menuitemtextinput "Store commands in a test alias: " $testalias "alias testalias $arg1" "echo This will store a test alias." 16];
[/code]
Thanks given by:
thanks orynge and v-man i look at that scripts and make my own :D

i type in menus.cfg

menuitem Friends [showmenu friends]

and then
newmenu friends
menuitem *K!D* [searchnickname *K!D*]

because *K!D* is my brother ^^

thanks
Thanks given by:
I wrote a "Friends" script if you wanna try it out! :D
Thanks given by:
(26 Jan 11, 11:46AM)MykeGregory Wrote:
(22 Jan 11, 04:18PM)DES|V-Man Wrote:
bind CAPSLOCK [sound 50; onrelease [sound 52]]

This is a script |DES|V-man kindly wrote for me to stop me pressing the capslock key while in game.
it makes the vote noise, so if i hear it and there is no vote, i will know i'v pressed the capslock key
LOL THIS IS AWESOME, ups, caps lock... XD
Edit: After going through 10 pages of the scripts thread I havent been able to find the one I was looking for :(, so...
Could someone please tell me the script with the connects to the Match servers as Mewtwo and such (but maybe a revised version of the one that I had ???). Thanks in advance.
Thanks given by:
http://forum.cubers.net/thread-2975.html
Thanks given by:
V-Man i saw nice
Thanks given by:
What're the default definitions for delta_game_0 and delta_game_1? I accidentally ran an old script of mine that modified those and don't really remember CubeScript much.

I looked in defaults.cfg, and it had this:

alias delta_game_0 [ if (= $arg1 1) [ primary ] [ secondary ] ]

But it will obviously only switch between primary and secondary.
Thanks given by:
$ grep -R "delta_game" *
defaults.cfg://alias delta_game_0 [ if (= $arg1 1) [ primary ] [ secondary ] ]
scripts.cfg:alias delta_game_0 [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ]

This tells me that it is in defaults.cfg and scripts.cfg.

Go with scripts.cfg, it has all the deltas in it.
Thanks given by:
Thanks. I believe "shiftweapon" is what I needed.
Thanks given by:
Switch for cubescript:

[cubescript]// switch - Takes an integer argument to determine which block of code to execute.
// NOTE: This command can only handle up to 23 "cases" (24 arguments).

// SVN version only below
// switch = [
// if (&& (<= $numargs 24) (checkrange $arg1 0 22)) [
// execute (getalias (format arg%1 (+ $arg1 2)))
// ]
// ]

// AC 1104 and lower version
switch = [
if (&& (<= $numargs 24) (&& (>= $arg1 0) (<= $arg1 22))) [
tmp = (getalias (format arg%1 (+ $arg1 2)))
tmp
]
][/cubescript]

Examples:

[cubescript]i = 22
switch $i [
echo test 1 // case 0
] [
echo test 2 // case 1
] [
echo test 3 // case 2
] [
echo test 4 // case 3
] [
echo test 5 // and so on..
] [
echo test 6
] [
echo test 7
] [
echo test 8
] [
echo test 9
] [
echo test 10
] [
echo test 11
] [
echo test 12
] [
echo test 13
] [
echo test 14
] [
echo test 15
] [
echo test 16
] [
echo test 17
] [
echo test 18
] [
echo test 19
] [
echo test 20
] [
echo test 21
] [
echo test 22
] [
echo test 23
]

// Output: test 23[/cubescript]

[cubescript]bind KEY [
// Use if statements to set an integer value for switch to inspect.
//
// If editing, execute case 0 (aka switch's arg2)
// | if connected to a server, execute case 1 (aka switch's arg3)
// | | if playing bots, execute case 2 (aka switch's arg4)
// | | | else execute case 3 (aka switch's arg5)
// | | | |
if (|| $editing (= $gamemode 1)) [ i = 0 ] [ if $connected [ i = 1 ] [ if (curmodeattr bot) [ i = 2 ] [ i = 3 ] ] ]

switch $i [
echo You're editing. // case 0 code block
] [
echo You're in multiplayer. // case 1 code block
] [
echo You're in singleplayer. // case 2 code block
] [
echo You're not playing. // case 3 code block
]
]

// In SVN/future versions of AC, the above code for the keybind is a bad example. Use megabind instead.[/cubescript]
Thanks given by:
could some1 write a script that would upon writting like

chagne 0 3 5 6 7

make forceteam to CN 0,3,5,6 and 7?

PS numbers are just an example

ty :)
Thanks given by:
I haven't attempted such a thing in 1.1, but in 1.0 I couldn't find a way to get the client to perform repeated admin functions in one script. I'm not sure why that is, but I could take a look at 1.1 to see if the problem is still there.
Thanks given by:
You'll have to add a sleep obviously, because it's a vote even if it ends again immediately. Other than that, I can't see why it wouldn't work.
Thanks given by:
One day I will or someone will need to make and index of all these scripts lol.
Before I post my scripts I would like to remind you that I don't know a whole lot of cubescript and got help with these after my attempts didn't work but they are both my own ideas from reading through all the .cfgs

1. Favourite Maps
Thanks V-Man!
It adds a favourite maps to the maps menu so when selecting a map you need just open favourites and select rather than browse through your huge cache of maps. Also there's none that say "Untitled by Unknown"

[cubescript]
//Favourite Maps By D1551D3N7
newmenu "favourite_maps"
menuitem "Team Deathmatch" "mode 0; showmenu favmaps"
menuitem "Deathmatch" "mode 2; showmenu favmaps"
menuitem "Team Survivor" "mode 4; showmenu favmaps"
menuitem "Survivor" "mode 3; showmenu favmaps"
menuitem "Capture the Flag" "mode 5; showmenu favmaps"
menuitem "Hunt the Flag" "mode 13; showmenu favmaps"
menuitem "Keep the Flag" "mode 15; showmenu favmaps"
menuitem "Team Keep the Flag" "mode 14; showmenu favmaps"
menuitem "Pistol Frenzy" "mode 6; showmenu favmaps"
menuitem "Last Swiss Standing" "mode 9; showmenu favmaps"
menuitem "One Shot, One Kill" "mode 10; showmenu favmaps"
menuitem "Team One Shot, One Kill" "mode 11; showmenu favmaps"
newmenu "favmaps"
//Change the map names to the ones you like but they MUST be the //same name as the ones in your maps folder (without .cgz)
alias favmaps "dreamland ac_douze krull_bunker mini_douze" "cgz" "map $arg1"
genmapitems $favmaps
[/cubescript]
Then go to menus_multiplayer.cfg and add
[cubescript] menuitem "Change To Favourite Map" "showmenu favourite_maps" [/cubescript] Beneath
[cubescript] menuitem "Set mode/map..." "showmenu Gamemode" [/cubescript]

ToDo: make savefav alias to save map to favourites.

2. Sendmap Menu
Thanks Ronald_Reagan!!!
[cubescript] newmenu Sendmap
menudirlist "packages/maps" "cgz" "sendmap $arg1" [/cubescript]
Now for some reason this dosen't work but I'm sure some one will be able to tweak it to work. Add it to menus_multiplayer.cfg below [cubescript] menuitem "Set mode/map..." "showmenu Gamemode" [/cubescript] or below favmaps if you have it :).


Other Ideas:
Ask Screenshot --- DONE SEE BELOW
Instead of screenshotting after every single game it will pop up and ask you weather to take a screenshot or not. (I didnt get to finish this or manage it as couldnt figure out how to get function for the end of the game)

Cool thing: Load a map of your choice on start
http://forum.cubers.net/thread-1339.html
This thread showed me this cool function. So right-click your assaultcube.bat file and click edit. Add --loadmap=maphere
This was sitting in my drafts for a long time :)
EDIT: Auto-screenshot
Thanks Lantry!!!!!
This needs V-mans tools.cfg to work. Might not work all the time
[cubescript]
alias scorescreenshot [ showscores 1; sleep 100 [ screenshot ] ]
newmenu screenshot
menuitem "Yes" [ sleep 30 [ scorescreenshot ] ]
menuitem "no"

addcheck_si [ showmenu screenshot ] [/cubescript]
Thanks given by:
(12 Dec 11, 09:46PM)tempest Wrote: You'll have to add a sleep obviously, because it's a vote even if it ends again immediately. Other than that, I can't see why it wouldn't work.

Nor can I, but it still doesn't work.
Thanks given by:
(13 Dec 11, 12:39AM)D1551D3N7 Wrote: Ask Screenshot
Instead of screenshotting after every single game it will pop up and ask you weather to take a screenshot or not. (I didnt get to finish this or manage it as couldnt figure out how to get function for the end of the game)

Well, it doesn't ask you each time, but I made a script which you might find useful. It automatically turns autoscreenshot on or off depending on the mastermode: here.

As for the asking script, you can use the "start_intermission" alias, or if you have V-Man's CS tools, you should use the "addcheck_si" alias.
Thanks given by:
I should probably make a whole autoexec.cfg file with all these in, and the necessary files. Ive obviously got some work to do!
Thanks given by:
Another idea :D
Auto GG
This needs V-Mans tools.cfg
[cubescript] addcheck_si [ say "GG Everyone :D" ] [/cubescript]

added a "d" so that it'll work
Thanks given by:
Well, Im a Script übbern00b, but I have some ideas... (dunno how difficult they might actually be).
One that pops up a menu to change the voicecoms.
One that , after typing a connect, prompts you if you wanna save it and with which name.
Thats all, for now...
Thanks given by:
Okay another idea :D If I bind my auto-screenshot and gg cause naturally you would have had a gg if you wanted screenshot
[cubescript] alias scorescreenshot [ showscores 1; sleep 100 [ screenshot ] ]
newmenu screenshot
menuitem "Yes" [ say "gg everyone :D"; scorescreenshot ]
menuitem "no"

addcheck_si [ showmenu screenshot ] [/cubescript]

PaulmuaddibKA what do mean a menu to change voicecoms?
I think it would be possible :D
Thanks given by:
@D1551D3N7 An in-game menu which allows you to change the Voice-com Expression to the one you mostly prefer.
It could be arranged from this, which is my first try to get into scripting XD:
// VoiceCom Menu
  //Main
newmenu "VoiceCom"
menuitem "1. Team Replies" [showmenu "Team Replies"]
menuitem "2. Team Commands" [showmenu "Team Commands"]
menuitem "3. Team State" [showmenu "Team State"]
menuitem "4. Team Talk" [showmenu "Team Talk"]
menuitem "5. Team Tactics" [showmenu "Team Tactics"]
menuitem "6. Public Talk" [showmenu "Public Talk"]

An every category make a selectable item for each expression (Yes, All right sir, Affirmative...) where you could change it, instead of having to go to the .cfg file each time.
Thanks given by:
[cubescript]
// forceteams -- force a variable number of client numbers to the opposite team -- by V-Man
// requires tools.cfg
alias forceteams [
forcelist = []
ft = 0; tmp1 = ft; tmp2 = $numargs; tmp3 = 100
loop sft $numargs [add2alias forcelist (getalias (concatword arg (+ $sft 1)))]
tmp4 = [forceteam (at $forcelist $ft)]
sloopme]
[/cubescript]
This works in SVN, haven't tested in 1.1.0.4.
The sleeps are certainly the key to this, but in 1.0 you couldn't even sleep repeat admin commands (or perhaps I couldn't figure out how, but I do recall trying many different methods).
Thanks given by:
This is a script to help you watch demos, it will change the crosshair and load the hitsound when a player hits another one. If you are folowing (ghost) cn 4, type /hit 4.
//change mycrosshair if you're not using star.png
//activate the script typing "/hit cn" while watching a demo

mycrosshair = "star.png"

alias hit [last_pweap = 0; pl = $arg1; hit_]
alias hit_ [if (watchingdemo) [
tmp_num = -1
new_pweap = 0
loop i 20 [tmp_num = (+ $tmp_num 2); new_pweap = (+ $new_pweap (at (pstat_weap $pl) $tmp_num))]
if (< $last_pweap $new_pweap) [crossh]
last_pweap = $new_pweap
sleep 0 [hit_]
]]
alias crossh [
sound 47; loadcrosshair x-dot.png; sleep 70 [loadcrosshair $mycrosshair]
]
Thanks given by:
A very basic melee knife script i made.
Bind F [weapon 0; attack; primary]

Just type that and then spam F to use. Halo CE style. Just dont spam too quickly or it will just change back to your weapon without slashing. Please improve on this if you want cos it is gash, could be a handy script to have if its improved.
Thanks given by: