27 lines
799 B
Plaintext
27 lines
799 B
Plaintext
|
//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);
|
||
|
}
|
||
|
|
||
|
|