Scripts
Verse: I made a similar script a little while back, and found it was much easier just to use conloop.
Thanks given by:
Hm, perhaps weapon change can be an event hook for a future release?
Or, if you still want to go the bind route, "findbind" in tools.cfg is your friend.
Thanks given by:
(10 Sep 11, 08:02PM)tempest Wrote: Well, with that code, you don't set crosshairsize anywhere. Did you mean to write
Setting_Knife_Size = [ crosshairsize $arg1]
(although that wouldn't make much sense)
Yes Tempest, I didn't include that in the snipit of code I was quoting, thus the '...' at the beginning and the end. If you wanted to search the entire script, I use it once at the end of all the logic.

(11 Sep 11, 12:13AM)Lantry Wrote: Verse: I made a similar script a little while back, and found it was much easier just to use conloop.

Lantry I don't doubt you are correct, this is my first script to have any type of logic and I have a lot to learn. What is a conloop anyway...
* Verse searches the forums and documentation

V-Man I'm researching before I reply to you.
Thanks given by:
(11 Sep 11, 02:34AM)Verse Wrote: V-Man I'm researching before I reply to you.

The Force is strong with this one.
Thanks given by:
My heart is full of joy.
"conloop" is a tool crafted specifically for use in polling the conline (see the URL in my user title). However, some things can go into the conloop (via add2conloop) that merely need to be checked out on a continuous basis, such as what weapon you currently have. One drawback is that the values are constantly being polled, even (especially) when they aren't needed. Heavy (ab)use of this has caused some FPS drops in different clients; severe abuse (installing every script that uses conloop, as well as a few test ones I had lying around) on my computer (1.5 GHz 2 MB RAM Intel Express 128 MB video) caused a drop of around 3-5 FPS average. Others have reported significantly steeper drops, though I suspect other things are affecting those systems.
Thanks given by:
(11 Sep 11, 05:11AM)V-Man Wrote: My heart is full of joy.
"conloop" is a tool crafted specifically for use in polling the conline... (ab)use of this has caused some FPS drops in different clients...a drop of around 3-5 FPS average. Others have reported significantly steeper drops, though I suspect other things are affecting those systems.
Ah yes, I could've done that, although I would've implemented it using a continuous while loop or never ending recursion (Verse waves at RR) that polls the current weapon every 50ms (which has already been done). My goal was to create an event triggered version. It made the script more complex, but since it is event triggered, i.e. it waits for you to press a key or mouse button, it only runs about 40 times every 50 ms after each time you switch a weapon or attack. Thus it is very efficient. The biggest draw back that I see is that this script won't play nice with other script that also triggered by such events. It wouldn't be that hard to combine those scripts if you know what you're doing though, giving a super script. And I assume it has been done many times.
Thanks given by:
tools.cfg:
add2bind
:D
Thanks given by:
(11 Sep 11, 06:37AM)V-Man Wrote: tools.cfg:
add2bind
:D

Are you inferring that I can dynamically change the keybind while in game? Holmes alias V-Man "Elementry my dear Watson"
* Verse puts mind to work figuring out how to rearrange the logic of the script.
Thanks given by:
Ahhh, I knew I was forgetting something when giving some feedback!

Have a gander at tools.cfg, it may open your eyes to what CS can do.
Thanks given by:
add2bind is great, it ensures that a block of code exists within a specific keybind.

In fact it's "built-in" in the next version of AC in /config/scripts.cfg. Thanks V-Man. :)
Thanks given by:
Auto-sorry & auto-thanks-man voicecoms script:

// Auto-sorry & auto-thanks-man script for AssaultCube 1.1.0.4 or greater by Bukz.
// Requires tools.cfg by V-Man: http://www.akimbo.in/files/index.php?act=view&id=723

auto_sorry_on = 1 // Change to 0 to disable the auto-sorry script.
auto_thank_on = 1 // Change to 0 to disable the auto-thanks-man script.

time_to_check = 10000 // Wait up to 10 seconds for a "nice shot" from the player you killed last. For auto-thanks.

min_message_wait = 1250 // Minimum time to wait (in milliseconds) before sending a message.
max_message_wait = 3000 // Maximum time to wait (in milliseconds) before sending a message.

// The %1 in the two commands below represent the player's name that the messages are directed towards.

sorry_message = [ result (format "Sorry %1!" $arg1) ]
thanks_message = [ result (format "Thanks %1!" $arg1) ]

// Various ways that people say "nice shot" to you. If you find people using different phrases you may
// want to add them to this list for the auto-thanks script to work on them.

ns_messages = [ "Nice shot" "nice shot" "ns" "NS" ]

// Do NOT edit anything below this unless you really know what you're doing!

rndwait = [ result (rrnd $min_message_wait (+ $max_message_wait 1)) ]

kill_messages = "fragged gibbed splattered slashed headshot"

add2conloop [
  if (|| $auto_sorry_on $auto_thank_on) [
    loop ctl (listlen $kill_messages) [
      if $auto_sorry_on [
        if_conline_has (format "%1you %2 teammate" (c 3) (at $kill_messages $ctl)) [ // For auto-sorry.
          tked_last = (at $conline 3)
          sleep (rndwait) [
            voicecom sorry (sorry_message $tked_last)
          ]
        ]
      ]

      if $auto_thank_on [
        if_conline_has (format "you %1" (at $kill_messages $ctl)) but_not teammate [ // For auto-thanks.
          last_victim = (at $conline 2)
          last_victim_time = (millis)
          scanning_ns = 1
        ] []
      ]
    ]
  ]
]

// For auto-thanks.
add2conloop [
  if $auto_thank_on [
    if (checkalias last_victim) [
      if (&& $scanning_ns (< (- (millis) $last_victim_time) $time_to_check)) [
        loop ccl (listlen $ns_messages) [
          if_conline_has (format "%1:" $last_victim) and_also (at $ns_messages $ccl) [
            sleep (rndwait) [
              voicecom (format thanks_%1 (rrnd 1 3)) (thanks_message $last_victim)
            ]
          ]
        ]
      ] [ scanning_ns = 0 ]
    ]
  ]
]

addcheck_msa [ scanning_ns = 0; last_victim_time = 0; last_victim = NULL; tked_last = NULL ]
addlistonquit "auto_sorry_on auto_thank_on time_to_check min_message_wait max_message_wait sorry_message thanks_message ns_messages rndwait kill_messages scanning_ns tked_last last_victim last_victim_time"

// End Auto-sorry & auto-thanks-man script.

Auto-sorry is pretty self explanitory, it will automatically send the sorry voicecom and a custom message to your teammate when you team kill them.

Auto-thanks-man is meant to automatically respond to people who send you a "nice shot" message after you kill them. So if you kill "unarmed" and they send you a "nice shot" message within a certain time frame, the script will automatically send the "thanks man" voicecom and a custom message: for instance "Thanks unarmed!".

This script needs tools.cfg to work. Be sure to read the comments towards the top and make edits to the script where necessary. Please report any problems you have with the script, because a few people have had problems getting it to work (especially curious about linux/mac users). Enjoy! :)
Thanks given by:
As I say to people in-game when I see it, automatic apology is no apology at all. :/
Thanks given by:
(12 Sep 11, 05:35PM)jamz Wrote: As I say to people in-game when I see it, automatic apology is no apology at all. :/

Ur absolutely right jamz, i take all the responsibility for that script cause i asked Bukzy to make one for me ;), lets admire the work, and I'll accept all the consequences for not being honest when i tk someone ;)

P.S. jk guys, but sometimes in the middle of a match stopping to write down "sry" means losing a flag XD
Thanks given by:
I can jump off a ledge, and type a few things while still in the air. These things are XD, sorry, and :P

Yes, I practice.
Thanks given by:
You're probably right jamz, but I rather do it that way than attempt at typing sorry, or the voice com and get killed or anything. So sorry D:
Thanks given by:
Try not to kill teammates and make the issue a moot point?
Thanks given by:
I'd love to see the record for most games played without any TKs.

* V-Man near the bottom...
Thanks given by:
V-Man, congratz on the 888th post on this thread.

http://en.wikipedia.org/wiki/Numbers_in_...ture#Eight

btw happy mid-autumn festival.

EDIT: Since I feel bad that I didn't post anything on topic or of actual substance...

addcheck_msa connectwrite

alias "connectwrite" [
if ( = $connected 1 ) [              
   curserverip = (curserver 1)        
   curserverport = (curserver 3)      
]]
alias "reconnect" [
connect $curserverip $curserverport //
]
there.
Thanks given by:
hello guys :)
im writting a simple script and i was wondering if there is a way that another command gets executed upon 1 vote pass? i noticed in doc something like onVoteEnd but that doesn't really seem to work?

thanks :)
Thanks given by:
That is in the SVN.
You can get the SVN and experiment with it.
Getting the SVN on Linux
Getting the SVN on Windows
Mac SVN binary from Ronald_Reagan
Thanks given by:
Yes, be careful with the documentation available at http://assault.cubers.net/docs/, and especially http://assault.cubers.net/docs/reference.xml, since it's the SVN's version.

You can get the online documentation for AC 1.1.0.4 here :
http://actiongame.svn.sourceforge.net/vi...ision=5882
Thanks given by:
(15 Sep 11, 01:57PM)Milandrag Wrote: hello guys :)
im writting a simple script and i was wondering if there is a way that another command gets executed upon 1 vote pass? i noticed in doc something like onVoteEnd but that doesn't really seem to work?

thanks :)

You can use "conline" and search the world "Vote pass" .
If the word "vote pass" is detected ,you use a command
Thanks given by:
True, if you can't bother to get the SVN or wait until the next release. Conline looping is the next best thing! :D
Thanks given by:
Auto-Auto-Screenshot Script :D

This script will automatically toggle the autoscreenshot tool depending on which mastermode the server is in. This is useful if you (like me) always forget to take screenshots of cms or inters, but don't want to leave autoscreenshot on all the time.
[cubescript]//AutoAutoScreenShot by Lantry
lastmastermode = 0
autoautoss = [
autoscreenshot 0
if (!= $lastmastermode (curmastermode)) [
if (= (curmastermode) 0) [ //when open
autoscreenshot 0 //autoscreensshot is on (1) or off (0)
echo "Mastermode 0 detected"
]
if (= (curmastermode) 1) [ //when private
autoscreenshot 1
echo "Mastermode 1 detected"
]
if (= (curmastermode) 2) [ //when match
autoscreenshot 1
echo "Mastermode 2 detected"
]
]
lastmastermode = (curmastermode)
sleep 300000 [ autoautoss ]
]
addcheck_msa [ autoautoss ][/cubescript]
By default, it will turn autoscreenshot on in private and match, and turn it off in open, but it is easily modifiable! Simply change the argument for "autoscreenshot" to 1 (on) or 0 (off) under the proper if statement.

To install, simply put it in your autoexec .cfg or scripts folder!
Thanks given by:
AC Booster 2.0
New version, some corrections in the size of the screens and modified a few lines.

before fps 108
[Image: 001fy.jpg]
[Image: 002xxq.jpg]

after fps 210
[Image: 003je.jpg]

//AC Booster by Stupp*
checkinit acbooster_2.0 []

newmenu "AC Booster 2.0"
menuitem "" -1
menuitem [ 3Screen Size]
menuitemcheckbox [Video Size 420/315] 0 [if (= $arg1 1) [scr_w 420; scr_h 315] []]
menuitemcheckbox [Video Size 480/360] 0 [if (= $arg1 1) [scr_w 480; scr_h 360] []]
menuitemcheckbox [Video Size 640/480] 0 [if (= $arg1 1) [scr_w 640; scr_h 480] []]
menuitemcheckbox [Video Size 720/560] 0 [if (= $arg1 1) [scr_w 720; scr_h 560] []]
menuitemcheckbox [Video Size 800/600] 0 [if (= $arg1 1) [scr_w 800; scr_h 600] []]
menuitemcheckbox [Video Size 832/624] 0 [if (= $arg1 1) [scr_w 832; scr_h 624] []]
menuitem [ 3Other Screen Size]
menuitemtextinput "Screen width:                " "$scr_w" "scr_w $arg1" "" 11
menuitemtextinput "Screen height:                " "$scr_h" "scr_h $arg1" "" 11
menuitem [ 3Booster]
menuitemcheckbox [Enable Turbo Booster] 0 [if (= $arg1 1) [bullethole 0; scorch 0; shotline 0; fsaa 0; shadowclip 0; shadowtile 0; skyclip 0; stencilshadow 0; hidebigmenuimages 1; vsync -1; bulletairsound 0; bulletbouncesound  0; footsteps 0; hitsound 1; fog 180; fov 120; minimapres 7; mtwater 0; reflectscissor 0; waterreflect 0; maxcon 10; trilinear 0; bilinear 0; lighterror 100; texreduce -1; mtexplosion 0; blood 0; maxfps 1000; minlod 60; gibnum 0; nosway 1; maxroll 0; fpsrange 100 1000; fullscreen o; texturescale 16; crosshairsize 50; damagescreen 0; footsteps o; sound detail low; hideradar 1; teamdisplaymode 2; echo 3Enable Turbo Booster] []]
menuitemcheckbox [Disable Turbo Booster] 0 [if (= $arg1 1) [bullethole 1; scorch 1; shotline 1; fsaa 0; shadowclip 1; shadowtile 1; skyclip 1; stencilshadow 40; hidebigmenuimages 0; vsync -1; bulletairsound 1; bulletbouncesound  1; footsteps 1; hitsound 0; fog 180; minimapres 9; mtwater 1; reflectscissor 1; waterreflect 1; maxcon 200; trilinear 1; bilinear 1; lighterror 1; texreduce 0; mtexplosion 1; blood 1; maxfps 200; minlod 60; gibnum 6; gibspeed 30; nosway 0; maxroll 0; fpsrange 100 1000; texturescale 32; damagescreen 1; sound detail high; footsteps 1; hideradar 0; teamdisplaymode 1; echo 3Disable Turbo Booster] []]
menuitem [ 3Guns]
menuitemcheckbox [Hide guns] 0 [if (= $arg1 1) [hudgun 0] []]
menuitemcheckbox [Show guns] 0 [if (= $arg1 1) [hudgun 1] []]
menuitem [ 3Sounds]
menuitemcheckbox [On] 0 [if (= $arg1 1) [unmuteallsounds] []]
menuitemcheckbox [Off] 0 [if (= $arg1 1) [mutesound  7; mutesound  8; mutesound  9; mutesound 10; mutesound 11; mutesound 12; mutesound 13; mutesound 14; mutesound 15; mutesound 16; mutesound 17; mutesound 18; mutesound 19; mutesound 41; mutesound 42; mutesound 43; mutesound 44; mutesound 45; mutesound 46; mutesound 20; mutesound 21; mutesound 22; mutesound 23; mutesound 25; mutesound 26; mutesound 27; mutesound 28; mutesound 29; mutesound 30; mutesound 31; mutesound 32; mutesound 33; mutesound 48; mutesound 62; mutesound 54; mutesound 55; mutesound 56; mutesound 57; mutesound 58; mutesound  0; mutesound  1; mutesound  2; mutesound 35; mutesound 36; mutesound 61; mutesound  3; mutesound  4; mutesound  5; mutesound  6; mutesound 34; mutesound 37; mutesound 38; mutesound 39; mutesound 40; mutesound 49; mutesound 50; mutesound 52; mutesound 59; mutesound 60; mutesound 63; mutesound 64; mutesound 65; mutesound 66; mutesound 67; mutesound 68; mutesound 89; mutesound 70; mutesound 71; mutesound 72; mutesound 73; mutesound 74; mutesound 75; mutesound 76; mutesound 77; mutesound 78; mutesound 79; mutesound 80; mutesound 81; mutesound 82; mutesound 83; mutesound 84; mutesound 85; mutesound 86; mutesound 87; mutesound 88; mutesound 89; mutesound 90; mutesound 91; mutesound 92; mutesound 93; mutesound 94; mutesound 95; mutesound 96; mutesound 97; mutesound 98] []]
menuitem
menuitem "" -1
menuitem [                   3APLLY NOW!                   ] [writecfg ; resetgl]
menuitem
menuitem [                       4AC Booster v 2.0 by Stupp*]
menuinitselection 1
alias booster [showmenu "AC Booster 2.0"]
add2mainmenu [menuitem "AC Booster 2.0" [showmenu "AC Booster 2.0"]]

Do not expect the same result for everyone, but I'm sure will benefit many.
Thanks given by:
bind KP4 [say % <---- Left <----]
bind KP5 [say % ----->Middle<----]
bind KP2 [say % <---- TUnnel ---->]
bind KP6 [say % ---->Right ---->]
bind KP- [say % Low Health Uh-Oh!]

Thanks to:

B}Verse (For helping me understand how to do this)
B}Ronald_Reagon (For Being Awesome and Helping him)
All -dyH| Members.
V-Man and DES|Cleaner for Inspiring me!

Working on some more scripts now :)

Mod edit: No DES|V-Man
Thanks given by:
Is it possible to make a script or something to set your fog to a certain amount when you load up the map, without typing /fog 1024?
Thanks given by:
Add this to your /config/autoexec.cfg:

[cubescript]if (! (checkalias mapstartalways)) [ mapstartalways = "" ]
if (! (strstr $mapstartalways [ fog 1024 ])) [ add2alias mapstartalways [ fog 1024 ] ]
[/cubescript]
Thanks given by:
Thanks a lot Bukz.
Thanks given by:
Hey guys,
i made a small script that will say something if you disconnect but it doesnt work, please help me!

This is the script:

ragequit = [say "bye bye everyone!"; sleep 200 [disconnect]]
Thanks given by: