Initial Upload
Initial Upload
This commit is contained in:
49
_module/nss/2keylock.nss
Normal file
49
_module/nss/2keylock.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
string sDeny;
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 1.3
|
||||
|
||||
For download info, please visit:
|
||||
http://www.lilacsoul.revility.com */
|
||||
|
||||
//Put this OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetItemPossessedBy(oPC, "ZekinthasStoreKey1")== OBJECT_INVALID)
|
||||
{
|
||||
sDeny="You do not have the correct keys in your possesion.";
|
||||
|
||||
SendMessageToPC(oPC, sDeny);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetItemPossessedBy(oPC, "ZekinthasStoreKey2")== OBJECT_INVALID)
|
||||
{
|
||||
sDeny="You do not have the correct keys in your possesion.";
|
||||
|
||||
SendMessageToPC(oPC, sDeny);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetObjectByTag("ZeksStoreDoor");
|
||||
|
||||
AssignCommand(oTarget, ActionOpenDoor(oTarget));
|
||||
|
||||
object oItem;
|
||||
oItem = GetItemPossessedBy(oPC, "ZekinthasStoreKey1");
|
||||
|
||||
if (GetIsObjectValid(oItem)) DestroyObject(oItem);
|
||||
|
||||
oItem = GetItemPossessedBy(oPC, "ZekinthasStoreKey2");
|
||||
|
||||
if (GetIsObjectValid(oItem)) DestroyObject(oItem);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user