Aschbourne_PRC8/_module/nss/_cb_heartbeat.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

110 lines
3.9 KiB
Plaintext

#include "_cb_core"
void main()
{
object cbObject = GetFirstPC();
int cbPCrace = GetRacialType(cbObject);
string cbPCsubrace = GetStringUpperCase(GetSubRace(cbObject));
while(cbObject != OBJECT_INVALID)
{
if(!GetIsDM(cbObject))
{
//in the orginal heartbeat i had a ECL adjustment script here but
//i figured out a better methoid i think so i'm moving it there.
if(GetIsDay() || GetIsDawn())
{
if(cbPCrace == RACIAL_TYPE_DWARF)
{
if((TestStringAgainstPattern("**GRAY**", cbPCsubrace)) ||
(TestStringAgainstPattern("**DUERGAR**", cbPCsubrace)))
{
if(GetLocalInt(cbObject, "CB_DAYNIGHT") != 1)
{
attack(2, 3, cbObject, FALSE);
savingthrow(4, 2, 21, cbObject, FALSE);
skills(2, 21, cbObject, FALSE);
SetLocalInt(cbObject, "CB_DAYNIGHT", 1);
}
}
}
if(cbPCrace == RACIAL_TYPE_ELF)
{
if((TestStringAgainstPattern("**DROW**", cbPCsubrace)) ||
(TestStringAgainstPattern("**DARK**", cbPCsubrace)))
{
if(GetLocalInt(cbObject, "CB_DAYNIGHT") != 1)
{
attack(1, 3, cbObject, FALSE);
savingthrow(4, 1, 21, cbObject, FALSE);
skills(1, 21, cbObject, FALSE);
//the blinding is wrong its goign to be temponary but it should only be 1 round and
//if certain bright spells are cast the drow should go blind for a round so need to
//work on this, Right now i'll just have drow going blind when its first become bright.
//but later i'll alter this and all of the bright light spell like daylight for example.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,SupernaturalEffect(EffectBlindness()), cbObject, 6.0);
SetLocalInt(cbObject, "CB_DAYNIGHT", 1);
}
}
}
if(cbPCrace == RACIAL_TYPE_GNOME)
{
if((TestStringAgainstPattern("**DEEP**", cbPCsubrace)) ||
(TestStringAgainstPattern("**SVIRFNEBLIN**", cbPCsubrace)))
{
if(GetLocalInt(cbObject, "CB_DAYNIGHT") != 1)
{
skills(2, 6, cbObject, FALSE);
SetLocalInt(cbObject, "CB_DAYNIGHT", 1);
}
}
}
}
if(GetIsNight() || GetIsDusk())
{
if(cbPCrace == RACIAL_TYPE_DWARF)
{
if((TestStringAgainstPattern("**GRAY**", cbPCsubrace)) ||
(TestStringAgainstPattern("**DUERGAR**", cbPCsubrace)))
{
if(GetLocalInt(cbObject, "CB_DAYNIGHT") != 0)
{
attack(2, 3, cbObject);
savingthrow(4, 2, 21, cbObject);
skills(2, 21, cbObject);
SetLocalInt(cbObject, "CB_DAYNIGHT", 0);
}
}
}
if(cbPCrace == RACIAL_TYPE_ELF)
{
if((TestStringAgainstPattern("**DROW**", cbPCsubrace)) || (TestStringAgainstPattern("**DARK**", cbPCsubrace)))
{
if(GetLocalInt(cbObject, "CB_DAYNIGHT") != 0)
{
attack(1, 3, cbObject);
savingthrow(4, 1, 21, cbObject);
skills(1, 21, cbObject);
SetLocalInt(cbObject, "CB_DAYNIGHT", 0);
}
}
}
if(cbPCrace == RACIAL_TYPE_GNOME)
{
if((TestStringAgainstPattern("**DEEP**", cbPCsubrace)) || (TestStringAgainstPattern("**SVIRFNEBLIN**", cbPCsubrace)))
{
if(GetLocalInt(cbObject, "CB_DAYNIGHT") != 0)
{
skills(2, 6, cbObject);
SetLocalInt(cbObject, "CB_DAYNIGHT", 0);
}
}
}
}
}
cbObject = GetNextPC();
cbPCrace = GetRacialType(cbObject);
cbPCsubrace = GetStringUpperCase(GetSubRace(cbObject));
}
}