// This is called on module heartbeat for all PCs. // If a PC's current HP is less than or equal to 30% of their max HP, // a blood placeable is left behind at their position. After 12 seconds, the blood disappears void main() { object oPC = OBJECT_SELF; object oArea = GetArea(oPC); string sTag = GetTag(oArea); if(GetIsDead(oPC) || sTag == "ooc_entry" || sTag == "WelcometoHeaven" || sTag == "WelcometoHell" || sTag == "WelcometoLimbo") return; int iCurrentHP = GetCurrentHitPoints(oPC); int iMaxHP = GetMaxHitPoints(oPC); location lLocation = GetLocation(oPC); if(iCurrentHP <= FloatToInt(iMaxHP * 0.3)) { object oBlood = CreateObject(OBJECT_TYPE_PLACEABLE, "zep_bloodstain7", lLocation); DestroyObject(oBlood, 48.0); } }