Scripts - Printable Version +- AssaultCube - Forum (https://forum.cubers.net) +-- Forum: AssaultCube (https://forum.cubers.net/forum-3.html) +--- Forum: Mapping and Modding (https://forum.cubers.net/forum-11.html) +--- Thread: Scripts (/thread-38.html) |
RE: Scripts - MacAdresS - 09 Jul 10 //-- 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 RE: Scripts - Luc@s - 09 Jul 10 For noobs coop editing official maps on public servers : [SELECT ALL] Code: alias lol [ RE: Scripts - Gibstick - 09 Jul 10 R4zor, you wouldn't believe how efficient it is. RE: Scripts - Matasar - 09 Jul 10 Ragequit with style..i need that =) RE: Scripts - DrauL - 09 Jul 10 Simple slap script i wanted to make: [SELECT ALL] Code: slap = [say slaps ($arg1) with a rusty salmon] Thanks to R4 for putting up with me and making it :D RE: Scripts - Gibstick - 09 Jul 10 In 1.1 you'll be able to do the /me command, so [SELECT ALL] Code: slap = [me slaps ($arg1) with a disco stick] RE: Scripts - V-Man - 09 Jul 10 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! RE: Scripts - R4zor - 10 Jul 10 I got RVSF 15+ times with (rnd 1) - how can we solve that RE: Scripts - #M|A#Wolf - 10 Jul 10 Raise the probabilities for CLA? RE: Scripts - DrauL - 10 Jul 10 (09 Jul 10, 04:09PM)Gibstick Wrote: In 1.1 you'll be able to do the /me command, so LoL, ty ruining it xD RE: Scripts - Gibstick - 10 Jul 10 [SELECT ALL] Code: rvsforcla = [rnd 8] RE: Scripts - R4zor - 10 Jul 10 Good thinking; lets add it in soo. [SELECT ALL] Code: //-- rolldie command to see who goes first in matches RE: Scripts - DrauL - 10 Jul 10 Nuke script for those MW2 fans wanting to disconnect in style: [SELECT ALL] Code: 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 RE: Scripts - flowtron - 10 Jul 10 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). [SELECT ALL] Code: nuke = [ RE: Scripts - Mr.Floppy - 10 Jul 10 (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. :) RE: Scripts - V-Man - 10 Jul 10 @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. RE: Scripts - Gibstick - 10 Jul 10 NOOB! RE: Scripts - Ronald_Reagan - 10 Jul 10 (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, [SELECT ALL] Code: (music [$musicpath] [ms length] [command]) RE: Scripts - DrauL - 11 Jul 10 (10 Jul 10, 02:41PM)flowtron Wrote: why do you delay additional 200 millis from #3 onwards? And then only 200 before "0"? I enjoy my crappyness. RE: Scripts - Mael - 11 Jul 10 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. RE: Scripts - DrauL - 11 Jul 10 Post the scripts that your trying to use here. RE: Scripts - Mael - 11 Jul 10 R4zor helped me with it and I'm no longer getting that message, however the script is still not working properly. [SELECT ALL] Code: 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. RE: Scripts - Gibstick - 11 Jul 10 [SELECT ALL] Code: infecloop = [sleep 1000 (infection)] RE: Scripts - R4zor - 11 Jul 10 [SELECT ALL] Code: infect = [if (> (listlen $arg1) 0) [alias infectmode $arg1]] RE: Scripts - V-Man - 12 Jul 10 (10 Jul 10, 07:38PM)Ronald_Reagan Wrote: (Rave) "[$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. RE: Scripts - Ronald_Reagan - 12 Jul 10 Ok, thanks, I wasn't sure what that [command] was there for, I caught the rest. Edit; then why is [SELECT ALL] Code: music [packages/audio/songs/ac.ogg] [8400] RE: Scripts - V-Man - 12 Jul 10 :/ 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: [SELECT ALL] Code: music [ac] [8400] RE: Scripts - Ronald_Reagan - 12 Jul 10 That makes sense in a very confusing way. But you were right. Btw, broken link for me. RE: Scripts - bballn45 - 12 Jul 10 Can someone tell me the sniper script. Were after shooting it pulls out your pistol automatically? RE: Scripts - #M|A#Wolf - 12 Jul 10 That's not allowed ;) |