The world map include file for the Merchant Quarter shows how the origin variable is used to redirect to a different waypoint, based on which direction the party is coming from.
// kinc_module1700
//
// global include file for the module.
// JYL 04/17/06
// DBR 08/03/06 - Initiate Olov ambush if player tries to leave Old Owl Well
// DBR 08/16/06 - Changed waypoint override to a tag that is not also in the Docks
//const string OLOV_CS_FLAG = "13gb_olov_ambush";
//const string OLOV_CS_WP = "13_Cascamp_To_Olov";
string Get1700Encounter(string sDestHotspot)
{
int nOrigin = GetGlobalInt("OriginArea");
if (GetGlobalInt("13gb_olov_ambush") == 1) //Olov ambush should occur, don't leave Old Owl Well without Ambush occurring.
{
SetGlobalInt("13gb_olov_ambush",2);
//PrettyMessage("Time for Olov to appear");
return "13_Cascamp_To_Olov";
}
if (sDestHotspot=="1013merchant" || sDestHotspot=="2013MerchantQuarter")
{
switch (nOrigin)
{
case 0: // Player entering from outside city
{
SetGlobalInt("00_bOverrideEncounterMessage", TRUE);
SetGlobalInt("district_redirect", 1);
return "10_wp_oow_spawn";
}
break;
case 1000: // Player entering from Docks
{
SetGlobalInt("00_bOverrideEncounterMessage", TRUE);
SetGlobalInt("district_redirect", 1);
return "10_wp_docksi_to_merchant";
}
break;
case 1600: // Player entering from Blacklake
case 2024:
{
SetGlobalInt("00_bOverrideEncounterMessage", TRUE);
SetGlobalInt("district_redirect", 1);
return "wp_from1024_to1013";
}
break;
}
}
return "";
}
string Get1700SpecialEncounter(string sDestHotspot)
{
return "";
}