Initial Commit
Initial Commit
This commit is contained in:
33
_module/nss/tavern_exit.nss
Normal file
33
_module/nss/tavern_exit.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
#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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user