From WiiLi
////////////////////////////////////////////////////////////////////////////////
/* _________ _____ __
/ _____/__ ________ ___________ / \ _____ _______|__| ____
\_____ \| | \____ \_/ __ \_ __ \ / \ / \\__ \\_ __ \ |/ _ \
/ \ | / |_> > ___/| | \/ / Y \/ __ \| | \/ ( <_> )
/_______ /____/| __/ \___ >__| \____|__ (____ /__| |__|\____/
\/ |__| \/ \/ \/
________ _____
/ _____/ / | |
/ __ \ / | |_
\ |__\ \/ ^ /
\_____ /\____ |
\/ |__| */
// //
// -By Jayz Facez- //
// -January 2008- //
////////////////////////////////////////////////////////////////////////////////
//Controls
//Set These keys in your emulator
//A=A
//B=B
//R=R
//Start=S
//Analog Stick=Arrow Keys
//C-Up=Home
//C-Down=End
//C-Left=Delete
//C-Right=Page down
//Special Controls
//Shake the Wiimote to attack (B)
//Flick the Nunchuk up if moving to do a long jump
//Flick the Nunchuk up if standing still to do a high jump (Backflip)
//----------------------------------------------------------------------------//
//SCRIPT
//Debug
debug = "X="+Wiimote.RelAccX+' Y='+Wiimote.RelAccY+' Z='+Wiimote.RelAccZ
//Nunchuk Movement
if 2 > Wiimote1.Nunchuk.JoyX > 0.5 then
Right = true
wait 60 ms
Right = false
endif
if -2 < Wiimote1.Nunchuk.JoyX < -0.5 then
left = true
wait 60 ms
left = false
endif
if 2 > Wiimote1.Nunchuk.JoyY > 0.5 then
down = true
wait 60 ms
down = false
endif
if -2 < Wiimote1.Nunchuk.JoyY < -0.5 then
up = true
wait 60 ms
up = false
endif
//Super Mario Galaxy Style Attack
if (wiimote.RelAccX > 25) or (wiimote.RelAccY > 25) or (wiimote.RelAccZ > 15) then
B = true
wiimote.Rumble = true
wait 60 ms
B = false
wait 240 ms
wiimote.Rumble = false
endif
//LEDS
if (Key.B = 1) or (wiimote1.Nunchuk.RelAccY > 10)
wiimote.Led1 = 1
wait 50ms
wiimote.Led1 = 0
wiimote.Led2 = 1
wait 50ms
wiimote.Led2 = 0
wiimote.Led3 = 1
wait 50ms
wiimote.Led3 = 0
wiimote.led4 = 1
wait 50ms
wiimote.Led4 = 0
wiimote.Led3 = 1
wait 50ms
wiimote.Led3 = 0
wiimote.Led2 = 1
wait 50ms
wiimote.led2= 0
end if
//Controller Mapping
Key.A = Wiimote1.A
Key.Z = Wiimote1.Nunchuk.ZButton
Key.R = Wiimote1.Nunchuk.CButton
Key.End = Wiimote1.Down
Key.Delete = Wiimote1.Left
Key.PageDown = Wiimote1.Right
Key.Home = Wiimote1.Up
Key.S = Wiimote1.Plus
//Auto Long/High Jump
if (wiimote1.Nunchuk.RelAccY > 10)
Key.Z = 1
Wiimote.Rumble = 1
wait 120 ms
Key.A = 1
wait 100 ms
Key.Z = 0
Key.A = 0
wait 100 ms
Wiimote.Rumble = 0
end if
//END
//----------------------------------------------------------------------------//