Posts: 76
Threads: 1
Joined: Jun 2010
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?
Posts: 1,823
Threads: 20
Joined: Jun 2010
30 Mar 11, 11:57PM
(This post was last modified: 31 Mar 11, 12:00AM by Gibstick.)
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.
Posts: 3,780
Threads: 33
Joined: Jun 2010
in that case,
addcheck_msa [accuracyreset]
Posts: 126
Threads: 19
Joined: Oct 2010
**New Bukz Commands**
bukz = [ loop $arg1 $arg2 $arg3 ]
getbukz = [ result (getalias $arg1) ]
Example
smilies = [ \:D |:D /:D ]
bukz "D:" (listlen $smilies) [ echo (at $smilies (getbukz (format %1 "D:"))) ]
// Output:
// \:D
// |:D
// /:D
Posts: 3,780
Threads: 33
Joined: Jun 2010
Awww. Frame that and put it on your fridge!
Posts: 1,823
Threads: 20
Joined: Jun 2010
All aboard the troll trail \:D
Posts: 890
Threads: 16
Joined: Jun 2010
03 Apr 11, 03:43AM
(This post was last modified: 03 Apr 11, 03:47AM by Mael.)
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.
Posts: 3,780
Threads: 33
Joined: Jun 2010
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."
Posts: 12
Threads: 1
Joined: Apr 2011
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
Posts: 1,823
Threads: 20
Joined: Jun 2010
Paste your configuration, without your passwords, here.
Posts: 60
Threads: 0
Joined: Jan 2011
(02 Apr 11, 11:56AM)Gibstick Wrote: All aboard the troll trail \:D
All aboard the noob truck
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];
Posts: 1,823
Threads: 20
Joined: Jun 2010
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.
Posts: 60
Threads: 0
Joined: Jan 2011
(07 May 11, 12:06PM)Gibstick Wrote: 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.
right thx
(07 May 11, 11:05AM)Sarin Wrote: (02 Apr 11, 11:56AM)Gibstick Wrote: All aboard the troll trail \:D
All aboard the noob truck
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];
This is the best script ever
Posts: 5
Threads: 0
Joined: May 2011
14 May 11, 04:03AM
(This post was last modified: 14 May 11, 04:08AM by cecia.)
The Variable Zoom Sniper
by CeCiA*
//The Variable Zoom Sniper
bind Z [scopefov 20]
bind X [scopefov 30]
bind C [scopefov 40]
Note that if you are a mapper, do not use these keys because then you cannot change textures or copy a part of a map. Feel free to do whatever you want to modify this. Press Z for farthest zoom. Press X for middle zoom. Press C for the smallest zoom. Also there might already be one of these but I am coming back from long inactivity so sorry if you already made it :S
Posts: 2,136
Threads: 50
Joined: Jun 2010
(14 May 11, 04:03AM)cecia Wrote: ...
Note that if you are a mapper, do not use these keys because then you cannot change textures or copy a part of a map... In which case,
bind Z [ if $editing [ domodifier 2 ] [scopefov 20]]
bind X [ if $editing [ domodifier 3 ] [scopefov 30]]
bind C [ if $editing [ copy ] [scopefov 40]]
...would fix it.
Posts: 5
Threads: 0
Joined: May 2011
Alright thanks Jamz, I'm still trying to learn :)
Posts: 6
Threads: 0
Joined: May 2011
the onKill, onTK, onDeathOther, etc. aliases don't work... does these aliases only work on admins or something?
Posts: 1,331
Threads: 44
Joined: Jun 2010
17 May 11, 12:23PM
(This post was last modified: 17 May 11, 02:51PM by Bukz.)
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. :)
Posts: 6
Threads: 0
Joined: May 2011
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:
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:
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.
Posts: 3,462
Threads: 72
Joined: Jun 2010
What other languages do you know?
* Ronald_Reagan guesses and says "Javascript!"
Anyways, look at this. Its just much cleaner (memory wise).
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:
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
Posts: 6
Threads: 0
Joined: May 2011
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...
Posts: 3,780
Threads: 33
Joined: Jun 2010
19 May 11, 01:53PM
(This post was last modified: 19 May 11, 01:54PM by V-Man.)
You can use pstat_score or conline to detect kills, [shameless plug]especially if you have tools.cfg.[/shameless plug]
add2conloop [loop i (curplayers) [if (>= (absval (at (pstat_score (at (validcumlist) $i)) 1)) 3) [echo (at (validcnumlist) $i) is a killer!] []]]
The "3" in there is the trashhold of the distance from 0 the frag score is when the script kicks in for that player (+3 or -3 = 3 frags or 3 teamkills).
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.
Posts: 6
Threads: 0
Joined: May 2011
my code's fixed now... a bit...
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."
]
Posts: 205
Threads: 3
Joined: Jun 2010
21 May 11, 02:34PM
(This post was last modified: 21 May 11, 03:08PM by macm.)
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.
//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]
Posts: 3,780
Threads: 33
Joined: Jun 2010
Er...
Why is wstr in there? XD
At any rate, as soon as 1105 is released, it'll be obsolete. :D
Posts: 560
Threads: 10
Joined: Jan 2011
macm: That was cool. It took me a moment to realise what the hell was happening to my screen :D
Posts: 205
Threads: 3
Joined: Jun 2010
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
Posts: 140
Threads: 9
Joined: Jun 2010
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.
Posts: 523
Threads: 6
Joined: Dec 2010
05 Jun 11, 03:22AM
(This post was last modified: 05 Jun 11, 03:25AM by VenteX.)
// 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
|