Useful scripts
Moderators: Moderators, Mappers
Oh now I get your problem! You trigger the enemyd BEFORE the kill is 'recorded'. Don't trigger it with "*saw the bullet*" or something, trigger it at the enemy down thing. I'll provide you with an example soon.
EDIT: here:
Just replace the HERE with your enemyd message + radiosound, and be sure to delete the trigger I mentioned before.
EDIT2: hehe, I was trying too hard: counter_autoenemyd "your enemyd msg here"
EDIT: here:
Code: Select all
//// Frag triggers
// Pistol
trigger "counter_pistolfrag;HERE" "*$name$'s Mark 23 pistol"
trigger "counter_pistolfrag;HERE" "*$name$'s .45 caliber pistol round"
// Akimbo pistols
trigger "counter_akimbofrag;HERE" "*$name$'s akimbo Mark 23 pistols"
trigger "counter_akimbofrag;HERE" "*was John Woo'd by $name$*"
// MP5
trigger "counter_frag;if $counter_roundover == 0 then inc counter_mp5kills;HERE" "* $name$'s *MP5*"
// M4
trigger "counter_frag;if $counter_roundover == 0 then inc counter_m4kills;HERE" "*$name$'s M4*"
// SSG
trigger "counter_sniperfrag;HERE" "*sniper bullet * $name$*"
trigger "counter_sniperfrag;HERE" "*was picked off by $name$*"
trigger "counter_sniperfrag;HERE" "*was sniped in the stomach by $name$*"
trigger "counter_sniperfrag;HERE" "*was shot in the legs by $name$*"
// M3
trigger "counter_frag;if $counter_roundover == 0 then inc counter_m3kills;HERE"" "*$name$'s M3*"
// HC
trigger "if $counter_roundover == 0 then inc counter_hctwobarrelkills;counter_hcfrag;HERE"" "*$name$'s sawed*off*"
trigger "if $counter_roundover == 0 then inc counter_hconebarrelkills;counter_hcfrag;HERE"" "*$name$'s single barreled handcannon*"
// Knife
trigger "counter_knifefrag_throw;HERE" "*$name$'s flying knife*"
trigger "counter_knifefrag_slash;HERE" "*throat slit by $name"
trigger "counter_knifefrag_slash;HERE" "*compliments of $name"
trigger "counter_knifefrag_slash;HERE" "*gutted by $name"
trigger "counter_knifefrag_slash;HERE" "*repeatedly in the legs by $name"
// Grenade
trigger "counter_grenadefrag;HERE" "*see $name$'s handgrenade"
// Kick
trigger "counter_kickfrag;HERE" "*got * ass kicked by $name"
trigger "counter_kickfrag;HERE" "*$name$, with a quickness"
trigger "counter_kickfrag;HERE" "*remove $name$'s boot from * ass"
// Punch
trigger "counter_punchfrag;HERE" "*was knocked out by $name"
trigger "counter_punchfrag;HERE" "*got a free facelift by $name"
trigger "counter_punchfrag;HERE" "*$name$'s iron fist"
// Drops
trigger "counter_frag;if $counter_roundover == 0 then inc counter_dropkills;HERE" "*was taught how to fly by $name"
EDIT2: hehe, I was trying too hard: counter_autoenemyd "your enemyd msg here"
I might have missed a message for a trigger, I'll try to find it. Thanks.Cnnlngs wrote:another word for AK:
the other day i kicked a bloke to death, but your uber script didn't counted it as a frag; so in the upper right corner of my screen there where 11 frags, but in the console (mapstats) there were only 10
Örr...
could be useful for someone wanting to exec different cfg's for different maps:
Code: Select all
trigger "exec cfg/$map$.cfg" "#cl_enterlevel"
this beats the netgraph toggle alias (in my opinion)
the graph stays up only as long as you press the key
the graph stays up only as long as you press the key
Code: Select all
//netgraph toggle
alias +net "netgraph 1"
alias -net "netgraph 0"
bind z +net
-
- tripped on its own grenade
- Posts: 331
- Joined: Tue Aug 26, 2003 11:20 am
- Location: de
- Contact:
A guy came to me and asked me about my previously posted scripts where $h_LCA == 3 would define that the round runs at the very moment.. etc.
And it came to be that he wanted some help with some killtriggers .. some more sophisticated ones of course.
As I don't like building funny things just for one person, here they are:
- It defines 4 killmessages that get _randomly_ chosen (needs aprq2 1.20 or higher)
Note: it's perhaps easier to read it from the last line to the first line as this would be the way of execution.
=> Yes, you can even say that you want 4 OTHER random killmessages once you fragged TWO ppl in the current round by doing this:
Instead of:
It would look like this:
Note: You will need to define t_killgroup_3, t_kill3_1 (actual message) etc. as you need them.
If you can handle these things, be welcome to use them Handle with care.
Haudrauf.
PS: The above scripts were written without being tested. But should work as I saw through them more than once.
edit: optimized.
And it came to be that he wanted some help with some killtriggers .. some more sophisticated ones of course.
As I don't like building funny things just for one person, here they are:
- It defines 4 killmessages that get _randomly_ chosen (needs aprq2 1.20 or higher)
Code: Select all
/// define ONLY messages: (we have 4 different messages)
set t_kill_messagecount 4
alias t_kill_1 "say_team %K got killed and I laugh my ass off."
alias t_kill_2 "say_team %K can't laugh anymore. lala lols."
alias t_kill_3 "say_team YOooo are so dead %K.. right? I don't hear you.."
alias t_kill_4 "say_team %K .. don't you find killmessages lame??"
/// we assign the message refered to by the random variable to the t_kill alias
/// and we always sound: enemy down!..
alias t_kill "radioteam enemyd; t_kill_$t_kill_rnd$"
/// let t_kill be a rotating alias. // we have 4 kill messages so we initialise a random variable for that.
alias t_killtrigger "random t_kill_rnd 1 $t_kill_messagecount; t_kill"
/// if round is running then run the actual trigger.
alias t_killedhim "if $h_LCA == 1 then t_killtrigger"
/// we killed something..
trigger "t_killedhim" "*blahblah had a makeover blah*"
Code: Select all
<cat> you dont have this.. when killing 1st.. there are 3 random msgs.. 2nd.. there are 3 NEW random msgs.. cant be the same as the 1st.. or?
<QuAd> you count the kills
<QuAd> and if killcount is 2 then call another alias than t_kill.
<cat> ya. you count the kills, and it restarts at 0 at next round.
Instead of:
Code: Select all
alias t_killtrigger "random t_kill_rnd 1 $t_kill_messagecount; t_kill"
Code: Select all
alias t_killtrigger "random t_kill_rnd 1 $t_kill_messagecount; t_killgroup_$killcount$"
Code: Select all
<QuAd> t_killgroup_1 is like t_kill now.
Code: Select all
alias t_killgroup_1 "radioteam enemyd; t_kill_$t_kill_rnd$"
alias t_killgroup_2 "radioteam enemyd; t_kill2_$t_kill_rnd$"
If you can handle these things, be welcome to use them Handle with care.
Haudrauf.
PS: The above scripts were written without being tested. But should work as I saw through them more than once.
edit: optimized.
Last edited by Haudrauf on Sun Aug 13, 2006 4:14 pm, edited 1 time in total.
Owner of http://aq2maps.quadaver.org
Not part of #aq2admins for a reason.
Not part of #aq2admins for a reason.
It works like this;Sovnig wrote:Hmmm, I don't get this... is this a way to code an automatic killmsg that shows whenever you kill someone?Haudrauf wrote:A lot
When you are about to kill a 1st player, it will be choosed between (4) messages, randomly. Only for the 1st player killed.
Then, if you kill another player (in the same round), it will be choosed between (4) total new killmessages, only used for the 2nd player.
And so on..
So it's 4 unique messages for each player by 4 total. So in the beginning of each message, I have the number of how many I have killed in that round. Very handy in clanwars, so your teammates will know how many you have killed.
Even more handy if you are using the radio numbers 1,2,3,4, for each player you kill.
I don't know if I explained this really good at all, but hopefully you get the idea.
+ Credits to Haudrauf for making this amazing code.
+ Also credits to Maniac for the trigger-code, and some help for coding some scripting as well.
i dont get it:D:D:D
skmz gimme ur script please:D FAST
i need the number counting sys which automatically says kill msgs and numbers (sound and text:D) and im dumbass when its about to scripting
for apr 1.20 would be good
the script what janner gave was junk (no offence), so please be so kind and share ur script:D
skmz gimme ur script please:D FAST
i need the number counting sys which automatically says kill msgs and numbers (sound and text:D) and im dumbass when its about to scripting
for apr 1.20 would be good
the script what janner gave was junk (no offence), so please be so kind and share ur script:D