| 
		
	
	
	
		
	Posts: 40Threads: 3
 Joined: Jun 2010
 
	
	
		//-- rolldie command to see who goes first in matchesalias 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
 
		
	 
	
	
	
		
	Posts: 1,981Threads: 63
 Joined: Jun 2010
 
	
	
		For noobs coop editing official maps on public servers : alias lol [newmap;
 sleep 100 [ lol ]
 ]
:D
	
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
		R4zor, you wouldn't believe how efficient it is.
	 
		
	 
	
	
	
		
	Posts: 151Threads: 8
 Joined: Jun 2010
 
	
	
		Ragequit with style..i need that =)
	 
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
	
		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
	
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
		In 1.1 you'll be able to do the /me command, so slap = [me slaps ($arg1) with a disco stick]
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		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!
 
		
	 
	
	
	
		
	Posts: 100Threads: 6
 Joined: Jun 2010
 
	
	
		I got RVSF 15+ times with (rnd 1) - how can we solve that
	 
		
	 
	
	
	
		
	Posts: 2,841Threads: 44
 Joined: Jun 2010
 
	
	
		Raise the probabilities for CLA?
	 
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
	
		 (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
	 
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
		
		
		10 Jul 10, 02:29AM 
(This post was last modified: 10 Jul 10, 02:47AM by Gibstick.)
		
	 
		rvsforcla = [rnd 8]rolldie = [ if (< (rvsforcla) 4) [say "Die roll - RVSF was chosen!] [say "Die roll - CLA was chosen!] ]
Fixed uneveness. Again. lol
	 
		
	 
	
	
	
		
	Posts: 100Threads: 6
 Joined: Jun 2010
 
	
	
		Good thinking; lets add it in soo. //-- rolldie command to see who goes first in matchesteamchoice = [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!]]
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
		
		
		10 Jul 10, 04:12AM 
(This post was last modified: 10 Jul 10, 04:12AM by DrauL.)
		
	 
		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
	
		
	 
	
	
	
		
	Posts: 586Threads: 24
 Joined: Jun 2010
 
	
	
		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)) ]
 ]
		
	 
	
	
	
		
	Posts: 638Threads: 10
 Joined: Jun 2010
 
	
	
		 (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. :)
	 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		@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.
 
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
		
		
		10 Jul 10, 07:38PM 
(This post was last modified: 10 Jul 10, 07:45PM by Ronald_Reagan.)
		
	 
		 (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.
	 
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
	
		 (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.
	 
		
	 
	
	
	
		
	Posts: 890Threads: 16
 Joined: Jun 2010
 
	
		
		
		11 Jul 10, 04:21AM 
(This post was last modified: 11 Jul 10, 04:22AM by Mael.)
		
	 
		![[Image: cannotredefine.jpg]](http://img228.imageshack.us/img228/2791/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.
	 
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
	
		Post the scripts that your trying to use here.
	 
		
	 
	
	
	
		
	Posts: 890Threads: 16
 Joined: Jun 2010
 
	
	
		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.
	
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
		
		
		11 Jul 10, 11:54AM 
(This post was last modified: 11 Jul 10, 11:54AM by Gibstick.)
		
	 
		infecloop = [sleep 1000 (infection)]infection = [say "Infection mode enabled"; if (&& (= (curteam) 0) (= (alive) 0)) [changeteam] []; infecloop]
This'll slow down the game.
	 
		
	 
	
	
	
		
	Posts: 100Threads: 6
 Joined: Jun 2010
 
	
	
		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]
 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
		
		
		12 Jul 10, 01:55AM 
(This post was last modified: 12 Jul 10, 01:56AM by V-Man.)
		
	 
		 (10 Jul 10, 07:38PM)Ronald_Reagan Wrote:  (Rave)More about the script, in the music command, it has a argument for command,
 What does this do? I'm not quite sure how to use this.(music [$musicpath] [ms length] [command])
 
"[$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.
	 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
		
		
		12 Jul 10, 03:51AM 
(This post was last modified: 12 Jul 10, 04:10AM by Ronald_Reagan.)
		
	 
		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.
	
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		:/ 
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:
 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).
	
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
		
		
		12 Jul 10, 04:55AM 
(This post was last modified: 12 Jul 10, 04:56AM by Ronald_Reagan.)
		
	 
		That makes sense in a very confusing way. But you were right.Btw, broken link for me.
 
		
	 
	
	
	
		
	Posts: 700Threads: 65
 Joined: Jun 2010
 
	
	
		Can someone tell me the sniper script. Were after shooting it pulls out your pistol automatically?
	 
		
	 
	
	
	
		
	Posts: 2,841Threads: 44
 Joined: Jun 2010
 |