generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
45
_module/nss/buff_talk.nss
Normal file
45
_module/nss/buff_talk.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "nw_i0_generic"
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 1.6
|
||||
|
||||
For download info, please visit:
|
||||
http://www.lilacsoul.revility.com */
|
||||
|
||||
//Put this OnUsed
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
if (!GetIsPC(oPC)) return;
|
||||
object oTarget;
|
||||
object oMod = GetModule();
|
||||
object oCrystal1 = GetObjectByTag("crystal1");
|
||||
object oCrystal2 = GetObjectByTag("crystal2");
|
||||
object oCrystal3 = GetObjectByTag("crystal3");
|
||||
int lState = GetLocalInt(oMod, "lever_state");
|
||||
if (lState!=1)
|
||||
{
|
||||
DelayCommand(0.0, PlaySound("sce_positive"));
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature("Power Crystals activated", oPC));
|
||||
//ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||||
DelayCommand(1.0, AssignCommand(oCrystal1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
||||
DelayCommand(1.0, AssignCommand(oCrystal2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
||||
DelayCommand(1.0, AssignCommand(oCrystal3, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
||||
SetLocalInt(oMod, "lever_state", 1);
|
||||
RecomputeStaticLighting(GetArea(OBJECT_SELF));
|
||||
}
|
||||
else
|
||||
{
|
||||
//ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
DelayCommand(0.0, PlaySound("sce_negative"));
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature("Power Crystals deactivated", oPC));
|
||||
DelayCommand(1.0, AssignCommand(oCrystal1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
||||
DelayCommand(1.0, AssignCommand(oCrystal2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
||||
DelayCommand(1.0, AssignCommand(oCrystal3, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
||||
SetLocalInt(oMod, "lever_state", 0);
|
||||
RecomputeStaticLighting(GetArea(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user