Download Script: Ammo Warning

Version V1.2

Introduction:
Do you often forget to check the current ammo count?
Find yourself walking into duels without enough ammo?
This is for you!

Introducing the new AmmoWarning script which notifies you when you are running low on ammo of the currently selected weapon.
You can have your choice of audio warnings, graphical warnings or Both!

Settings:
Now Has Proper options, which is a part of the in-game options menu.
Thanks to T[h]E Dis[as]teR, who wrote the code for this before I could get around to it.
They're listed in the main options.
as before, 1 is on, 0 off.
Alternatively, if you want to remain using the old version
here's the old information.
$PlaySounds= 1;
$ShowGraphics= 1;
(Listed near top of script).
To disable either sounds or graphics for the script, just change respective values to 0.

Installation:
Unzip into your live folder.
A readme file is included in the zip.

NOTE: All sounds and graphics are purely placeholders. If you can make better ones, please do, and post them up here so other people can use them.

Download (Version 1.2)(Mediafire)
Download (Version 1.0)(Mediafire)
 
Ok guys, an update.
I fixed the bug where it would keep playing even after you leave a server (whew, glad that's over).
I've yet to find an easy fix for the after death bug though. I am working on it though, so keep an eye out.
 

RockeyRex

Legions Developer
Hrm...
Few tips here and there.
Overloading of the clientCmdServerMessage is not needed. Use addMessageCallback functions instead. (See messages.cs for reference)
$ActiveWeapon is also there now as well as $PlayerIsAlive.

Also, yer "death bug" is at line 56:
Code:
if($IsAlive=1)
 
oh whoops. readme was in last dl. forgot to put it in this 1.
it'll be in the next version though, which should be up sometime later today. Not that it should really be needed.
 
Quick update.
I have massively improved code quality and efficiency (with a few hints here and there from rockey), I've just got one final thing to fix up and I'll put version 1.0 up.
This will hopefully be something I can get done sometime in the next 24 hours. I need to find a coder to check something with.
 
Version 1.0 Now Done.
The code is now much more efficient than before, and as far as I can tell, completely bug free. :D
Enjoy!
 
Apologies for continuously posting new versions, but T[h]E Dis[as]teR has handed me some extra code for options, and I figured I'd add it in.
If you've already got it set up the way you like, then there's no need to update anything, as the main code is completely unchanged, but for the extra functionality, download 1.1
Thanks guys.
 

RockeyRex

Legions Developer
Code:
                    %ammowarningsounds = $Pref::sfx::AmmoWarningPlaySounds ? "1" : "0";
                    %this.selectOption(14, %ammowarningsounds);

                    %ammowarninggraphics = $Pref::Video::AmmoWarningShowGraphics ? "1" : "0";
                    %this.selectOption(15, %ammowarninggraphics);
Ooof. Bad, bad bad bad bad.

If we add an option to the game it will be default numbered and this will *dance* it over.

See FairyTrail on how to make this proper.
 
Top