I released this at PureZC the day after I made the Inventory Modifier. However, I held it back from here since I figured I'd be making a few other scripts and I was going to bundle them in a single topic. After all, why waste so many topics on these things? However, I now have Twilight Princess distracting me, so I might as well go ahead and do this.

Once again, this script is nothing amazing, really. It utilizes a do-while loop (my favorite type of loop), but beyond this, this script isn't all that different from other scripts with looping counters. The main reason I created it was so that people could take advantage of the extra sfx slots in ZQuest. There is currently no way to use them outside of scripting.

Copy/Paste from PureZC:
This script pretty much does what the name says: it plays a sound effect. D0 is the sound effect slot that will be played. D1 is a bit more complicated to explain, but it's essentially the delay (in tics) between each play of the sound effect. If you leave this at 0, the sound effect will only play once. I had to add the delay because there is currently no way to determine how long a sound effect is (*hint hint*). Just looping PlaySound(); over and over again would not work by itself, as that would be very bad. As such, you will have to determine for yourselves the proper values to put here for whatever sound effects you want to use. The F9 dialog in ZQuest is a good place to explore possible values.

Code:
// --------------------------------------
// SCRIPT: SFX Player
// --------------------------------------
// DESCRIPTION
// This script will play a sound effect
// specified by the user. It is capable
// of crude looping when a delay is specified.
// --------------------------------------
// USER ARGUMENTS
// D0 (sfx_slot)
// 	This is the slot number of the sfx you will be playing.
// D1 (sfx_delay)
//	This is the delay between each play of the SFX *in TICS*.
//	**Leaving this at zero will make the SFX only play once.**
//	There are no REAL sound effects that are 0 tics long, after all.
//	Most people will want to set this to the length of the sfx.
//	SECOND TO TIC CONVERSION: Seconds / (1/60) OR Seconds / 0.0166
//	Alternatively (or if I got that wrong), just check things in the ZQuest F9 dialog.
// --------------------------------------

// #####This is the main code that ZQuest will execute#####
ffc script sfx_player {
	void run(int sfx_slot, int sfx_delay) { // Begin run function.
		int counter = 0; // This is the counter that will be used.
						 // It's used to produce the delay specified.
		do{ // Run this block of code once before checking the status of sfx_delay.
			if (counter == 0) // If the counter is zero, play the sfx in this iteration of the loop.
			{
				Game->PlaySound(sfx_slot); // Play sound # "sfx_slot." This action happens each time this is executed.
				counter = sfx_delay; // (Re)start the counter by setting it to sfx_delay.
			}//!End if statement for counter
			else
			{
				counter--; // Subtract one tic from the counter
			}//!End else statement for counter
			Waitframe(); // Makes the script wait a frame before looping again.
		}while(sfx_delay != 0);//! End of internal do-while loop. If sfx_delay is not 0, it will loop until the ffc is terminated.
	}//! End of run function
}//! End of ffc script
Like last time, let me know if there are any problems with this script.