Code:
// Laser Skirmish Script
// By Carl Kenner
//
// Set master volume to between 0% and 100%
var.GameVolume = 50%
// Set time it takes to reload to whatever you want
var.ReloadTime = 200ms
if not var.Initialized then
var.Player1disabled = true
var.Player2disabled = true
var.BeepVolume = 40%
Say("Skirmish will begin in 10 seconds")
Wait 3 seconds
Say("Ten")
Wait 1 second
Say("Nine")
Wait 1 second
Say("Eight")
Wait 1 second
Say("Seven")
Wait 1 second
Say("Six")
Wait 100 ms
var.Player1Starting = true
var.Player2Starting = true
Wait 900 ms
//Say("Five")
Wait 1 second
//Say("Four")
Wait 1 second
//Say("Three")
Wait 1 second
//Say("Two")
Wait 1 second
//Say("One")
Wait 1 second
Wait 1 second
var.BeepVolume = 2%
var.Initialized = true
end if
var.player1targeted = (Wiimote2.dot1vis or Wiimote2.dot2vis) and (not var.Player1disabled)
var.player2targeted = (Wiimote1.dot1vis or Wiimote1.dot2vis) and (not var.Player2disabled)
var.player1reloading = keepdown(pressed(var.player1shooting), var.ReloadTime)
var.player1shooting = Wiimote1.B and (not var.player1reloading) and (not var.player1disabled)
var.player2reloading = keepdown(pressed(var.player2shooting), var.ReloadTime)
var.player2shooting = Wiimote2.B and (not var.player2reloading) and (not var.player2disabled)
if Wiimote1.A then
Wiimote1.leds = 1
else if Wiimote1.One then
Wiimote1.Led1 = var.Player1Frags=1 or var.Player1Frags=5 or var.Player1Frags=8 or var.Player1Frags>=10
Wiimote1.Led2 = var.Player1Frags=2 or var.Player1Frags=6 or var.Player1Frags>=9
Wiimote1.Led3 = var.Player1Frags=3 or var.Player1Frags>=7
Wiimote1.Led4 = var.Player1Frags>=4
else if Wiimote1.Two then
Wiimote1.Led1 = var.Player2Frags=1 or var.Player2Frags=5 or var.Player2Frags=8 or var.Player2Frags>=10
Wiimote1.Led2 = var.Player2Frags=2 or var.Player2Frags=6 or var.Player2Frags>=9
Wiimote1.Led3 = var.Player2Frags=3 or var.Player2Frags>=7
Wiimote1.Led4 = var.Player2Frags>=4
else if not var.player1disabled then
Wiimote1.leds = 15 * (1-int(var.player1reloading))
end if
if Wiimote2.A then
Wiimote2.leds = 2
else if Wiimote2.One then
Wiimote2.Led1 = var.Player1Frags=1 or var.Player1Frags=5 or var.Player1Frags=8 or var.Player1Frags>=10
Wiimote2.Led2 = var.Player1Frags=2 or var.Player1Frags=6 or var.Player1Frags>=9
Wiimote2.Led3 = var.Player1Frags=3 or var.Player1Frags>=7
Wiimote2.Led4 = var.Player1Frags>=4
else if Wiimote2.Two then
Wiimote2.Led1 = var.Player2Frags=1 or var.Player2Frags=5 or var.Player2Frags=8 or var.Player2Frags>=10
Wiimote2.Led2 = var.Player2Frags=2 or var.Player2Frags=6 or var.Player2Frags>=9
Wiimote2.Led3 = var.Player2Frags=3 or var.Player2Frags>=7
Wiimote2.Led4 = var.Player2Frags>=4
else if not var.player2disabled then
Wiimote2.leds = 15 * (1-int(var.player2reloading))
end if
var.player1hit = var.player2shooting and var.player1targeted
var.player2hit = var.player1shooting and var.player2targeted
if var.player1shooting but not var.player2hit then
Wiimote1.volume = 120% * var.GameVolume
Wiimote1.frequency = 300 Hz
Wiimote1.rumble = true
wait 100 ms
Wiimote1.rumble = false
Wiimote1.frequency = 400 Hz
wait 50 ms
Wiimote1.frequency = 0
end if
if var.player2shooting but not var.player1hit then
Wiimote2.volume = 120% * var.GameVolume
Wiimote2.frequency = 300 Hz
Wiimote2.rumble = true
wait 100 ms
Wiimote2.rumble = false
Wiimote2.frequency = 400 Hz
wait 50 ms
Wiimote2.frequency = 0
end if
if var.player1hit then
Inc(var.Player2Frags)
var.player1disabled = true
Wiimote1.volume = 200% * var.GameVolume
Wiimote1.frequency = 500 Hz
Wiimote1.rumble = true
wait 200 ms
Wiimote1.leds = 1+2+4
Wiimote1.frequency = 400 Hz
wait 200 ms
Wiimote1.leds = 1+2
Wiimote1.frequency = 300 Hz
wait 200 ms
Wiimote1.leds = 1
Wiimote1.frequency = 200 Hz
wait 200 ms
Wiimote1.leds = 0
Wiimote1.frequency = 100 Hz
wait 200 ms
Wiimote1.frequency = 0
Wiimote1.rumble = false
var.Player1Starting = true
end if
if var.Player1Starting then
var.Player1Starting = false
Wiimote1.volume = var.BeepVolume * var.GameVolume
wait 1 second
// 1 second beep
Wiimote1.frequency = 1600 Hz
wait 100 ms
Wiimote1.frequency = 0
wait 900 ms
// 2 seconds beep
Wiimote1.leds = 1
Wiimote1.frequency = 1600 Hz
wait 100 ms
Wiimote1.frequency = 0
wait 900 ms
// 3 seconds beep
Wiimote1.leds = 1+2
Wiimote1.frequency = 1600 Hz
wait 100 ms
Wiimote1.frequency = 0
wait 900 ms
// 4 seconds beep
Wiimote1.leds = 1+2+4
Wiimote1.frequency = 1600 Hz
wait 100 ms
Wiimote1.frequency = 0
wait 900 ms
// 5 seconds beep
Wiimote1.leds = 1+2+4+8
Wiimote1.frequency = 1600 Hz
wait 100 ms
Wiimote1.frequency = 0
wait 900 ms
Wiimote1.volume = 25% * var.GameVolume
Wiimote1.frequency = 100 Hz
Wiimote1.rumble = true
wait 100 ms
Wiimote1.frequency = 200 Hz
wait 100 ms
Wiimote1.frequency = 300 Hz
wait 100 ms
Wiimote1.frequency = 400 Hz
wait 100 ms
Wiimote1.frequency = 500 Hz
wait 100 ms
Wiimote1.frequency = 0
Wiimote1.rumble = false
var.Player1disabled = false
end if
if var.player2hit then
Inc(var.Player1Frags)
var.player2disabled = true
Wiimote2.volume = 200% * var.GameVolume
Wiimote2.frequency = 500 Hz
Wiimote2.rumble = true
wait 200 ms
Wiimote2.leds = 1+2+4
Wiimote2.frequency = 400 Hz
wait 200 ms
Wiimote2.rumble = false
Wiimote2.leds = 1+2
Wiimote2.frequency = 300 Hz
wait 200 ms
Wiimote2.leds = 1
Wiimote2.frequency = 200 Hz
wait 200 ms
Wiimote2.leds = 0
Wiimote2.frequency = 100 Hz
wait 200 ms
Wiimote2.frequency = 0
var.player2starting = true
end if
if var.player2starting then
var.player2starting = false
Wiimote2.volume = var.BeepVolume * var.GameVolume
wait 700 ms
// 1 second beep
Wiimote2.frequency = 1600 Hz
wait 100 ms
Wiimote2.frequency = 0
wait 900 ms
// 2 seconds beep
Wiimote2.leds = 1
Wiimote2.frequency = 1600 Hz
wait 100 ms
Wiimote2.frequency = 0
wait 900 ms
// 3 seconds beep
Wiimote2.leds = 1+2
Wiimote2.frequency = 1600 Hz
wait 100 ms
Wiimote2.frequency = 0
wait 900 ms
// 4 seconds beep
Wiimote2.leds = 1+2+4
Wiimote2.frequency = 1600 Hz
wait 100 ms
Wiimote2.frequency = 0
wait 900 ms
// 5 seconds beep
Wiimote2.leds = 1+2+4+8
Wiimote2.frequency = 1600 Hz
wait 100 ms
Wiimote2.frequency = 0
wait 900 ms
Wiimote2.volume = 25% * var.gamevolume
Wiimote2.frequency = 100 Hz
Wiimote2.rumble = true
wait 100 ms
Wiimote2.frequency = 200 Hz
wait 100 ms
Wiimote2.rumble = false
Wiimote2.frequency = 300 Hz
wait 200 ms
Wiimote2.frequency = 400 Hz
wait 200 ms
Wiimote2.frequency = 500 Hz
wait 200 ms
Wiimote2.frequency = 0
Wiimote2.rumble = false
var.Player2disabled = false
end if
debug = Wiimote1.Battery+', '+Wiimote2.battery+ ' Score: Player1 = '+var.Player1Frags+', Player2 = '+var.Player2Frags
Bookmarks