30 Mar 11, 11:28PM
Wouldn't having it on intermission actually kill your stats right at the end? And, if you don't finish a game/map, the next one may well "inherit" the stats?
|
Scripts
|
|
30 Mar 11, 11:28PM
Wouldn't having it on intermission actually kill your stats right at the end? And, if you don't finish a game/map, the next one may well "inherit" the stats?
Not sure about the inheriting, but yeah it's stupid if you can't even look at your stats at the end of a match.
Ok, it inherits.
31 Mar 11, 08:00AM
in that case,
Code: addcheck_msa [accuracyreset]
02 Apr 11, 04:27AM
**New Bukz Commands**
Code: bukz = [ loop $arg1 $arg2 $arg3 ]
getbukz = [ result (getalias $arg1) ]Example Code: smilies = [ \:D |:D /:D ]
bukz "D:" (listlen $smilies) [ echo (at $smilies (getbukz (format %1 "D:"))) ]
// Output:
// \:D
// |:D
// /:D
02 Apr 11, 07:01AM
Awww. Frame that and put it on your fridge!
02 Apr 11, 11:56AM
All aboard the troll trail \:D
There's no way to get the vdelta or cubeheight of a vertex is there? Trying to work a way out but unless I'm missing something obvious it doesn't look possible at this time.
I did notice getposition was added in 1105. Thanks devs for the command and for making all my scripting efforts toward that end moot. But seriously, it is nice to have.
03 Apr 11, 06:40AM
lol
My goal in making workaround scripts is that a dev will notice it and say "duh! This would be more efficient if I put this line of code in -- like that."
11 Apr 11, 10:56AM
the bind key the claim admin script doesnt work! i even applied all my settings right and still all it came up with was the server configuration was incorrect? any help/tips
11 Apr 11, 12:41PM
Paste your configuration, without your passwords, here.
07 May 11, 11:05AM
(02 Apr 11, 11:56AM)Gibstick Wrote: All aboard the troll trail \:D All aboard the noob truck Code: alias 1z [me [|^^^^^^^^^^^^^^| ,,]];
alias 2z [me [| N00B TRUCK | '|""";.||.___.]];
alias 3z [me [|_..._...______==== _|__|..., ] |]];
alias 4z [me ["(@)'(@)""""*|(@)(@)*****(@)]];
alias truck [oldname = $curname;name ".";1z;2z;3z;4z;name $oldname]
start_intermission = [truck];
07 May 11, 12:06PM
Nice script, though you don't need those semicolons at the end - line breaks to the same thing. It's either line breaks or semicolons and most people chose line breaks.
07 May 11, 01:33PM
07 May 11, 07:59PM
(07 May 11, 11:05AM)Sarin Wrote:(02 Apr 11, 11:56AM)Gibstick Wrote: All aboard the troll trail \:D This is the best script ever
The Variable Zoom Sniper
by CeCiA* Code: //The Variable Zoom Sniper
bind Z [scopefov 20]
bind X [scopefov 30]
bind C [scopefov 40]
14 May 11, 08:40AM
(14 May 11, 04:03AM)cecia Wrote: ...In which case, Code: bind Z [ if $editing [ domodifier 2 ] [scopefov 20]]
bind X [ if $editing [ domodifier 3 ] [scopefov 30]]
bind C [ if $editing [ copy ] [scopefov 40]]
14 May 11, 03:26PM
Alright thanks Jamz, I'm still trying to learn :)
17 May 11, 11:47AM
the onKill, onTK, onDeathOther, etc. aliases don't work... does these aliases only work on admins or something?
They only work in the SVN version (and future releases of AC), they are not in 1104 or versions prior to.
@ Lantry: There is a new variable "slowmove" in the SVN version which, when is set to 0, editmode fly speed is the same as the spectate mode fly speed, when it's set to 1, it uses the old editmode fly speed. Theres also a helper alias in scripts.cfg called "slowtoggle" which can be keybound to easily toggle between the two while editing. Sure it's not as customizable as your request, but it's a step in the right direction. :) Btw, slowmove defaults to 0, and slowtoggle is keybound to mouse2 (right mouse click) if editing and if not using the "old editbinds" (/old_editbinds = 0) - the editing menu was moved to mouse3 (scroll wheel click) for this as well. Edit: nvm, we've got a proper flyspeed variable now. :)
17 May 11, 05:10PM
(This post was last modified: 17 May 11, 05:15PM by master_se7en.)
My own script: GEMA commands (kick, ban) for players and admins...
Save this as a seperate cfg file: Code: alias initGEMACommands [
alias kickReason "No killing in GEMA!"
alias banReason "No killing in GEMA!"
alias meDeclare ""
alias kickKiller [
kick (findcn $arg1) $kickReason
if (strcmp $meDeclare "") [] [ me $meDeclare ]
]
alias kickKillerCN [
kick $arg1 $kickReason
if (strcmp $meDeclare "") [] [ me $meDeclare ]
]
alias banKiller [
ban (findcn $arg1) $banReason
if (strcmp $meDeclare "") [ me $meDeclare ] []
]
alias banKillerCN [
ban $arg1 $banReason
if (strcmp $meDeclare "") [ me $meDeclare ] []
]
bind F3 [ saycommand "/kickKiller " ]
bind F4 [ saycommand "/banKiller " ]
bind F7 [ saycommand "/kickKillerCN " ]
bind F8 [ saycommand "/banKillerCN " ]
bind F9 [ uninitGEMACommands ]
echo "Gema Commands initialized."
]
alias uninitGEMACommands [
alias kickReason []
alias banReason []
alias meDeclare []
alias kickKiller []
alias kickKillerCN []
alias banKiller []
alias banKillerCN []
bind F3 ""
bind F4 ""
bind F7 ""
bind F8 ""
bind F9 [ initGEMACommands ]
echo "Gema Commands uninitialized."
]add this to the autoexec.cfg file: Code: exec "config\<name of the cfg file where the gema commands are found>"
bind F9 [ initGEMACommands ]i'm still adapting to the scripting nature of CubeScript... my first script.
19 May 11, 12:31AM
What other languages do you know?
* Ronald_Reagan guesses and says "Javascript!" Anyways, look at this. Its just much cleaner (memory wise). Code: alias uninitGEMACommands [
delalias kickReason
delalias banReason []
delalias meDeclare []
delalias kickKiller []
delalias kickKillerCN []
delalias banKiller []
delalias banKillerCN []
bind F3 ""
bind F4 ""
bind F7 ""
bind F8 ""
bind F9 [ initGEMACommands ]
echo "Gema Commands uninitialized."
]Or you could do this: Code: alias initGEMACommands [
alias kickReason "No killing in GEMA!"
alias banReason "No killing in GEMA!"
alias meDeclare ""
alias kickKiller [
kick (findcn $arg1) $kickReason
if (strcmp $meDeclare "") [] [ me $meDeclare ]
]
alias kickKillerCN [
kick $arg1 $kickReason
if (strcmp $meDeclare "") [] [ me $meDeclare ]
]
alias banKiller [
ban (findcn $arg1) $banReason
if (strcmp $meDeclare "") [ me $meDeclare ] []
]
alias banKillerCN [
ban $arg1 $banReason
if (strcmp $meDeclare "") [ me $meDeclare ] []
]
bind F3 [if $GEMACommand [ saycommand "/kickKiller " ]]
bind F4 [if $GEMACommand [ saycommand "/banKiller " ]]
bind F7 [if $GEMACommand [ saycommand "/kickKillerCN " ]]
bind F8 [if $GEMACommand [ saycommand "/banKillerCN " ]]
bind F9 [if $GEMACommand [GEMACommand = "0"] [GEMACommand = "1"] ]
]Test this, I haven tested it myself actually. Also, I see usage of saycommand "/kickKillerCN ". If you want to execute it, just do kickKillerCN
19 May 11, 09:58AM
(This post was last modified: 19 May 11, 10:09AM by master_se7en.)
i didn't know there was a "delalias" function... okay, time to remake my script... i'll post it later...
the reason i'm not invoking the functions directly is because the script-user must indicate the player's name or CN yet... i'm still finding a way on auto-detecting the killer in the process, since i'm not using the onKillOther, etc. aliases right now... Ronald_Reagan, your guess was close... technically... since I considered AS3 to be close to JavaScript... I'm also a C++ programmer, in addition to AS3...
You can use pstat_score or conline to detect kills, [shameless plug]especially if you have tools.cfg.[/shameless plug]
Code: add2conloop [loop i (curplayers) [if (>= (absval (at (pstat_score (at (validcumlist) $i)) 1)) 3) [echo (at (validcnumlist) $i) is a killer!] []]]As of now, that just shows how to detect that a specific player is fragging. When it is triggered, it will spam your console until the fragger leaves (or the frags score goes to zero). A similar, slightly more complex method can use conline to detect frags and teamkills (in case the perpetrator tries to balance the two to remain near zero). Look at the MPL stats script for an example of how conline is used to do this.
20 May 11, 02:19PM
my code's fixed now... a bit...
Code: alias initGEMACommands [
alias kickReason "No killing in GEMA!"
alias banReason "No killing in GEMA!"
alias meDeclare ""
alias kickKillerPN [
kick (findcn $arg1) $kickReason
if (! (strcmp $meDeclare "")) [ me $meDeclare ]
]
alias kickKiller [
kick $arg1 $kickReason
if (! (strcmp $meDeclare "")) [ me $meDeclare ]
]
alias banKillerPN [
ban (findcn $arg1) $banReason
if (! (strcmp $meDeclare "")) [ me $meDeclare ]
]
alias banKiller [
ban $arg1 $banReason
if (! (strcmp $meDeclare "")) [ me $meDeclare ]
]
bind F3 [ saycommand "/kickKiller " ]
bind F4 [ saycommand "/banKiller " ]
bind F7 [ saycommand "/kickKillerPN " ]
bind F8 [ saycommand "/banKillerPN " ]
bind F9 [ uninitGEMACommands ]
echo "Gema Commands initialized."
]
alias uninitGEMACommands [
delalias kickReason
delalias banReason
delalias meDeclare
alias kickKiller ""
alias kickKillerPN ""
alias banKiller ""
alias banKillerPN ""
delalias kickKiller
delalias kickKillerPN
delalias banKiller
delalias banKillerPN
bind F3 ""
bind F4 ""
bind F7 ""
bind F8 ""
bind F9 [ initGEMACommands ]
echo "Gema Commands uninitialized."
]
I had this for a while, shared with few players, it could be better.
And maybe added to 1105 aswell :D Its a singleplayer mode where you have to kill the "zombots" and survive the waves (i wish i could mod or skin some zombies :'( ). I could improve it depending on the feed back, like adding the best number of waves record save, better randomization of the bots to add at each wave... Try it out, have fun. Code: //ZomBot BY =SA=macm
//to start type: /zombot map
alias botskill_list ["best" "good" "medium" "worse" "bad"]
alias zombot [
if (strcmp $arg1 "0") [zombot_ = 0] [map_ = $arg1; zombot_ = 1; zombot_1]
]
//mmsg = (result (at $msglist (rnd (listlen $msglist))))
alias zombot_1 [
oldgamma = $gamma; oldfog = $fog; oldfogcolour = $fogcolour
mode 7; map $map_
waves = 1; btm3 = 0
mmsg = [msglist (rnd 10)]
mmsg1 = [msglist1 (rnd 3)]
echo "2ZOMBOT IS STARTING..."
sleep 1000 [
botn_ = 1
botn = [+ (rnd $botn_) (+ (rnd 2) 1)]
botteam = (if (= (curteam) 0) (result "RVSF") (result "CLA"))
botskill_ = [at $botskill_list (rnd 5)]
loop a (botn) [addbot $botteam (botskill_)]
sleep 1000 [echo "11st wave is starting..."; mmsg; loadsky textures/skymaps/kothic/atsea; fog 64; fogcolour FFFFFF; gamma 100; gammav; sleep 2000 [zombot_2; sleep 2000 [botsheadtome]]]
]
]
alias zombot_2 [
if (= $zombot_ 0) [kickallbots; echo "3##### GAME OVER #####"; echo (concat "0you survived" (- $waves 1) "waves"); fog $oldfog; fogcolour $oldfogcolour; gamma $oldgamma ] [
botalive = 0
if (!= (strcmp (at $conline 0) "2you") 1) [] [if (= (strstr $conline "were") 1) [] [
if (= (listlen $conline) 3) [kickbot (at $conline 2)] [
if (= (listlen $conline) 4) [kickbot (concat (at $conline 2) (at $conline 3))] [
if (= (listlen $conline) 5) [kickbot (concat (at $conline 2) (at $conline 3) (at $conline 4))] [zombot_ = 0; echo "ERROR #3"]]]]];
if (= (alive) 1) [] [zombot_ = 0]
if (= btm3 1) [] [loop a 100 [if (= (strcmp (findpn $a) "") 1) [] [if (= $a (findcn $curname)) [] [botalive = 1]]];
if (= $botalive 0) [echo "0you survived wave number" (+ $waves 1)); mmsg1; zombot_3] []]
sleep 1 [zombot_2]
]]
alias zombot_3 [btm3 = 1;
waves = (+ $waves 1)
botn_ = (result (+ $botn_ 2))
loop a (botn) [addbot $botteam (botskill_)]
sleep 1000 [echo (concat "0wave number" $waves "is starting..."); mmsg; sleep 4000 [botsheadtome]]
sleep 4000 [btm3 = 0]
]
alias gammav [
if (= $zombot_ 0) [] [
if (= $gamma 100) [gmd = 1] []
if (= $gamma 50) [gmd = 0] []
if (= $gmd 1) [gamma (- $gamma 10)] [gamma (+ $gamma 10)]
sleep 250 [gammav]
]]
msglist = [
arg_ = $arg1
switch arg_
case 0 echo "3Will you survive this one?" break;
case 1 echo "3Do you have what it takes?" break;
case 2 echo "3KILL THOSE DAMN BOTS!" break;
case 3 echo "3You can do this!" break;
case 4 echo "3LET'S GET'EM!" break;
case 5 echo "3Do you have the guts?" break;
case 6 echo "3Can you handle the pressure?" break;
case 7 echo "3KILL'EM ALL!" break;
case 8 echo "3GO GO GO!" break;
case 9 echo "3Piece of cake..." break;
]
msglist1 = [
arg_ = $arg1
switch arg_
case 0 echo "1Good job!" break;
case 1 echo "1Well done!" break;
case 2 echo "1AWESOME!" break
]
docident [zombot] [starts a bot game];
docargument [M] [the map name (if 0 stops the game)];
docexample [zombot ac_desert];
//Bad switch script by =SA=macm
alias switch [ switch1 = $arg1; st = 0; def = 0]
alias case [
cnumargs = $numargs;
switch2 = [];
if (= (strcmp (getalias (concatword "arg" $cnumargs)) "break") 1) [
loop f (- $cnumargs 1) [if (= $f 0) [] [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))]]
][
loop f $cnumargs [if (= $f 0) [] [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))]]
];
if (= (strcmp (getalias (concatword "arg" $cnumargs)) "break") 1) [
if (= (getalias (getalias switch1)) $arg1) [
switch2; def = 1] []
] [
if (= $st 0) [
if (= (getalias (getalias switch1)) $arg1) [
switch2; st = 1; def = 1
] []
] [switch2; def = 1]
]
]
alias case_cmp [
cnumargs = $numargs;
switch2 = [];
if (= (strcmp (getalias (concatword "arg" $cnumargs)) "break") 1) [
loop f (- $cnumargs 1) [if (= $f 0) [] [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))]]
][
loop f $cnumargs [if (= $f 0) [] [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))]]
];
if (= (strcmp (getalias (concatword "arg" $cnumargs)) "break") 1) [
if (= (strcmp (getalias (getalias switch1)) $arg1) 1) [
switch2; def = 1] []
] [
if (= $st 0) [if (= (strcmp (getalias (getalias switch1)) $arg1) 1) [
switch2; st = 1; def = 1] []
] [switch2; def = 1]]
]
alias case_str [
cnumargs = $numargs;
switch2 = [];
if (= (strcmp (getalias (concatword "arg" $cnumargs)) "break") 1) [
loop f (- $cnumargs 1) [if (= $f 0) [] [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))]]
][
loop f $cnumargs [if (= $f 0) [] [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))]]
];
if (= (strcmp (getalias (concatword "arg" $cnumargs)) "break") 1) [
if (= (strstr (getalias (getalias switch1)) $arg1) 1) [
switch2; def = 1] []
] [
if (= $st 0) [if (= (strstr (getalias (getalias switch1)) $arg1) 1) [
switch2; st = 1; def = 1] []
] [switch2; def = 1]]
]
alias default [
if (= $def 0) [
cnumargs = $numargs;
switch2 = [];
loop f $cnumargs [f = (+ $f 1); add2alias_ switch2 (getalias (concatword "arg" $f))];
switch2
] [
]
]
//wstr by DES|V-man
// wstr -- finds a given string among muddled messes of CubeScript punctuation.
// Parentheses were not possible. :(
// This is a very laborious, resource-intensive process. AssaultCube will hang for a moment each time this is used.
alias wprefixes (concat "[" "[[" "[[[" "[[[[")
alias wsuffixes (concat "]" "]]" "]]]" "]]]]" ";")
alias wordcheckloop [loop w (listlen $searchlist) [loop p 4 [loop s 5 [
if (strcmp $itemtofind (at $searchlist $w)) [alias wmatch 1] [
if (strcmp (concatword (at $wprefixes $p) $itemtofind (at $wsuffixes $s)) (at $searchlist $w)) [alias wmatch 1] [
if (strcmp (concatword (at $wprefixes $p) $itemtofind) (at $searchlist $w)) [alias wmatch 1] [
if (strcmp (concatword $itemtofind (at $wsuffixes $s)) (at $searchlist $w)) [alias wmatch 1] []]]]]]]]
// A Beast of a string-comparison tool
alias wstr [
alias itemtofind $arg2
alias searchlist $arg1
alias wmatch 0
wordcheckloop
result $wmatch]
21 May 11, 03:00PM
Er...
Why is wstr in there? XD At any rate, as soon as 1105 is released, it'll be obsolete. :D
25 May 11, 02:41PM
macm: That was cool. It took me a moment to realise what the hell was happening to my screen :D
28 May 11, 06:02PM
I think i first used wstr to find the bots names, but then i found another way around it, wstr isn't being used at all :\
Hey, atleast someone liked it :D
30 May 11, 08:57AM
do you know if the botusealways commmand (the one that you can select which weapon bots use) will come out in 1.1.0.5? I think flowtron said something about it once. also if it came out would it support selecting knife as one of the weapons ;D zombies.
Code: // NAME: ignoreall
// PURPOSE: Ignores all clients with a single call
// AUTHOR: VenteX (like much credit needs to be given for a simple one-liner... psh.)
alias ignoreall [ clearignored; sleep 1 [ loop cn 20 [ ignore $cn ] ] ]Enjoy :P |
|
« Next Oldest | Next Newest »
|