LoT_PRC8/_module/nss/pr_ba_checkcell.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

22 lines
678 B
Plaintext

//Connected to the Bailiff's heartbeat event
void main()
{
int cell = GetCampaignInt("prison","cell");
if (cell == 1)
{
SpeakString("Cell is 1");
object oOffice = GetObjectByTag("officedoor");
object oPrison = GetObjectByTag("prisondoor");
object oBailiff = OBJECT_SELF;
//cell is occupied so trigger the release sequence
ActionUnlockObject(oOffice);
ActionOpenDoor(oOffice);
location ldest = GetLocation(GetWaypointByTag("pr_ba_dest"));
//location ldest = GetLocation(oPrison);
ActionMoveToLocation(ldest);
SetCampaignInt("prison","cell",0);
object oPlayer = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC);
SpeakString("Player Name is "+GetName(oPlayer));
}
}