02 Dec 10, 04:10AM
Or something like "Y" that gets hit less often, yet hit a fair amount. "V"?
|
Scripts
|
|
02 Dec 10, 04:10AM
Or something like "Y" that gets hit less often, yet hit a fair amount. "V"?
02 Dec 10, 04:52AM
I just noticed you forgot "forward" in that bind xD
Maybe bind S [backward; writecfg]
02 Dec 10, 05:35AM
I use okl; instead of wasd.
02 Dec 10, 06:47AM
heh.
And I thought my "ESDF" was weird.
02 Dec 10, 03:46PM
Is it possible to make a script so that as soon as someone takes your flag next time you get a death you will switch to the Sniper Rifle?
That would be an epic script and I would use it!!
02 Dec 10, 04:00PM
I don't see the use of that but here it is, I have not tested so I can't guarantee it will work. ;)
Code: checkflag = [
if (strstr $conline "has your flag") [
nextprimary 5
] []
sleep 1 [checkflag]
]
if (strstr $mapstartalways checkflag) [] [
add2alias mapstartalways [checkflag]
]
02 Dec 10, 04:34PM
Fourteen minutes! A new record! :D
03 Dec 10, 12:19AM
Updated version of anyconnect (connect to private/passworded servers from server list, even with admin pass).
Code: //Even more convenient connecting from server browser.
//Concept by Stef
//By Gibstick
sbpass = ""
sbserverdesc_ = ""
sbpass = ""
lastIP = ""
lastport = ""
sbbreason = ""
connasadmin = ""
newmenu "connect with password"
menuitemvar [ concat "Connecting to:" $sbserverdesc_ ]
menuitem ""
menuitemvar [ result $sbbreason ]
menuitemtextinput "Password: " [] [ sbpass = $arg1 ]
menuitemcheckbox "Connect as admin" 0 [ conasadmin = $arg1 ]
menuitem "2 [ Connect ]" [ closemenu "Server Password"; if $conasadmin [ connectadmin $lastIP $lastport $sbpass ] [ connect $lastIP $lastport $sbpass ] ]
alias sbconnect [
lastIP = $arg1; lastport = $arg2; sbserverdesc_ = $arg7
if (= $arg5 1) [ sbbreason = "2This server is mastermode private. Admin pass is required."; sleep 10 [ showmenu "connect with password" ] ] [
if (= $arg6 1) [ sbbreason = "3You are banned from this server. Admin/deban pass is required."; sleep 10 [ showmenu "connect with password" ] ] [
if (= $arg6 2) [ sbbreason = "3You are blacklisted from this server. Admin/deban pass is required."; sleep 10 [ showmenu "connect with password" ] ] [
if (= $arg6 3) [ sbbreason = "3You are banned and blacklisted from this server. Admin/deban pass is required."; sleep 10 [ showmenu "connect with password" ] ] [
if (= $arg4 1) [ sbbreason = "7This server is password protected."; sleep 10 [ showmenu "connect with password" ] ] [
connect $arg1 $arg2; echo connecting to $arg7 ]
]
]
]
]
]
Epic stuff Gibbeh! :D
Random map/match script: Code: // Random map/match script by DES|Bukz
alias offmaplist [ac_aqueous ac_arabian ac_arctic ac_arid ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_elevation ac_gothic ac_iceroad ac_ingress ac_keller ac_mines ac_outpost ac_power ac_rattrap ac_scaffold ac_shine ac_snow ac_sunset ac_toxic ac_urban ac_werk]
alias mltmdelist [tdm dm lms ts ctf pf lss osok tosok htf tktf ktf]
alias rndmap [
map (at $offmaplist (rnd (+ (listlen $offmaplist) 1)))
]
alias rndmatch [
((at $mltmdelist (rnd (+ (listlen $mltmdelist) 1))) (at $offmaplist (rnd (+ (listlen $offmaplist) 1))))
]
addOnQuit [offmaplist = ""; mltmdelist = ""; rndmap = ""; rndmatch = ""]
docsection [RND]
docident [rndmap] [Loads a random official map.]
docident [rndmatch] [Loads a random mode on a random map.]Use: Code: /rndmap // Loads a random map.
/rndmatch // Loads a random mode on a random map.Singleplayer and coop modes were left out intentionally.
Easily play bots on custom maps script:
http://pastebin.com/raw.php?i=h2jLCBBL Use the: Code: /cstbotProtips: Use even numbers when choosing # of bots for BTDM, (ie choosing 8 will put 4 bots on the enemy team, and 3 on your team, for a 4 on 4) and don't try using a value higher than 32. Enjoy! :)
Custom map settings script for every map you play:
http://pastebin.com/raw.php?i=aDzN0si3 Use: Code: /cstmap // Shows the custom settings menu for the current map.
/cstmapsets // Enables or disables the custom settings script.The menu lets you customize what gamma and fog you want to be applied for that map. AC should remember the values that you set for next time, so you should be able to set it once per map and forget it! :) Some notes: Quote:Custom map settings for every map you play on script by DES|Bukz Triple post spam woooooo. ♥
Whoooooo likes self-recursive conline checking?! :D
At the speed of sleep 0, here's conloop.cfg: Code: // Generic looping conline checker by DES|V-Man.
// Requires check2add.cfg.
if (checkalias if_conline_list) [] [alias if_conline_list ""]
alias if_conline_has [
alias check_for $arg1
if (strcmp $arg2 "but_not") [
alias has_not $arg3; alias action_if_yes $arg4; alias action_if_no $arg5
if (&& (strstr $conline $check_for) (! (strstr $conline $has_not))) [action_if_yes] [action_if_no]
] [
alias action_if_yes $arg2; alias action_if_no $arg3
if (strstr $conline $check_for) [action_if_yes] [action_if_no]]; alias has_not ""]
alias add2conloop [ addcheck if_conline_list $arg1 ]
alias conloop [
if_conline_list
conline [ ]
sleep 0 [conloop]]
addcheck_msa conloop
// Example:
// add2conloop [
// if_conline_has "you fragged" but_not "teammate" [+= frags 1] [
// if_conline_has "you fragged teammate" [-= frags 1] [
// if_conline_has "you knifed teammate" [-= frags 1] []]]
// if_conline_has "cheat" but_not "don't" [say "don't talk about cheating!"] [
// if_conline_has "cheat" but_not "stop" [say "don't talk about cheating!"] []]]
docsection [Custom]
docident [add2conloop] [Adds entries to a system's "if_conline_list".];
docargument [E] ["if_conline_has" entries];
docexample [add2conloop [if_conline_has "fragged" but_not "you" [+= otherplayersfrags 1] [+= frags 1]]] [Adds the entries to the conline checker.];
docremark [Can be used in a nesting manner like other, similar CubeScript commands. See "if_conline_has".];
docident [conloop] [Loops through the conline output, searching for given cues and executing pertinent commands.];
docremark [Is added automatically to mapstartalways to enable conline culling at all times.];
docident [if_conline_has] [Checks conline for specific strings and returns the given commands.];
docargument [S] [The string to search for.];
docargument [B] [Can be "but_not" to indicate that the next argument is an exception; otherwise, it is the command to execute if the first argument is found in conline.];
docargument [X] [Is either the exception (if the second argument is "but_not") or the command to execute if the first argument is not found in conline.];
docargument [Y] [The command to be executed after conline passes the tests of the first and third arguments.];
docargument [N] [The command to be executed after conline fails the tests of the first and second arguments.];Also available on Akimbo!
Double-post spam FTW! ♥
pauseconline: Code: // pauseconline.cfg -- make the conline hold still while you browse it! By DES|V-Man
// Bind "pauseconline" and "unpauseconline" to specific keys for the most efficient use.
alias pauseconline [
if (strcmp $conline " ") [] [
conskip 1; conline [ ]]
sleep 0 [pauseconline]]
alias unpauseconline [push pauseconline []; sleep 1 [pop pauseconline]](shrug, lol)
Thanks to DES|Bukz for spending nearly two hours helping me (ok, he did all the hard work :D) wicked sweet script.
Auto whois everyone when you connect to a server, and auto whois new players as they connect: Code: autogetdemo = 0
if (checkalias whoisdall) [] [
whoisdall = 0
]
checkplayers = [
if (strstr (at $conline 0) "connected") [
whois (findcn (at $conline 1))
conline [ ]
] []
if (= $connected 0) [whoisdall = 0] []
sleep 0 [checkplayers]
]
if (strstr $mapstartalways checkplayers) [] [
add2alias mapstartalways [
if (&& (= $connected 1) (= $whoisdall 0)) [
whoisdall = 1
loop e 21 [whois $e]
] []
if (&& (= $connected 1) (= $autogetdemo 1)) [
getdemo
autogetdemo = 0
] []
checkplayers
]
]
if (strstr $start_intermission autogetdemo) [] [
add2alias start_intermission [autogetdemo = 1]
]Useful for logging purposes: I made a folder called logs and use this launcher for example: Code: assaultcube -T > ~/.assaultcube_v1.1/logs/$(date +%d.%m.%y_%H%M%S)\.logEDIT: I added automatic demo recording. It only works if you are connected and have finished a match (you don't have to have played the entire thing however).
13 Dec 10, 10:32PM
Bukz you make everything I do obsolete :((
@Gibstick: Your efforts aren't obsolete until I finish posting this.
I've grouped all the meta-scripting tools I've crafted over the past few months and consolidated them into one config file: http://www.akimbo.in/files/index.php?act=view&id=723 Documentation and instructions included in the zip file. @DEKiMA: The script you wrote, with this config file installed, can be accomplished using this much code: Code: add2conloop [if_conline_has "connected: " [whois (findcn (at $conline 1))] []]
addcheck_msa [loop e 21 [whois $e]]
14 Dec 10, 08:03PM
(14 Dec 10, 04:01PM)DES|V-Man Wrote: @DEKiMA: Thanks, but because he spent so much time on it and it works perfectly, I'll use Bukz's. Also you use mapstartalways for the inital whois which doesn't work quite as neatly as only using when connecting to a server for the first time. Correct?
Correct, in which case you can merely change the second line to this:
Code: addcheck_sb [add2alias mapstartonce [loop e 21 [whois $e]]]I prefer the whoisall at every new map load because the players will have changed a bit -- but, with this monitoring every "connected: ", all of that will be kept track of. Good script. :D Also, the main reason for using a consolidated looping conline check is so that any number of stats can access one script instead of fighting over alias names and system resources (Bukz and I have a ton of scripts with aliases named "conlinecheck" that all do different things, each causing the last one to throw errors). This allows a single alias to be modified at will by outside scripts wanting a piece of the conline.
15 Dec 10, 02:38AM
First, a question (?)
What does add2conloop do? Is conloop something that I am missing? Another couple pieces of advice. First, I will almost always (now-a-days) prefix (or suffix) my aliases with a short thing describing what they are used for. So you could do who_checkplayers (checkplayers_who) or whois_checkplayers (checkplayers_whois). I may or may not use these prefixes for aliases the user uses, as these tend to be the ones in the lesser amount. Second piece of advice, scan around other scripts, and find techniques used in these to use in yours. I have recently plucked a couple lines out of "My Personal Ladder" as these made initializing my variables much easier, and the script was just beautiful anyhow!
If the tools.cfg file is properly installed, conloop is an alias that is automatically put into mapstartalways. It executes "if_conline_list", which contains commands you give to it via add2conloop. After executing those commands, it clears the conline and calls itself.
Code: alias add2conloop [ addcheck if_conline_list $arg1 ]
alias conloop [
if_conline_list
conline [ ]
sleep 0 [conloop]]You can put anything in using add2conloop, but I mostly made it for the console-condition-checking "if_conline_has": Code: add2conloop [if_conline_has "connected: " [whois (findcn (at $conline 1))] []]And yes, some of the tools were thrown in to the stats script to make things easier for me and Bukz. ;-)
Demo "rewind" workaround script:
http://pastebin.com/raw.php?i=kAjdpRy2 Use: Code: /rewinde.g. Code: /rewind 6 // Restarts the demo you are watching and skips to minutes remaining 6 as fast as possible.HTH all :)
A novel script for warning people
My first (successful) script :D NOTE: Replace |FOX|Thrawn with your own name, i dont like impersonators :D Code: // By Thrawn
alias WARNING1 [
name "WARNING"
me "KEY HAS BEEN PRESSED!!!!"
]
alias WARNING2 [
me "KEY HAS BEEN RELEASED: YOU HAVE BEEN WARNED!"
name "|FOX|Thrawn"
]
bind 7 [WARNING1; onrelease [WARNING2]]
10 Jan 11, 05:15PM
10 Jan 11, 07:30PM
(10 Jan 11, 05:15PM)eftertanke Wrote:(10 Jan 11, 01:04AM)Thrawn Wrote: A novel script for warning peopleUh... what? ok, see the line that reads: Code: name "|FOX|Thrawn"Replace |FOX|Thrawn with whatever your name is Code: // Client counting ident script by DES|Bukz
alias curplayers [
players = 0
if (= $connected 1) [
loop x 21 [
if (= (at (pstat_score $x) 4) -1) [] [
+= players 1
]
]
result $players
] [result -1]
]
docsection [Server]
docident [curplayers] [Returns the current number of clients on the server.]
docremark [If executed while not connected to a server, it will return -1]
docexample [/echo (curplayers)] [Output: 6]A new homemade ident that returns the current number of clients (players) on the server. This return is done silently as almost all cubescript idents, therefore an echo is required to *see* it's result. But, it will still work within any scripts you may incorporate it into. :) Note: It requires no arguments.
17 Jan 11, 03:16AM
Wouldn't it be easier to look at the scoreboard?
17 Jan 11, 03:21AM
Wolf: write me a script that looks at the scoreboard
17 Jan 11, 03:37AM
Well for instance, this is a functionality that I've always wanted because my internet is so crappy and I can only play on servers with a certain # of players, when the server becomes too full I get too laggy, so:
Code: // Personal max client threshold script by DES|Bukz
// Requires the "curplayers" script, get it from this link:
// http://forum.cubers.net/thread-38-post-32722.html#pid32722
if (checkalias climit) [] [
climit = 21
autodc = 0
autocl = 0
]
alias checkclimit [
if (< (curplayers) $climit) [] [
add2alias mapstartonce [
echo (c 3)The server has reached your predefined max client limit.
]
if (= $autodc 1) [ disconnect ] []
]
sleep 0 [ checkclimit ]
]
if (strstr $mapstartalways checkclimit) [] [
add2alias mapstartalways [
if (= $autocl 1) [ checkclimit ] []
]
]
newmenu "climit"
menuitemtextinput [ Max client limit: ] [ result $climit ] [ climit = $arg1 ]
menuitemcheckbox [ Auto-disconnect upon reaching threshold? ] [ $autodc ] [ autodc = $arg1 ]
menuitemcheckbox [ Enable the script? *Must be checked to function ] [ $autocl ] [ autocl = $arg1 ]
menuitem " OK" [ closemenu "climit" ]Use: Code: /showmenu climitUseful for when some of the only good servers around ATM are ones with high maxclients that your internet can't handle, and you're lazy like me ofc. :P Not really something that glancing at the scoreboard can pull off. This of course, is one of many examples I could of used - first one that came to mind since I've been craving it. :D |
|
« Next Oldest | Next Newest »
|