//Mienaikage's WiinSaber v1.1 //Based on the Mac WiiSaber //Get all the files you need at http://rapidshare.com/files/7731954/WiinSaber_v1.1.rar.html var.xOffset = 0 var.yOffset = -10 var.zOffset = -10 var.xRot = Wiimote.RawAccX + var.xOffset var.yRot = Wiimote.RawAccY + var.yOffset var.zRot = Wiimote.rawforceZ + var.zOffset Wiimote.leds = 0 if var.rmbl then wiimote.Rumble = 1 wait 1 ms wiimote.Rumble = 0 wait var.time ms endif if var.rmbl = false then debug = "Press B to turn on your WiinSaber" endif if var.rmbl = true then debug = "Swing. Hold B or Down to change sound effects. Press A to stop." endif if (wiimote.b) + (var.on = 0) then playsound("lightsaber sounds\on0.wav") var.time = 25 var.rmbl = true wait(1.35s) var.on = 1 var.soundon = 1 endif if var.soundon = 1 playsound("lightsaber sounds\idle0.wav") var.time = 100 wait(452ms) endif if wiimote.a + (var.on = 1) then playsound("lightsaber sounds\off0.wav") var.on = 0 var.soundon = 0 var.time = 200 wait(0.5s) var.rmbl= false endif if (var.yrot < -30) + (var.on = 1) + (wiimote.b = 0) + (wiimote.down = 0) then var.swingy = 1 playsound("lightsaber sounds\swing0.wav") wait(0.5s) var.swingy = 0 endif if (var.xrot > 15) + (var.on = 1) + (wiimote.b = 0) + (wiimote.down = 0) then var.swingx = 1 playsound("lightsaber sounds\swing1.wav") wait(0.64s) var.swingx = 0 endif if (var.zrot > 20) + (var.on = 1) + (wiimote.b = 0) + (wiimote.down = 0) then var.swingz = 1 playsound("lightsaber sounds\swing7.wav") wait(0.53s) var.swingz = 0 endif if (var.yrot > 32) + (var.on = 1) + (wiimote.b = 0) + (wiimote.down = 0) then var.swingminusy = 1 playsound("lightsaber sounds\swing2.wav") wait(0.85s) var.swingminusy = 0 endif if (var.xrot < -15) + (var.on = 1) + (wiimote.b = 0) + (wiimote.down = 0) then var.swingminusx = 1 playsound("lightsaber sounds\swing5.wav") wait(0.64s) var.swingminusx = 0 endif if (var.yrot > 32) + (var.on = 1) + (wiimote.b = 1) then playsound("lightsaber sounds\strike0.wav") var.strikey = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.38s) var.strikey = 0 endif if (var.xrot > 15) + (var.on = 1) + (wiimote.b = 1) then playsound("lightsaber sounds\strike1.wav") var.strikex = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.23s) var.strikex = 0 endif if (var.zrot > 20) + (var.on = 1) + (wiimote.b = 1) then playsound("lightsaber sounds\strike2.wav") var.strikez = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.27s) var.strikez = 0 endif if (var.yrot < -30) + (var.on = 1) + (wiimote.b = 1) then playsound("lightsaber sounds\strike0.wav") var.strikeminusy = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.38s) var.strikeminusy = 0 endif if (var.xrot < -15) + (var.on = 1) + (wiimote.b = 1) then playsound("lightsaber sounds\strike1.wav") var.strikeminusx = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.23s) var.strikeminusx = 0 endif if (var.yrot < -30) + (var.on = 1) + (wiimote.down = 1) then playsound("lightsaber sounds\hit0.wav") var.hity = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(1.25s) var.hity = 0 endif if (var.xrot > 15) + (var.on = 1) + (wiimote.down = 1) then playsound("lightsaber sounds\hit3.wav") var.hitx = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.45s) var.hitx = 0 endif if (var.zrot > 20) + (var.on = 1) + (wiimote.down = 1) then playsound("lightsaber sounds\hit1.wav") var.hitz = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.8s) var.hitz = 0 endif if (var.yrot > 32) + (var.on = 1) + (wiimote.down = 1) then playsound("lightsaber sounds\hit2.wav") var.hitminusy = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(1.25s) var.hitminusy = 0 endif if (var.xrot < -15) + (var.on = 1) + (wiimote.down = 1) then playsound("lightsaber sounds\hit4.wav") var.hitminusx = 1 var.time = 0 Wiimote.Leds = 15 wait(0.3s) var.time = 50 wait(0.45s) var.hitminusx = 0 endif if (var.swingy or var.swingx or var.swingz or var.strikey or var.strikex or var.strikez or var.hity or var.hitx or var.hitz or var.swingminusy or var.swingminusx or var.strikeminusy or var.strikeminusx or var.hitminusy or var.hitminusx) = 1 then var.soundon = 0 else if var.on = 1 var.soundon = 1 endif