Fishing in WoW, part 2
View blog reactions Written on April 4, 2007 by Chris Heald
I’ve updated my GlovePIE script considerably. It’s a lot smoother now.
- Holding “A” and casting will attempt to cast. This causes the Wiimote to rumble.
- Jerking back on the line will reel your catch in. Also causes some mild rumble.
- The nunchuk joystick moves the cursor/acts as mouse.
- “Z” is left click now. “B” is right click. Holding both of them puts you into run mode, and the joystick can steer your character just as you would with the mouse. Holding “C” rather than “Z” will put you into strafe mode, which doesn’t move the camera, but which allows you to strafe side to side, or back up.
- The plus and minus buttons zoom the camera in and out
- I fixed the “casting lag” that was present in the first video
Feedback and suggestions are welcome! Updated code is behind the cut.
// WoW Fishing Script
// By Chris Heald (Antiarc)
var.speed = 0.008
var.button = Wiimote.A or Wiimote.1 or Wiimote.2
if Wiimote.RawAccY <= -15 m per s per s and var.button then
Wiimote.Rumble = 1
Shift+F = true
wait 10 ms
Shift+F = false
Wiimote.Frequency = 350
wait 180 ms
var.lineOut = true
Wiimote.Frequency = 255
wait 170 ms
Wiimote.Frequency = 155
wait 160 ms
Wiimote.Frequency = 100
wait 100 ms
Wiimote.Frequency = 0
Wiimote.Rumble = 0
endif
mouse.LeftButton = Wiimote.Nunchuk.ZButton or Wiimote.Nunchuk.CButton
mouse.RightButton = Wiimote.B
if Wiimote.Plus then Mouse.DirectInputZ = Mouse.DirectInputZ + 1
if Wiimote.Minus then Mouse.DirectInputZ = Mouse.DirectInputZ - 1
if Wiimote.B and Wiimote.Nunchuk.CButton then
A = Wiimote1.Nunchuk.JoyX < -0.2
D = Wiimote1.Nunchuk.JoyX > 0.2
S = Wiimote1.Nunchuk.JoyY > 0.2
W = Wiimote1.Nunchuk.JoyY < -0.2
var.cSet = true
else
if var.cSet then
A = false
D = false
S = false
W = false
var.cSet = false
end
if (Wiimote1.Nunchuk.JoyX > 0 and Wiimote1.Nunchuk.JoyX >= 0.15) or (Wiimote1.Nunchuk.JoyX < 0 and Wiimote1.Nunchuk.JoyX <= -0.15) then mouse.x = mouse.x + (Wiimote1.Nunchuk.JoyX * var.speed)
if (Wiimote1.Nunchuk.JoyY > 0 and Wiimote1.Nunchuk.JoyY >= 0.15) or (Wiimote1.Nunchuk.JoyY < 0 and Wiimote1.Nunchuk.JoyY <= -0.15) then mouse.y = mouse.y + (Wiimote1.Nunchuk.JoyY * var.speed)
endif
if Wiimote.RawAccY >= 20 m per s per s and not var.button then
if var.lineOut then Wiimote.Rumble = 1
Shift = true
mouse.RightButton = true
wait 100 ms
mouse.RightButton = false
Shift = false
Wiimote.Rumble = 0
var.lineOut = false
endif
Posted in 
April 12th, 2007 at 7:53 am
Chris, I sat down yesterday and tried to get this hack working, but I can’t get the Wiimote to connect to my PC.
I happen to have the exact same Kensington Bluetooth dongle as you - use it to sync my phone with my work PC.
I’m using the newest version of the Widcomm software from Kensington’s website. I put the Wiimote in discover mode by holding buttons 1 & 2, and told my PC to search for devices. It found the Wiimote HID and created an icon in My Bluetooth Places. I then right-clicked on the icon and told my PC to connect to the HID.
It brings up a connection wizard, and eventually a page asking for the device’s password. There are two choices here - put in a password, or click on “Skip” if there’s no password. When I click on Skip, nothing happens. If I leave the password field blank and try to connect, it pops up an error.
Not sure what I’m doing wrong here - can you give me some advice?
I seem to remember that I wasn’t ever able to ask my PC to connect to my phone using this software either. I always had to request the connection from my phone. Is this what I’m doing wrong? Do I have to use the red “sync” button inside the battery hatch on the Wiimote?
Thanks lots in advance!
April 12th, 2007 at 8:14 am
OK, I’m mistaken. I sync’ed my phone at work to see which method works. I actually do initiate the connection from my PC, specify a password, and then my phone requests the password. Connection created.
Let me know what you think I’m doing wrong with the Wiimote connection. Thanks!
April 12th, 2007 at 9:45 am
This same problem got me, too. You need to be able to use the “Skip Pairing” button, but it only works if you connect through the Wizard. I right-click the tray icon, select “Bluetooth Connection Wizard”, and follow through it, selecting “Skip Pairing” when appropriate. This works, but connecting normally doesn’t. No idea why.
April 12th, 2007 at 10:05 am
Excellent! Thanks for the help. Look forward to getting this working tonight.
April 13th, 2007 at 12:06 am
Well, I’m getting closer. Using the wizard allowed me to successfully “Skip” the password step. The wizard finds a service called “Nintendo RVL-CNT-01″, I select that and click “Finish”. The Wiimote seems to connect. Inside the Widcomm software, the device with the same name gains the “two green arrows” icon that normally indicates an attached device.
Something is still wrong though. Inside GlovePIe, none of the test scripts seem to work. In any of the scripts where the Wiimote is supposed to control the cursor, the cursor moves to the upper left and buries itself in the corner. Some others are supposed to test the rumble feature via the shift key - doesn’t work.
When I connect, all four lights on my Wiimote also continue to blink as if it were in discovery mode. Do all 4 lights continue to blink once you’ve connected?
Sorry to be a pain - just hard to tell if I’m missing something.
April 13th, 2007 at 12:46 am
OK - sorry skip my last comment. I saw a number of comments stating “if your first Wiimote won’t work, try the other one”. No idea why, but this worked for me. The test scripts in GlovePIE were interacting with the Wiimote.
I’ll try your fishing script over the weekend. Thanks for your patience. :)
April 14th, 2007 at 11:24 am
Got it working - thanks for your help. Excellent script!
Now I just need to figure out why the one Wiimote won’t connect properly…
February 29th, 2008 at 8:31 pm
Perhaps…. with nokia n95 and accelerometer plugin you can make the same…. :)