Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
#include "ah_penta_inc"
|
|
void main()
|
|
{
|
|
object oPC=GetLastUsedBy();
|
|
|
|
// Inspect local variables
|
|
if((GetLocalInt(oPC, "ah_GotBlood") == 1))
|
|
{
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_REG_RED),OBJECT_SELF));
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_LRG_RED),OBJECT_SELF));
|
|
}
|
|
else
|
|
{
|
|
|
|
int nCurrentHour = (GetCalendarYear()-1)*12*28*24 +
|
|
(GetCalendarMonth()-1)*28*24 +
|
|
(GetCalendarDay()-1)*24 +
|
|
GetTimeHour();
|
|
int nLastSpawnHour = GetLocalInt(OBJECT_SELF,"LAST_SPAWN_HOUR");
|
|
int nSpawnDelay = 1;
|
|
if (nCurrentHour > (nLastSpawnHour + nSpawnDelay))
|
|
{
|
|
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0);
|
|
}
|
|
|
|
//return if time has not passed yet
|
|
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
|
|
{
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_REG_RED),OBJECT_SELF));
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_COM_BLOOD_LRG_RED),OBJECT_SELF));
|
|
return;
|
|
}
|
|
location loc = GetLocation(OBJECT_SELF);
|
|
pentagram(loc);
|
|
ActionSpeakString("The time of her coming is nigh; the blood of the innocent spilled, drunk. She will rise once more and such terror will be unleashed in her wake..");
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_BLOOD_REG_RED),OBJECT_SELF));
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_SCREEN_SHAKE),OBJECT_SELF));
|
|
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_HEAD_EVIL),OBJECT_SELF));
|
|
// Set the variable to say that the PC has blood in their hands
|
|
SetLocalInt(oPC, "ah_GotBlood", 1);
|
|
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
|
|
SetLocalInt(OBJECT_SELF,"LAST_SPAWN_HOUR",nCurrentHour);
|
|
}
|
|
}
|
|
|