Sure, it's a simple repeat loop.
It would be helpful if you included your existing script as a baseline, but it will end up looking like:
repeat until (do shell script "/sbin/ping -c 2 -q server.net" contains "2 packets received")
delay 5
end repeat
-- mount command goes here
The idea here is that you run the ping command repeatedly until it returns a positive result (i.e. in the above example, it sends 2 pings and they both return). At that point you continue with the remaining commands.
You may also be able to use /sbin/ping -o which pings repeatedly until a reply is received, but this could run indefinitely and is harder to break out of (in the above example you could have additional code inside the repeat loop that fails gracefully after a preset time).