void main() { object oStore = GetNearestObjectByTag("ElemPortStore"); int iAir = GetLocalInt(oStore, "air"); int iFire = GetLocalInt(oStore, "fire"); int iWater = GetLocalInt(oStore, "water"); int iEarth = GetLocalInt(oStore, "earth"); object oPlayer = GetLastUsedBy(); if (GetTag(OBJECT_SELF) == "ccportaleast") { AssignCommand(oPlayer, ActionJumpToObject(GetObjectByTag("PortalWaypointE"))); } else if (GetTag(OBJECT_SELF) == "ccportalwest") { AssignCommand(oPlayer, ActionJumpToObject(GetObjectByTag("PortalWaypointW"))); } if (iAir == 1) { if (iFire == 1) { if (iWater == 1) { if (iEarth == 1) { if (GetTag(OBJECT_SELF) == "elemporteast") { AssignCommand(oPlayer, ActionJumpToObject(GetObjectByTag("CCPortalEast"))); } else if (GetTag(OBJECT_SELF) == "elemportwest") { AssignCommand(oPlayer, ActionJumpToObject(GetObjectByTag("CCPortalWest"))); } } } } } }