NWNDS/nwnds_module/ds_amuletexit.nss

11 lines
361 B
Plaintext
Raw Normal View History

void main()
{
DelayCommand(20.0,ActionCloseDoor(OBJECT_SELF));
string sDoor = GetTag(OBJECT_SELF);
int num = Random(9) + 1;
string sExit = "MD"+IntToString(num);
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
string sWP = GetLocalString(oPC, sDoor);
AssignCommand(oPC,ActionJumpToLocation(GetLocation(GetObjectByTag(sExit))));
}