The New Death System... in progress
Posted: Thu Aug 01, 2002 1:02 am
Avlis include file:
///////////////////////
////avlis_include
//// by Josh Simon & Adam Colon
//// This file contains Avlis specific functions and variables.
///////////////////////
// July 4th, 2002
//////////////////////
// Gets PC alignment and sends them to the appropriate plane.
object oDeadPC;
object oDeathArea;
location lDiedHere;
object oContainer;
int nDestroyOriginal;
object oItemCopy;
object oDeathCorpse;
int PLAYER_STATE_ALIVE = 0;
int PLAYER_STATE_STABLE = 1;
int PLAYER_STATE_DISABLED = 2;
int PLAYER_STATE_DYING = 3;
void GoToPlaneOfAlignment()
{
// Determine Good/Evil and Law/Chaos values of PC's Alignment.
int nAlignmentGoodEvil = GetGoodEvilValue(oDeadPC);
int nAlignmentLawChaos = GetLawChaosValue(oDeadPC);
string sLawChaos = IntToString(nAlignmentLawChaos);
string sGoodEvil = IntToString(nAlignmentGoodEvil);
SendMessageToPC(oDeadPC, "L/C: "+sLawChaos); // Tell PC what align is
SendMessageToPC(oDeadPC, "G/E: "+sGoodEvil);
// Apply a set of rules that govern where the PC goes depending on their
// alignment values.
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >= 80)
// Send PC to Seven Heavens
{
location lSevenHeavens = GetLocation(GetObjectByTag("WP_LGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lSevenHeavens)));
SetLocalLocation(oDeadPC, "My Death Plane", lSevenHeavens);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=60 && nAlignmentLawChaos <= 79)
// Send PC to Bytopia
{
location lBytopia = GetLocation(GetObjectByTag("WP_LGNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lBytopia)));
SetLocalLocation(oDeadPC, "My Death Plane", lBytopia);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=40 && nAlignmentLawChaos <= 59)
// Send PC to Elysium
{
location lElysium = GetLocation(GetObjectByTag("WP_NGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lElysium)));
SetLocalLocation(oDeadPC, "My Death Plane", lElysium);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=20 && nAlignmentLawChaos <= 39)
// Send PC to Beastlands
{
location lBeastlands = GetLocation(GetObjectByTag("WP_NGCDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lBeastlands)));
SetLocalLocation(oDeadPC, "My Death Plane", lBeastlands);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos <=19)
// Send PC to Arborea
{
location lArborea = GetLocation(GetObjectByTag("WP_CGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lArborea)));
SetLocalLocation(oDeadPC, "My Death Plane", lArborea);
return;
}
if (nAlignmentGoodEvil >= 31 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
// Send PC to Ysgard
{
location lYsgard = GetLocation(GetObjectByTag("WP_CGNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lYsgard)));
SetLocalLocation(oDeadPC, "My Death Plane", lYsgard);
return;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <=60 && nAlignmentLawChaos <= 39)
// Send PC to Limbo
{
location lLimbo = GetLocation(GetObjectByTag("WP_CNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lLimbo)));
SetLocalLocation(oDeadPC, "My Death Plane", lLimbo);
return;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
// Send PC to Pandemonium
{
location lPandemonium = GetLocation(GetObjectByTag("WP_CNEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lPandemonium)));
SetLocalLocation(oDeadPC, "My Death Plane", lPandemonium);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos <= 19)
// Send PC to The Abyss
{
location lAbyss = GetLocation(GetObjectByTag("WP_CEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lAbyss)));
SetLocalLocation(oDeadPC, "My Death Plane", lAbyss);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 20 && nAlignmentLawChaos <=39)
// Send PC to Tarterus
{
location lTarterus = GetLocation(GetObjectByTag("WP_CENDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lTarterus)));
SetLocalLocation(oDeadPC, "My Death Plane", lTarterus);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
// Send PC to Hades
{
location lHades = GetLocation(GetObjectByTag("WP_NEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lHades)));
SetLocalLocation(oDeadPC, "My Death Plane", lHades);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 60 && nAlignmentLawChaos <=79)
// Send PC to Gehenna
{
location lGehenna = GetLocation(GetObjectByTag("WP_NELDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lGehenna)));
SetLocalLocation(oDeadPC, "My Death Plane", lGehenna);
return;
}
if (nAlignmentGoodEvil <= 20 && nAlignmentLawChaos >=80)
// Send PC to Baator
{
location lBaator = GetLocation(GetObjectByTag("WP_LEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lBaator)));
SetLocalLocation(oDeadPC, "My Death Plane", lBaator);
return;
}
if (nAlignmentGoodEvil >= 21 && nAlignmentGoodEvil <= 40 && nAlignmentLawChaos >=61)
// Send PC to Acheron
{
location lAcheron = GetLocation(GetObjectByTag("WP_LNEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lAcheron)));
SetLocalLocation(oDeadPC, "My Death Plane", lAcheron);
return;
}
if (nAlignmentGoodEvil >= 61 && nAlignmentGoodEvil <= 69 && nAlignmentLawChaos >=61)
// Send PC to Arcadia
{
location lArcadia = GetLocation(GetObjectByTag("WP_LNGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lArcadia)));
SetLocalLocation(oDeadPC, "My Death Plane", lArcadia);
return;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <= 60 && nAlignmentLawChaos >=61)
// Send PC to Mechanus
{
location lMechanus = GetLocation(GetObjectByTag("WP_LNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lMechanus)));
SetLocalLocation(oDeadPC, "My Death Plane", lMechanus);
return;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <= 70 &&
nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
// Send PC to Concordant Opposition
{
location lConcordantOpp = GetLocation(GetObjectByTag("WP_NDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lConcordantOpp)));
SetLocalLocation(oDeadPC, "My Death Plane", lConcordantOpp);
return;
}
return;
}
//Kill the target, forcing it to leave a corpse behind
//taken from Bioware's KillAndReplace()
void killandreplace()
{
SetPlotFlag(oDeadPC, FALSE);
AssignCommand(oDeadPC, SetIsDestroyable(FALSE, FALSE));
AssignCommand(oDeadPC, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDeadPC));
}
// Copy item in a player's inventory and give it to the corpse.
void CopyItem(object oItem, object oRecipient, int nDestroyOriginal)
{
int iNumberInStack = GetNumStackedItems(oItem);
oItemCopy = CreateItemOnObject(GetTag(oItem), oRecipient, iNumberInStack);
if (GetIdentified(oItem) == TRUE){
SetIdentified(oItemCopy, TRUE);
}
if (nDestroyOriginal == TRUE)
DestroyObject(oItem);
return;
}
// Function to make player unequip and destroy items called from the main()
// function(thanks Jhenne)
void strip_equiped(object oPlayer, object oEquip)
{
if(GetIsObjectValid(oEquip))
AssignCommand(oPlayer, ActionUnequipItem(oEquip));
DestroyObject(oEquip);
}
location GetDeathPlaneLocation(object oPlayer)
{
// Determine Good/Evil and Law/Chaos values of PC's Alignment.
location lDeathLocation;
int nAlignmentGoodEvil = GetGoodEvilValue(oDeadPC);
int nAlignmentLawChaos = GetLawChaosValue(oDeadPC);
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >= 80)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=60 && nAlignmentLawChaos <= 79)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LGNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=40 && nAlignmentLawChaos <= 59)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=20 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NGCDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos <=19)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 31 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CGNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <=60 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CNEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos <= 19)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 20 && nAlignmentLawChaos <=39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CENDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 60 && nAlignmentLawChaos <=79)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NELDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 20 && nAlignmentLawChaos >=80)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 21 && nAlignmentGoodEvil <= 40 && nAlignmentLawChaos >=61)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LNEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 61 && nAlignmentGoodEvil <= 69 && nAlignmentLawChaos >=61)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LNGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <= 60 && nAlignmentLawChaos >=61)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <= 70 &&
nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NDEAD"));
return lDeathLocation;
}
return lDeathLocation;
}
///////////////////////
////avlis_include
//// by Josh Simon & Adam Colon
//// This file contains Avlis specific functions and variables.
///////////////////////
// July 4th, 2002
//////////////////////
// Gets PC alignment and sends them to the appropriate plane.
object oDeadPC;
object oDeathArea;
location lDiedHere;
object oContainer;
int nDestroyOriginal;
object oItemCopy;
object oDeathCorpse;
int PLAYER_STATE_ALIVE = 0;
int PLAYER_STATE_STABLE = 1;
int PLAYER_STATE_DISABLED = 2;
int PLAYER_STATE_DYING = 3;
void GoToPlaneOfAlignment()
{
// Determine Good/Evil and Law/Chaos values of PC's Alignment.
int nAlignmentGoodEvil = GetGoodEvilValue(oDeadPC);
int nAlignmentLawChaos = GetLawChaosValue(oDeadPC);
string sLawChaos = IntToString(nAlignmentLawChaos);
string sGoodEvil = IntToString(nAlignmentGoodEvil);
SendMessageToPC(oDeadPC, "L/C: "+sLawChaos); // Tell PC what align is
SendMessageToPC(oDeadPC, "G/E: "+sGoodEvil);
// Apply a set of rules that govern where the PC goes depending on their
// alignment values.
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >= 80)
// Send PC to Seven Heavens
{
location lSevenHeavens = GetLocation(GetObjectByTag("WP_LGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lSevenHeavens)));
SetLocalLocation(oDeadPC, "My Death Plane", lSevenHeavens);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=60 && nAlignmentLawChaos <= 79)
// Send PC to Bytopia
{
location lBytopia = GetLocation(GetObjectByTag("WP_LGNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lBytopia)));
SetLocalLocation(oDeadPC, "My Death Plane", lBytopia);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=40 && nAlignmentLawChaos <= 59)
// Send PC to Elysium
{
location lElysium = GetLocation(GetObjectByTag("WP_NGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lElysium)));
SetLocalLocation(oDeadPC, "My Death Plane", lElysium);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=20 && nAlignmentLawChaos <= 39)
// Send PC to Beastlands
{
location lBeastlands = GetLocation(GetObjectByTag("WP_NGCDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lBeastlands)));
SetLocalLocation(oDeadPC, "My Death Plane", lBeastlands);
return;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos <=19)
// Send PC to Arborea
{
location lArborea = GetLocation(GetObjectByTag("WP_CGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lArborea)));
SetLocalLocation(oDeadPC, "My Death Plane", lArborea);
return;
}
if (nAlignmentGoodEvil >= 31 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
// Send PC to Ysgard
{
location lYsgard = GetLocation(GetObjectByTag("WP_CGNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lYsgard)));
SetLocalLocation(oDeadPC, "My Death Plane", lYsgard);
return;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <=60 && nAlignmentLawChaos <= 39)
// Send PC to Limbo
{
location lLimbo = GetLocation(GetObjectByTag("WP_CNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lLimbo)));
SetLocalLocation(oDeadPC, "My Death Plane", lLimbo);
return;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
// Send PC to Pandemonium
{
location lPandemonium = GetLocation(GetObjectByTag("WP_CNEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lPandemonium)));
SetLocalLocation(oDeadPC, "My Death Plane", lPandemonium);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos <= 19)
// Send PC to The Abyss
{
location lAbyss = GetLocation(GetObjectByTag("WP_CEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lAbyss)));
SetLocalLocation(oDeadPC, "My Death Plane", lAbyss);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 20 && nAlignmentLawChaos <=39)
// Send PC to Tarterus
{
location lTarterus = GetLocation(GetObjectByTag("WP_CENDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lTarterus)));
SetLocalLocation(oDeadPC, "My Death Plane", lTarterus);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
// Send PC to Hades
{
location lHades = GetLocation(GetObjectByTag("WP_NEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lHades)));
SetLocalLocation(oDeadPC, "My Death Plane", lHades);
return;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 60 && nAlignmentLawChaos <=79)
// Send PC to Gehenna
{
location lGehenna = GetLocation(GetObjectByTag("WP_NELDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lGehenna)));
SetLocalLocation(oDeadPC, "My Death Plane", lGehenna);
return;
}
if (nAlignmentGoodEvil <= 20 && nAlignmentLawChaos >=80)
// Send PC to Baator
{
location lBaator = GetLocation(GetObjectByTag("WP_LEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lBaator)));
SetLocalLocation(oDeadPC, "My Death Plane", lBaator);
return;
}
if (nAlignmentGoodEvil >= 21 && nAlignmentGoodEvil <= 40 && nAlignmentLawChaos >=61)
// Send PC to Acheron
{
location lAcheron = GetLocation(GetObjectByTag("WP_LNEDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lAcheron)));
SetLocalLocation(oDeadPC, "My Death Plane", lAcheron);
return;
}
if (nAlignmentGoodEvil >= 61 && nAlignmentGoodEvil <= 69 && nAlignmentLawChaos >=61)
// Send PC to Arcadia
{
location lArcadia = GetLocation(GetObjectByTag("WP_LNGDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lArcadia)));
SetLocalLocation(oDeadPC, "My Death Plane", lArcadia);
return;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <= 60 && nAlignmentLawChaos >=61)
// Send PC to Mechanus
{
location lMechanus = GetLocation(GetObjectByTag("WP_LNDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lMechanus)));
SetLocalLocation(oDeadPC, "My Death Plane", lMechanus);
return;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <= 70 &&
nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
// Send PC to Concordant Opposition
{
location lConcordantOpp = GetLocation(GetObjectByTag("WP_NDEAD"));
AssignCommand(oDeadPC, DelayCommand(0.5,ActionJumpToLocation(lConcordantOpp)));
SetLocalLocation(oDeadPC, "My Death Plane", lConcordantOpp);
return;
}
return;
}
//Kill the target, forcing it to leave a corpse behind
//taken from Bioware's KillAndReplace()
void killandreplace()
{
SetPlotFlag(oDeadPC, FALSE);
AssignCommand(oDeadPC, SetIsDestroyable(FALSE, FALSE));
AssignCommand(oDeadPC, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDeadPC));
}
// Copy item in a player's inventory and give it to the corpse.
void CopyItem(object oItem, object oRecipient, int nDestroyOriginal)
{
int iNumberInStack = GetNumStackedItems(oItem);
oItemCopy = CreateItemOnObject(GetTag(oItem), oRecipient, iNumberInStack);
if (GetIdentified(oItem) == TRUE){
SetIdentified(oItemCopy, TRUE);
}
if (nDestroyOriginal == TRUE)
DestroyObject(oItem);
return;
}
// Function to make player unequip and destroy items called from the main()
// function(thanks Jhenne)
void strip_equiped(object oPlayer, object oEquip)
{
if(GetIsObjectValid(oEquip))
AssignCommand(oPlayer, ActionUnequipItem(oEquip));
DestroyObject(oEquip);
}
location GetDeathPlaneLocation(object oPlayer)
{
// Determine Good/Evil and Law/Chaos values of PC's Alignment.
location lDeathLocation;
int nAlignmentGoodEvil = GetGoodEvilValue(oDeadPC);
int nAlignmentLawChaos = GetLawChaosValue(oDeadPC);
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >= 80)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=60 && nAlignmentLawChaos <= 79)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LGNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=40 && nAlignmentLawChaos <= 59)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos >=20 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NGCDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 70 && nAlignmentLawChaos <=19)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 31 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CGNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <=60 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <=40 && nAlignmentLawChaos <= 39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CNEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos <= 19)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 20 && nAlignmentLawChaos <=39)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_CENDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 31 && nAlignmentLawChaos >= 60 && nAlignmentLawChaos <=79)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NELDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil <= 20 && nAlignmentLawChaos >=80)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 21 && nAlignmentGoodEvil <= 40 && nAlignmentLawChaos >=61)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LNEDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 61 && nAlignmentGoodEvil <= 69 && nAlignmentLawChaos >=61)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LNGDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 41 && nAlignmentGoodEvil <= 60 && nAlignmentLawChaos >=61)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_LNDEAD"));
return lDeathLocation;
}
if (nAlignmentGoodEvil >= 30 && nAlignmentGoodEvil <= 70 &&
nAlignmentLawChaos >= 40 && nAlignmentLawChaos <=59)
{
lDeathLocation = GetLocation(GetObjectByTag("WP_NDEAD"));
return lDeathLocation;
}
return lDeathLocation;
}