// LandGate (Rev 3) // Notes: // As the script stands, a destination LandGate can only be jumped to if the PC has in their // inventory a valid LandGate Rune for that destination. It would have been issued to the PC // if they have previously visited that LandGate. // If you wish to remove this feature, delete line 27 and replace line 25 with line 26. #include "NW_I0_GENERIC" void main() { // Get DialValues based on conversation script with the Sundial. string DialValue = GetLocalString(GetPCSpeaker(), "DialValue1") + GetLocalString(GetPCSpeaker(), "DialValue2") + GetLocalString(GetPCSpeaker(), "DialValue3"); // Rune Check & Destination Check string DestWP = "WP_Dial" + DialValue; string sRuneValue = "LandGateRune" + DialValue; object oRune = GetObjectByTag(sRuneValue); if ((GetWaypointByTag(DestWP) != OBJECT_INVALID) // if (GetWaypointByTag(DestWP) != OBJECT_INVALID) && (GetItemPossessedBy(GetPCSpeaker(), sRuneValue) != OBJECT_INVALID)) { // Display Visual Effect & Wait Before Jumping SpeakString("LandGate Initialized... Please Stand By..."); PlaySound("as_mg_telepin1"); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_IMP_AC_BONUS), GetPCSpeaker()); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_IMP_HOLY_AID), GetPCSpeaker()); location DestLocation = GetLocation(GetWaypointByTag(DestWP)); AssignCommand (GetPCSpeaker(), DelayCommand(2.0, JumpToLocation(DestLocation))); } else { SpeakString("System Error - Bad LandGate Destination or Rune not found"); } }