The GetPCCell function tests for the player’s presence in the specified cell. It returns 1 if the player is in the specified cell, 0 if not. Partial matches are supported, e.g. GetPCCell, "Vivec" will return true for the cells "Vivec", "Vivec, foreign quarter waistworks" and "Vivec, temple", etc.
Sample Script:
This small Bethesda script checks for the PC leaving a certain area until removing a certain item from an NPC:
Begin DrothPost
if ( GetJournalIndex "MS_EstateSale" >= 70 )
if ( GetPCCell "Mournhold, Geon Auline's House" == 0 )