If you want to merely format it without using a DVD, CD, disc or disk, take the hard drive out, plug it into an enclosure or another computer, and format it from there.
If you want to "format" it in the sense of resetting it to factory, i.e. with Mac OS X 10.4 or 10.5 on it, then you have no other choice than to get hold of an installation medium on an optical disc or a drive connected through FireWire.
Why is that? For a factory reset, you need to:
- Format the startup disk
- Copy the default system onto the disk
With the following constraints:
- You cannot reset a Mac running OS X to the factory default without having an original installation disc because in order to even format the startup disk, it cannot be booted from. So whatever formats the disk—typically the OS X installer's Disk Utility—needs to run from an optical disc or FireWire (the PowerBook G4 cannot boot from USB either).
- Copying the default system files onto the startup disk would require you to have them in the first place, and they're not on the system you're currently running, because they've certainly been modified.
Bottom line, you need the Mac OS X 10.5 installer. Or a complete system image you took when the Mac was still "fresh", so to say.