A flag should do the trick. pick an unused flag. Check for this flag on the tile; if it's set, go to the script; if not, skip it. In the get-pokemon script, set the flag. That way, afterwards, the prof will call you and give you the Dex. In the dex script, clear the flag. That way, when you step on it again, it's back to normal. Should work.