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.
96 lines
5.0 KiB
Plaintext
96 lines
5.0 KiB
Plaintext
void main()
|
|
{
|
|
int iSX = 0;
|
|
string sText = "[The Portal needs time to recharge.]";
|
|
float fSpeed=1.0;
|
|
location llocation = GetLocation(GetObjectByTag("fr_iwd_gw_portal_locb"));
|
|
object oTarget = GetObjectByTag("fr_iwd_gw_portal_invb");
|
|
object oPC = GetLastUsedBy();
|
|
|
|
if((GetLocalInt(oTarget, "Chk")==0) && (GetItemPossessedBy(oPC, "NW_IT_GEM003") != OBJECT_INVALID))
|
|
{
|
|
SetLocalInt(oTarget,"Chk", 1);
|
|
object oGem = GetItemPossessedBy(oPC, "NW_IT_GEM003");
|
|
|
|
if(GetItemStackSize(oGem)==1){
|
|
DestroyObject(oGem);
|
|
}
|
|
else{
|
|
SetItemStackSize(oGem, GetItemStackSize(oGem) - 1);
|
|
}
|
|
|
|
AssignCommand(OBJECT_SELF, DelayCommand(0.2,ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
|
|
|
object oPillar1=GetObjectByTag("fr_gway_inv_iwd01b");
|
|
object oPillar2=GetObjectByTag("fr_gway_inv_iwd02b");
|
|
object oPillar3=GetObjectByTag("fr_gway_inv_iwd03b");
|
|
object oPillar4=GetObjectByTag("fr_gway_inv_iwd04b");
|
|
object oPillar5=GetObjectByTag("fr_gway_inv_iwd05b");
|
|
object oPillar6=GetObjectByTag("fr_gway_inv_iwd06b");
|
|
|
|
effect eBeam1 = EffectBeam(VFX_BEAM_FIRE_W, oPillar1, BODY_NODE_CHEST);
|
|
effect eBeam2 = EffectBeam(VFX_BEAM_FIRE_W, oPillar2, BODY_NODE_CHEST);
|
|
effect eBeam3 = EffectBeam(VFX_BEAM_FIRE_W, oPillar3, BODY_NODE_CHEST);
|
|
effect eBeam4 = EffectBeam(VFX_BEAM_FIRE_W, oPillar4, BODY_NODE_CHEST);
|
|
effect eBeam5 = EffectBeam(VFX_BEAM_FIRE_W, oPillar5, BODY_NODE_CHEST);
|
|
effect eBeam6 = EffectBeam(VFX_BEAM_FIRE_W, oPillar6, BODY_NODE_CHEST);
|
|
|
|
effect eFlame1 = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_FIRE, FALSE);
|
|
effect eFlame2 = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_FIRE, FALSE);
|
|
effect eFlame3 = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_FIRE, FALSE);
|
|
effect eFlame4 = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_FIRE, FALSE);
|
|
effect eFlame5 = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_FIRE, FALSE);
|
|
effect eFlame6 = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_FIRE, FALSE);
|
|
|
|
effect eBoom = EffectVisualEffect(VFX_IMP_PULSE_FIRE , FALSE);
|
|
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_20 , FALSE);
|
|
|
|
//flames on top of the spikes
|
|
DelayCommand(0.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFlame1, oPillar1, 20.0));
|
|
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFlame2, oPillar2, 20.0));
|
|
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFlame3, oPillar3, 20.0));
|
|
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFlame4, oPillar4, 20.0));
|
|
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFlame5, oPillar5, 20.0));
|
|
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFlame6, oPillar6, 20.0));
|
|
|
|
//triangle to form a star
|
|
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam1, oPillar2, 15.0));
|
|
DelayCommand(1.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam2, oPillar3, 15.0));
|
|
DelayCommand(2.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam3, oPillar4, 15.0));
|
|
|
|
DelayCommand(3.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam4, oPillar5, 15.0));
|
|
DelayCommand(4.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam5, oPillar6, 15.0));
|
|
DelayCommand(5.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam6, oPillar1, 15.0));
|
|
|
|
DelayCommand(5.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam1, oTarget, 10.0));
|
|
DelayCommand(6.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam2, oTarget, 10.0));
|
|
DelayCommand(7.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam3, oTarget, 10.0));
|
|
DelayCommand(8.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam4, oTarget, 10.0));
|
|
DelayCommand(9.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam5, oTarget, 10.0));
|
|
DelayCommand(10.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam6, oTarget, 10.0));
|
|
|
|
//open portal
|
|
DelayCommand(14.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBoom, oTarget, 5.0));
|
|
DelayCommand(14.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLight, oTarget, 55.0));
|
|
DelayCommand(14.0, ActionInteractObject(CreateObject(OBJECT_TYPE_PLACEABLE, "fr_iwd_gw_p02b", llocation, TRUE)));
|
|
DelayCommand(14.0, PlaySound("as_mg_telepin1"));
|
|
DelayCommand(16.0, SoundObjectPlay(GetNearestObjectByTag("fr_iwd_uzsnd")));
|
|
|
|
|
|
effect eEND = EffectVisualEffect(VFX_IMP_PULSE_HOLY_SILENT, FALSE);
|
|
|
|
//close portal
|
|
DelayCommand(68.0, SetPlotFlag(GetObjectByTag("fr_iwd_gw_p02b"), FALSE));
|
|
DelayCommand(69.0, DestroyObject(GetObjectByTag("fr_iwd_gw_p02b")));
|
|
DelayCommand(69.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEND, oTarget, 5.0));
|
|
DelayCommand(68.0, SoundObjectStop(GetNearestObjectByTag("fr_iwd_uzsnd")));
|
|
DelayCommand(69.0, PlaySound("as_mg_telepout1"));
|
|
DelayCommand(69.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBoom, oTarget, 5.0));
|
|
AssignCommand(OBJECT_SELF, DelayCommand(69.0,ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
|
DelayCommand(70.0, SetLocalInt(oTarget,"Chk", 0));
|
|
}
|
|
else
|
|
ActionSpeakString(sText, TALKVOLUME_TALK);
|
|
|
|
}
|