Write the function you need in C. Here is roughly the pcode (that you need to convert to C in your virtual user)
If (My savecount variable from web_reg_find() indicates I have not found the text) then exit my virtual user
if (the saved response time of this call is less than five seconds (see lr_get_transaction_duration()) then exit my virtual user.
The natural state is continue.
As you are new, make sure your C skills are up to snuff. if not, then you need to address that. 'C for Dummies' is a great book, one I have recommended to both colleagues and family members alike.
If you have not been to training, then you need to go. The only training with a proven track record of success with multiple instructors is the delivery of the standard HP LoadRunner training material with an HP certfied instructor. After that you need to go through a mentoring/internship period for your next 3-4 projects under the tutelage of a very seasoned performance test professional (who also happens to know LoadRunner well).