Suppose you have the threadid of the thread whose first post content you want to grab, stored in $threadid. You can the query the database as follows:
PHP Code:
$fposts = $vbulletin->db->query_read("
SELECT post.*
FROM " . TABLE_PREFIX . "post AS post
WHERE threadid = " . $threadid . "
AND parentid = 0
");
$fpost = $db->fetch_array($fposts);
$postcontent = $fpost['pagetext'];
Now you have the content of the first post in the thread stored in $postcontent.