28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
|
#include "NW_I0_GENERIC"
|
||
|
#include "NW_I0_TOOL"
|
||
|
#include "rpo_inc"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oOpener = GetLastOpenedBy();
|
||
|
object oSamir = GetObjectByTag("PrisonGuard");
|
||
|
DebugString(GetTag(OBJECT_SELF) + " opened by " + GetName(oOpener) + ". Reputation: " + IntToString(GetLocalInt(oOpener, "PlayerState")));
|
||
|
|
||
|
if (GetIsObjectValid(oOpener))
|
||
|
if (oOpener != oSamir && GetIsPC(oOpener))
|
||
|
{
|
||
|
if (GetLocalInt(oOpener, "PlayerState") == PWS_PLAYER_STATE_PRISON)
|
||
|
{
|
||
|
if(AutoDC(DC_EASY, SKILL_LISTEN, oSamir))
|
||
|
{
|
||
|
DebugString("Samir passed listen check on door opening!");
|
||
|
AssignCommand(oSamir, ActionMoveToObject(OBJECT_SELF, TRUE));
|
||
|
AssignCommand(oSamir, AdjustReputation(oOpener, oSamir, -100));
|
||
|
AssignCommand(oSamir, DetermineCombatRound(oOpener));
|
||
|
}
|
||
|
else
|
||
|
DebugString("Samir failed listen check on door opening!");
|
||
|
}
|
||
|
}
|
||
|
}
|