Amon_PRC8/_module/nss/murder_fine.nss

27 lines
799 B
Plaintext
Raw Permalink Normal View History

2025-04-03 19:00:46 -04:00
//MURDER
void main()
{
object oPC = GetLastKiller();
int nLvlPC = 100 * (GetHitDice(oPC));
string sPCName = GetName(oPC);
string sFine = "Has been fined for killing an innocent person";
FloatingTextStringOnCreature(sPCName + " " + sFine, oPC);
//TakeGoldFromCreature(nLvlPC, oPC);
AssignCommand(oPC, TakeGoldFromCreature(nLvlPC, oPC, TRUE));
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
// If we're a good/neutral commoner,
// adjust the killer's alignment evil
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
{
object oKiller = GetLastKiller();
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
ExecuteScript("prc_npc_death", OBJECT_SELF);
}