Ok, to get the camera to bob up and down, you'll need to have a variable which says how far to offset the camera. Then, when the player is walking, just change the variable using a sine wave to get a nice bobbing motion.
moving=0
If upkey()=1 then moving=1 blah etc all your movement code here
if moving=1
camerabobangle=wrapvalue(camerabobangle+1)
endif
if moving=0
camerabobangle=curveangle(0,camerabobangle,10)
endif
camerabob=sin(camerabobangle)*10
position camera x,y+camerabob,z
That's basically the code you want, you'll have to fit that in around your existing code.
Once I was but the learner,
now, I am the Master.