generated from Jaysyn/ModuleTemplate
53 lines
2.2 KiB
Plaintext
53 lines
2.2 KiB
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
// Vuldrick's Universal Alignment Shifter
|
|
// Created: 11/09/06
|
|
// Modified: 11/09/06
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// The following is a list of possible alignment shifts that can be used.
|
|
// Note: If option "5" is used, it shifts both the PC's CHAOS/LAW and
|
|
// GOOD/EVIL alignment subdomains more toward neutrality.
|
|
// Note: All alignment shifts affect every PC in a multiplayer party. Keep
|
|
// this in mind as you implement alignment shifts based on PC actions.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
void main()
|
|
{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/*
|
|
1 = Chaotic
|
|
2 = Lawful
|
|
3 = Evil
|
|
4 = Good
|
|
5 = Neutral
|
|
6 = Lawful Good
|
|
7 = Lawful Evil
|
|
8 = Chaotic Good
|
|
9 = Chaotic Evil
|
|
*/
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
object oPC = GetPCSpeaker();
|
|
// Determine the direction of alignment shift by looking for a local int on the NPC
|
|
int iShift = GetLocalInt(OBJECT_SELF,"Shift");
|
|
// Declare INTs to determine shifts in CHAOS/LAW, GOOD/EVIL, NEUTRAL
|
|
int iShiftCL;
|
|
int iShiftGE;
|
|
int iShiftN;
|
|
// Determine the amount of the alignment shift by looking for a local ints on the NPC
|
|
int iAmountCL = GetLocalInt(OBJECT_SELF,"AmountCL");
|
|
int iAmountGE = GetLocalInt(OBJECT_SELF,"AmountGE");
|
|
int iAmountN = GetLocalInt(OBJECT_SELF,"AmountN");
|
|
// Set up the alignment to be shifted based on the above table
|
|
if (iShift == 1){iShiftCL = ALIGNMENT_CHAOTIC;}
|
|
if (iShift == 2){iShiftCL = ALIGNMENT_LAWFUL;}
|
|
if (iShift == 3){iShiftGE = ALIGNMENT_EVIL;}
|
|
if (iShift == 4){iShiftGE = ALIGNMENT_GOOD;}
|
|
if (iShift == 5){iShiftN = ALIGNMENT_NEUTRAL;}
|
|
if (iShift == 6){iShiftCL = ALIGNMENT_LAWFUL;iShiftGE = ALIGNMENT_GOOD;}
|
|
if (iShift == 7){iShiftCL = ALIGNMENT_LAWFUL;iShiftGE = ALIGNMENT_EVIL;}
|
|
if (iShift == 8){iShiftCL = ALIGNMENT_CHAOTIC;iShiftGE = ALIGNMENT_GOOD;}
|
|
if (iShift == 9){iShiftCL = ALIGNMENT_CHAOTIC;iShiftGE = ALIGNMENT_EVIL;}
|
|
// Perform desired alignment shift
|
|
if (iShiftCL!=0){AdjustAlignment(oPC,iShiftCL,iAmountCL);}
|
|
if (iShiftGE!=0){AdjustAlignment(oPC,iShiftGE,iAmountGE);}
|
|
if (iShiftN!=0){AdjustAlignment(oPC,iShiftN,iAmountN);}
|
|
}
|