BigETI

Minecraft with Classic Controller

Sep 26th, 2011
2,921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. /*
  2. Minecraft 1.8 Wiimote made by BigETI
  3. For a better gameplay double click the Home button of your Classic Controller to get a better camera gameplay
  4. Double click again to return back to normal mouse movement.
  5. */
  6.  
  7. if(Wiimote1.PluggedIn)
  8. if(Wiimote1.HasClassic)
  9. if(Wiimote1.Classic.RightStickX < (-0.1))
  10. Mouse.VirtualDesktopX = (Screen.CursorPosX/Screen.Width)+(Wiimote1.Classic.RightStickX/50)
  11. endif
  12. if(Wiimote1.Classic.RightStickX > 0.1)
  13. Mouse.VirtualDesktopX = (Screen.CursorPosX/Screen.Width)+(Wiimote1.Classic.RightStickX/50)
  14. endif
  15. if(Wiimote1.Classic.RightStickY < (-0.1))
  16. if(var.mode)
  17. Mouse.VirtualDesktopY = (Screen.CursorPosY/Screen.Height)-(Wiimote1.Classic.RightStickY/50)
  18. else
  19. Mouse.VirtualDesktopY = (Screen.CursorPosY/Screen.Height)+(Wiimote1.Classic.RightStickY/50)
  20. endif
  21. endif
  22. if(Wiimote1.Classic.RightStickY > 0.1)
  23. if(var.mode)
  24. Mouse.VirtualDesktopY = (Screen.CursorPosY/Screen.Height)-(Wiimote1.Classic.RightStickY/50)
  25. else
  26. Mouse.VirtualDesktopY = (Screen.CursorPosY/Screen.Height)+(Wiimote1.Classic.RightStickY/50)
  27. endif
  28. endif
  29. if(var.mode)
  30. if(Wiimote1.Classic.LeftStickY < (-0.4) or Wiimote1.Classic.Up)
  31. W = true
  32. else
  33. W = false
  34. endif
  35. if(Wiimote1.Classic.LeftStickY > 0.4 or Wiimote1.Classic.Down)
  36. S = true
  37. else
  38. S = false
  39. endif
  40. if(Wiimote1.Classic.LeftStickX < (-0.4))
  41. Mouse.VirtualDesktopX = (Screen.CursorPosX/Screen.Width)+(Wiimote1.Classic.LeftStickX/55)
  42. endif
  43. if(Wiimote1.Classic.LeftStickX > 0.4)
  44. Mouse.VirtualDesktopX = (Screen.CursorPosX/Screen.Width)+(Wiimote1.Classic.LeftStickX/55)
  45. endif
  46. else
  47. if(Wiimote1.Classic.LeftStickY < (-0.1))
  48. Mouse.VirtualDesktopY = (Screen.CursorPosY/Screen.Height)+(Wiimote1.Classic.LeftStickY/50)
  49. endif
  50. if(Wiimote1.Classic.LeftStickY > 0.1)
  51. Mouse.VirtualDesktopY = (Screen.CursorPosY/Screen.Height)+(Wiimote1.Classic.LeftStickY/50)
  52. endif
  53. if(Wiimote1.Classic.LeftStickX < (-0.1))
  54. Mouse.VirtualDesktopX = (Screen.CursorPosX/Screen.Width)+(Wiimote1.Classic.LeftStickX/50)
  55. endif
  56. if(Wiimote1.Classic.LeftStickX > 0.1)
  57. Mouse.VirtualDesktopX = (Screen.CursorPosX/Screen.Width)+(Wiimote1.Classic.LeftStickX/50)
  58. endif
  59. endif
  60. A = Wiimote1.Classic.Left
  61. D = Wiimote1.Classic.Right
  62. Mouse.LeftButton = Wiimote1.Classic.a
  63. Mouse.RightButton = Wiimote1.Classic.x
  64. Key.Space = Wiimote1.Classic.b
  65. Key.Shift = Wiimote1.Classic.y
  66. Mouse.WheelUp = Clicked(Wiimote1.Classic.LFull)
  67. Mouse.WheelDown = Clicked(Wiimote1.Classic.RFull)
  68. Q = Wiimote1.Classic.ZR
  69. E = Wiimote1.Classic.ZL
  70. Key.Tab = Wiimote1.Classic.Home
  71. Key.Escape = Wiimote1.Classic.Plus
  72. if(DoubleClicked(Wiimote1.Classic.Home))
  73. if(var.mode == false)
  74. var.mode = true
  75. Wiimote1.Leds = 15
  76. midi.LowBongo = true
  77. else
  78. var.mode = false
  79. Wiimote1.Leds = 1
  80. midi.HiBongo = true
  81. endif
  82. endif
  83. Debug = "Classic Controller Mode; Battery: "+((Wiimote1.Battery/128)*100)+"%"
  84. else
  85. Debug = "Please use the Classic Controller to play. Battery: "+((Wiimote1.Battery/128)*100)+"%"
  86. endif
  87. else
  88. Debug = "Please connect a Wiimote to this computer."
  89. endif
  90.  
  91.  
Advertisement
Add Comment
Please, Sign In to add comment