17 Jan 11, 04:07AM
Bear in mind there are servers with high maxclients that even the server can't handle.
Scripts
|
17 Jan 11, 04:07AM
Bear in mind there are servers with high maxclients that even the server can't handle.
It's meant to be used in bigger and better scripts, it's just a tool. Similar to how curweapon returns the numerical value of the weapon you're holding, or how curserver returns the IP and port of the server you're on, this returns the # of players on the server. I'm similarly dumbfounded with why this hasn't already been implemented in cubescript. xD
If someone needed to loop a body of code the exact number of times as there are players on the server, it'd be a simple: [SELECT ALL] Code: loop blah (curplayers) [] The "whoisall" (and others like it) script will be more efficient now, because it won't always be looping 21 times, it'll loop only exactly the number of times it has to: [SELECT ALL] Code: loop d (curplayers) [whois $d]
Oh, ok. I get it now.
17 Jan 11, 05:02AM
Nice. Will it be added to tools.cfg?
17 Jan 11, 05:18AM
I showed it to V-Man a while back and I'm pretty sure he was thinking about adding it, let's throw stuff at him until he does.
* Bukz throws a desk chair @ V-Man :P
17 Jan 11, 05:26AM
* eftertanke throws a foot rest @ V-Man :P
17 Jan 11, 12:29PM
Months of scripting, and I still don't see anyone use code such as
if $connected [] instead of if (= $connected 1) Why Bukz? Is it habit?
17 Jan 11, 12:54PM
Maybe it was something else causing them, but I was getting missing ) errors without it. :P
17 Jan 11, 01:01PM
[SELECT ALL] Code: loop k (curplayers) [kick $k FIRE_IN_THE_HOLE]
17 Jan 11, 03:21PM
* V-Man throws flower petals at V-Man :P
All right youse guys. With a bunch of help from Wifey, I was able to add bot-player-counting capabilities to the script. I'm including the modified/expanded version of "curplayers" in this update of tools.cfg. :D
Script Request: (I tried to script it but i allways get an epic fail). A countdown time when you (or teammatet) drop the flag in ctf mode (30 seconds?). The countdown must stop if someone gets the flag again.
Help: countdown must be diplayed when in log there's a "you dropped the flag" or "xxxxx dropped the enemy flag. It will be cool if from 30 to 20 displayed in green, from 20 to 10 orange and from 10 to 0 red.
17 Jan 11, 10:23PM
(This post was last modified: 17 Jan 11, 10:25PM by MykeGregory.)
[SELECT ALL] Code: /Bind 9 [paused 0 onrelease; Me UN-PAUSED] Bind 0 [paused 1 onrelease; Me PAUSE] This is a pause and un pause script i wrote for offline bot games and i use it myself. it pauses the game when you press 0 and unpauses when you hit 9. i know its nooby but i find it handy for when your playing bots and somthing in real life pops up, like food and toilet breaks. lol
Save one of your keys and use:
[SELECT ALL] Code: /bind 0 [if $paused [paused 0; echo Unpaused] [paused 1; echo Paused]] And yet another way to make playing custom maps with bots easier: [SELECT ALL] Code: // Custom bot maps menu item script by DES|Bukz This script requires V-Man's tools.cfg. You have to edit alias "custommaps" to add your own list of map names before using the script, for example: [SELECT ALL] Code: alias custommaps [ac_edifice ac_fracht ac_egypt] The new menu will show up in the existing "botmaps" menu:
19 Jan 11, 06:35AM
Thanks a lot V-Man!!
I'll change it a little cuz i'm interested just when my team drops :D Strangly i had to paste all tools.cfg on autoexec.cfg because if a execute tools.cfg didn't work. Anyway sometimes countdown goes under 0 with negative numbers. I'm gonna test it more, thanks again Edit: You forget this cases: [SELECT ALL] Code: if_conline_has "returned the enemy flag" [alias flag_is_down 0] []
19 Jan 11, 12:49PM
19 Jan 11, 01:18PM
(17 Jan 11, 01:01PM)Gibstick Wrote: Nnno! [SELECT ALL] Code: loop k (curplayers) [kick $k "FIRE IN THE HOLE"]
19 Jan 11, 01:39PM
Gibstick , yes i put it, but i think the problem was with the 'exec config/countdownflag.cfg' dunno why
19 Jan 11, 03:40PM
You should put scripts other than tools.cfg in a folder (for example, "scripts") and execute that folder at the end of autoexec.cfg:
[SELECT ALL] Code: exec config\tools.cfg
19 Jan 11, 10:37PM
(19 Jan 11, 01:18PM)eftertanke Wrote: Nnno! I was just mocking one of Bukz scripts x)
To supplement Bukz' "curplayers" script:
[SELECT ALL] Code: // (validcnumlist) returns a list of valid client numbers [SELECT ALL] Code: alias teamcount [ [SELECT ALL] Code: // kickbots (cn) (cn) (cn) (cn) (cn) (cn) ... -- kick multiple bots by client number @VallDiGna: Haha, how'd those escape my notice?! I've updated the flag countdown script to cover the missing cases you mentioned. Thanks!
Auto-Ignore script - Automatically ignore clients with wildcard (e.g. clantag) support.
Password Generator script - Server admin tool to easily generate random, secure, admin and deban passwords. ...and some more junk... :P [SELECT ALL] Code: // curhighestcn - Returns the highest client number in the current game. - by DES|Bukz Summary: curhighestcn - Returns the highest valid cn in the current game. curenemies - Returns your current number of enemies. curdeaths - Returns the given client's current number of deaths. curfrags - Returns the given client's current number of frags. curratio - Returns the given client's current ratio (frags / deaths). curscore - Returns the given client's current score (in points). Lots of new toys for you cubescripters out there! HF! More to come, keep checking this post.
:D
My turn! Delete elements in a list in a given alias: [SELECT ALL] Code: alias delfromlistend [ delfromlistend - delete a given number of list elements from the end of a given list delfromliststart - delete a given number of list elements from the beginning of a given list delfromlist - delete a given element from a given list delfromlist_mult - delete multiple arbitrary elements from a given list Example, for those who remember this: /alias testlist [I do not like CubeScript] /echo $testlist I do not like CubeScript /echo (delfromlist_mult $testlist [do not]) I like CubeScript
26 Jan 11, 11:46AM
(This post was last modified: 26 Jan 11, 11:48AM by MykeGregory.)
(22 Jan 11, 04:18PM)DES|V-Man Wrote: 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
26 Jan 11, 01:23PM
Lack of credit FTW!
Win V-Man, simply...win.
delfromlist is EXACTLY what I need to allow people to remove specific entires from their auto-ignore list when using the auto-ignore script. You couldn't of released it just a few hours before eh?! :P We'll see another update to tools.cfg soon me hopes? :D:D Edit: VenteX, sorry for the confusion, but what are you referring to/who are you directing that at?
I've updated the delfromlist scripts to behave more broadly, like other command-like aliases. They now take a list and output a result, so you can do more with it like echo, save a new alias, etc. But you don't change the original alias (if the list is in an alias), unless you direct it to. :D
And I'll update tools.cfg when I feel more decisive about whether the world is ready for a certain script. VenteX is disappointed that he didn't get credit for the idea to have the vote sound in CAPSLOCK. All I did was put the numbers in.
26 Jan 11, 09:17PM
can some one make me a teabag scipt, please use t :)
|
« Next Oldest | Next Newest »
|