| 
		
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
		
		
		18 Aug 10, 03:24AM 
(This post was last modified: 18 Aug 10, 03:25AM by V-Man.)
		
	 
		 (17 Aug 10, 06:28PM)Kirin Wrote:  fyi V-Man (and all accuracy lovers), 1.1.0.2 (atm) is going to have a accuracy [1|0] switch :)@V-Man (and other cubescripters) and also:
 
 
 checkalias X   (returns 1 if X is defined)conline          (represents last console line)
 delalias X       (completely removes X alias)
 += X number   (makes X equal to X+number)
 -= X number    (makes X equal to X-number)
 strstr X Y         (returns 1 if Y can be found in X, X&Y are strings not necessarely variables)
 execdir X       (executes *.cfg in directory X, it can easy deployment/organization of scripts)
 c X                (command to put color ascii codes in a clean way like /echo (c 0) green (c X) purple)
 1) <3 
2) <3 
3) <3<3<3<3<3<3<3 
4) <3<3<3<3<3<3<3 
5) <3 
6) <3 
7) I'd like to see what that can do. 
8) Does that mean it executes all  cfg files in a given directory? 
9) <3
	 
		
	 
	
	
	
		
	Posts: 137Threads: 2
 Joined: Jun 2010
 
	
	
		yes it executes all .cfg in a given directory,
 in my autoexec i just have this: execdir scripts
 
 and i put all the scripts in AC/scripts
 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
	
		omigoshiloveyouguys!I'm eager to test drive that babeh!
 
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
		execdir is only useful if it's included in scripts.cfg by default, otherwise the newbies will still have to edit autoexec :P
	 
		
	 
	
	
	
		
	Posts: 137Threads: 2
 Joined: Jun 2010
 
	
	
		yeah i think it would be nice to add it as default
	 
		
	 
	
	
	
		
	Posts: 119Threads: 8
 Joined: Jun 2010
 
	
	
		 (18 Aug 10, 02:23AM)Bukz Wrote:  http://desbukz.pastebin.com/v7M7WYuR
 if (strcmp $arg1 o) [kobr = "Being a noob."] [
 if (strcmp $arg1 o) [kobr = "Inappropriate name."] [
 First of all good work, but... Did you notice? Same argument, diferent reason. 
Maybe i did something wrong but sometimes i get an 'invalid reason' idw
	 
		
	 
	
	
	
		
	Posts: 1,331Threads: 44
 Joined: Jun 2010
 
	
	
		Oops, thanks for pointing that out, I meant to change that when I added some more reasons (args) to the script. Thanks VallDiGna! :)Fixed version here
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
		
		
		18 Aug 10, 07:45PM 
(This post was last modified: 18 Aug 10, 07:45PM by Gibstick.)
		
	 
		Kick or ban with attitude! Don't use if you use Bukz' script (which is far more practical).http://gibstick.pastebin.com/pv5eA7Kf 
Note that if you leave out the reason you'll look incredibly stupid. Non-admin version included. 
Thank you MusicMan10 and ShadowZ for being my dummies. Because admins can't kick themselves :(
	
		
	 
	
	
	
		
	Posts: 1,331Threads: 44
 Joined: Jun 2010
 
	
		
		
		21 Aug 10, 07:22AM 
(This post was last modified: 21 Aug 10, 08:29AM by Bukz.)
		
	 
		Headshot Message Script - Mirror #1
Headshot Message Script - Mirror #2
Automatically say a custom message when you headshot an enemy. Change the message on-the-fly via a menu. :)
 
Made for, tested on, and will only work on AC 1.1.0.2  or greater.
 
Enjoy!
Edit:
NOTE:  You must bind the following to MOUSE1 (place it in your autoexec.cfg) for the script to work properly:
 bind "MOUSE1" [attack; sleep 5000 [hsmsg = 0]]
This prevents the script from spamming, but if you get more than 1 headshot every 5 seconds, and want this script to say the message after every one, you may want/have to lower this sleep's value. 
 
Auto say sorry to teamates upon teamkill:
 
Using the same principle as my previous script, I've created a script that will automatically say sorry for you whenever you teamkill.
 
Either put this into a new .cfg named whatever, and put within the /scripts folder you made when installing my last script, or just paste the whole thing into your autoexec.cfg :p
 add2alias mapstartalways [sleep 1000 [tkchk]]
 tkmsg = 0
 
 tkchk = [
 if (= $connected 1) [ // Only apoligize to real people :p
 if (= $tkmsg 0) [
 if (= (strstr $conline "you fragged teammate") 1) [
 say (concatword % $srymsg); tkmsg = 1] [
 if (= (strstr $conline "you gibbed teammate") 1) [
 say (concatword % $srymsg); tkmsg = 1] [
 if (= (strstr $conline "you knifed teammate") 1) [
 say (concatword % $srymsg); tkmsg = 1] [
 if (= (strstr $conline "you splattered teammate") 1) [
 say (concatword % $srymsg); tkmsg = 1] []]]]] []
 sleep 50 [tkchk]] []
 ]
 
 bind "MOUSE1" [attack; sleep 5000 [tkmsg = 0]]
 
 newmenu "srymsg"
 menuitemtextinput "Teamkill say message: " "" "srymsg = $arg1"
Will allow you to change what is said on-the-fly via a menu. Now there are no more excuses for not apoligizing to your teammates for your trigger-happiness! :)
NOTE:  Your MOUSE1 bind will have to be edited a bit if you use both of these scripts in this post, to accomodate both scripts. It should look like this:
 bind "MOUSE1" [attack; sleep 5000 [hsmsg = 0; tkmsg = 0]]
Made for, tested on, and will only work on AC 1.1.0.2  or greater.
 
Enjoy!
	 
		
	 
	
	
	
		
	Posts: 137Threads: 2
 Joined: Jun 2010
 
	
		
		
		21 Aug 10, 09:37AM 
(This post was last modified: 21 Aug 10, 01:04PM by Kirin.)
		
	 
		i think that now it's a good idea to add this command: addtimedloop [millisecs] [alias]
what do u think guys?
 
GJ Bukz :)
 
btw bukz 
u can do conline [ ] 
to avoid the spam and this way your scripts will become much more efficient. 
EDIT: took time to do it properly:
 //on Tk message script by Bukz. little mod by kirin.if (! (strstr $mapstartalways tkchk)) [add2alias mapstartalways [sleep 1000 [tkchk]]] []
 if (checkalias srymsg) [] [srymsg = "Sorry Mate :("]
 
 tkchk = [
 if (= $connected 1) [ // Only apoligize to real people :p
 if (strstr $conline "you fragged teammate ") [say (concatword % $srymsg);conline [ ]] []
 if (strstr $conline "you gibbed teammate ") [say (concatword % $srymsg);conline [ ]] []
 if (strstr $conline "you splattered teammate ") [say (concatword % $srymsg);conline [ ]] []
 if (strstr $conline "you knifed teammate ") [say (concatword % $srymsg);conline [ ]] []
 if (strstr $conline "you headshotted teammate ") [say (concatword % $srymsg);conline [ ]] []
 ]
 sleep 1 [tkchk]
 ]
 newmenu "sorrymsg"
 menuitemtextinput "message on TeamKill: " "result $srymsg" "srymsg = $arg1"
much simpler and efficient dont ya think?
 
also i fixed a bug that launched your script repeatdly after rerunning AC
 
mapstartalways was getting accumulated. 
and i added a default for srymsg.
 
EDIT.. 
fixed another bug for those who call themselfes "teammate"
	
		
	 
	
	
	
		
	Posts: 1,331Threads: 44
 Joined: Jun 2010
 
	
	
		Thanks much for fixing it! I'm obviously still lost in my 1.0.4 scripting mind, not quite sure how things need to be done in 1.1 yet. :x
 I never mind people letting me know when my noob is showing, and I'm always looking for improvements to my methods and what not so don't be scared to correct me when I'm wrong. :D
 
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
		
		
		21 Aug 10, 12:37PM 
(This post was last modified: 21 Aug 10, 01:04PM by Gibstick.)
		
	 
		I'm drooling about what I could do with addtimedloop. Now this sort of thing is obsolete: bind RALT [if (= $whoisable 0) [whoisable = 1; echo "Whois all loop 0on!"] [whoisable = 0; echo "Whois all loop 3off!"]]alias whoisall [loop w 21 [whois $w]; if (= $whoisable 1) [waloop] []]
 alias waloop [sleep 60000 [whoisall]]
And Bukz: Don't you notice that I always pester people for help before  I release a script? And since no one really goes on #cubepad on gamesurge (cough cough cough I want more people there), no one can really tell. HEHEHHEHEHEHAE
	
		
	 
	
	
	
		
	Posts: 2,841Threads: 44
 Joined: Jun 2010
 
	
		
		
		22 Aug 10, 12:10AM 
(This post was last modified: 22 Aug 10, 12:10AM by #M|A#Wolf.)
		
	 
		Bukz, is there a way for that script to say the voicecom of sorry? When I use yours Kirin the command of "unknown command: if" appears.
	 
		
	 
	
	
	
		
	Posts: 1,331Threads: 44
 Joined: Jun 2010
 
	
		
		
		22 Aug 10, 01:23AM 
(This post was last modified: 22 Aug 10, 01:28AM by Bukz.)
		
	 
		Try changing the says: say (concatword % $srymsg); tkmsg = 1] [
to something like:
 voicecom sorry $srymsg; tkmsg = 1] [
But I recommend getting Kirin's version of the script working, it is much better. :)
	
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
	
		If your like me and have a high gamma for your game, and hate for it to reset everytime you minimize quickly or by accident this script is for you.
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
	
		Bonus points for your creative use of conline.
	 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
		
		
		23 Aug 10, 06:38AM 
(This post was last modified: 23 Aug 10, 07:15AM by V-Man.)
		
	 
		BC|Wolf Wrote:unknown command: if Epic fail.
 
 
in other news:
 alias add2bind [bind $arg1 (concat (keybind $arg1) ";" $arg2)]
:D
	 
		
	 
	
	
	
		
	Posts: 152Threads: 20
 Joined: Jul 2010
 
	
	
		hey guysi was wondering if there is a way to make it fog go to 1024 for ever... like you don't need to type it every time map changes... is this possible?
 
		
	 
	
	
	
		
	Posts: 1,823Threads: 20
 Joined: Jun 2010
 
	
		
		
		23 Aug 10, 03:11PM 
(This post was last modified: 23 Aug 10, 03:11PM by Gibstick.)
		
	 
		Try add2alias mapstartalways [fog 1024]
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
		
		
		24 Aug 10, 04:56AM 
(This post was last modified: 24 Aug 10, 07:39AM by DrauL.)
		
	 
		//LRN2NOSCOPE SCRIPT//By DrauL; massacred by DES|V-Man
 noscope = [2500] //Lower over time to increase difficulty
 
 scopetiming = [start_time = (millis) ; onrelease [end_time = (millis) ; timescoping = (- $end_time $start_time); echo Time scoping was $timescoping milliseconds ; lrn2noscope]]
 
 lrn2noscope = [if (> $timescoping $noscope) [suicide] []]
 
 bind "MOUSE2" [if (= (curweapon) 5) [altaction ; scopetiming] [altaction]]
 
		
	 
	
	
	
		
	Posts: 5Threads: 4
 Joined: Aug 2010
 
	
	
		Trying to get the 'quickknife' script to work with no luck. C&P'd it into autoexec.cfg, autoexec.cfg is in the right folder. Start AC, in the startup map I press and hold 'q' and all I do is fire with my selected gun but if I have grenades as my active weapon, 'q' will switch to knife and attack when held but not return to previous weap when released. Using 1.1.0.1 client.
	 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		Quote:Using 1.1.0.1 client. 
Thats your problem, that script was written pre-carbine. 
I dont remember the knife's weapon number, but I'm pretty sure its current number + 1. If you know any cubescript, that should help you. If not I'm sure someone can give you an updated one.
	 
		
	 
	
	
	
		
	Posts: 1,438Threads: 54
 Joined: Jun 2010
 
	
	
		alias quickknife [if (!= (curweapon) 7) [melee]
 attack
 onrelease [ sleep 1 [ if (= (curweapon) 1) [weapon (prevweapon)] ] ]
 ]
 bind Q quickknife
Should work....knowing me, iot probz wont.
	 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
		
		
		24 Aug 10, 08:56PM 
(This post was last modified: 24 Aug 10, 08:57PM by V-Man.)
		
	 
		no... actually, the problem is that "onrelease" is not a valid command to switch to another weapon on.Weapon switching must be done under a keybound alias (and lose their validity under manipulating commands such as onrelease, sleep, and loop). Make it so you have to click again, and on that second click it switches back.
 
 Oh yeah, and yay for addtimedloop! I started making recursive aliases because I couldn't find any appropriate way to use loop or while for my scripts... XD
 
		
	 
	
	
	
		
	Posts: 5Threads: 4
 Joined: Aug 2010
 
	
	
		Ty for the help guys, and the script Draul. I know zero about cubescript, only been playing AC for a little less than a month.I was just too lazy to m3 click for knife in tosok then have to switch back if I got a successful hit.
 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		There is no way to tell if there is a successful hit.
	 
		
	 
	
	
	
		
	Posts: 3,780Threads: 33
 Joined: Jun 2010
 
	
		
		
		26 Aug 10, 07:45AM 
(This post was last modified: 26 Aug 10, 07:46AM by V-Man.)
		
	 
		No way to tell CubeScript, anyway.Then again... /hitsound 1 tells you (the player) when you make a successful hit...
 
		
	 
	
	
	
		
	Posts: 3,462Threads: 72
 Joined: Jun 2010
 
	
	
		not if you do bind "MOUSE1" [attack; playsound 47]
Try it! I wonder if I got the right sound :P
	
		
	 
	
	
	
		
	Posts: 119Threads: 8
 Joined: Jun 2010
 
	
	
		 (20 Jun 10, 04:48PM)a_slow_old_man Wrote:  3. Zoom script by stef:
 With this script you can zoom with your sniper. Just scroll with your scrollwheel while you scope.//zoom script by stef with fog 1024 trick added, a must for a sniperalias 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)
 ]
 
 4. Out of ammo script:
 
 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)// out of ammo -> pistolalias noprimammo [
 if (= curweapon [currentprimary]) [sleep 100 [if (= (magcontent (currentprimary)) 0)[ weapon 1]]]]
 bind MOUSE1 [attack;noprimammo]
 Anyone can make them for 1.1?
	 
		
	 
	
	
	
		
	Posts: 1,331Threads: 44
 Joined: Jun 2010
 
	
	
		@VallDiGna, the first one, may still be possible, I can look into it, the second one is out of the question AFAIK, since all weapon switching must be done via key/mouse binds now.
	 
		
	 |