Hmm. The script is a bit hard to read in it's current format and it also just kinda gets cut off at the end there. But from what I can see so far is that most of your debugging code is checking GetIsPC(oPC) so DMs won't see any of the debug code. Not that that would prevent a DM for transitioning but it might help see whats going on. There is a variable that is being checked right off the bat. It is set in some other script, on a LocalObject called "SpawnedBy", so perhaps it's being set for DMs? Lastly we also can't see the DetachArea function which is also checking GetIsPC(oPC). Could be one/some of these things. Could be something completely different. Hopefully it can help point you in the right direction.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
////// ALL-IN-ONE SEAMLESS AREA TRANSITIONER (for Neverwinter Nights) //////
////// Date: July 19, 2002 - Version 1.1 //////
////// Created by: Jaga Te'lesin (jaga-nwn@earthlink.net) //////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
////// Copyright Notice //////
////// You may use this script for personal use however you like. But if you redistribute you *must* //////
////// leave all code untouched and with all comments intact. //////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
////// For detailed instructions: //////
////// Please see the readme file that comes with the standard .zip distribution of this script. //////
////// It contains detailed installation and configuration instructions. A current version of this //////
////// script and the accompanying demo module can be found at: //////
//////
http://home.earthlin...テつ テつ テつ テつ テつ テつ テつ テつ テつ テつ テつ テつ テつ テつ テつ //////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "op_dynamicareas"
#include "op_inc_navmsgs"
const int nKS_WBORDER = 47;
const int nKS_NBORDER = 51;
const int nGS_EBORDER = 57;
const int nGS_SBORDER = 47;
const int nTW_NBORDERX = 38;
const int nTW_WLIMIT = 20;
const int nTW_SBORDER = 57;
const int nHP_NBORDER = 40;
const int nHP_SBORDERX = 61;
const int nHP_ELIMIT = 80;
const int nHP_NLIMIT = 20;
const int nTW_SLIMIT = 80;
const string sNWMESSAGE = "The wide river and the tall mountains loom before you; you cannot go further north.";
const string sWKSMESSAGE = "The tall peaks of the Kora Shan loom before you; you cannot go further east.";
const string sTWWMESSAGE = "Due to module limitations, you may not go further west.";
const string sHPEMESSAGE = "Due to module limitations, you may not go further east.";
const string sEKSMESSAGE = "The sodden bog and the tall mountains loom before you; you may not go further south.";
const string sEGSMESSAGE = "The towering peaks of the Glittering Spires loom before you; you cannot go further west.";
const string sHPNMESSAGE = "Due to module limitations, you may not go further north.";
const string sTWSMESSAGE = "Due to module limitations, you may not go further south.";
void TransportEffect ( object oTarget , float fDuration );
string GetNumberPadding ( int nNumber );
int GetIsValidTransArea ( string sAreaTag );
int NLimitCheck ( int nCurAreaX, int nCurAreaY, object oPC );
int SLimitCheck ( int nCurAreaX, int nCurAreaY, object oPC );
int ELimitCheck ( int nCurAreaX, int nCurAreaY, object oPC );
int WLimitCheck ( int nCurAreaX, int nCurAreaY, object oPC );
object oPC = GetEnteringObject(); //added this line to no effect
int GetIsDM(object oPC); //added this line to no effect
int GetIsDMPossessed(object oPC); //added this line to no effect
void main()
{ /// Begin User-Defined Variables ///
float fMaxAreaDim = 160.0f; // 10.0 per tile in one dimension. (Areas under 3x3 not recommended)
// Example: 16x16 areas would use 160.0f, 8x8 areas would use 80.0f, etc.
// *** NOTE: Linked areas *should* be square only! ***
float fLandingOffset = 8.0f; // Distance out from edge in destination Area that PC will land (8 to 10 recommended)
float fDiagTransSize = 10.0f; // Distance out from any corner to sense diagonal movement (8 to 15 recommended)
float fTransitionDelay = 2.5f; // Delay before zoning, used to prevent cheating by PC's (2.0 to 4.0 recommended)
int nDEBUG = TRUE; // Turns on feedback while zoning. Use for problem solving only, normal state is FALSE.
/// End User-Defined Variables ///
object oPC = GetEnteringObject();
// added for custom Outpost content
string sOldArea = GetTag(GetArea(oPC));
if ((oPC != OBJECT_INVALID) && (GetLocalInt(oPC,"m_nZoning") != TRUE))
{
if (
GetLocalInt(GetLocalObject(oPC, "SpawnedBy"),"DontZone") == 1) return;
vector vPCVector = GetPosition(oPC); // PC's current Vector
float fPCFacing = GetFacingFromLocation(GetLocation(oPC)); // Direction PC is facing
float fNorthDist = fMaxAreaDim - vPCVector.y; // Distance from North edge
float fSouthDist = vPCVector.y; // Distance from South edge
float fEastDist = fMaxAreaDim - vPCVector.x; // Distance from East edge
float fWestDist = vPCVector.x; // Distance from West edge
float fLeast = fMaxAreaDim; // Initialize smallest found dist from any edge
object oArea; // Destination area
location lLoc; // Placeholder location for general use
int nNumber; // Placeholder number for general use
int nSuccess = FALSE; // Good zone located flag
int nDir2; // Fallback direction for diagonal movement
effect eZoneEffect3 = EffectVisualEffect(VFX_IMP_ACID_L); // ZoneIn effect for end-of-transition
int nDir; // Direction: N=1,S=2,E=3,W=4,NW=5,NE=6,SW=7,SE=8
// Loop through distances to find direction PC is moving, and set nDir to that direction
nDir = 1; // PC at NORTH edge
fLeast = fNorthDist;
if (fSouthDist <= fLeast)
{
nDir = 2; // PC at SOUTH edge
fLeast = fSouthDist;
}
if (fEastDist <= fLeast)
{
nDir = 3; // PC at EAST edge
fLeast = fEastDist;
}
if (fWestDist <= fLeast)
{
nDir = 4; // PC at WEST edge
fLeast = fWestDist;
}
if ((fSouthDist > (fMaxAreaDim-fDiagTransSize)) && (fWestDist < fDiagTransSize))
nDir = 5; // PC in NORTHWEST trigger area
else if ((fSouthDist > (fMaxAreaDim-fDiagTransSize)) && (fWestDist > (fMaxAreaDim-fDiagTransSize)))
nDir = 6; // PC in NORTHEAST trigger area
else if ((fSouthDist < fDiagTransSize) && (fWestDist < fDiagTransSize))
nDir = 7; // PC in SOUTHWEST trigger area
else if ((fSouthDist < fDiagTransSize) && (fWestDist > (fMaxAreaDim-fDiagTransSize)))
nDir = 8; // PC in SOUTHEAST trigger area
string sDestAreaX, sDestAreaY;
int nCurAreaX, nCurAreaY;
// start outpost custom content
object oOldArea = GetArea(oPC);
if (nDEBUG) PrintString(GetTag(oOldArea));
string sCurAreaTag = GetStringLowerCase(GetTag(oOldArea)); // X,Y,Z Tag of Current Area
int bDynamicArea = (GetStringLeft(sCurAreaTag, 4) == "dyna");
if (nDEBUG && bDynamicArea) PrintString("Entering dynamic area");
string sCurAreaX;
string sCurAreaY;
string sCurAreaZ;
if (bDynamicArea)
{
if (nDEBUG) PrintString("Leaving dynamic area");
nCurAreaX = GetLocalInt(oOldArea, "iX");
nCurAreaY = GetLocalInt(oOldArea, "iY");
if (nDEBUG) PrintString("area trans: " + IntToString(nCurAreaX) + IntToString(nCurAreaY));
sCurAreaX = "p" + IntToString(nCurAreaX);
sCurAreaY = "p" + IntToString(nCurAreaY);
sCurAreaZ = "p00";
}
else
// end outpost custom content (except for the brackets)
{
string sXYTag = GetStringLeft(sCurAreaTag,6); // Separate out X/Y from Z coordinate
sCurAreaX = GetStringLeft(sXYTag,3); // X-coordinate of current area (from Tag)
sCurAreaY = GetStringRight(sXYTag,3); // Y-coordinate of current area (from Tag)
sCurAreaZ = GetStringRight(sCurAreaTag,3); // Z-coordinate of current area (from Tag)
if (GetStringLeft(sCurAreaX,1) == "p")
{
nCurAreaX = StringToInt(GetStringRight(sCurAreaX,2));
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Current Area X
coordinate is " + GetNumberPadding(nCurAreaX) +
IntToString(abs(nCurAreaX)) + ".");
}
else
if (GetStringLeft(sCurAreaX,1) == "n")
{
nCurAreaX = (StringToInt(GetStringRight(sCurAreaX,2)) * (-1));
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Current Area X
coordinate is " + GetNumberPadding(nCurAreaX) +
IntToString(abs(nCurAreaX)) + ".");
}
if (GetStringLeft(sCurAreaY,1) == "p")
{
nCurAreaY = StringToInt(GetStringRight(sCurAreaY,2));
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Current Area Y
coordinate is " + GetNumberPadding(nCurAreaY) +
IntToString(abs(nCurAreaY)) + ".");
}
else
if (GetStringLeft(sCurAreaY,1) == "n")
{
nCurAreaY = (StringToInt(GetStringRight(sCurAreaY,2)) * (-1));
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Current Area Y
coordinate is " + GetNumberPadding(nCurAreaY) +
IntToString(abs(nCurAreaY)) + ".");
}
}
switch (nDir) // Calculate new Area Tag based on the direction they are moving, and move them
{
case 1: // Moving NORTH
{
if (NLimitCheck(nCurAreaX,nCurAreaY,oPC)==TRUE) return;
--nCurAreaY;
sDestAreaY = GetNumberPadding(nCurAreaY) + IntToString(abs(nCurAreaY));
oArea = GetObjectByTag(sCurAreaX + sDestAreaY + sCurAreaZ);
// Outpost custom stuff for dynamic areas
if (oArea == OBJECT_INVALID)
{
oArea = GetObjectByTag(PickDynamicArea(nCurAreaX, nCurAreaY,oPC,oOldArea,bDynamicArea));
if (GetIsObjectValid(oArea))
ExploreAreaForPlayer(oArea,oPC);
}
// end Outpost custom stuff
lLoc = Location(oArea,Vector(vPCVector.x,fLandingOffset),fPCFacing);
if (nDEBUG) if
(GetIsPC(oPC)) SendMessageToPC(oPC,"Moving North:" +
"\\nDestination Area X TAG is " + sCurAreaX + "." + "\\nDestination Area Y
TAG is " + sDestAreaY + ".");
if ((oArea != OBJECT_INVALID) && (GetAreaFromLocation(lLoc) == oArea))
{
SetLocalInt(oPC,"m_nZoning",TRUE);
TransportEffect(oPC,fTransitionDelay);
if (
GetIsPC(oPC)) FloatingTextStringOnCreature("Moving North...",oPC);
//outpost stuff
//
if (GetIsPC(oPC)) DetachArea(sOldArea); DelayCommand(fTransitionDelay,AssignCommand(oPC,JumpToLocation(lLoc)));
DelayCommand(fTransitionDelay,SetLocalInt(oPC,"m_nZoning",FALSE));
DelayCommand(fTransitionDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eZoneEffect3,lLoc));
//MRC_TransitionMerchant(oPC, lLoc, fTransitionDelay);
}
break;
}
case 2: // Moving SOUTH
{
if (SLimitCheck(nCurAreaX,nCurAreaY,oPC)==TRUE) return;
++nCurAreaY;
sDestAreaY = GetNumberPadding(nCurAreaY) + IntToString(abs(nCurAreaY));
oArea = GetObjectByTag(sCurAreaX + sDestAreaY + sCurAreaZ);
// Outpost custom stuff for dynamic areas
if (oArea == OBJECT_INVALID)
{
oArea = GetObjectByTag(PickDynamicArea(nCurAreaX, nCurAreaY,oPC,oOldArea,bDynamicArea));
}
// end Outpost custom stuff
lLoc = Location(oArea,Vector(vPCVector.x,fMaxAreaDim - fLandingOffset),fPCFacing);
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Moving South:" +
"\\nDestination Area X TAG is " + sCurAreaX + "." + "\\nDestination Area Y
TAG is " + sDestAreaY + ".");
if ((oArea != OBJECT_INVALID) && (GetAreaFromLocation(lLoc) == oArea))
{
SetLocalInt(oPC,"m_nZoning",TRUE);
TransportEffect(oPC,fTransitionDelay);
if (
GetIsPC(oPC)) FloatingTextStringOnCreature("Moving South...",oPC);
//outpost stuff
//
if (GetIsPC(oPC)) DetachArea(sOldArea); DelayCommand(fTransitionDelay,AssignCommand(oPC,JumpToLocation(lLoc)));
DelayCommand(fTransitionDelay,SetLocalInt(oPC,"m_nZoning",FALSE));
DelayCommand(fTransitionDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eZoneEffect3,lLoc));
//MRC_TransitionMerchant(oPC, lLoc, fTransitionDelay);
}
break;
}
case 3: // Moving EAST
{
if (ELimitCheck(nCurAreaX,nCurAreaY,oPC)==TRUE) return;
++nCurAreaX;
sDestAreaX = GetNumberPadding(nCurAreaX) + IntToString(abs(nCurAreaX));
oArea = GetObjectByTag(sDestAreaX + sCurAreaY + sCurAreaZ);
// Outpost custom stuff for dynamic areas
if (oArea == OBJECT_INVALID)
{
oArea = GetObjectByTag(PickDynamicArea(nCurAreaX, nCurAreaY,oPC,oOldArea,bDynamicArea));
}
// end Outpost custom stuff
lLoc = Location(oArea,Vector(fLandingOffset,vPCVector.y),fPCFacing);
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Moving East:" +
"\\nDestination Area X TAG is " + sDestAreaX + "." + "\\nDestination Area Y
TAG is " + sCurAreaY + ".");
if ((oArea != OBJECT_INVALID) && (GetAreaFromLocation(lLoc) == oArea))
{
SetLocalInt(oPC,"m_nZoning",TRUE);
TransportEffect(oPC,fTransitionDelay);
if (
GetIsPC(oPC)) FloatingTextStringOnCreature("Moving East...",oPC);
//outpost stuff
//
if (GetIsPC(oPC)) DetachArea(sOldArea); DelayCommand(fTransitionDelay,AssignCommand(oPC,JumpToLocation(lLoc)));
DelayCommand(fTransitionDelay,SetLocalInt(oPC,"m_nZoning",FALSE));
DelayCommand(fTransitionDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eZoneEffect3,lLoc));
//MRC_TransitionMerchant(oPC, lLoc, fTransitionDelay);
}
break;
}
case 4: // Moving WEST
{
if (WLimitCheck(nCurAreaX,nCurAreaY,oPC)==TRUE) return;
--nCurAreaX;
sDestAreaX = GetNumberPadding(nCurAreaX) + IntToString(abs(nCurAreaX));
oArea = GetObjectByTag(sDestAreaX + sCurAreaY + sCurAreaZ);
// Outpost custom stuff for dynamic areas
if (oArea == OBJECT_INVALID)
{
oArea = GetObjectByTag(PickDynamicArea(nCurAreaX, nCurAreaY,oPC,oOldArea,bDynamicArea));
}
// end Outpost custom stuff
lLoc = Location(oArea,Vector(fMaxAreaDim - fLandingOffset,vPCVector.y),fPCFacing);
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Moving West:" +
"\\nDestination Area X TAG is " + sDestAreaX + "." + "\\nDestination Area Y
TAG is " + sCurAreaY + ".");
if ((oArea != OBJECT_INVALID) && (GetAreaFromLocation(lLoc) == oArea))
{
SetLocalInt(oPC,"m_nZoning",TRUE);
TransportEffect(oPC,fTransitionDelay);
if (
GetIsPC(oPC)) FloatingTextStringOnCreature("Moving West...",oPC);
//outpost stuff
//
if (GetIsPC(oPC)) DetachArea(sOldArea); DelayCommand(fTransitionDelay,AssignCommand(oPC,JumpToLocation(lLoc)));
DelayCommand(fTransitionDelay,SetLocalInt(oPC,"m_nZoning",FALSE));
DelayCommand(fTransitionDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eZoneEffect3,lLoc));
//MRC_TransitionMerchant(oPC, lLoc, fTransitionDelay);
}
break;
}
case 5: // Moving NORTHWEST
{
// check for limits of the map
if (NLimitCheck(nCurAreaX,nCurAreaY,oPC)==TRUE) return;
if (WLimitCheck(nCurAreaX,nCurAreaY,oPC)==TRUE) return;
// end limits
--nCurAreaX;
sDestAreaX = GetNumberPadding(nCurAreaX) + IntToString(abs(nCurAreaX));
--nCurAreaY;
sDestAreaY = GetNumberPadding(nCurAreaY) + IntToString(abs(nCurAreaY));
// if (GetIsValidTransArea(sDestAreaX + sDestAreaY + sCurAreaZ)) // If target Area is validated..
// {
oArea = GetObjectByTag(sDestAreaX + sDestAreaY + sCurAreaZ);
// Outpost custom stuff for dynamic areas
if (oArea == OBJECT_INVALID)
{
oArea = GetObjectByTag(PickDynamicArea(nCurAreaX, nCurAreaY,oPC,oOldArea,bDynamicArea));
}
// end Outpost custom stuff
lLoc = Location(oArea,Vector(fMaxAreaDim - fLandingOffset,fLandingOffset),fPCFacing);
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Destination Area
validated, moving NorthWest:" + "\\nDestination Area X TAG is " +
sDestAreaX + "." + "\\nDestination Area Y TAG is " + sDestAreaY + ".");
if (
GetIsPC(oPC)) FloatingTextStringOnCreature("Moving NorthWest...",oPC);
// Outpost custom stuff for dynamic areas
//
if (GetIsPC(oPC)) DetachArea(sOldArea); DelayCommand(fTransitionDelay,AssignCommand(oPC,JumpToLocation(lLoc)));
DelayCommand(fTransitionDelay,SetLocalInt(oPC,"m_nZoning",FALSE));
DelayCommand(fTransitionDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eZoneEffect3,lLoc));
//MRC_TransitionMerchant(oPC, lLoc, fTransitionDelay);
// }
// else
// {
// if (fNorthDist <= fWestDist)
// nDir2 = 1; // Set fallback direction indicator to North
// else nDir2 = 4; // Set fallback direction indicator to West
// if (nDir2 == 1) // Try to move them North since it was closer edge..
// {
// if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"Destination Area NOT validated, trying North..");
// ++nCurAreaX;
// sDestAreaX = GetNumberPadding(nCurAreaX) + IntToString(abs(nCurAreaX));
// if (GetIsValidTransArea(sDestAreaX + sDestAreaY + sCurAreaZ))
// {
// oArea = GetObjectByTag(sDestAreaX + sDestAreaY + sCurAreaZ);
// lLoc = Location(oArea,Vector(vPCVector.x,fLandingOffset),fPCFacing);
// nSuccess = TRUE;
//
if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"North is valid and
will be used:" + "\\nDestination Area X TAG is " + sDestAreaX + "." +
"\\nDestination Area Y TAG is " + sDestAreaY + ".");
// if (GetIsPC(oPC)) FloatingTextStringOnCreature("Moving North...",oPC);
// }
// if (nSuccess == FALSE) // Try to move them West since North Failed..
// {
// if (nDEBUG) if (
GetIsPC(oPC)) SendMessageToPC(oPC,"North Area NOT validated, trying West...");
// --nCurAreaX;
// &