There are several ways to do this. One is to parse the players input with the advanced script command "Before each turn" in the Game/Advanced.menu. All rooms where the player must swim get a property "water". This property and the usercommand can be checked before each turn. Its a bit tricky and it seems to me, that Quest4 does not work properly.
Another way is to use no exits with waterrooms. Use the "Edit Custom Player Commands..." in the Advanced-menu of each room to create a swim #to#-command for this room. With skripts you can parse the direction and move the player to the next room. Look at the attached test2.asl