I was randomly getting that off my 15" August '05 PowerBook - it didn't matter if it was plugged into the mains or not.
I'm staying in university halls of residence with a really bad carpet, and it started just after the cleaner had vacuumed my carpet (she's done this loads of times, but it's only just started happening).
I just "earthed" myself before touching my PB - touch something metal that's on the ground and that should do the job. You may still get a shock, which means you're full of static electricity 😀
I assume getting a shock off your PB case won't mess anything inside up, since the case creates a Faraday Cage around the important stuff.
One concern I did have when it was happening to me: if I didn't earth myself, and then got a shock from the PB, my trackpad wouldn't work very well for about 30s. The sensitivity would gradually come back. Hopefully I haven't damaged my trackpad...