 |
WiiLi.org a new revolution
|
| View previous topic :: View next topic |
| Author |
Message |
TigerGD
Joined: 16 Apr 2007 Posts: 70 Location: SoCal
Digg It |
Posted: Fri Jun 20, 2008 4:59 pm Post subject: Wii Wheel + Balance Board driving script |
|
|
| Code: | /* Wii Wheel + Balance Board driving script
by Mike "Tiger" Sylvester
Balance Board must be connected first and Wiimote connected second in order
for this script to work as written. This script has been tested to work in
Need for Speed: ProStreet.
For a full description of how this script was made, check out
Revolutionary: WRX Stage 1
http://www.nintendowiifanboy.com/2008/06/18/revolutionary-wrx-stage-1/
A demo of the Wheel and Board working in the game controller control panel
is available here: http://www.youtube.com/watch?v=eEqEIocS-VE
A demo of the Wheel and Board working in Need for Speed Prostreet is
available here: http://www.youtube.com/watch?v=povVio_THgU
*/
wait 20ms
PPjoy.Analog1 = 0
if !var.init
var.BBJy = Wiimote1.BalanceBoard.JoyX
var.init = True
EndIf
var.BBy = Wiimote1.BalanceBoard.JoyX - var.BBJy
PPJoy.Analog0 = maprange(Wiimote2.SmoothPitch,-80,80,-1,1)
PPJoy.Digital0 = Wiimote2.1 //Digital button 0
PPJoy.Digital1 = Wiimote2.2 //Digital button 1
PPJoy.Digital2 = Wiimote2.B //Digital button 2
PPJoy.Digital3 = Wiimote2.A //Digital button 3
Key.Up = Wiimote2.Right //Menu up
Key.Down = Wiimote2.Left //Menu down
Key.Left = Wiimote2.Up //Menu left
Key.Right = Wiimote2.Down //Menu right
Key.Esc = Wiimote2.Minus //Menu back
Key.Enter = Wiimote2.Plus //Menu enter
Shift + P + I + E = Any.Home //Stops script running
If var.BBy < 0
var.BBy = (var.BBy * 9)
EndIf
var.BBy = (var.BBy * 25)
PPjoy.Analog1 = var.BBy
If (PPjoy.Analog1 > .25 or < -.25)
PPjoy.Analog1 = PPjoy.Analog1
Else
PPjoy.Analog1 = 0
EndIf
//debug = var.BBy + ", " + var.BBJy
debug = PPjoy.Analog1 + ", " + PPjoy.Analog0 |
Last edited by TigerGD on Sun Jun 22, 2008 7:34 am; edited 1 time in total |
|
| Back to top |
|
 |
Maxadam5

Joined: 23 May 2008 Posts: 37
Digg It |
Posted: Sun Jun 22, 2008 2:26 am Post subject: Air rivals |
|
|
Here is a simple script for air rivals hold the wiimote sideways and tilt up down left right to move your ship press 2 to fire primary weapon and press 1 to fire secondary A is untarget B is stop ship plus is held for ir pointing b and a are left/right click when plus is held home is options minus is land arrow keys are wasd like right=w left=s up=a and down=d and to boost you push forward with the wiimote and it will keep going for 3 seconds hope you guys like this as much as i am liking it lol
| Code: | if var.irpointer = false then
Mouse.x = MapRange(Wiimote1.Pitch, -90 degrees,90 degrees, 0,1)
Mouse.y = MapRange(Wiimote1.Roll, 90 degrees,-90 degrees, 0,1)
endif
if var.A = true then
mouse.x = wiimote.PointerX
mouse.Y = wiimote.PointerX
endif
var.A = Wiimote1.A
var.B = Wiimote1.B
var.home = Wiimote1.Home
var.plus = Wiimote1.Plus
var.minus = Wiimote1.Minus
var.Cbutton = wiimote.Nunchuk.CButton
var.Zbutton = wiimote.Nunchuk.ZButton
var.one = wiimote.One
var.two = wiimote.Two
var.up = wiimote.Up
var.down = wiimote.Down
var.left = wiimote.Left
var.right = wiimote.right
var.nunchukswing = (wiimote.Nunchuk.RawAccX > 25 or < -25) or (wiimote.Nunchuk.RawAccY > 25 or < -25) or (wiimote.Nunchuk.RawAcc > 25 or < -25)
var.nunchukx = (wiimote.Nunchuk.RawAccX > 25 or < -25)
var.nunchuky = (wiimote.Nunchuk.RawAccY > 25 or < -25)
var.nunchukz = (wiimote.Nunchuk.RawAccZ > 25 or < -25)
var.wiimoteswing = (wiimote.RawAccX > 25 or < -25) or (wiimote.RawAccY > 25 or < -25) or (wiimote.RawAcc > 25 or < -25)
var.wiimoteX = (wiimote.RawAccX > 25 or < -25)
var.wiimoteY = (wiimote.RawAccY > 25 or < -25)
var.wiimoteZ = (wiimote.RawAccZ > 25 or < -25)
var.wiimoteXforward = (wiimote.rawaccX > 10)
/////////////////////////////////////
if pressed(var.wiimoteXforward) then
key.Space = true
wait 3 seconds
key.space = false
endif
if var.irpointer = false
mouse.LeftButton = var.two
mouse.rightbutton = var.one
key.B = var.b
key.shift = var.A
key.Escape = var.home
key.W = var.right
key.S = var.left
key.A = var.up
key.D = var.down
key.C = var.minus
endif
if var.plus = true then
var.irpointer = true
mouse.x = wiimote.PointerX
mouse.Y = wiimote.PointerY
else
var.irpointer = false
endif
if var.irpointer = true then
mouse.LeftButton = var.B
mouse.RightButton = var.A
endif |
|
|
| Back to top |
|
 |
Vrilya
Joined: 08 Jun 2008 Posts: 4 Location: Sweden
Digg It |
Posted: Wed Jun 25, 2008 11:38 pm Post subject: |
|
|
This is my Glovepie script for World of Wacraft ... I have been using it now for a while and I am really happy with it.
I have found good use with this for all the classes I play (shaman, warrior, warlock and druid).
I have also done some tanking on my protection warrior in karazhan, SSC and tempest keep (all cleard ofcourse).... and I have to say it's pretty nice to kick back in your couch for once and just play the game without using the keyboard.
I was a little bit skeptical to the arena first though as I usually get much fast thinking preassure on me while playing my resto druid... but we did as good as we always do and won all battles we tried except one.
right now I am too tired to tell you all about how I use my buttons soo you have to figure it all by yourself.... but all I can say is that you have three modes.
The 1'st mode is your basic mode where you handle all of your attacks and such on your action bars.
Mode 2 is enabled when you press C on your nunchuck, and is used to enable the mouse.
Left mousebutton is the same as Wiimote A and right mousebutton the same as Wiimote B.
During mode 2 you can allso access windows like the paperdoll, your map, your bags (inventory), questlog etc.
Pressing the C button on the Nunchuck will take you back to Mode 1.
Mode 3 is an extension to the first mode (and is only accessible through the first mode) and this is to reach the rest of the buttons on the action bar (5,6,7 etc)... you access this mode by keeping the B button on your mote down.
Under mode 3 you can press the Z button on your nunchuck to autorun, and doing the same thing again (Pressing Z during mode 3) will get you out of the autorunning.
and last this... you steer your character with the analog stick on your Nunchuck.
Anyhow... I would love if anyone could try it and see what they think... or if anyone have some ideas to make this even better... please write.
Thanks
//Vrilya
| Code: |
/* Wowmote - A GlovePie Wiimote script for World of Warcraft by Vrilya
Some of the code for this script comes from various sources soo
to be honest everything here is'nt my code.
However I do wish to thank everyone who I cant remember the names of
right now.
However I would like to thank Ethan for his wowwiimote script as that is
what inspired me to write this one.
And to you guys at wiili.org ... some of you have even sent me private
messages to explain some things I could'nt really understand myself
sadly you did'nt want to be in my thanks list... but the overall community
here seems very helpfull and kind... soo this thanks goes out to all of you
on the forums.
To end this... if you want to change my code or make it better in any way,
go ahead and do soo... if you want to publish it somewhere I would be honored.
just as long as you give the credits to me. */
var.xOffset = 2
var.yOffset = -2
var.zOffset = 4
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
var.speed = 2
var.xCutoff = 4
var.zCutoff = 4
var.xtrim = 2.50
var.ytrim = 3.50
var.ztrim = 29.50
var.deadzone = 5
var.accx = wiimote.RawForceX + var.xtrim
var.accy = wiimote.RawForceY + var.ytrim
var.accz = wiimote.RawForceZ + var.ztrim
if var.normal = false
var.pressedb = false
var.NunC = false
if keepdown(wiimote.b,0)
var.lampor = "trean"
shift + keyboard.Up = wiimote.one
shift + keyboard.down = wiimote.two
key.5 = wiimote.A
key.6 = wiimote.minus
key.7 = wiimote.home
key.8 = wiimote.Plus
mouse.MiddleButton = Wiimote.nunchuk.Zbutton
keyboard.F2 = Wiimote.Up
keyboard.F4 = Wiimote.Down
keyboard.F5 = Wiimote.Left
keyboard.F3 = Wiimote.Right
if pressed(Wiimote.nunchuk.Zbutton)
toggle(var.styrning)
endif
else
var.lampor = "ettan"
key.1 = wiimote.A
key.2 = wiimote.minus
key.3 = wiimote.home
key.4 = wiimote.Plus
keyboard.Tab = Wiimote.nunchuk.Zbutton
keyboard.comma = Wiimote.Up
keyboard.dot = Wiimote.Down
keyboard.9 = Wiimote.Left
keyboard.0 = Wiimote.Right
keyboard.Escape = wiimote.one
mouse.rightbutton = wiimote.two
endif
endif
if var.nunc = true
var.pressedb = false
var.normal = true
if var.xRot > var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot - var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.speed * (var.xRot + var.xCutoff)
if var.zRot > var.zCutoff then mouse.y = mouse.y - .001 * var.speed * (var.zRot - var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .003 * var.speed * (var.zRot + var.zCutoff)
mouse.leftbutton = wiimote.A
mouse.rightbutton = wiimote.b
mouse.wheelup = Wiimote.Up
mouse.wheeldown = Wiimote.Down
keyboard.Escape = Wiimote.HOME
keyboard.c = Wiimote.plus
keyboard.p = Wiimote.minus
keyboard.l = wiimote.One
keyboard.o = wiimote.two
keyboard.b = Wiimote.left
keyboard.m = Wiimote.right
endif
endif
endif
endif
endif
if pressed (Wiimote.nunchuk.cbutton) and var.nunc = false
var.nunc = true
var. normal = true
var.lampor = "tvaan"
else if pressed (Wiimote.nunchuk.cbutton) and var.nunc = true
var.nunc = false
var. normal = false
var.lampor = "ettan"
endif
if var.yRot >= 60 then
press(key.space)
release(key.space)
endif
var.styrning = var.styrning
if var.lampor = "ettan"
Wiimote1.Led1 = true
Wiimote1.Led2 = false
Wiimote1.Led3 = false
Wiimote1.Led4 = false
endif
if var.lampor = "tvaan"
Wiimote1.Led1 = false
Wiimote1.Led2 = true
Wiimote1.Led3 = false
Wiimote1.Led4 = false
endif
if var.lampor = "trean"
Wiimote1.Led1 = false
Wiimote1.Led2 = false
Wiimote1.Led3 = true
Wiimote1.Led4 = false
endif
if var.styrning = false
keyboard.w = wiimote.nunchuk.joyY<= - 25%
keyboard.s= wiimote.nunchuk.joyY>=25%
keyboard.a= wiimote.nunchuk.joyX<= -25%
keyboard.d= wiimote.nunchuk.joyX>=25%
else
keyboard.a= wiimote.nunchuk.joyX<= -25%
keyboard.d= wiimote.nunchuk.joyX>=25%
endif |
|
|
| Back to top |
|
 |
dustthunder
Joined: 26 Jun 2008 Posts: 1
Digg It |
Posted: Thu Jun 26, 2008 2:18 am Post subject: Best FPS Scripts |
|
|
Hi everybody! I've looked through the entire 49 pages of scripts here and am struggling finding the best of the best. There are so many modifications to making mouse movement more effective, etc. Can anybody make a few recommendations?
Best FPS (doesn't have to be a specific game, because specific buttons can easily be changed) for:
1. WITH sensor bar: Wiimote as mouse and connected nunchuk
2. WITHOUT sensor bar: Wiimote + nunchuk
Thanks so much! I'm so excited about GlovePie and this whole extended world of Wii use!!!
dust |
|
| Back to top |
|
 |
djdna
Joined: 29 Jun 2008 Posts: 34
Digg It |
Posted: Sun Jun 29, 2008 7:45 pm Post subject: |
|
|
heres my scripts, theyre all edits of other scripts (as im noob at this) but they work ok for me, so far
this one is for wii classic controller use, its the same as the main one on wiili, but it also has the right analog stick mapped to mouse movement and ZL mapped to mouse click, so you can broswe windows without switching input devices etc.... hope its usefull
/********************************************************************
* edit of script originally Writen by Marc-Andre Larouche
********************************************************************/
// READ THIS
// ************************ Important ***************************
//
// By default the second player buttons mapping share 2 of them with
// the player one !!! In order to correct this problem, please remap
// the Player 2 input to the following keys.
// (you can use this script with the wiimote to do that)
//
// UP: Numpad 8 | A: Keyboard P | L: Keyboard I
// DOWN: Numpad 2 | B: Keyboard L | R: Keyboard J
// LEFT: Numpad 4 | X: Keyboard O | Select: Left Alt
// RIGHT: Numpad 6 | Y: Keyboard K | Start: Left Ctrl
//
// P1 button mapping
Key.Z = Wiimote1.Classic.b
Key.X = Wiimote1.Classic.a
Key.A = Wiimote1.Classic.y
Key.S = Wiimote1.Classic.x
Key.D = Wiimote1.Classic.L
Key.C = Wiimote1.Classic.R
Key.Up = Wiimote1.Classic.Up
Key.Down = Wiimote1.Classic.Down
Key.Left = Wiimote1.Classic.Left
Key.Right = Wiimote1.Classic.Right
Key.RightShift = Wiimote1.Classic.Minus
Key.Enter = Wiimote1.Classic.Plus
mouse.leftbutton = Wiimote1.Classic.ZL
mouse.rightbutton = Wiimote1.Classic.ZR
// P2 button mapping
Key.L = Wiimote2.Classic.b
Key.P = Wiimote2.Classic.a
Key.K = Wiimote2.Classic.y
Key.O = Wiimote2.Classic.x
Key.I = Wiimote2.Classic.L
Key.J = Wiimote2.Classic.R
Key.NUMPAD8 = Wiimote2.Classic.Up
Key.NUMPAD2 = Wiimote2.Classic.Down
Key.NUMPAD4 = Wiimote2.Classic.Left
Key.NUMPAD6 = Wiimote2.Classic.Right
Key.LeftAlt = Wiimote2.Classic.Minus
Key.LeftControl = Wiimote2.Classic.Plus
// Emulator Shared key
Key.Console = Wiimote1.Classic.Home
Key.F4 = Wiimote1.Classic.ZL
Key.F2 = Wiimote1.Classic.ZR
Key.Console = Wiimote2.Classic.Home
Key.F4 = Wiimote2.Classic.ZL
Key.F2 = Wiimote2.Classic.ZR
// LED P1
Wiimote1.LED1 = true;
Wiimote1.LED2 = false;
Wiimote1.LED3 = false;
Wiimote1.LED4 = false;
// LED P2
Wiimote2.LED1 = false;
Wiimote2.LED2 = true;
Wiimote2.LED3 = false;
Wiimote2.LED4 = false;
// P1 Analog sticks
// The following script mapped the left analog stick to the same controls as the D-pad
Key.left = Wiimote1.Classic.Joy1X <= -25%
Key.right = Wiimote1.Classic.Joy1X >= 25%
Key.up = Wiimote1.Classic.Joy1Y <= -25%
Key.down = Wiimote1.Classic.Joy1Y >= 25%
//Nickm717 Classic Controller Mouse
// Modified version of Kunal Khiyani's nunchuk mouse
if (-1.2 < wiimote1.Classic.Joy2Y < -0.5) {
Mouse.DirectInputY = Mouse.DirectInputY - 10;
}
if (0.5 < wiimote1.Classic.Joy2Y < 1.2) {
Mouse.DirectInputY = Mouse.DirectInputY + 10;
}
if (-1.2 < wiimote1.Classic.Joy2X < -0.5) {
Mouse.DirectInputX = Mouse.DirectInputX - 10;
}
if (0.5 < wiimote1.Classic.Joy2X < 1.2) {
Mouse.DirectInputX = Mouse.DirectInputX + 10;
}
// P2 Analog sticks
// The following script mapped the left analog stick to the same controls as the D-pad
Key.NUMPAD4 = Wiimote2.Classic.Joy1X <= -25%
Key.NUMPAD6 = Wiimote2.Classic.Joy1X >= 25%
Key.NUMPAD8 = Wiimote2.Classic.Joy1Y <= -25%
Key.NUMPAD2 = Wiimote2.Classic.Joy1Y >= 25%
//Nickm717 Classic Controller Mouse
// Modified version of Kunal Khiyani's nunchuk mouse
if (-1.2 < wiimote2.Classic.Joy2Y < -0.5) {
Mouse.DirectInputY = Mouse.DirectInputY - 10;
}
if (0.5 < wiimote2.Classic.Joy2Y < 1.2) {
Mouse.DirectInputY = Mouse.DirectInputY + 10;
}
if (-1.2 < wiimote2.Classic.Joy2X < -0.5) {
Mouse.DirectInputX = Mouse.DirectInputX - 10;
}
if (0.5 < wiimote2.Classic.Joy2X < 1.2) {
Mouse.DirectInputX = Mouse.DirectInputX + 10;
} |
|
| Back to top |
|
 |
djdna
Joined: 29 Jun 2008 Posts: 34
Digg It |
Posted: Sun Jun 29, 2008 7:56 pm Post subject: |
|
|
this next script is for general mouse use, i just found these mappings a bit more usefull than the default one on wiili, theyre generally setup for browsing windows and using a browser in the main...
hope its usefull
MAPPINGS >
IR pointer = mouse movement
a = mouse button 1
b = mouse button 2
left = back & left arrow key
right = forward and right arrow key
up = scroll wheel up and up key
down = scroll wheel down and down key
- = shift and + key (browser zoom in)
+ = shift and - key (browser zoom out)
1 = nextappright (shows next open program)
2 = windows key and u key (opens windows on screen keyboard and magnifier)
home = windows key and d key (show desktop)
// Wiimote mouse script for Windows desktop
// Requires a sensor bar
var.ButtonFreezeTime = 250ms
var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)
Wiimote.Led1 = true
// Mouse movement
if wiimote.PointerVisible but not var.PointerBump then
mouse.x = wiimote.PointerX
mouse.y = wiimote.PointerY
end if
// Mouse Buttons
mouse.LeftButton = Wiimote.A and KeepDown(Wiimote.PointerVisible,0.5s)
mouse.RightButton = Wiimote.B and KeepDown(Wiimote.PointerVisible,0.5s)
key.windows and key.D = Wiimote.Home
mouse.XButton1 and key.left = Wiimote.left
mouse.XButton2 and key.right = Wiimote.right
key.shift and key.numpadplus = wiimote.plus
key.shift and key.numpadminus = wiimote.minus
key.windows and key.u = wiimote.two
key.nextappright = wiimote.one
// Mouse Wheel
Key.Up = Wiimote.Up
if wiimote.Up then
mouse.WheelUp = true
wait 30ms
mouse.WheelUp = false
wait 30ms
end if
Key.Up = Wiimote.Down
if wiimote.Down then
mouse.WheelDown = true
wait 30ms
mouse.WheelDown = false
wait 30ms
end if |
|
| Back to top |
|
 |
greenfir3
Joined: 30 Jun 2008 Posts: 6
Digg It |
Posted: Mon Jun 30, 2008 3:27 am Post subject: |
|
|
I'm very confused.
Whenever I try to run certain scripts, my computer automatically restarts itself. Could someone please help?
I don't yet know programming and cannot figure this out.
Note:I fixed it
Last edited by greenfir3 on Thu Jul 10, 2008 4:13 pm; edited 1 time in total |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|