34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
#include "nw_i0_plot"
|
|
void main()
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "ClientSpawned", FALSE);
|
|
SetLocalInt(GetExitingObject(), "ClientSpawned", FALSE);
|
|
int nTavern = GetLocalInt(OBJECT_SELF, "TavernNumber");
|
|
string sTag;
|
|
|
|
//Get the area's exit waypoint's tag
|
|
if (nTavern == 1) sTag = "alverton_tav_exit";
|
|
|
|
//Make the client NPC walk away (out of the tavern)
|
|
object oNPC = GetFirstObjectInArea();
|
|
effect eEffect;
|
|
while (GetIsObjectValid(oNPC))
|
|
{
|
|
if (GetLocalInt(oNPC, "Client") == TRUE)
|
|
{
|
|
AssignCommand(oNPC, EscapeArea(FALSE, sTag));
|
|
//Remove all effects on the NPC (to make quest exclamation and question marks disappear)
|
|
eEffect = GetFirstEffect(oNPC);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
RemoveEffect(oNPC, eEffect);
|
|
eEffect = GetNextEffect(oNPC);
|
|
}
|
|
return;
|
|
}
|
|
oNPC = GetNextObjectInArea();
|
|
}
|
|
|
|
|
|
}
|