Rune_PRC8/_module/nss/curseschestonope.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

67 lines
1.3 KiB
Plaintext

/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.5
For download info, please visit:
http://www.lilacsoul.revility.com */
#include "NW_O2_CONINCLUDE"
//Put this OnOpen
void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = oPC;
effect eEffect;
eEffect = EffectNegativeLevel(1);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
oTarget = oPC;
eEffect = EffectAbilityDecrease(ABILITY_STRENGTH, 1);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
oTarget = oPC;
eEffect = EffectAbilityDecrease(ABILITY_CONSTITUTION, 1);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
oTarget = oPC;
eEffect = EffectAbilityDecrease(ABILITY_DEXTERITY, 0);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
oTarget = oPC;
eEffect = EffectAttackDecrease(5);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
//Spawn treasure
float fDelay = 1800.0;
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
return;
}
object oLastOpener = GetLastOpener();
//Some gold
CreateItemOnObject("nw_it_gold001", OBJECT_SELF,2000);
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
DelayCommand(fDelay,SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0));
ShoutDisturbed();
}