WoR_PRC8/_module/nss/are_enter_slow.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

36 lines
689 B
Plaintext

#include "x2_inc_itemprop"
#include "prc_inc_racial"
effect eEffect;
object oTarget;
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetRacialType(oPC) == RACIAL_TYPE_MEPHLING_WATER ||
GetRacialType(oPC) == RACIAL_TYPE_WATER_GEN)
{ return; }
if (IPGetHasItemPropertyOnCharacter(oPC, ITEM_PROPERTY_FREEDOM_OF_MOVEMENT))
{ return; }
if (GetLocalInt(oPC, "Slowdown")== 100)
{ return; }
else
{
oTarget = oPC;
eEffect = EffectMovementSpeedDecrease(50);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
SetLocalInt(oPC, "Slowdown", 100);
}
}