pc_npc->setQuestOrigRegion(pc_npc->region.toInt());
pc_npc->setQuestOrigRegion(pc_npc->region->name().toInt());
void MsgBoardQuestEscortCreate( P_CHAR pc_npc ){	// Choose a random region as a destination for the escort quest (except for the same region as the NPC was spawned in)	unsigned long loopexit=0;	if ( pc_npc == NULL ) return;	do 	{		if ( escortRegions )		{			// If the number of escort regions is 1, check to make sure that the only 			// valid escort region is not the NPC's current location - if it is Abort			if ( (escortRegions==1) && (validEscortRegion[0]==pc_npc->region) )			{				pc_npc->setQuestDestRegion(0);				break;			}						pc_npc->setQuestDestRegion(validEscortRegion[RandomNum(0, (escortRegions-1))]);		}		else		{			pc_npc->setQuestDestRegion(0);  // If no escort regions have been defined in REGIONS.SCP then we can't do it!!			break;		}	} while ( (pc_npc->questDestRegion() == pc_npc->region) && (++loopexit < MAXLOOPS)  );		// Set quest type to escort	pc_npc->setQuestType(ESCORTQUEST);		// Make sure they don't move until an player accepts the quest	pc_npc->npcWander       = 0;                // Don't want our escort quest object to wander off.	pc_npc->setNpcAIType( 18 );                // set to escort speech so they can yell to all.	pc_npc->setQuestOrigRegion(pc_npc->region.toInt());  // Store this in order to remeber where the original message was posted		// Set the expirey time on the NPC if no body accepts the quest	if ( SrvParams->escortinitexpire() )		pc_npc->summontimer = ( uiCurrentTime + ( MY_CLOCKS_PER_SEC * SrvParams->escortinitexpire() ) );		// Make sure the questDest is valid otherwise don't post and delete the NPC	if ( !pc_npc->questDestRegion() )	{		clConsole.send("WOLFPACK: MsgBoardQuestEscortCreate() No valid regions defined for escort quests\n");		Npcs->DeleteChar( pc_npc );		//deletechar( npcIndex );		return;	}		// Post the message to the message board in the same REGION as the NPC	if ( !MsgBoardPostQuest(pc_npc->serial, ESCORTQUEST) )	{		clConsole.send( "WOLFPACK: MsgBoardQuestEscortCreate() Failed to add quest post for %s\n", pc_npc->name.c_str() );		clConsole.send( "WOLFPACK: MsgBoardQuestEscortCreate() Deleting NPC %s\n", pc_npc->name.c_str() );		Npcs->DeleteChar( pc_npc );		//deletechar( npcIndex );		return;	}		// Debugging messages#ifdef DEBUG	clConsole.send("WOLFPACK: MsgBoardQuestEscortCreate() Escort quest for:\n       %s to be escorted to %s\n", pc_npc->name, region[pc_npc->questDestRegion].name.c_str() );#endif}