21 lines
787 B
Plaintext
21 lines
787 B
Plaintext
|
// 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);
|
||
|
}
|