Battledale_PRC8/_module/nss/jw_mosbraz_use.nss
Jaysyn904 7b9e44ebbb Initial upload
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.
2024-03-11 23:44:08 -04:00

38 lines
1.1 KiB
Plaintext

void main()
{
if (GetLocalInt(OBJECT_SELF,"NW_L_AMION")==1)
{
return;
}
object oPC=GetLastUsedBy();
object oLeft=GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
object oRight=GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
if ((GetBaseItemType(oLeft)!=BASE_ITEM_TORCH)&&(GetBaseItemType(oRight)!=BASE_ITEM_TORCH))
{
return;
}
else
{
effect eFire=EffectVisualEffect(VFX_FNF_FIREBALL);
DelayCommand(0.4,ApplyEffectToObject(DURATION_TYPE_INSTANT,eFire,OBJECT_SELF));
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
SetLocalInt(OBJECT_SELF,"NW_L_AMION",1);
object oOtherBrazier=GetNearestObjectByTag("jw_mos_braz",OBJECT_SELF,1);
if (GetLocalInt(oOtherBrazier,"NW_L_AMION")==1)
{
object oDoor=GetObjectByTag("jw_moseley_door");
AssignCommand(oDoor,SetLocked(oDoor,FALSE));
AssignCommand(oDoor,ActionOpenDoor(oDoor));
PlaySound("as_cv_brickscrp1");
}
DelayCommand(0.4,SetPlaceableIllumination(OBJECT_SELF, TRUE));
DelayCommand(0.5,RecomputeStaticLighting(GetArea(OBJECT_SELF)));
}
}