Try this, Sinister.
But this script will replace your say() function, so it is incompatible with any other script that replaces say(), like my script pack.
function say (%channel, %message) {
%omgno = Match::String(%message, "#cast teleport*");
%omgsux = Match::String(%message, "#cast transport*");
%omglol = Match::String(%message, "#cast advtransport*");
%omghax = Match::String(%message, "#cast masstransport*");
if (%omgno || %omgsux || %omglol || %omghax) {
$teledustquantity = getItemCount("Magic Dust");
$teleprchquantity = getItemCount("Parchment");
if ($teledustquantity > 0 || $teleprchquantity > 0) {
say(0, "#global Hey everyone, I just tried to teleport while carrying " @ $teledustquantity @ " dusts and " @ $teleprchquantity @ " parchments, which I would have lost!");
return;
} // end if
} // end if
remoteEval(2048, say, %channel, %message);
} // end say