[HELP NEEDED] Controlling 3-wheel omniwheel robot

Questions :
Have you made the robot move forward for a fixed time at a fixed speed then stop ?
Have you made the robot turn 90 degrees right or left then stop ?

If you have then you know how to move it in the pattern that you describe

move forward
stop
spin right
stop
move forward
stop
spin left
stop
go back and do it over again

If not, then start by getting it to move forward a fixed amount and stop. Write the code to do it, try it out and if it does not work post it here for help.

HINT - the forward(), control() and motor() functions need to be in your script. They are not there in the script you posted although you did post them separately.