Useful scripts

Forum for Skins, Maps, Configs etc.

Moderators: Moderators, Mappers

IBA
didn't throw its grenade far enough
Posts: 311
Joined: Mon Jul 28, 2003 7:28 am
Location: de
Contact:

Post by IBA »

cheef wrote:

Code: Select all

bind mouse1 unbindall
lame script, works only 1 time =)
#quadaver || TEAMS !"§ || http://www.quadaver.de
AK
is connecting
Posts: 9
Joined: Sat Oct 02, 2004 6:34 pm
Location: fi
Contact:

Post by AK »

Hi, made this little personal statistics script using AprQ2 1.19b's new commands (the if statements mostly) and the triggers. I had a boring evening and this idea came to my mind and I wanted to test it out. :)

(Deleted the old version, get the latest version from the link below)

http://koti.mbnet.fi/akmods/aq2/statscript/

This script counts the hits you've got, awards, grenade kills, falls, use of bandage etc. and notifies how many frags left before you get an excellent.

You can turn the "frags to excellent" counter's messages off by modifying the variable "counter_excellentcounter" to zero. After every award/grenade kill/fall you'll get a message saying the amount of those (can be turned off by setting "counter_show_amount" to zero).

There is a little check in the script that prevent teamkilling after round to affect statistics. The script shows the statistics when the map ends and you can see them too by using command mapstats. Statistics reset automatically when new map starts.

With the variable "counter_fragsleft" you can set how many frags there has to be left before you get a message saying "x frags left to excellent" after a kill. If you exec the script during a map you'll have to use command counter_reset to get it working (no need to use counter_reset if the script loads with other configurations before a map). At the first load of the script you'll might get a little error with one if command but don't care about that because it prevents resetting the statistics if the script gets executed again.

Have fun! :P
Last edited by AK on Fri Mar 17, 2006 7:38 am, edited 1 time in total.
Örr...
Den
something dur dur
Posts: 2616
Joined: Fri Jul 25, 2003 8:56 am
Location: nl
Contact:

Post by Den »

hehe thats great man :)
There's a chopper coming in 3 days and there's a katana on top of the cafe and that's all you need to know
Image
SaLsA
was flattened
Posts: 149
Joined: Sat Oct 16, 2004 6:13 pm
Location: no
Contact:

Post by SaLsA »

wow, that looks great :D
I'll definately try it out!
Image<",))><
Mutu
loses a vital chest organ
Posts: 525
Joined: Sun Aug 29, 2004 2:46 pm
Location: no
Contact:

Post by Mutu »

sounds cool :)
· Catch-Gamer.no AQ2admin
Janner
found a way out
Posts: 200
Joined: Tue Mar 08, 2005 12:09 pm
Location: nl

Post by Janner »

Oh my god, I took a look at it and it's great! I tried that if cmd too, and I love it. This shows I have alot more to learn about scripting :).

EDIT: This is like... weird. Without script everything is normal, with script I get the config I had about 2 weeks ago on a jumpserver? Could be me, but it's weird anyway.

This is my config with and without script:

Without:

Code: Select all

-------- [Loading Renderer] --------
ref_gl version: GL 0.01
Initializing OpenGL display
...setting mode 4: 800 600 FS
...attempting fullscreen
...using desktop display depth of 32
...calling CDS: ok
GL PFD: Color(32bits) Depth(24bits) Stencil(8bits)
... Using stencil buffer
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: RADEON X300 SE x86/MMX/3DNow!/SSE2
GL_VERSION: 1.5.4454 WinXP Release
...allowing CDS
...enabling GL_EXT_compiled_vertex_array
...enabling WGL_EXT_swap_control
...using GL_EXT_point_parameters
...GL_EXT_shared_texture_palette not found
...using GL_ARB_multitexture
...GL_SGIS_multitexture deprecated in favor of ARB_multitexture
...using GL_EXT_texture_rectangle
...ignoring GL_SGIS_generate_mipmap
...ignoring GL_ARB_texture_compression
...ignoring GL_EXT_texture_filter_anisotropic
Maximum Texture Size: 2048x2048
------------------------------------
]condump withoutscript
Dumped console text to ./action/withoutscript.txt.
And with:

Code: Select all

-------- [Loading Renderer] --------
ref_gl version: GL 0.01
Initializing OpenGL display
...setting mode 4: 800 600 FS
...attempting fullscreen
...using desktop display depth of 32
...calling CDS: ok
GL PFD: Color(32bits) Depth(24bits)
Stencil(8bits)
... Using stencil buffer
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: RADEON X300 SE
x86/MMX/3DNow!/SSE2
GL_VERSION: 1.5.4454 WinXP Release
...allowing CDS
...enabling
GL_EXT_compiled_vertex_array
...enabling WGL_EXT_swap_control
...using GL_EXT_point_parameters
...GL_EXT_shared_texture_palette not
found
...using GL_ARB_multitexture
...GL_SGIS_multitexture deprecated in
favor of ARB_multitexture
...using GL_EXT_texture_rectangle
...ignoring GL_SGIS_generate_mipmap
...ignoring GL_ARB_texture_compression

...ignoring
GL_EXT_texture_filter_anisotropic
Maximum Texture Size: 2048x2048
------------------------------------

------- sound initialization -------
Initializing DirectSound
   2 channel(s)
   16 bits/sample
   22050 bytes/sec
dsound init succeeded
sound sampling rate: 22050
------------------------------------
Winamp Integration Disabled
libcurl/7.15.1 zlib/1.2.3 initialized.
====== Quake2 Initialized ======

Added packfile ./action/pak0.pak (184 files)
Added packfile ./action/pak1.pak (66 files)
Added packfile ./action/pak2.pak (110 files)
Added packfile ./action/pak3.pak (3 files)
Added packfile ./action/pak4.pak (3 files)
Added packfile ./action/pak5.pak (3 files)
Added packfile ./action/pak6.pak (3 files)
Added packfile ./action/pak7.pak (54 files)
Added packfile ./action/pak8.pak (26 files)
Added packfile ./action/pak9.pak (20 files)
Added packfile ./action/pak10.pak (313 files)
Added packfile ./action/pak11.pak (121 files)
Added packfile ./action/pak12.pak (48 files)
Added packfile ./action/pak13.pak (124 files)

------- sound initialization -------
Initializing DirectSound
sound sampling rate: 22050
------------------------------------
execing autoexec.cfg
execing ../action/autoexec.cfg
Cbuf_InsertText overflowed
-------- [Loading Renderer] --------
ref_gl version: GL 0.01
Initializing OpenGL display
...setting mode 4: 800 600 FS
...attempting fullscreen
...using desktop display depth of 32
...calling CDS: ok
GL PFD: Color(32bits) Depth(24bits) Stencil(8bits)
... Using stencil buffer
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: RADEON X300 SE x86/MMX/3DNow!/SSE2
GL_VERSION: 1.5.4454 WinXP Release
...allowing CDS
...enabling GL_EXT_compiled_vertex_array
...enabling WGL_EXT_swap_control
...using GL_EXT_point_parameters
...GL_EXT_shared_texture_palette not found
...using GL_ARB_multitexture
...GL_SGIS_multitexture deprecated in favor of ARB_multitexture
...using GL_EXT_texture_rectangle
...ignoring GL_SGIS_generate_mipmap
...ignoring GL_ARB_texture_compression
...ignoring GL_EXT_texture_filter_anisotropic
Maximum Texture Size: 2048x2048
------------------------------------
]condump withscript
Dumped console text to ./action/withscript.txt.
I dont get it?
Stric
needs some Pepto Bismol
Posts: 730
Joined: Tue Jul 29, 2003 5:41 am
Location: si
Contact:

Post by Stric »

i`m getting errors that if statement is wrong :D
Image
Image
^stric^
AK
is connecting
Posts: 9
Joined: Sat Oct 02, 2004 6:34 pm
Location: fi
Contact:

Post by AK »

Uncle- wrote:i`m getting errors that if statement is wrong :D
Don't mind about that because the same statement prevents resetting of the statistics if you exec your configs again during a map.
Örr...
Stric
needs some Pepto Bismol
Posts: 730
Joined: Tue Jul 29, 2003 5:41 am
Location: si
Contact:

Post by Stric »

Ye noticed, its ok now and I hope this is your first release of many :)
Image
Image
^stric^
AK
is connecting
Posts: 9
Joined: Sat Oct 02, 2004 6:34 pm
Location: fi
Contact:

Post by AK »

Hi, I added a bunch of new things into the statistics script and made a little web page for it because it is so huge (~200 lines atm), get the latest version from here:

http://koti.mbnet.fi/akmods/aq2/statscript/
Örr...
Royal^
was in the wrong place
Posts: 253
Joined: Mon Aug 02, 2004 2:10 pm
Location: fi
Contact:

Post by Royal^ »

Code: Select all

alias fragayss "enemydown1"
trigger fragayss "*to $name$*"
trigger fragayss "*by $name$*"
trigger fragayss "*from $name$*"
trigger fragayss "*of $name$*"
trigger fragayss "*caught $name$*"
trigger fragayss "*after $name$*"
trigger fragayss "*via $name$*"
trigger fragayss "*accepts $name$*"
trigger fragayss "*see $name$*"
trigger fragayss "*remove $name$*"
trigger fragayss "*against $name$*"
trigger fragayss "*got $name$*"
trigger fragayss "*underestimated $name$*"
trigger fragayss "*ate $name$*"
trigger fragayss "*feels $name$*"
alias enemydown1 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown2"
alias enemydown2 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown3"
alias enemydown3 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown4"
alias enemydown4 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown5"
alias enemydown5 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown6"
alias enemydown6 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown7"
alias enemydown7 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown8"
alias enemydown8 "radioteam enemyd; say_team *type ur own message here*  ; "alias fragayss "enemydown1"
automatic enemydown with changing enemydown messages :)
admin of #DuraWorks - #shoutcastftw - AQ2Suomi.com
Image
Cnnlngs
plummets to its death
Posts: 68
Joined: Wed Oct 05, 2005 8:34 pm
Location: cl

Post by Cnnlngs »

hm this question goes to AK
why the $counter_totalkills$ show only the frags you had before instead of showing your actual score? and how can i do that?

example:
"say_team %K down! ($counter_totalkills$)"

:(
AK
is connecting
Posts: 9
Joined: Sat Oct 02, 2004 6:34 pm
Location: fi
Contact:

Post by AK »

Cnnlngs wrote:hm this question goes to AK
why the $counter_totalkills$ show only the frags you had before instead of showing your actual score? and how can i do that?

example:
"say_team %K down! ($counter_totalkills$)"

:(
Don't know for sure, worked well when I tested it. I would guess the problem are those ghost frags that don't give a message so they can't be counted and the counter for total kills stays one behind.
Örr...
Cnnlngs
plummets to its death
Posts: 68
Joined: Wed Oct 05, 2005 8:34 pm
Location: cl

Post by Cnnlngs »

AK wrote:
Cnnlngs wrote:hm this question goes to AK
why the $counter_totalkills$ show only the frags you had before instead of showing your actual score? and how can i do that?

example:
"say_team %K down! ($counter_totalkills$)"

:(
Don't know for sure, worked well when I tested it. I would guess the problem are those ghost frags that don't give a message so they can't be counted and the counter for total kills stays one behind.
weird, 'cause my frags seemed very concrete...
maybe it's because i don't have it binded (as bind x "say_team...%K"...), but have autokill msg's triggers so there's some weird delay problem (happened once with the ACCURACY or EXCELLENT screenshot)

i'll add some "wait's" & probably the issue will be solved :D (will post when have an answer)
Cnnlngs
plummets to its death
Posts: 68
Joined: Wed Oct 05, 2005 8:34 pm
Location: cl

Post by Cnnlngs »

tried with wait 10... 15, but nothing happened, still the same problem
:S
Post Reply