Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //====WIIMOTE===
- mouse.DirectInputPos += [(wiimote.PointerX-1/2)*14, (wiimote.PointerY-1/2)*9]
- Mouse.LeftButton = Wiimote.B
- Mouse.RightButton = Nunchuck.Z
- Mouse.WheelUp = Wiimote.Minus
- Mouse.WheelDown = Wiimote.Plus
- Key.E = Wiimote.A
- Key.Escape = Wiimote.Home
- Key.F5 = Wiimote.Up
- Key.R = Wiimote.Left
- Key.Q = Wiimote.Right
- Key.F = Wiimote.Down
- //====NUNCHUCK====
- W = ( Wiimote.Nunchuk.JoyY < -.2 )
- A = ( Wiimote.Nunchuk.JoyX < -.2 )
- S = ( Wiimote.Nunchuk.JoyY > .2 )
- D = ( Wiimote.Nunchuk.JoyX > .2 )
- Key.Shift = Nunchuck.C
- if Nunchuck.shakiness > 15 then
- Key.Space = true
- wait 30ms
- Key.Space = false
- wait 2000ms
- end if
- if Wiimote.One && Wiimote.Two then
- (Key.Shift && Key.P && Key.I && Key.E) = true
- end if
- //====LED Battery Counter====
- var.Batt = wiimote.Battery / 48
- if true then
- wait 5 seconds
- Wiimote.Report15 = 0x80 | Int(wiimote.Rumble)
- end if
- var.Blink = 500ms
- debug = "Battery level: " + 100*48*var.Batt/192 + "%"
- if 0<=var.Batt<=0.25 then
- Wiimote.Leds = 1
- wait var.Blink
- Wiimote.Leds = 0
- wait var.Blink
- elseif 0.25 < var.Batt<=1 then
- Wiimote.Leds = 1
- elseif 1 < var.Batt<=1.25 then
- Wiimote.Leds = 3
- wait var.Blink
- Wiimote.Leds = 1
- wait var.Blink
- elseif 1.25 < var.Batt<=2 then
- Wiimote.Leds = 3
- elseif 2 < var.Batt<=2.25 then
- Wiimote.Leds = 7
- wait var.Blink
- Wiimote.Leds = 3
- wait var.Blink
- elseif 2.25 < var.Batt<=3 then
- Wiimote.Leds = 7
- elseif 3 < var.Batt<=3.25 then
- Wiimote.Leds = 15
- wait var.Blink
- Wiimote.Leds = 7
- wait var.Blink
- elseif 3.25 < var.Batt<=4 then
- Wiimote.Leds = 15
- else
- Wiimote.Leds = 0
- endif
Add Comment
Please, Sign In to add comment