GlovePIE:Super Metroid - Jayz

From WiiLi

Jump to: navigation, search
//                             _____
//                            / ____|
//                           | (___  _   _ _ __   ___ _ __
//                           \___ \| | | | '_ \ / _ \ '__|
//                           ____) | |_| | |_) |  __/ |
//                          |_____/ \__,_| .__/ \___|_|
//                                       | |
//                                       |_|

//                                 ,-´\_______ `-,-´/
//_____     _____ __________  ___,´___;\ _____`;´ ,`.  ______   ______ ________
//`.   `. ,´   .´ `.   ____ || __    __ |\   __ `.´  \´  __  `. `.  .´ `.   _  `.
// |  .  `  .  |   |  |____`''´/ |  |  `'|  |  )  |  |  /  \  |  |  |   |  | \  |
// |  |`. ,´|  |   |   ____|   | |  |,-´¯|  |,´  ,|  |  |  |  |  |  |   |  | |  |
// |  |  `  |  |   |  |        | |  |`-. |  |`.  `|  |  |  |  |  |  |   |  | |  |
// |  |     |  |   |  '----´|  \ |  |_,´ |  |,´`.  `.\  `--´  /  |  |   |  '-´  /
//´----`   ´----` ´---------'  ´.--;´   _;---` ´-,---``------´  ´----` ´-------´
//                              _}´ _,-´\____,\´  ,´
//                             /_,-´-._________\-´


//                                 -By Jayz Facez-
//                                 -January  2008-


//Emulator Setup
//A=A
//B=B
//X=X
//Y=Y
//Select=Q
//Start=S
//D-Pad=Up, Down, Left, Right


//Special Features
//Pitch the wiimote to Aim Straight, Diagonally, Up or down.
//Press the C-Button to enter/exit Morph Ball mode


//Debug
debug = 'X='+Wiimote.Pitch+'Battery='+wiimote1.Battery

//Morph Ball
if (Var.A = 0) and (wiimote.Nunchuk.CButton = 1)
  down = 1
  wait 50 ms
  down = 0
  wait 50 ms
  down = 1
  wait 50 ms
  down = 0
  Var.A = 1
end if

if (Var.A = 1) and (wiimote.Nunchuk.CButton = 1)
  up = 1
  wait 50 ms
  up = 0
  wait 50 ms
  up = 1
  wait 50 ms
  up = 0
  Var.A = 0
end if


//Motion Aiming
if (Wiimote.Pitch > 30) + (Wiimote.Pitch < 64)
  Key.R = 1
  key.L = 0
end if

if (Wiimote.Pitch > -25) + (Wiimote.Pitch < 30)
  Key.R = 0
  Key.L = 0
end if

if (Wiimote.Pitch < -20) + (Wiimote.Pitch > -49)
  Key.R = 0
  Key.L = 1
end if

if (Wiimote.Pitch > 65)
  Key.R = 0
  key.L = 0
  Key.Up = 1
  wait 10 ms
  Key.Up = 0
end if

if (Wiimote.Pitch < -50)
  Key.R = 0
  key.L = 0
  Key.Down = 1
  Wait 10 ms
  Key.Down = 0
end if



//Nunchuk Movement
if 2 > Wiimote1.Nunchuk.JoyX > 0.5 then
Right = true
wait 60 ms
Right = false
end if
if -2 < Wiimote1.Nunchuk.JoyX < -0.5 then
left = true
wait 60 ms
left = false
end if
if 2 > Wiimote1.Nunchuk.JoyY > 0.5 then
down = true
wait 60 ms
down = false
end if
if -2 < Wiimote1.Nunchuk.JoyY < -0.5 then
up = true
wait 60 ms
up = false
end if


//Controls
Key.A = Wiimote.B
Key.X = wiimote.A
Key.Q = Wiimote.Down
Key.S = Wiimote.Plus
Key.B = Wiimote.Minus


//Rumble and LEDS
if Wiimote.A = 1
  Wiimote.Rumble = 1
  wait 2 ms
  Wiimote.Rumble = 0
endif

if wiimote.A = 1
  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

//X-RAY Visor (This will only work properly if you have it)
if Wiimote.One = 1
  Key.Y = 1
  wait 25 ms
  Key.Y = 0
  Key.Q = 1
  wait 25 ms
  Key.Q = 0
  wait 25 ms
  Key.Q = 1
  wait 25 ms
  Key.Q = 0
  wait 25 ms
  Key.Q = 1
  wait 25 ms
  Key.Q = 0
  wait 25 ms
  Key.Q = 1
  wait 25 ms
  Key.Q = 0
  wait 25 ms
  Key.Q = 1
  wait 25 ms
  Key.Q = 0
end if
Personal tools
Online Casino - best online casino reviews.
Facebook Developers - facebook applications, facebook developers, facebook development, social network application development and viral widget social media strategy