Scripts
I just discovered the wheel.
Using the command / dbgtiles 1.
Just make a script and/or use bind.
Example: When you're with the flag and defending, you can give the command /dbgtiles1 and see through the wall if the kevlar, helmet, ammunition, akimbo, are in place. Then you pick up and return.
You can see through the wall if your enemy took something without going there.
- Does it change the gameplay? -
we will divide the Ac on two levels:
1) Script clan/players pró
2) no-script clan/player pró
Thanks given by:
(07 Mar 13, 11:04PM)1Cap Wrote: ...
For me it just works for helmets. It literally picks off every single mapmodel in the map as well, and it's incredibly annoying.
Thanks given by:
(07 Mar 13, 11:04PM)1Cap Wrote: I just discovered the wheel.
Using the command / dbgtiles 1.

No relation with damage scripts.
dbgtiles was obviously introduced for debugging purposes only and using it to gain an advantage /could/ be considered as cheating.

By the way, this command was removed from the game a few months ago.
Thanks given by:
(07 Mar 13, 11:04PM)1Cap Wrote: Using the command / dbgtiles 1.
Just make a script and/or use bind.

Yeah sure, binding a command to a key makes you a hardcore scripter.
Thanks given by:
(20 Jun 10, 04:48PM)a_slow_old_man Wrote: Post your scripts here (with a short explanation what it does).

"Credit goes to original autor"

To use this scripts copy&paste them in your "autoexec.cfg" you can find it in the "config"-section of you Assaultcube.


1. Quick knife script:
cubescript code :
 
alias quickknife [
    if (!= (curweapon) 6) [melee]
    attack
    onrelease [ sleep 1 [ if (= (curweapon) 0) [weapon (prevweapon)] ] ]
]
bind Q quickknife
 

To activate this script you have to press and hold "q" ingame. You will draw your knife and attack. When you stop pressing "q" you'll automaticly change back to your previous weapon.


2. Knifeattack script:
cubescript code :
alias knifeattack [
if (= (currentprimary) (curweapon)) [
weapon 0
] [
primary
]
]
bind Q knifeattack

This script will make you change to kinfe/primary weapon everytime you press "q"


3. Zoom script by stef:
cubescript code :
//zoom script by stef with fog 1024 trick added, a must for a sniper
alias adjustsens [
scopefov 40
scopesensscale = (divf $scopefov $fov)
]
alias altaction_4 [ alias oldfog $fog;fog 1024
adjustsens; domodifier 1; zoom 1;
onrelease [ zoom 0; adjustsens; fog $oldfog ]
]
alias delta_game_1 [
  if (= $arg1 1) [
    if (> $scopefov 5) [scopefov (- $scopefov 5) ]
  ][
    if (< $scopefov 60) [scopefov (+ $scopefov 5) ]
  ];
  sensitivity (divf (*f (*f $oldsens $scopesensscale) $scopefov) 40)
]

With this script you can zoom with your sniper. Just scroll with your scrollwheel while you scope.


4. Out of ammo script:
cubescript code :
// out of ammo -> pistol
alias noprimammo [
if (= curweapon [currentprimary]) [sleep 100 [if (= (magcontent (currentprimary)) 0)[ weapon 1]]]]
bind MOUSE1 [attack;noprimammo]

With this script you will automaticly change to the pistol when your primary weapon is out of ammo. (To use it with the SMG/AR you may have to set "autoreload" off or press the mousebutton again when you are out of ammo)


5. Teamchange script:
cubescript code :
alias swapteams [sleep 100 [autoteam 0]; sleep 200 [forceteam 0]; sleep 300 [forceteam 1]; sleep 400 [forceteam 2]; sleep 500 [forceteam 3]; sleep 600 [forceteam 4]; sleep 700 [forceteam 5]; sleep 800 [forceteam 6]; sleep 900 [forceteam 7]; sleep 1000 [forceteam 8]; sleep 1100 [forceteam 9]; sleep 1200 [forceteam 10]; sleep 1300 [forceteam 11]; sleep 1400 [forceteam 12]; sleep 1500 [forceteam 13]; sleep 1600 [autoteam 1]]

You need to be admin for this script.
When you type "/swapteams" ingame (or bind it to a key/in a menu) every player will change the team.
(For some reason it doesn't work properly for me. If the author of this script could have a look at this and tell me if it's wrong or something, I'd be very happy :) )


6. "Get rid of suckers" - script aka force script
cubescript code :
alias force_cn -1;
alias forceloop_o [
    callvote 5 $force_cn;
    sleep 5000 forceloop;
]
alias forceloop [];
alias start_force [
    alias forceloop $forceloop_o;
    forceloop;
]
alias stop_force [
    alias forceloop [];
]
alias force [
    if (< $numargs 1) [
        echo "Error: FORCE needs a ClientNumber!";
    ] [
        alias force_cn $arg1;
        start_force;
    ]
]
bind F8 [ stop_force;echo "Force Stopped!" ]
 

You need to be admin for this script.
When you type "/force cn" ingame the player with the choosen cn will get changed to the enemy team ever 5 second or something, till you press F8 or he leaves.
This is a nice altanative to kick/ban :)

Mod Edit: Upgraded [noparse][code] tags to
cubescript code :
[/noparse] tags</blockquote><br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">Cmon autor's, right a damn script. This was at one time a scripts thread...  I'll try...</span></span>
 
[cubescript]Assaultcube = [ yumad ] [ yunoob ]
if yunoob = Assaultcube [ Bind Alt + F4 ]
if yumad = jamz [ Auto Perma Ban ]
Format getnoobalais [ yumad ] [ yunoob ] [ jamz ]
if 3/8/2013 [ RELEASE A FRIGGIN NEW VERSIONS AND GIVE US ALL SOMETHING TO REALLY DISCUSS ]


I think I win, you may need to compile the compiler to get my scripts to work properly. wp gg

Thanks given by:
(08 Mar 13, 07:31AM)vern Wrote: 3/8/2013
You must be American.
Thanks given by:
No, he's happy to wait until the 3rd of August.
Thanks given by:
(08 Mar 13, 07:44AM)#M|A#Wolf Wrote:
(08 Mar 13, 07:31AM)vern Wrote: 3/8/2013
You must be American.
Is this bad? :P
Thanks given by:
If you know some people fromr Boston its harrrible J/K :P
Thanks given by:
cubescript code :
 
//By BarricadeX75/Frenzy, with help from Bukz :D
 
fcchrono = 0
startedcounting = 0
alias fccincrement [if (= 0 $stplp) [+= fcchrono 1; sleep 100 [fccincrement]]]
 
add2conloop [
 
if (= 5 $gamemode) [
 
if_conline_has (concatword (c 2) "you have the enemy flag") [
stplp = 0
if (= 0 $startedcounting) [fccincrement]
sleep 20 [startedcounting = 1]
echo (c 3) Chrono started!
]
 
if_conline_has (concatword (c 2) "you scored") [
fctime = (divf $fcchrono 10)
echo (format "%1Time taken to score: %2%3 %1seconds" (c 7) (c 3) $fctime)
sleep 20 [fcchrono = 0; startedcounting = 0; stplp = 1]
]
 
if_conline_has (concatword (c 2) "you dropped the flag") [
echo (c 3) You failed at scoring
fcchrono = 0
startedcounting = 0
stplp = 1
]
 
if_conline_has (concatword (c 2) "you lost the flag") [
echo (c 3) You failed at scoring
fcchrono = 0
startedcounting = 0
stplp = 1
]
 
]
 
]
 


This script will display the amount of time it took you to score each time you score a flag in CTF. (It starts counting as soon as you pick up the enemy flag)
Note that the chronometer will reset if you die or drop the flag by yourself.
This script requires tools.cfg :P

EDIT: updated with the new color tags :P
Thanks given by:
(14 Mar 13, 12:44AM)BarricadeX75 Wrote:
cubescript code :
 
//By BarricadeX75/Frenzy, with help from Bukz :D
 
fcchrono = 0
startedcounting = 0
alias fccincrement [if (= 0 $stplp) [+= fcchrono 1; sleep 100 [fccincrement]]]
 
add2conloop [
 
if (= 5 $gamemode) [
 
if_conline_has " 2you have the enemy flag" [
stplp = 0
if (= 0 $startedcounting) [fccincrement]
sleep 20 [startedcounting = 1]
echo " 3Chrono started!"
]
 
if_conline_has " 2you scored" [
fctime = (divf $fcchrono 10)
echo (concatword " 7Time taken to score: 3 " $fctime " 7seconds")
sleep 20 [fcchrono = 0; startedcounting = 0; stplp = 1]
]
 
if_conline_has " 2you dropped the flag" [
echo " 3You failed at scoring"
fcchrono = 0
startedcounting = 0
stplp = 1
]
 
if_conline_has " 2you lost the flag" [
echo " 3You failed at scoring"
fcchrono = 0
startedcounting = 0
stplp = 1
]
 
]
 
]
 


This script will display the amount of time it took you to score each time you score a flag in CTF. (It starts counting as soon as you pick up the enemy flag)
Note that the chronometer will reset if you die or drop the flag by yourself.
This script requires tools.cfg :P


We can't see that binary character ;) Edit your post to use this:

cubescript code :
 
//By BarricadeX75/Frenzy, with help from Bukz :D
  
fcchrono = 0
startedcounting = 0
alias fccincrement [if (= 0 $stplp) [+= fcchrono 1; sleep 100 [fccincrement]]]
  
add2conloop [
  
if (= 5 $gamemode) [
  
if_conline_has concatword (c 2) "you have the enemy flag" [
stplp = 0
if (= 0 $startedcounting) [fccincrement]
sleep 20 [startedcounting = 1]
echo concatword (c 3) "Chrono started!"
]
  
if_conline_has concatword (c 2) "you scored" [
fctime = (divf $fcchrono 10)
echo (concatword (c 7) "Time taken to score: " (c 3) $fctime (c 7) "seconds")
sleep 20 [fcchrono = 0; startedcounting = 0; stplp = 1]
]
  
if_conline_has concatword (c 2) "you dropped the flag" [
echo concatword (c 3) "You failed at scoring"
fcchrono = 0
startedcounting = 0
stplp = 1
]
  
if_conline_has concatword (c 2) "you lost the flag" [
echo concatword (c 3) "You failed at scoring"
fcchrono = 0
startedcounting = 0
stplp = 1
]
  
]
  
]
 


That should work.
Thanks given by:
Almost @ PhaNtom, you need to wrap parenthesis around the concatword statements though.

cubescript code :
if_conline_has (concatword (c 2) "you lost the flag") [
Thanks given by:
(14 Mar 13, 02:03AM)PhaNtom Wrote:
(14 Mar 13, 12:44AM)BarricadeX75 Wrote:
cubescript code :
 
//By BarricadeX75/Frenzy, with help from Bukz :D
 
fcchrono = 0
startedcounting = 0
alias fccincrement [if (= 0 $stplp) [+= fcchrono 1; sleep 100 [fccincrement]]]
 
add2conloop [
 
if (= 5 $gamemode) [
 
if_conline_has " 2you have the enemy flag" [
stplp = 0
if (= 0 $startedcounting) [fccincrement]
sleep 20 [startedcounting = 1]
echo " 3Chrono started!"
]
 
if_conline_has " 2you scored" [
fctime = (divf $fcchrono 10)
echo (concatword " 7Time taken to score: 3 " $fctime " 7seconds")
sleep 20 [fcchrono = 0; startedcounting = 0; stplp = 1]
]
 
if_conline_has " 2you dropped the flag" [
echo " 3You failed at scoring"
fcchrono = 0
startedcounting = 0
stplp = 1
]
 
if_conline_has " 2you lost the flag" [
echo " 3You failed at scoring"
fcchrono = 0
startedcounting = 0
stplp = 1
]
 
]
 
]
 


This script will display the amount of time it took you to score each time you score a flag in CTF. (It starts counting as soon as you pick up the enemy flag)
Note that the chronometer will reset if you die or drop the flag by yourself.
This script requires tools.cfg :P


We can't see that binary character ;)

Try copy/pasting this script somewhere else and it'll be here ;)

EDIT: but anyway, I'm updating it using those tags right now :P
Thanks given by:
Three new scripts from myself: http://ac-akimbo.net/search.php?action=r...a6e863e08e
Thanks given by:
Maybe a script where if i click say mouse button 4, my automatic gunfire would change to three round burst fire. If anyone can please do this, it would me much appreciated.
Thanks given by:
@bballn45:

cubescript code :
burston = 0
 
bind MOUSE4 [
if (= $burston 0) [
echo "Mode: burst"
burstshots (curweapon) 3
burston = 1
] [
echo "Mode: automatic"
burstshots (curweapon) 0
burston = 0
]
]
Thanks given by:
(20 Jun 10, 05:34PM)Andrez Wrote: 7. AFK Script
Code:
//AFK Script
//by CiD
//TODO: make a settings menu
//User Settings
//This is what will be added to your name when you are AFK.
afkstr = "|afk"

//If set to 1, it will display a message to other players when you go AFK. Set to 0 to disable.
afkshowmessage = 1

//This will be placed after your name and sent to other players.
afkmessage = "is no longer available."

//This is how long (in seconds) the script will wait if you are idle before changeing you to AFK.
timeuntilafk = 20

//DO NOT EDIT BELOW HERE
curafk = 0
afktime = 0
alias afk [
if $arg1 [
if (= $curafk 0) [
oldname = $curname
name (concatword $oldname $afkstr)
curafk = 1
echo "You are now set to: AFK"
if $afkshowmessage [say (concat "AFKScript:" $oldname $afkmessage )]
]
] [
if $curafk [
name $oldname
curafk = 0
echo "You are now set to: ONLINE"
]
]
]
alias notafk [
if (= $afktime 0) [afkcheck]
afktime = 0
if (= $curafk 1) [afk 0]
]
alias afkcheck [
afktime = (+ $afktime 5)
if (= 2 (+ (> $afktime (* $timeuntilafk 1000)) (= $curafk 0))) [afk 1]
sleep 5 afkcheck
]
bind w [forward;notafk]
bind a [left;notafk]
bind s [backward;notafk]
bind d [right;notafk]
//END of AFK Script
It automatically changes your nickname from "nickname" to "afk|nickname" after some inactivity period.

This didn't work completely for me, so I wrote a modified version. Credits are in the script. I feel like I'm kinda wasting my time posting this, but if anyone wants it, have fun. If you just want to download the .cfg file and add it straight to your "scripts" folder, click -->here<--.

Code:
//Credits to CiD's AFK Script        http://forum.cubers.net/thread-38.html (posted by Andrez)
//Note: I don't mean to steal script or claim I built this from scratch. This is credited to CiD's AFK script, whom I based my script off of, since his wasn't working for me, and it had excess coding.
//Usage: When you need to go afk, type "/afk". This will switch you to team spectator and add "-AFK" to your name, as well as printing to the console the afkmessage. When you want to stop being afk, type "/afk" again, this will remove the "-AFK", switch you to a team, and print a message announcing your return.
//Copyright or License: I don't really care if you modify this, just please credit both CiD's AFK Script and myself, Speedbomb00.
afksuf = "-AFK"
afkmessage = "is now afk."
returnmessage = "is no longer afk."
curafkmode = 0
alias afk [
if $arg1 [
if (= $curafkmode 0) [
oldname = $curname
me $afkmessage
name (concatword $oldname $afksuf)
curafkmode = 1
spectate] [
if $arg1 [
if (= $curafkmode 1) [
name $oldname
curafkmode = 0
me $returnmessage
spectate
]
]
]
]
]
Thanks given by:
[Image: 10h6syr.jpg]

ty kcolspac10
Thanks given by:
Could someone write me a script that gives me a 5 second countdown to respawn?
the normal countdown isn't there when your speccing someone.
Thanks given by:
Could someone write me a script that automatically place teamkiller in spect if TOSOK round is finished?
Thanks given by:
How to use universal delta and domodifier (How to use your mouse scroll wheel in scripts without rebinding the scroll wheel itself. This is especially useful if you have more than one script that you want to use with the mouse scroll wheel):

Overview:


Usage:
Thanks given by:
(19 Nov 12, 06:24PM)888 Wrote: Auto respaw (no need bind )
alias mapstartalways [sleep 100 [spaw]]
alias spaw [
if (= 1 (alive) ) [sleep 500 [spaw] ] [ echo [mort];sleep 5000 [attack;sleep 500 [spaw]] ]
]
Added menu checkbox
cubescript code :
 
alias respawx
alias mapstartalways [sleep 100 [spaw]]
alias spaw [
  if (= 1 (respawx) ) [ if (= 1 (alive) ) [sleep 500 [spaw]] [sleep 5000 [attack;sleep 500 [spaw]] ] ] [sleep 2000 [spaw] ]
]
 

((This goes to autoexec.cfg))
cubescript code :
menuitemcheckbox [Auto respawn: ]     "$respawx"                     [ respawx = $arg1 ]

((This goes to whatever menu you would like to put this (I put in misc settings)))




UPDATE:::AFK SCRIPT + MENU:::
the afk script is by "TheKiller" (basic script).
I added the menu and the back online message

The system has
Menu (By me, Which allows the following: )
Enable/disable afk system
Enable/disable afk message
Enable/disable back online message
Set Suffix for your nick when AFK
Set time to AFK (in seconds, from 10 to 180)

Now, to install:
1) Add the following line under any menu you would like (my fav is under "gameplay")
cubescript code :
menuitem [AFK settings...]                                     [ showmenu [AFK settings] ]

2) Add this anywhere on menu config files (I added under gampley menu in menus_settings.cfg)
cubescript code :
newmenu [AFK settings]
 
menuitemcheckbox   [Enable afk:            ]        "$afkenable"           [ afkenable = $arg1      ]
menuitemcheckbox   [Show afk message:      ]        "$afkshowmessage"      [ afkshowmessage = $arg1 ]
menuitemcheckbox   [Show online message:   ]        "$afkshowback"         [ afkshowback = $arg1    ]
menuitemtextinput  [Set afk name caption:  ]        "result $afkstr"       [ afkstr = $arg1         ]
menuitemtextinput  [Set afk message:       ]        "result $afkmessage"   [ afkmessage = $arg1     ]
menuitemtextinput  [Set online message:    ]        "result $backmessage"  [ backmessage = $arg1    ]
menuitemslider     [Set seconds until afk: ] 10 180 "$timeuntilafk" 10 []  [ timeuntilafk = $arg1   ]

3) Add this on the file "defaults.cfg"
cubescript code :
afkstr = "|afk"
afkshowmessage = 0
afkshowback = 0
backmessage = "is available again."
afkmessage = "is no longer avilable."
timeuntilafk = 30
afkenable = 0

4) Add this on autoexec.cfg file
cubescript code :
 
//AFK Script by TheKiller edited and menued by _DucK_
 
//DO NOT EDIT BELOW HERE
curafk = 0
afktime = 0
alias afk [
if (= ($afkenable) 1 ) [
if $arg1 [
if (= $curafk 0) [
oldname = $curname
name (concatword $oldname $afkstr)
curafk = 1
echo "You are now set to: AFK"
if $afkshowmessage [say (concat "AFK Message:" $oldname $afkmessage )]
]
] [
if $curafk [
name $oldname
curafk = 0
echo "You are now set to: ONLINE"
if $afkshowback [say (concat "AFK Message:" $oldname $backmessage )]
]
]
]
]
alias notafk [
if (= $afktime 0) [afkcheck]
afktime = 0
if (= $curafk 1) [afk 0]
]
alias afkcheck [
afktime = (+ $afktime 5)
if (= 2 (+ (> $afktime (* $timeuntilafk 1000)) (= $curafk 0))) [afk 1]
sleep 5 afkcheck
]
bind w [forward;notafk]
bind a [left;notafk]
bind s [backward;notafk]
bind d [right;notafk]
bind MOUSE4 [universaldelta  1;notafk] // this line was added by me
bind MOUSE5 [universaldelta -1;notafk] // this line was added by me
bind MOUSE1 [attack;notafk] // this was added by me
bind MOUSE2 [altaction;notafk] // by me
bind MOUSE3 [weapon;notafk] // by me


*I am not quite sure if Thekiller is actually the author. if not, my apologies and credit goes to the original author
Thanks given by:
A script to show who the teamkillers are, and how many teamkills they have.
NOTE: Unintentional teamkills happen all the time! Please consider that some teamkills are accidental before kicking people!

Code:
bind J [show_teamkillers]

persistidents 0

alias show_teamkillers [
  newmenu Teamkillers

  menuitem (concatword "| CN | " (c 3) "Teamkills" (c 5) " | " (c 2) "Name" (c 5) " |") -1
  alias _tklist []

  loop _cn 20 [
    if (isclient $_cn) [
      if (> (player $_cn tks) 0) [
        add2list _tklist $_cn
        menuitem (concatword "| " $_cn " | " (c 3) (player $_cn tks) (c 5) " | " (c 2) (player $_cn name)) -1
      ]
    ]
  ]
  if (= (listlen $_tklist) 0) [ menuitem (concatword (c 0) "No Teamkills detected! :D") -1 ]
 
  showmenu Teamkillers
 
  onrelease [closemenu Teamkillers; delmenu Teamkillers]
]

persistidents 1
Thanks given by:
@ Thrawn:
Nice! Useful. Thank you.

*Edit: Anyone have a script to automatically F2 any kick or ban vote against yourself?
Thanks given by:
Code:
persistidents 0
lolc = 0
checkinit onSpawn [ lolc = 0 ]
checkinit onKill [
if (&& (= $arg1 (player1 cn)) (!= $arg1 $arg2)) [
if (&& (curmodeattr team) (!= (player1 team) (player $arg2 team))) [
if ( = $lolc 0)[
hudecho (c 0)"You have slain an enemy"
lolc = 1
sleep 30000 [ lolc = 0 ]
][
if ( = $lolc 1 ) [
hudecho (c 0)"Double kill"
lolc = 2
sleep 30000 [ lolc = 0 ]
][
if ( = $lolc 2 ) [
hudecho (c 0)"Triple kill"
lolc = 3
sleep 30000 [ lolc = 0 ]
][
if ( = $lolc 3 ) [
hudecho (c 0)"Quadra kill"
lolc = 4
sleep 30000 [ lolc = 0 ]
][
if ( = $lolc 4 ) [
hudecho (c 0)"Penta kill"
lolc = 0
sleep 1000[ hudecho (c 1)"Ace!" ]
]
]
]
]
]
]
]
]
persistidents 1
Do you like my script??
Thanks given by:
I know there's already a script which makes you respawn on the same team as before but this one is event based... the idea is that you don't have to sleep for 500ms or something just to make sure the sleep time is larger than the ping so you actually went to spectate. Instead it switches back as soon as you're in spectate which results in a much faster respawn.

fireEvent was a more general approach so it also counts the milliseconds passed since waiting to fire but for sure you can't let two events race each other the second one will always kill the first one. As a hint though fireEvent is also really usefull for claiming and releasing admin.
Code:
alias nop []

alias fireEvent [
 eventStatement = $arg1
 eventListener = $arg2
 if (! (&& (checkalias arg3) $arg3)) [
   eventStart = (millis)
 ]
 sleep 1 [
   if ($eventStatement) [
     ($eventListener (- (millis) $eventStart))
   ] [
     fireEvent $eventStatement $eventListener 1
   ]
 ]
]

checkinit mapstartalways [
   eventStart = 0
   eventStatement = 0
   eventListener = nop
]

alias isSpectate [
 return (= (curteam (player1 cn)) 4)
]
alias enterTeam [
 team $teamwish
 attack
]
alias respawn [
 if (! (&& (checkalias arg1) $arg1)) [
   if (= (curteam) 0) [
     teamwish = [CLA]
   ]
   if (= (curteam) 1) [
     teamwish = [RVSF]
   ]
 ]
 spectate
 fireEvent isSpectate enterTeam
]
And for sure the actual command created here is /respawn
Thanks given by: |HP| , +f0r3v3r+
I'm search without success a script for know automatically when my akimbo disappear , i have see the scipt by 888 but only the manual timer run for me.
Thanks given by: Mise"
Hello, I'd love to have auto vote auto change team thing.

Thanks to everyone who might be able to help me!
Thanks given by: