generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
20
_module/nss/k_xp_unlock.nss
Normal file
20
_module/nss/k_xp_unlock.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
// This script gives XP for unlocking the calling object.
|
||||
//
|
||||
// ============================================================================
|
||||
// Part of the "Aspire" module foundation package.
|
||||
// Author: Kaylor
|
||||
// ============================================================================
|
||||
void main()
|
||||
{
|
||||
object oCreature = GetLastUnlocked();
|
||||
object oReferenceMember = GetObjectByTag("Aspire_ReferenceMember_Hostile");
|
||||
int nXP = GetLockUnlockDC(OBJECT_SELF) + d8(2);
|
||||
|
||||
// Picking locks is a chaotic act against all but the hostile faction.
|
||||
if (oReferenceMember != OBJECT_INVALID){
|
||||
if (GetFactionEqual(OBJECT_SELF, oReferenceMember) == FALSE){
|
||||
AdjustAlignment(oCreature, ALIGNMENT_CHAOTIC, 1);
|
||||
}
|
||||
}
|
||||
GiveXPToCreature(oCreature, nXP);
|
||||
}
|
||||
Reference in New Issue
Block a user