Scripts
#61
//-- rolldie command to see who goes first in matches
alias rolldie [ if (&& (> (listlen $arg1) 0) (> (listlen $arg2) 0) ) [dieteams1 = $arg1; dieteams2 = $arg2] [dieteams1 = CLA; dieteams2 = RVSF]; if (rnd 2) [dieteams = $dieteams1] [dieteams = $dieteams2]; sleep 100 [say Random Die Roll - team $dieteams was chosen!]]

by DES|R4zor
Reply
Thanks given by:
#62
For noobs coop editing official maps on public servers :
alias lol [
    newmap;
    sleep 100 [ lol ]
]
:D
Reply
Thanks given by:
#63
R4zor, you wouldn't believe how efficient it is.
Reply
Thanks given by:
#64
Ragequit with style..i need that =)
Reply
Thanks given by:
#65
Simple slap script i wanted to make:

slap = [say slaps ($arg1) with a rusty salmon]

Thanks to R4 for putting up with me and making it :D
Reply
Thanks given by:
#66
In 1.1 you'll be able to do the /me command, so
slap = [me slaps ($arg1) with a disco stick]
Reply
Thanks given by:
#67
The rolldie command:
rnd 2 will produce either 0, 1, or 2. The context "if (rnd 2)" makes it interpreted as either 1 or 0. When a number greater than 1 is put to a binary test, it is called "1". "if (rnd 2)" is generating such a binary test, but producing 3 possible numbers.
Whatever is picked as $arg1 will be selected 66% of the time, while the second argument will only be picked 33% of the time. Test it!
Reply
Thanks given by:
#68
I got RVSF 15+ times with (rnd 1) - how can we solve that
Reply
Thanks given by:
#69
Raise the probabilities for CLA?
Reply
Thanks given by:
#70
(09 Jul 10, 04:09PM)Gibstick Wrote: In 1.1 you'll be able to do the /me command, so
slap = [me slaps ($arg1) with a disco stick]

LoL, ty ruining it xD
Reply
Thanks given by:
#71
rvsforcla = [rnd 8]
rolldie = [ if (< (rvsforcla) 4) [say "Die roll - RVSF was chosen!] [say "Die roll - CLA was chosen!] ]
Fixed uneveness. Again. lol
Reply
Thanks given by:
#72
Good thinking; lets add it in soo.

//-- rolldie command to see who goes first in matches
teamchoice = [rnd 8]
alias rolldie [ if (&& (> (listlen $arg1) 0) (> (listlen $arg2) 0) ) [dieteams1 = $arg1; dieteams2 = $arg2] [dieteams1 = CLA; dieteams2 = RVSF]; if (<= (teamchoice) 3) [dieteams = $dieteams1] [dieteams = $dieteams2]; sleep 100 [say Random Die Roll - team $dieteams was chosen!]]
Reply
Thanks given by:
#73
Nuke script for those MW2 fans wanting to disconnect in style:

nuke = [say "Tactical Nuke Incoming!"; sleep 200 [say "5"]; sleep 1200 [say "4"]; sleep 2400 [say "3"]; sleep 3400 [say "2"]; sleep 4400 [say "1"]; sleep 4600 [disconnect] ]

Just type /nuke
Reply
Thanks given by:
#74
why do you delay additional 200 millis from #3 onwards? And then only 200 before "0"?
If you're going to count seconds then that'd be 1000 millis, or just go with 500 - but changing pace?!?! Are you a drummer? (haha, old musician joke).
nuke = [
  tic = 500
  cnt = 5
  say "..until we meet again.."
  sleep (* (+ $cnt 2) $tic) disconnect
  loop w $cnt [ sleep (* (+ $w 1) $tic) (concat say (- $cnt $w)) ]
]
Reply
Thanks given by:
#75
(10 Jul 10, 02:41PM)flowtron Wrote: If you're going to count seconds then that'd be 1000 millis, or just go with 500 - but changing pace?!?! Are you a drummer? (haha, old musician joke).

Haha! Yep... that's a drummer's work. :)
Reply
Thanks given by:
#76
@Gibstick:
D:
I just realized, I made a really lame mistake.
(rnd 2) produces a random number between 0 and 2, including 0 but not including 2. This means it will only produce 1 or 0.
So... Your original script has no problems -- only my judgment.
XD sorry.
Reply
Thanks given by:
#77
NOOB!
Reply
Thanks given by:
#78
(01 Jul 10, 06:48PM)DES|V-Man Wrote: Rave - Changes light levels and fog colors to simulate a rave atmosphere!

I downloaded this script awhile back, and I have been messing around with it. I saw your music commmand, I looked through the reference (looked=used the find command) for the command music, it I didn't see the command. Is there a description for it?
More about the script, in the music command, it has a argument for command,
(music [$musicpath] [ms length] [command])
What does this do? I'm not quite sure how to use this.
Reply
Thanks given by:
#79
(10 Jul 10, 02:41PM)flowtron Wrote: why do you delay additional 200 millis from #3 onwards? And then only 200 before "0"?
If you're going to count seconds then that'd be 1000 millis, or just go with 500 - but changing pace?!?! Are you a drummer? (haha, old musician joke).
nuke = [
  tic = 500
  cnt = 5
  say "..until we meet again.."
  sleep (* (+ $cnt 2) $tic) disconnect
  loop w $cnt [ sleep (* (+ $w 1) $tic) (concat say (- $cnt $w)) ]
]

I enjoy my crappyness.
Reply
Thanks given by:
#80
[Image: cannotredefine.jpg]

Any way around this "cannot redefine" stuff? I've been staring at the docs for an hour or so and can't figure it out. I'd like to be able to execute one command only when I'm on CLA team and another only if I'm dead.
Reply
Thanks given by:
#81
Post the scripts that your trying to use here.
Reply
Thanks given by:
#82
R4zor helped me with it and I'm no longer getting that message, however the script is still not working properly.

infection = [say "Infection mode enabled"; if (&& (= (curteam) 0) (= (alive) 0)) [changeteam]]

The script is supposed to changeteam if a player is on CLA team and dead. It does that when I enter /infection but it needs to do it automatically and I need a way to loop it so it executes once every second or so.
Reply
Thanks given by:
#83
infecloop = [sleep 1000 (infection)]
infection = [say "Infection mode enabled"; if (&& (= (curteam) 0) (= (alive) 0)) [changeteam] []; infecloop]
This'll slow down the game.
Reply
Thanks given by:
#84
infect = [if (> (listlen $arg1) 0) [alias infectmode $arg1]]
infectmode = 0
infection = [if (&& (= (curteam) 0) (= (alive) 0)) [changeteam; say "Infection mode enabled"]]
start_intermission = [saycommand /infect; echo "Will the next game be Infection? 1 for yes, 0 for no"]
bind MOUSE1 [if (= $infectmode 1) [infection]; attack]
Reply
Thanks given by:
#85
(10 Jul 10, 07:38PM)Ronald_Reagan Wrote: (Rave)
More about the script, in the music command, it has a argument for command,
(music [$musicpath] [ms length] [command])
What does this do? I'm not quite sure how to use this.

"[$musicpath]" should contain the path to a music file (ogg or wav) of your choosing (e.g., packages\audio\songs\Ronald_Reagan);
"[ms length]" is how long you want the song to play for, in milliseconds;
"[command]" is what (if anything) you want to happen when the song finishes playing.
Reply
Thanks given by:
#86
Ok, thanks, I wasn't sure what that [command] was there for, I caught the rest.
Edit; then why is
music [packages/audio/songs/ac.ogg] [8400]
returning saying it "could not open music packages/audio/songs/ac.ogg" I tried it with the extension and with out the extension.
Reply
Thanks given by:
#87
:/
I know it's given me trouble in the past, but I can't remember exactly why.
Definitely leave out the ".ogg" part.
I believe (now that I'm actually using some brain cells) that the path should start in the "songs" folder.
so:
music [ac] [8400]
should work. The path argument gets complicated if you try to play songs outside of the "songs" folder. (Look at my Assault Your Ears download for comparison).
Reply
Thanks given by:
#88
That makes sense in a very confusing way. But you were right.
Btw, broken link for me.
Reply
Thanks given by:
#89
Can someone tell me the sniper script. Were after shooting it pulls out your pistol automatically?
Reply
Thanks given by:
#90
That's not allowed ;)
Reply
Thanks given by: