Trending Games
Release Countdowns
Florida Man Death Clocks Funko PoP!


The Elder Scrolls IV: Oblivion® Game of the Year Edition



2,393 Results
For SCPT:SCTX

NumberEDIDText
1ActRockGreatForest01SCRIPTscn ActRockGreatForest01SCRIPT short activated begin onActivate if isActionRef player == 0 && activated == 1 disableLinkedPathPoints set activated to 1 endif end
2AichanTRAPStatueHunger01TargetSCRIPTscn AichanTRAPStatueHunger01TargetSCRIPT ; When activated will shoot custom Damage Health spell at parent-linked ref ; A trigger parent-links to this statue and the statue then parent-links to a target ref (such as an X Marker) ; ; NOTE - This version will NOT daisy-chain to another activator ; ; Scaled-down version that can be used in groups & that will hopefully not slaughter the player instantly. ; ;Casts TRAPDamageHealthTarget02 from level 12 and up ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 set mySelf to getSelf set myParent to getParentRef ; Leveled spell casting, tops out at lvl 21+ if player.GetLevel <= 10 cast TRAPDamageHealthTarget01 myParent elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget02 myParent elseif ( player.GetLevel >= 21) cast TRAPDamageHealthTarget02 myParent endif endif end
3AloysBincalScriptscn AloysBincalScript ; QUESTS ; MS46 short talked begin gamemode if talked == 0 && getdistance player < 1000 startconversation calliabincalref MS46AloysStart set talked to 1 endif end
4AmuletofKingsSCRIPTscn AmuletofKingsSCRIPT ref tempRef begin OnEquip player MessageBox "The Amulet of Kings slips off as you try to fasten it around your neck." set tempRef to GetContainer tempRef.unequipitem AmuletofKings 1 end
5AncontarScriptscn AncontarScript ; QUESTS: ; MS47 float timer short count begin OnDeath if getstagedone ms47 42 == 0 additem MS47ReverseInvisibilityScroll 1 elseif player.getitemcount MS47ReverseInvisibilityScroll == 0 && getstage MS47 < 50 setstage MS47 70 endif end begin gamemode if timer > 0 set timer to timer - getsecondspassed else if getstage ms47 == 20 && count < 3 if count < 2 && getdistance player < 1000 ; message "DEBUG: MS47 Ancotar speaking, count=%.0f", count set timer to sayto player GREETING set timer to timer + 20 ; 20 seconds between his speaking set count to count + 1 endif if count == 2 evaluatepackage endif endif endif end
6AngaTrigPressurePlate01SCRIPTscn AngaTrigPressurePlate01SCRIPT ; Activates trap linked as Parent short activated begin gameMode if activated == 0 if getDistance player < 64 playGroup forward 1 AngaSecretWall02REF.playgroup forward 0 set activated to 1 endif endif end
7AngaWallSwitch01SCRIPTscn AngaWallSwitch01SCRIPT short open begin onActivate if open == 0 playgroup forward 1 AngaSecretWall01REF.playgroup forward 0 set open to 1 endif end
8AnvilLighthouseActivatorscn AnvilLighthouseActivator begin OnActivate if IsActionRef player == 1 if AnvilLighthouseFire.GetDisabled == 0 AnvilLighthouseFire.disable else AnvilLighthouseFire.enable endif elseif IsActionRef UlfgarFogEyeRef == 1 ; message "DEBUG: Ulfgar activating lighthouse bowl" ; turn on if evening, turn off if morning if gamehour <= 12 AnvilLighthouseFire.disable else AnvilLighthouseFire.enable endif endif end
9AnvilNQDScriptscn AnvilNQDScript short maenlornVAR short WilburVAR short NorbertVAR short AzzanVAR short RhanoVAR short LlensiVAR short CarahilVAR short FelenVAR short MarcVAR short AndrusVAR short MirabelleVAR short HaulsVAR short HeinrichVAR short PinarusVAR short NewheimVAR short ArvenaVAR short QuillVAR short ClesaVAR short HuurwenVAR short VigdisVAR short RufriusVAR
10ArcaneUniversityTeleportSCRIPTscn ArcaneUniversityTeleportSCRIPT ref mySelf ref targetref begin onActivate set targetref to GetActionRef set mySelf to getSelf targetref.pms effectshockshield mySelf.pms effectshockshield activate end
11ARChainPlatform01SCRIPTscn ARChainPlatform01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short activated short lowered short next float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if lowered == 0 message " This gate is lowered remotely." endif elseif isActionRef mySelf == 0 if lowered == 0 playgroup forward 0 set lowered to 1 else playgroup backward 0 set lowered to 0 endif set next to 1 set timer to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set lowered to 0 end
12ARCrumbleWall01SCRIPTscn ARCrumbleWall01SCRIPT short init short activated float timer ref mySelf ref myParent begin onActivate if isActionRef player == 0 && activated == 0 && isActionRef mySelf == 0 myParent.activate mySelf 1 playgroup unequip 0 set activated to 1 set timer to 2 endif end begin gameMode if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif if activated == 1 && timer <= 0 triggerHitShader 5 set activated to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end
13ARCrumbleWall02SCRIPTscn ARCrumbleWall02SCRIPT short activated ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 0 && activated == 1 && isActionRef mySelf == 0 myParent.activate mySelf 1 playgroup unequip 0 set activated to 2 endif end begin onReset reset3DState set activated to 1 end
14ArenaTrapSpike01SCRIPTscn ArenaTrapSpike01SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if activated == 0 ; set up the damage values set fTrapDamage to 10 set fTrapPushBack to 128 set fTrapMinVelocity to 128 set bTrapContinuous to 0 set activated to 1 else trapUpdate endif end
15AREvilStonePulsar01SCRIPTscn AREvilStonePulsar01SCRIPT ; this is just a pulsating red stone, made for the dreamworld quest ; it isn't a trap, just decorative ; will light up when the player gets whithin range short activated float timer begin gameMode if getDistance player < 600 && activated == 0 playgroup forward 0 set activated to 1 set timer to 8 endif if timer <= 0 && activated == 1 playgroup forward 0 set timer to 8 endif if timer > 0 set timer to timer - getSecondsPassed endif end
16ARFloorSMASHER01SCRIPTscn ARFloorSMASHER01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short next float timer ref mySelf ref myParent begin onActivate if isActionRef mySelf == 0 && isActionRef player == 0 && timer <= 0 playgroup forward 0 set next to 1 set timer to 7 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef set init to 1 endif ; daisy-chain activation if next == 1 && timer <= 5 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
17ARGate01SCRIPTscn ARGate01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened remotely." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
18ARGateAUTOCLOSE01SCRIPTscn ARGateAUTOCLOSE01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay ; automatically closes after 4 sec delay short open short next float timer ref mySelf ref myParent begin onLoad ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints end begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 4 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <= 3 set next to 0 myParent.activate mySelf 1 endif if open == 1 && timer <= 0 set open to 0 playgroup backward 0 disableLinkedPathPoints endif if timer > 0 set timer to timer - getSecondsPassed endif end
19ARGateDelay01SCRIPTscn ARGateDelay01SCRIPT short init short activated short open float timer begin onActivate if isActionRef player == 1 message " This gate is opened elsewhere." else if open == 0 set timer to 3 set activated to 1 else playgroup backward 1 set open to 0 disableLinkedPathPoints endif endif end begin gameMode if init == 0 ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif if activated == 1 && timer <= 0 playgroup forward 1 set activated to 0 set open to 1 enableLinkedPathPoints endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 disableLinkedPathPoints end
20ARGatePREOPEN01SCRIPTscn ARGatePREOPEN01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short closed short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if closed == 1 message " This gate is opened remotely." endif elseif isActionRef mySelf == 0 && busy == 0 if closed == 0 playgroup forward 0 set closed to 1 disableLinkedPathPoints else playgroup backward 0 set closed to 0 enableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState enableLinkedPathPoints set closed to 0 set busy to 0 set next to 0 end
21ARPitStairs01SCRIPTscn ARPitStairs01SCRIPT ; on activation stairs go up, parent activated 1 sec later short init short busy short raised float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 && raised == 0 message "The stairs are raised remotely." elseif isActionRef player == 0 && raised == 0 && busy == 0 playgroup forward 0 set raised to 1 set timer to 1 set busy to 1 enableLinkedPathPoints elseif isActionRef player == 0 && raised == 2 && busy == 0 playgroup backward 0 set raised to 0 set timer to 1 set busy to 1 disableLinkedPathPoints endif end begin gameMode if init == 0 ; set up parent ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif if raised == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set raised to 2 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set raised to 0 set busy to 0 disableLinkedPathPoints end
22ARPitStairs03SCRIPTscn ARPitStairs03SCRIPT ; on activation stairs go down, parent activated 1 sec later short init short lowered float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 && lowered == 0 message "The stairs are lowered remotely." elseif isActionRef player == 0 && lowered == 0 playgroup forward 0 set lowered to 1 set timer to 1 disableLinkedPathPoints endif end begin gameMode if init == 0 ; set up parent ref vars set mySelf to getSelf set myParent to getParentRef set init to 1 endif if lowered == 1 && timer <= 0 myParent.activate mySelf 1 set lowered to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set lowered to 0 enableLinkedPathPoints end
23ARSecretWall01SCRIPTscn ARSecretWall01SCRIPT short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 0 && isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 1 set open to 0 disableLinkedPathPoints endif set next to 1 set busy to 1 set timer to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
24ARSecretWallFAST01SCRIPTscn ARSecretWallFAST01SCRIPT short init short busy short open short next float timer ref mySelf ref myParent begin onActivate if isActionRef player == 0 && isActionRef myself == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 1 set open to 0 disableLinkedPathPoints endif set next to 1 set busy to 1 set timer to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
25ARSwitch01SCRIPTscn ARSwitch01SCRIPT short busy ref target ref mySelf begin onActivate if busy == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set busy to 1 endif If Player.GetInCell SkingradCastleDungeon == 1 AnvilPrisonDoorRef.Lock BravilPrisonDoorRef.Lock BrumaPrisonDoorRef.Lock CheydinhalPrisonDoorRef.Lock ChorrolPrisonDoorRef.Lock ICPrisonDoorRef.Lock LeyawiinPrisonDoorRef.Lock SkingradPrisonDoorRef.Lock EndIf end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
26ARTallWallAnim01SCRIPTscn ARTallWallAnim01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 0 && isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up parent ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked path nodes disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
27ARTallWallCarvingAnim01SCRIPTscn ARTallWallCarvingAnim01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short open short next short busy float timer ref mySelf ref myParent begin onLoad ; set up parent ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked path nodes disableLinkedPathPoints end begin onActivate if isActionRef UmbacanoRef == 1 && busy == 0 if open == 0 ; animate to "show carving" playgroup forward 0 ; activate sliding steps myParent.activate mySelf 1 set open to 1 enableLinkedPathPoints endif set next to 1 ; set timer to 3 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 && open == 1 set next to 0 playgroup backward 0 set open to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 && open == 2 set busy to 0 setstage ms27 80 endif end
28ARTrapBridgeBlade01SCRIPTscn ARTrapBridgeBlade01SCRIPT ; Dropping blade for use on AR Pit Bridge sections. ; Set activated to 1 to start, it will continue dropping/lifting with 5 second intervals short activated short reset short nextTrap float timer ref target ref mySelf float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if activated == 0 && isActionRef player == 0 ; set up the damage values set fTrapDamage to 20 set fTrapPushBack to 500 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 playgroup forward 0 set activated to 1 set timer to 10 endif end begin gameMode if activated == 1 ; after first second of the sequence, the blade will stop dealing damage ; this is so the PC has a chance to jump over it if timer <= 9 && fTrapDamage > 0 set fTrapDamage to 0 set fTrapPushBack to 0 endif ; halfway through cycle, bring blade back up if timer <= 4 && reset == 0 playgroup backward 0 set reset to 1 endif ;set the next trap going if its linked as a parent if nextTrap == 0 && timer <= 8 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set nextTrap to 1 endif ;end of cycle, reset and bring blade down if timer <= 0 set fTrapDamage to 20 set fTrapPushBack to 500 playgroup forward 0 set timer to 10 set reset to 0 endif set timer to timer - getSecondsPassed endif end begin onReset reset3DState set activated to 0 end
29ARTrapBridgeBladeRANDOM01SCRIPTscn ARTrapBridgeBladeRANDOM01SCRIPT ; Dropping blade for use on AR Pit Bridge sections. ; Self-activated, starts at random time short start short reset float timer float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if start == 0 set timer to 1 + ( getRandomPercent / 3 ) ; set up the damage values set fTrapDamage to 20 set fTrapPushBack to 1000 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set start to 1 set reset to 1 endif ; halfway through the delay period, bring the blade back up if timer <= 5 && reset == 0 playgroup backward 0 set reset to 1 endif if timer <= 0 playgroup forward 0 set timer to 11 set reset to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif trapUpdate end
30ARTrapBridgeCrumble01SCRIPTscn ARTrapBridgeCrumble01SCRIPT short init short activated ref mySelf ref myParent begin onActivate if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef set init to 1 endif if isActionRef player == 0 && activated == 0 && isActionRef mySelf == 0 myParent.activate mySelf 1 playgroup unequip 0 triggerHitShader 4 set activated to 1 disableLinkedPathPoints endif end begin onReset reset3DState set activated to 0 end
31ARTrapChannelSpikes01SCRIPTscn ARTrapChannelSpikes01SCRIPT ; Flies down the channel, pause, return, pause, and continue the cycle short activated float timer short counter float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if activated == 0 && isActionRef player == 0 ; set up the damage values set fTrapDamage to 20 set fTrapPushBack to 1200 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 2 elseif isActionRef player == 0 set activated to 0 endif end begin gameMode if activated == 2 && timer <= 0 ; fly down the channel set activated to 3 set timer to 9 ; set counter to counter + 1 playgroup forward 0 elseif activated == 3 && timer <= 0 ; return to starting position playgroup backward 0 set timer to 10 set activated to 2 ; after five journeys stop ; if counter == 5 ; set counter to 0 ; set activated to 0 ; endif elseif activated == 4 ; return to starting position, reset everything playgroup backward 60 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set activated to 0 end
32ARTrapEvilStone01SCRIPTscn ARTrapEvilStone01SCRIPT ; when activated will shoot fireball at player after 3 sec float timer short ready ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 && timer <= 0 && ready == 0 playgroup forward 1 set timer to 8 set ready to 1 set next to 1 endif end begin gameMode ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20) set SpellRank to 4 elseif ( player.GetLevel >= 21 ) set SpellRank to 5 endif if timer <= 4 && ready == 1 && SpellRank > 0 ; check to make sure player is still in range if getDistance player < 700 ;Debug message ;message "Rank %.0f Freezy Spell", SpellRank, 10 if SpellRank == 1 cast StandardFrostDamageTarget1Novice player elseif SpellRank == 2 cast StandardFrostDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFrostDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardFrostDamageTarget4Expert player elseif SpellRank == 5 cast StandardFrostDamageTarget5Master player endif endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
33ARTrapEvilStone02SCRIPTscn ARTrapEvilStone02SCRIPT ; when activated will shoot shockbolt at player after 3 sec float timer short ready ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 && timer <= 0 playgroup forward 1 set timer to 8 set ready to 1 set next to 1 endif end begin gameMode ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20) set SpellRank to 4 elseif ( player.GetLevel >= 21 ) set SpellRank to 5 endif if timer <= 4 && ready == 1 && SpellRank > 0 ; check to make sure player is still in range if getDistance player < 700 ;Debug message ;message "Rank %.0f Zappy Spell", SpellRank, 10 if SpellRank == 1 cast StandardShockDamageTarget1Novice player elseif SpellRank == 2 cast StandardShockDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardShockDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardShockDamageTarget4Expert player elseif SpellRank == 5 cast StandardShockDamageTarget5Master player endif endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
34ARTrapEvilStoneAUTOFIRE01SCRIPTscn ARTrapEvilStoneAUTOFIRE01SCRIPT ; come within range and this thing will shoot a fireball at you (range is 700) float timer short ready short disabled short SpellRank begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if SpellRank == 0 && disabled == 0 if getDistance player < 700 && timer <= 0 playgroup forward 0 set ready to 1 set timer to 8 ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20) set SpellRank to 4 elseif ( player.GetLevel >= 21 ) set SpellRank to 5 endif endif endif if timer <= 4 && ready == 1 && SpellRank > 0 ; check to make sure player is still in range if getDistance player < 700 ;Debug message ;message "Rank %.0f Freezy Spell", SpellRank, 10 if SpellRank == 1 cast StandardFrostDamageTarget1Novice player elseif SpellRank == 2 cast StandardFrostDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFrostDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardFrostDamageTarget4Expert player elseif SpellRank == 5 cast StandardFrostDamageTarget5Master player endif set ready to 0 set spellrank to 0 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set SpellRank to 0 end
35ARTrapEvilStoneAUTOFIRE02SCRIPTscn ARTrapEvilStoneAUTOFIRE02SCRIPT ; come within range and this thing will shoot a shockbolt at you (range is 700) float timer short ready short disabled short SpellRank begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if SpellRank == 0 && disabled == 0 if getDistance player < 700 && timer <= 0 playgroup forward 0 set ready to 1 set timer to 8 ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20) set SpellRank to 4 elseif ( player.GetLevel >= 21 ) set SpellRank to 5 endif endif endif if timer <= 4 && ready == 1 && SpellRank > 0 ; check to make sure player is still in range if getDistance player < 700 ;Debug message ;message "Rank %.0f Zappy Spell", SpellRank, 10 if SpellRank == 1 cast StandardShockDamageTarget1Novice player elseif SpellRank == 2 cast StandardShockDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardShockDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardShockDamageTarget4Expert player elseif SpellRank == 5 cast StandardShockDamageTarget5Master player endif set ready to 0 set spellrank to 0 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set SpellRank to 0 end
36ARTrapEvilStoneAUTOFIREFAR01SCRIPTscn ARTrapEvilStoneAUTOFIREFAR01SCRIPT ; come within range and this thing will shoot a fireball at you (range is 1400) float timer short ready short disabled short SpellRank begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if SpellRank == 0 && disabled == 0 if getDistance player < 1400 && timer <= 0 playgroup forward 0 set ready to 1 set timer to 8 ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20) set SpellRank to 4 elseif ( player.GetLevel >= 21 ) set SpellRank to 5 endif endif endif if timer <= 4 && ready == 1 && SpellRank > 0 ; check to make sure player is still in range if getDistance player < 700 ;Debug message ;message "Rank %.0f Freezy Spell", SpellRank, 10 if SpellRank == 1 cast StandardFrostDamageTarget1Novice player elseif SpellRank == 2 cast StandardFrostDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFrostDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardFrostDamageTarget4Expert player elseif SpellRank == 5 cast StandardFrostDamageTarget5Master player endif set ready to 0 set spellrank to 0 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set SpellRank to 0 end
37ARTrapEvilStoneAUTOFIREFAR02SCRIPTscn ARTrapEvilStoneAUTOFIREFAR02SCRIPT ; come within range and this thing will shoot a fireball at you (range is 1400) float timer short ready short disabled short SpellRank begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if SpellRank == 0 && disabled == 0 if getDistance player < 1400 && timer <= 0 playgroup forward 0 set ready to 1 set timer to 8 ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) && (player.GetLevel <= 20) set SpellRank to 4 elseif ( player.GetLevel >= 21 ) set SpellRank to 5 endif endif endif if timer <= 4 && ready == 1 && SpellRank > 0 ; check to make sure player is still in range if getDistance player < 700 ;Debug message ;message "Rank %.0f Zappy Spell", SpellRank, 10 if SpellRank == 1 cast StandardShockDamageTarget1Novice player elseif SpellRank == 2 cast StandardShockDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardShockDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardShockDamageTarget4Expert player elseif SpellRank == 5 cast StandardShockDamageTarget5Master player endif set ready to 0 set spellrank to 0 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set SpellRank to 0 end
38ARTrapEvilStoneAUTOFIREFireSCRIPTscn ARTrapEvilStoneAUTOFIRE_FireSCRIPT ; come within range and this thing will shoot a fireball at you (range is 700) float timer short ready short disabled ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if SpellRank == 0 && disabled == 0 if getDistance player < 700 && timer <= 0 playgroup forward 0 set ready to 1 set timer to 8 endif ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 7 set SpellRank to 1 elseif ( player.GetLevel >= 8 ) && ( player.GetLevel <= 13 ) set SpellRank to 2 elseif ( player.GetLevel >= 14 ) && ( player.GetLevel <= 20 ) set SpellRank to 3 elseif ( player.GetLevel >= 21 ) set SpellRank to 4 endif ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if timer <= 4 && ready == 1 ; check to make sure player is still in range if getDistance player < 700 ;Debug message message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast StandardFireDamageTarget1Novice player elseif SpellRank == 2 cast StandardFireDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFireDamageArea3Journeyman player elseif SpellRank == 4 cast StandardFireDamageArea4Expert player endif endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif end begin onReset reset3DState set SpellRank to 0 end
39ARTrapEvilStoneFAST01SCRIPTscn ARTrapEvilStoneFAST01SCRIPT ; when activated will shoot fireball at player after 3 sec float timer short ready ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 && timer <= 0 && ready == 0 playgroup forward 1 set timer to 8 set ready to 1 set next to 1 endif end begin gameMode ; daisy-chain if next == 1 && timer <= 8 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 7 set SpellRank to 1 elseif ( player.GetLevel >= 8 ) && ( player.GetLevel <= 13 ) set SpellRank to 2 elseif ( player.GetLevel >= 14 ) && ( player.GetLevel <= 20 ) set SpellRank to 3 elseif ( player.GetLevel >= 21 ) set SpellRank to 4 endif if timer <= 4 && ready == 1 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast StandardFrostDamageTarget1Novice player elseif SpellRank == 2 cast StandardFrostDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFrostDamageTarget3Journeyman player elseif SpellRank == 4 cast StandardFrostDamageTarget4Expert player endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
40ARTrapEvilStoneFireSCRIPTscn ARTrapEvilStoneFireSCRIPT ; when activated will shoot fireball at player after 3 sec float timer short ready ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 && timer <= 0 playgroup forward 1 set timer to 8 set ready to 1 set next to 1 endif end begin gameMode ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 7 set SpellRank to 1 elseif ( player.GetLevel >= 8 ) && ( player.GetLevel <= 13 ) set SpellRank to 2 elseif ( player.GetLevel >= 14 ) && ( player.GetLevel <= 20 ) set SpellRank to 3 elseif ( player.GetLevel >= 21 ) set SpellRank to 4 endif ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if timer <= 4 && ready == 1 ;Debug message message "Rank %Of Fireball", SpellRank, 10 if SpellRank == 1 cast StandardFireDamageTarget1Novice player elseif SpellRank == 2 cast StandardFireDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFireDamageArea3Journeyman player elseif SpellRank == 4 cast StandardFireDamageArea4Expert player endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
41ARTrapGasCloud01SCRIPTscn ARTrapGasCloud01SCRIPT ; Self-activated, no trigger required short init float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if init == 0 ; set up the damage values set fTrapDamage to 2 set fTrapPushBack to 0 set fLevelledDamage to 0.125 set fTrapMinVelocity to 0 set bTrapContinuous to 1 set init to 1 endif end
42ARTrapGasEmitter01SCRIPTscn ARTrapGasEmitter01SCRIPT ; spurt gas on activation short init float timer short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 set init to 2 ; set up the damage values set fTrapDamage to 10 set fTrapPushBack to 0 set fLevelledDamage to 0.125 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set timer to 8 set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <= 7 set next to 0 myParent.activate mySelf 1 endif if timer <= 0 && init == 2 playgroup forward 1 set timer to 10 endif if timer > 0 set timer to timer - getSecondsPassed endif end
43ARTrapGasEmitterRANDOM01SCRIPTscn ARTrapGasEmitterRANDOM01SCRIPT ; self-activated, randomly spurts gas float timer short started float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if started == 0 ; "random" seed, so each emitter isn't spouting at exactly the same time set timer to 6 + ( getRandomPercent / 3 ) ; set up the damage values set fTrapDamage to 2 set fLevelledDamage to 0.125 set fTrapPushBack to 0 set fTrapMinVelocity to 10 set bTrapContinuous to 1 set started to 1 endif if ( timer <= 0 ) ; time to spurt playgroup forward 1 set timer to 11 endif set timer to timer - getSecondsPassed if timer < 7 trapUpdate endif end
44ARTrapGasGrate01SCRIPTscn ARTrapGasGrate01SCRIPT ; spurt gas on activation float timer short next short activated ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if activated == 0 set myParent to getParentRef set mySelf to getSelf set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 ; set up the damage values set fTrapDamage to 5 set fLevelledDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 1 set timer to 24 set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <= 23 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;reset for next time if timer <= 0 && activated == 1 set fTrapDamage to 0 set activated to 0 endif set timer to timer - getSecondsPassed end
45ARTrapLongSpikes01SCRIPTscn ARTrapLongSpikes01SCRIPT ; Self-activated, no trigger required short init float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if init == 0 ; set up the damage values set fTrapDamage to 15 set fLevelledDamage to 1.5 set fTrapPushBack to 0 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set init to 1 endif end
46ARTrapSpikePit01SCRIPTscn ARTrapSpikePit01SCRIPT ; Self-activated, no trigger required short init float timer float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if isActionRef player == 0 && timer <= 0 playgroup forward 0 set timer to 10 endif end begin gameMode if init == 0 ; set up the damage values set fTrapDamage to 20 set fLevelledDamage to 1.5 set fTrapPushBack to 200 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set init to 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
47ARTrapSwingBladeFAST01SCRIPTscn ARTrapSwingBladeFAST01SCRIPT ; start swinging on activation float timer short swingState short activated short nextTrap ref target ref mySelf float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if activated == 0 set timer to 2 set swingState to 1 playgroup forward 0 set fTrapDamage to 20 set fTrapPushBack to 1000 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 1 endif end begin gameMode if activated == 1 ; swing the blade if swingState == 0 && timer <= 2 playgroup forward 0 set swingState to 1 elseif swingState == 1 && timer <= 0 playgroup backward 0 set swingState to 0 set timer to 4 endif ; set the next trap going if its linked as a parent if nextTrap == 0 && timer <= 7 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set nextTrap to 1 endif set timer to timer - getSecondsPassed trapUpdate endif end begin onReset reset3DState set activated to 0 end
48ARTrapSwingBladeONCE01SCRIPTscn ARTrapSwingBladeONCE01SCRIPT ; start swinging on activation float timer short swingState short activated short nextTrap ref target ref mySelf float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if activated == 0 set timer to 2 set swingState to 1 playgroup forward 0 set fTrapDamage to 20 set fTrapPushBack to 1000 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 1 endif end begin gameMode if activated == 1 ; swing the blade if swingState == 0 && timer <= 2 playgroup forward 0 set swingState to 1 elseif swingState == 1 && timer <= 0 playgroup backward 0 set swingState to 0 set activated to 0 endif ; set the next trap going if its linked as a parent if nextTrap == 0 && timer <= 7 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set nextTrap to 1 endif set timer to timer - getSecondsPassed endif end
49ARTrapSwingBladeRANDOM01SCRIPTscn ARTrapSwingBladeRANDOM01SCRIPT ; self-activated, will pick a random interval and just start swinging float timer short delay short swingState short start float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode ; swing the blade if start == 0 ; random seed, so each blade doesn't start swinging at the same time set timer to getRandomPercent if timer > 80 set timer to 1 elseif timer > 60 set timer to 2 elseif timer > 40 set timer to 3 elseif timer >= 0 set timer to 4 endif set start to 1 endif if ( timer <= 0 ) && ( start == 1 ) set fTrapDamage to 100 set fTrapPushBack to 1000 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set start to 2 set timer to 3 endif if ( timer <= 0 ) && ( start == 2 ) if swingState == 0 playgroup forward 1 set swingState to 1 else playgroup backward 1 set swingState to 0 endif set timer to 3 endif set timer to timer - getSecondsPassed trapUpdate end
50ARTrapSwingBladeSLOW01SCRIPTscn ARTrapSwingBladeSLOW01SCRIPT ; start swinging on activation float timer short swingState short activated short nextTrap ref target ref mySelf float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if activated == 0 set timer to 2 set swingState to 1 playgroup forward 0 set fTrapDamage to 20 set fTrapPushBack to 1000 set fLevelledDamage to 1.5 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 1 endif end begin gameMode if activated == 1 ; swing the blade if swingState == 0 && timer <= 4 playgroup forward 0 set swingState to 1 elseif swingState == 1 && timer <= 0 playgroup backward 0 set swingState to 0 set timer to 8 endif ; set the next trap going if its linked as a parent if nextTrap == 0 && timer <= 2 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set nextTrap to 1 endif set timer to timer - getSecondsPassed trapUpdate endif end begin onReset reset3DState set activated to 0 end
51ARTrapWallCorner01SCRIPTscn ARTrapWallCorner01SCRIPT short activated short open short next float timer ref mySelf ref myParent begin onActivate ; prevents self re-activation if there's no parent linked if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif ; if player clicks on me give him a clue if isActionRef player == 1 if open == 1 message "This wall is lowered remotely." endif elseif isActionRef mySelf == 0 if open == 0 playgroup forward 0 triggerHitShader 2 set open to 1 else playgroup backward 1 set open to 0 endif set next to 1 set timer to 0.4 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 myParent.activate mySelf 1 if open == 1 set next to 2 set timer to 8 else set next to 0 endif endif ; time's up, lower myself if next == 2 && timer <= 0 playgroup backward 0 set open to 0 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
52ARTrapWallDeactivate01SCRIPTscn ARTrapWallDeactivate01SCRIPT float timer short activated ref myParent ref mySelf begin onActivate if activated == 0 set activated to 1 set myParent to getParentRef set mySelf to getSelf endif if isActionRef player == 1 && activated == 2 playgroup backward 0 myParent.activate mySelf 1 set activated to 3 elseif activated == 1 playgroup forward 0 set activated to 2 set timer to 15 endif end begin gameMode if activated == 2 && timer <= 0 playgroup backward 0 set activated to 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
53ARTrigPressurePlate01SCRIPTscn ARTrigPressurePlate01SCRIPT ; Activates trap linked as Parent short activated ref target ref mySelf begin gameMode if activated == 0 if getDistance player < 64 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set activated to 1 playgroup forward 0 endif endif end begin onReset reset3DState set activated to 0 end
54ARTrigPressurePlateRESET01SCRIPTscn ARTrigPressurePlateRESET01SCRIPT ; Activates trap linked as Parent short activated float timer ref target ref mySelf begin gameMode if activated == 0 if getDistance player < 60 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set activated to 1 set timer to 5 playgroup forward 0 endif endif end begin gameMode if activated == 1 && timer <= 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set activated to 0 end
55ARWelkyndCage01SCRIPTscn ARWelkyndCage01SCRIPT short raised float timer ref myParent ref mySelf begin onActivate if isActionRef player == 1 && raised == 0 message "This cage is raised remotely." elseif isActionRef player == 0 && raised == 0 set raised to 1 set timer to 1 playgroup forward 0 endif end begin gameMode if raised == 1 && timer <= 0 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set raised to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end
56AtronachFlameScriptscn AtronachFlameScript begin ScriptEffectStart PlayMagicShaderVisuals effectAtronachFlame end begin ScriptEffectFinish StopMagicShaderVisuals effectAtronachFlame end
57AtronachFrostHealSCRIPTscn AtronachFrostHealSCRIPT begin ScriptEffectStart pme frsh ; frost shield effect end begin ScriptEffectFinish sme frsh ; frost shield effect end
58AtronachFrostScriptscn AtronachFrostScript begin ScriptEffectStart PlayMagicShaderVisuals effectAtronachFrost end begin ScriptEffectFinish StopMagicShaderVisuals effectAtronachFrost end
59AtronachStormScriptscn AtronachStormScript begin ScriptEffectStart PlayMagicShaderVisuals effectShockDamage end begin ScriptEffectFinish StopMagicShaderVisuals effectShockDamage end
60AutoCSecretDoor01SCRIPTscn AutoCSecretDoor01SCRIPT short state begin onLoad disableLinkedPathPoints end begin gameMode if ( state == 0 ) if ( GetDistance Player < 150) playgroup Forward, 1 triggerHitShader 3 set state to 1 enableLinkedPathPoints endif endif if ( state == 1 ) if ( GetDistance Player > 1500) playgroup Backward, 1 set state to 0 disableLinkedPathPoints endif endif end
61BanditRobberSCRIPTscn BanditRobberSCRIPT begin OnLoad forceav aggression 0 set HighwaymanGotMoney to 0 end
62BarthelGernandScriptscn BarthelGernandScript ; QUESTS: ; MS46 short lastStage ; this package ends when the player leaves Crestbridge camp after finishing MS46 begin OnPackageStart MS46WalkToCropsford setstage ms46fin, 1 end ; this package ends when he first reaches Cropsford begin OnPackageChange MS46WalkToCropsford ; set up new camp at Cropsford setstage ms46fin, 2 end ; this package runs once per week until Cropsford is complete built begin OnPackageChange MS46CropsfordCountdown set lastStage to getstage ms46FIN set lastStage to lastStage + 1 setstage ms46FIN, lastStage end
63BaurusScriptscn BaurusScript ; MQ01 ; MQ05 short target ; temp var used for chargen short chargenOver ; set to 1 when chargen is finished so we know to skip last section of script short sayPlayer ; set to 1 when Baurus first speaks to player short temp short warncount ; counts number of times player hits ; goes down over time begin OnPackageDone MQ05BaurusGoToSewerLowerHall if getdistance MQ05BaurusWaitLowerHall < 200 setstage MQ05 76 endif end begin OnPackageDone CGBaurusToMarker9 ; close the door at the top of the stairs CGPrisonEntranceDoor.SetOpenState 0 end begin onPackageDone CGBaurusSearchAmbushBRoom if getstage charactergen < 38 setstage charactergen 38 endif end begin OnPackageDone CGBaurusToMarkerJ1 setstage characterGen 67 end begin OnPackageDone CGBaurusToDeadEmperor setstage CharacterGen 85 end begin OnPackageChange MQ14CheerPlayer stoplook end begin OnHit if getquestrunning charactergen == 1 ; Baurus can't die during charactergen set temp to GetBaseActorValue health forceav health, temp endif end begin OnStartCombat if getcombattarget != player set warncount to 0 endif if getcombattarget != player && glenroyref.isincombat == 0 && getstage charactergen > 40 && getquestrunning charactergen == 1 Say Attack endif if getcombattarget != player && getincell ImperialSewersElvenGardens == 1 Say MQ00Voice endif end begin OnHit player if getquestrunning charactergen == 1 if warncount <= 4 stopcombat player.scaonActor endif SayTo player CharGenBaurus 1 set warnCount to warnCount + 1 ; make sure disposition of anybody never goes below 30 ; Baurus set temp to BaurusRef.getdisposition player if temp < 30 set temp to 30 - temp BaurusRef.moddisposition player temp endif ; Renote set temp to RenoteRef.getdisposition player if temp < 30 set temp to 30 - temp RenoteRef.moddisposition player temp endif ; Emperor set temp to UrielSeptimRef.getdisposition player if temp < 30 set temp to 30 - temp UrielSeptimRef.moddisposition player temp endif ; Glenroy set temp to GlenroyRef.getdisposition player if temp < 30 set temp to 30 - temp GlenroyRef.moddisposition player temp endif endif end begin gamemode if getquestrunning MQ05 == 1 if getstage MQ05 == 32 && getdistance player < 300 startconversation player endif endif ; rest of this script is Chargen stuff; ignore once we've finished if chargenOver == 1 return endif ; talk when it is time if CharacterGen.speaker == 1 && CharacterGen.convTimer <= 0 set target to CharacterGen.target if target == 0 set CharacterGen.convTimer to Say CharGenMain 1 elseif target == 1 set CharacterGen.convTimer to SayTo BaurusRef, CharGenMain 1 elseif target == 2 set CharacterGen.convTimer to SayTo RenoteRef, CharGenMain 1 elseif target == 3 set CharacterGen.convTimer to SayTo GlenroyRef, CharGenMain 1 elseif target == 4 set CharacterGen.convTimer to SayTo UrielSeptimRef, CharGenMain 1 elseif target == 5 set CharacterGen.convTimer to SayTo player, CharGenMain 1 endif endif if getstage charactergen == 19 if getdistance player < 250 && sayPlayer == 0 sayTo player CharGenVoice set sayPlayer to 1 endif endif if getstage charactergen >= 18 && getstage charactergen < 22 if getdistance CGPlayerStartMarker < 200 && CGPlayerCellDoor.getOpenState < 3 CGPlayerCellDoor.setopenstate 0 CGPlayerCellDoor.lock 100 enableplayercontrols endif endif end
64BedDiseaseSCRIPTscn BedDiseaseSCRIPT short diseasechance begin OnActivate Activate if IsActionRef player == 1 set diseasechance to getrandompercent endif end begin menumode if diseasechance > 80 && isPCSleeping == 1 player.addspell DisYellowTick set diseasechance to 0 endif end begin gamemode set diseasechance to 0 end
65BellTowerScriptscn BellTowerScript float timer short playernear short soundplaying Begin GameMode If ( GetInSameCell player == 1 ) if ( playernear == 0 ) set playernear to 1 endif elseif ( GetInSameCell player == 0 ) if ( playernear == 1 ) set playernear to 0 endif endif if ( soundplaying == 1 ) set timer to ( timer - GetSecondsPassed ) if ( timer <= -5 ) set soundplaying to 0 set timer to 0 endif endif if ( playernear == 1 ) && ( soundplaying == 0 ) if ( GameHour >= 23.98 ) || ( GameHour <= 0.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 0.98 ) && ( GameHour <= 1.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 1.98 ) && ( GameHour <= 2.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 2.98 ) && ( GameHour <= 3.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 3.98 ) && ( GameHour <= 4.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 4.98 ) && ( GameHour <= 5.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 5.98 ) && ( GameHour <= 6.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 6.98 ) && ( GameHour <= 7.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 7.98 ) && ( GameHour <= 8.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 8.98 ) && ( GameHour <= 9.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 9.98 ) && ( GameHour <= 10.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 10.98 ) && ( GameHour <= 11.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 11.98 ) && ( GameHour <= 12.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 12.98 ) && ( GameHour <= 13.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 13.98 ) && ( GameHour <= 14.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 14.98 ) && ( GameHour <= 15.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 15.98 ) && ( GameHour <= 16.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 16.98 ) && ( GameHour <= 17.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 17.98 ) && ( GameHour <= 18.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 18.98 ) && ( GameHour <= 19.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 19.98 ) && ( GameHour <= 20.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 20.98 ) && ( GameHour <= 21.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 21.98 ) && ( GameHour <= 22.02 ) PlaySound3d AMBBellTower set soundplaying to 1 elseif ( GameHour >= 22.98 ) && ( GameHour <= 23.02 ) PlaySound3d AMBBellTower set soundplaying to 1 endif endif End
66BlackBrugoScriptscn BlackBrugoScript begin OnDeath if getstagedone MS92 80 == 0 SetStage MS92 80 endif end
67BlackRock01SCRIPTscn BlackRock01SCRIPT short open short next short busy float timer ref mySelf ref myParent begin onActivate if busy == 0 if open == 0 set mySelf to GetSelf mySelf.PME REHE mySelf.PMS effectRestore set open to 1 set next to 1 set timer to 2 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 set myParent to getParentRef BlackRockForceDoorREF.activate mySelf 0 myParent.disable playsound AMBArrowKeySuccess set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
68BlackRockSwitch01aSCRIPTscn BlackRockSwitch01aSCRIPT ; disables parent ref short open short next short busy float timer ref myParent ref mySelf begin onActivate if busy == 0 if open == 0 set mySelf to GetSelf playgroup forward 1 mySelf.pme REHE mySelf.pms effectRestore set open to 1 set next to 1 set timer to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 set myParent to getParentRef BlackRockForceDoorREF.activate mySelf 1 myParent.disable playsound AMBArrowKeySuccess set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set next to 0 set open to 0 set busy to 0 end
69BlackRockSwitchSCRIPTscn BlackRockSwitchSCRIPT ; disables parent ref short open short next short busy float timer ref myParent ref mySelf begin onActivate if busy == 0 if open == 0 set mySelf to GetSelf playgroup forward 1 mySelf.pme REHE mySelf.pms effectRestore set open to 1 set next to 1 set timer to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 set myParent to getParentRef myParent.disable playsound AMBArrowKeySuccess set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set next to 0 set open to 0 set busy to 0 end
70BravilNQDScriptscn BravilNQDScript short BogrumVAR short GilgondorinVAR short UravasaVAR short MarzVAR short FathisVAR short NahsiVAR short TadroseVAR short KudVAR short ArdalineVAR short ItaVAR short DelphineVAR short WearsVAR short VaronVAR short CityVAR short LucianaVAR short SkoomaVAR
71BrotherPinerScriptscn BrotherPinerScript short MQ04Voice ; set to 1 after shouting to player begin gamemode if getstage MQ04 == 10 && getdistance player < 800 && MQ04Voice == 0 && getdead == 0 SayTo player MQVoice set MQ04Voice to 1 endif end
72BrumaNQDScriptscn BrumaNQDScript short OlavVAR short HafidVAR short SkjortaVAR short OlfandVAR short CirrocVAR short ArentusVAR short RightVAR short BumphVAR short JskarVAR short AlgaVAR short JantusVAR short EdlaVAR short BrotchVAR
73BurdSCRIPTscn BurdSCRIPT short burdSalute begin OnStartCombat if getcombattarget != player Say MQ00Voice endif ; make sure things move along if getstage MQ10 == 31 || getstage MQ10 == 32 setstage mq10 33 endif end begin OnPackageDone MQ10BurdGiveSpeech setstage mq10 32 end begin OnPackageChange MQ14CheerPlayer stoplook end
74CariusRunelliusSCRIPTscn CariusRunelliusSCRIPT short Stop short CariusMoved begin gamemode if ( Player.GetInCell BrumaBradonLirriansHouse == 1 ) if ( GetStage MS11 < 20 ) && ( Stop == 0 ) StartConversation Player, Greeting set Stop to 1 endif endif if ( MS11.CariusOlav == 1 ) if ( Player.GetInCell BrumaOlavsTapandTack == 1 ) StartConversation Player, Greeting endif endif end begin OnPackageEnd MS11CariusLeavesBradons ;This moves Carius to Olav's at Stage 85 if ( GetStage MS11>= 85 ) && ( CariusMoved == 0 ) && ( MS11.CariusDone == 1 ) CariusRef.Disable CariusRef.MoveTo MS11Stage50Marker set CariusMoved to 1 endif end
75CastleSecretBarrelScriptscn CastleSecretBarrelScript ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy short waiting float timer ref mySelf ref myParent begin onActivate if isActionRef mySelf == 0 && busy == 0 && isActionRef player == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints set waiting to 1 else playgroup backward 0 set open to 0 disableLinkedPathPoints set waiting to 0 endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 && open == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
76CastleSecretDoorScriptscn CastleSecretDoorScript ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy short waiting float timer float autoclose ref mySelf ref myParent begin onActivate if isActionRef mySelf == 0 && busy == 0 && isActionRef player == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints set autoclose to 8 set waiting to 1 else playgroup backward 0 set open to 0 disableLinkedPathPoints set waiting to 0 endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if waiting == 1 && autoclose <= 0 playgroup backward 0 set open to 0 disableLinkedPathPoints set waiting to 0 elseif waiting == 1 set autoclose to autoclose - getSecondsPassed endif if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
77CathedralDoorBrumaSCRIPTscn CathedralDoorBrumaSCRIPT ; this is just to turn subtitles on during the conversation between Martin and Countess begin OnLoad if getstage MQ13 == 20 && MQ13.convDone == 0 showdialogsubtitles 1 endif end
78CGAkaviriLongswordScriptscn CGAkaviriLongswordScript ; this script disables everything in the world after Baurus speaks to you, to make sure the player doesn't leave with it begin gamemode if getstage CharacterGen == 88 if getcontainer == 0 if getdisabled == 0 disable endif else removeMe endif endif end begin OnAdd player set MQ01.weapon to 1 end begin OnEquip player set MQ01.weaponEquip to 1 end
79CGAmbushAGateScriptscn CGAmbushAGateScript begin onActivate ; make sure NPCs don't open the gate until after Renote is dead. if IsActionRef player == 1 || getstage charactergen > 26 Activate endif end
80CGAmbushCBackGateScriptscn CGAmbushCBackGateScript begin OnActivate ; nobody can open this gate end
81CGAmbushCGateScriptscn CGAmbushCGateScript begin OnActivate ; player can't activate this gate if isActionRef player == 1 ; if closed, give message; otherwise, do nothing if getopenstate >= 3 && getlocked == 1 if CGAmbushCLockedGateSideMarker.getdistance player > 150 messageBox "The gate is barred from the other side. There is no way to open it from here." else unlock Activate endif endif else Activate endif end
82CGAssassinAmbushCScriptscn CGAssassinAmbushCScript float timer short dying ; set to 1 after timer is set begin gamemode ; kill assassins when Emperor dies if GetDead == 0 && getstage charactergen >= 74 if dying == 0 set dying to 1 setrestrained 1 set timer to ( getrandompercent/50 ) else if timer > 0 set timer to timer - getsecondspassed else kill endif endif endif end
83CGAssassinScriptscn CGAssassinScript short target begin gamemode ; talk when it is time if CharacterGen.speaker == 6 && CharacterGen.convTimer <= 0 && getdead == 0 set target to CharacterGen.target if target == 0 set CharacterGen.convTimer to Say CharGenMain elseif target == 1 set CharacterGen.convTimer to SayTo BaurusRef, CharGenMain elseif target == 2 set CharacterGen.convTimer to SayTo RenoteRef, CharGenMain elseif target == 3 set CharacterGen.convTimer to SayTo GlenroyRef, CharGenMain elseif target == 4 set CharacterGen.convTimer to SayTo UrielSeptimRef, CharGenMain elseif target == 5 set CharacterGen.convTimer to SayTo player, CharGenMain elseif target == 6 endif set charactergen.convTimer to CharacterGen.convTimer + 3 ; pause between taunts endif end begin OnDeath setstage CharacterGen 84 end begin OnHit set charactergen.finalTauntCount to charactergen.finalTauntCount + 1 end
84CGate01SCRIPTscn CGate01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 if player.getitemcount MQ15OrthesKey == 0 message "This gate requires a key." else player.removeitem MQ15OrthesKey 1 playgroup forward 0 set open to 1 enableLinkedPathPoints endif endif else if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints endif endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
85CGateOPEN01SCRIPTscn CGateOPEN01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short closed short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if closed == 1 message " This gate is opened elsewhere." endif else isActionRef mySelf == 0 && busy == 0 if closed == 0 playgroup forward 0 set closed to 1 disableLinkedPathPoints else playgroup backward 0 set closed to 0 enableLinkedPathPoints endif set next to 1 set busy to 1 set timer to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set closed to 0 set busy to 0 set next to 0 enableLinkedPathPoints end
86CGBladesEquipmentScriptscn CGBladesEquipmentScript ; this script disables everything in the world after Baurus speaks to you, to make sure the player doesn't leave with it begin gamemode if getstage CharacterGen == 88 if getcontainer == 0 if getdisabled == 0 disable endif elseif getcontainer != GlenroyRef removeMe endif endif end begin OnAdd player set MQ01.heavyarmor to 1 end begin OnEquip player set MQ01.heavyArmorEquip to 1 end
87CGBowScriptscn CGBowScript ; this script is used to detect when player equips the bow for CharGen tutorial begin OnAdd player set MQ01.bow to 1 if MQ01.arrows == 1 ; have both bow and arrows now set MQ01.stage to 54 set MQ01.timer to 2 else ; bow only set MQ01.stage to 50 set MQ01.timer to 2 endif end begin OnEquip player set MQ01.bowEquip to 1 if MQ01.arrowsEquip == 1 set MQ01.stage to 56 set MQ01.timer to 2 endif end
88CGChest02SCRIPTscn CGChest02SCRIPT short done begin gamemode if done == 0 if getitemcount repairhammer == 0 setstage mq01 65 set done to 1 endif endif end
89CGCrumbleWall01SCRIPTscn CGCrumbleWall01SCRIPT short pushed float timer short triggered ; set to 1 when waiting to trigger rats begin onLoad ; prepare linked pathsgrid points disableLinkedPathPoints end begin onActivate if pushed == 0 && isActionRef player == 0 playgroup Unequip 1 CGCrumbleDust01REF.playgroup forward 1 set pushed to 1 set timer to 2 setstage MQ01 24 setdestroyed 1 enableLinkedPathPoints endif end begin gameMode if timer > 0 set timer to timer - getSecondsPassed endif if pushed == 1 && timer <= 0 CGCrumbleDust02REF.playgroup forward 1 set pushed to 2 set timer to 4 elseif pushed == 2 && timer <= 0 CGCrumbleDust03REF.playgroup forward 1 set pushed to 3 endif end
90CGDomesticRatScriptscn CGDomesticRatScript short aggro begin gamemode if aggro == 0 && CGRatPenGate.gateOpen == 1 set aggro to 1 setfactionreaction CGDomesticRatFaction CGGoblinFaction -100 setav aggression 50 setav confidence 80 evp endif end
91CGDoorToSewersScriptscn CGDoorToSewersScript begin OnActivate Activate if IsActionRef player == 1 player.removeItem CGExitKey 1 player.scaonactor endif end
92CGDungeon01ExitDoorScriptscn CGDungeon01ExitDoorScript short hintCount begin OnActivate if IsActionRef player == 1 Activate if GetLocked == 1 if hintcount == 0 MessageBox "This door is locked. Maybe you can find the key somewhere nearby." else MessageBox "This door is locked. Try searching the dead goblin shaman for the key." endif set hintcount to 1 endif endif end
93CGDungeon05To02DoorScriptscn CGDungeon05To02DoorScript begin OnActivate if IsActionRef player == 1 player.scaonactor endif Activate end
94CGEmperorScriptscn CGEmperorScript short target ref combattarget ref bladeHelp short temp short warncount ; how many warnings has the Emperor given for player hitting him? short warnstage ; what stage was the last warning? begin OnActivate if IsActionRef player == 1 && GetDead == 1 BaurusRef.SayTo player CharGenVoice else Activate endif end begin gamemode ; if dead, set stage: if getstage charactergen == 74 if getdead == 1 setstage charactergen 76 endif endif ; talk when it is time if CharacterGen.speaker == 4 && CharacterGen.convTimer <= 0 set target to CharacterGen.target if target == 0 set CharacterGen.convTimer to Say CharGenMain 1 elseif target == 1 set CharacterGen.convTimer to SayTo BaurusRef, CharGenMain 1 elseif target == 2 set CharacterGen.convTimer to SayTo RenoteRef, CharGenMain 1 elseif target == 3 set CharacterGen.convTimer to SayTo GlenroyRef, CharGenMain 1 elseif target == 4 set CharacterGen.convTimer to SayTo UrielSeptimRef, CharGenMain 1 elseif target == 5 set CharacterGen.convTimer to SayTo player, CharGenMain 1 elseif target == 6 endif ; special case -- endless loop with Glenroy if charactergen.convCount == 35 set charactergen.convTimer to 10 endif ; special case -- endless loop with player if charactergen.convCount == 45 set charactergen.convTimer to 12 endif endif ; special: birthsign speech ;if ( getstage charactergen == 42 || getstage charactergen == 44 ) && CharacterGen.convTimer <= 0 ; set CharacterGen.convTimer to SayTo player, CGEmperorBirthsign 1 ;endif end ; Assassin kills emperor in one blow begin OnHit CGAssassinFinal kill end ; NOTE: order is important here. OnHit player block needs to come first begin OnHit player if getdead == 0 if warncount <= 4 stopcombat player.scaonActor endif SayTo player CharGenEmperor 1 set warnCount to warnCount + 1 set warnstage to getstage charactergen ; make sure disposition of anybody never goes below 30 ; Baurus set temp to BaurusRef.getdisposition player if temp < 30 set temp to 30 - temp BaurusRef.moddisposition player temp endif ; Renote set temp to RenoteRef.getdisposition player if temp < 30 set temp to 30 - temp RenoteRef.moddisposition player temp endif ; Emperor set temp to UrielSeptimRef.getdisposition player if temp < 30 set temp to 30 - temp UrielSeptimRef.moddisposition player temp endif ; Glenroy set temp to GlenroyRef.getdisposition player if temp < 30 set temp to 30 - temp GlenroyRef.moddisposition player temp endif endif end begin OnStartCombat if warnstage < getstage charactergen set warncount to 0 endif ; Blades react if not the player set combattarget to GetCombatTarget if combattarget != player && combattarget > 0 if getdistance BaurusRef < getdistance GlenroyRef || GlenroyRef.GetDead == 1 set bladeHelp to BaurusRef if charactergen.debug == 1 message "DEBUG: Baurus calling for help for Emperor" endif else set bladeHelp to GlenroyRef if charactergen.debug == 1 message "DEBUG: Glenroy calling for help for Emperor" endif endif bladeHelp.SayTo player CharGenBlades bladeHelp.startcombat combattarget endif end begin OnHit if getstage charactergen < 74 ; Emperor can't die until the end of charactergen set temp to GetBaseActorValue health forceav health, temp endif end begin OnPackageDone CGEmperorToMarkerB setstage CharacterGen 16 end begin OnPackageDone CGEmperorToMarkerH setstage CharacterGen 62 end begin OnPackageDone CGEmperorToMarkerJ setstage CharacterGen 68 end
95CGGlenroyScriptscn CGGlenroyScript short target short dieNextHit short temp short warncount begin gamemode ; talk when it is time if CharacterGen.speaker == 3 && CharacterGen.convTimer <= 0 set target to CharacterGen.target if target == 0 set CharacterGen.convTimer to Say CharGenMain 1 elseif target == 1 set CharacterGen.convTimer to SayTo BaurusRef, CharGenMain 1 elseif target == 2 set CharacterGen.convTimer to SayTo RenoteRef, CharGenMain 1 elseif target == 3 set CharacterGen.convTimer to SayTo GlenroyRef, CharGenMain 1 elseif target == 4 set CharacterGen.convTimer to SayTo UrielSeptimRef, CharGenMain 1 elseif target == 5 set CharacterGen.convTimer to SayTo player, CharGenMain 1 endif endif ; special cases ; Glenroy waiting for player to get away from the cell door if getstage charactergen == 13 if charactergen.convTimer <= 0 ; Glenroy warns player if he doesn't get back SayTo player CharGenVoice 1 set charactergen.convTimer to 7 endif endif end begin OnPackageDone CGGlenroyToMarkerB setstage CharacterGen 15 end begin OnPackageDone CGGlenroyToMarkerD setstage CharacterGen 30 end begin OnPackageDone CGGlenroyToMarkerE setstage CharacterGen 34 end begin OnPackageDone CGGlenroyEscortEmperorToF setstage CharacterGen 52 end begin OnPackageDone CGGlenroyEscortEmperorToG setstage CharacterGen 56 end begin OnPackageDone CGGlenroyToMarkerH setstage CharacterGen 60 end begin OnPackageDone CGGlenroyToMarkerI setstage CharacterGen 64 end begin OnStartCombat if getcombattarget != player set warncount to 0 endif if getcombattarget != player && baurusref.isincombat == 0 && getstage charactergen > 40 Say Attack endif end begin OnHit if dieNextHit == 1 kill elseif getstage charactergen < 70 ; Glenroy can't die until the end of charactergen set temp to GetBaseActorValue health forceav health, temp endif end begin OnHit player if getdead == 0 if warncount <= 3 stopcombat player.scaonActor endif SayTo player CharGenGlenroy 1 set warnCount to warnCount + 1 ; make sure disposition of anybody never goes below 30 ; Baurus set temp to BaurusRef.getdisposition player if temp < 30 set temp to 30 - temp BaurusRef.moddisposition player temp endif ; Renote set temp to RenoteRef.getdisposition player if temp < 30 set temp to 30 - temp RenoteRef.moddisposition player temp endif ; Emperor set temp to UrielSeptimRef.getdisposition player if temp < 30 set temp to 30 - temp UrielSeptimRef.moddisposition player temp endif ; Glenroy set temp to GlenroyRef.getdisposition player if temp < 30 set temp to 30 - temp GlenroyRef.moddisposition player temp endif endif end
96CGGoblinLogRun01SCRIPTscn CGGoblinLogRun01SCRIPT short activated begin onActivate activate if activated == 0 set activated to 1 evp CGGoblinRunover02REF.evp endif end
97CGGoblinSecretDoor01SCRIPTscn CGGoblinSecretDoor01SCRIPT short opened ref myParent ref mySelf begin onActivate if opened == 0 playgroup forward 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set opened to 1 CGGoblinBossREF.evaluatePackage endif end
98CGHeavyArmorScriptscn CGHeavyArmorScript begin OnAdd player set MQ01.heavyarmor to 1 end begin OnEquip player set MQ01.heavyArmorEquip to 1 end
99CGLightArmorScriptscn CGLightArmorScript ; this script is used to detect when player equips weapons for CharGen tutorial begin OnAdd player set MQ01.lightArmor to 1 set MQ01.invstage to 60 set MQ01.menutimer to 1 end begin OnEquip player set MQ01.lightArmorEquip to 1 end
100CGMortalPestleSCRIPTscn CGMortalPestleSCRIPT begin OnAdd player setstage MQ01 64 end
101CGMythicDawnAmbushA1Scriptscn CGMythicDawnAmbushA1Script begin OnPackageDone CGAssassinsAmbushA1 setstage charactergen 23 startcombat glenroyref if charactergen.debug == 1 message "DEBUG: Assassin 1 starting combat with Glenroy" endif end begin onHit RenoteRef.kill setstage CharacterGen 24 end begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 ; in case he dies before finishing package setstage charactergen 23 ; advance stage when all Ambush A assassins are dead if characterGen.ambushCount >= 4 && getstage CharacterGen < 26 setstage characterGen 26 set characterGen.ambushCount to 0 endif end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end begin OnActivate if isActionRef player == 1 && getDead == 1 && getstagedone mq01 15 == 1 set MQ01.lootCorpse to 1 setstage MQ01 18 endif Activate end
102CGMythicDawnAmbushA2Scriptscn CGMythicDawnAmbushA2Script begin OnPackageDone CGAssassinsAmbushA2 setstage CharacterGen 23 startcombat glenroyref if charactergen.debug == 1 message "DEBUG: Assassin 2 starting combat with Glenroy" endif end begin onHit RenoteRef.kill setstage CharacterGen 24 end begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 ; in case he dies before finishing package setstage charactergen 23 ; advance stage when all Ambush A assassins are dead if characterGen.ambushCount >= 4 && getstage CharacterGen < 26 setstage characterGen 26 set characterGen.ambushCount to 0 endif end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end begin OnActivate if isActionRef player == 1 && getDead == 1 && getstagedone mq01 15 == 1 set MQ01.lootCorpse to 1 setstage MQ01 18 endif Activate end
103CGMythicDawnAmbushA3Scriptscn CGMythicDawnAmbushA3Script begin OnPackageDone CGAssassinsAmbushA3 setstage charactergen 23 startcombat baurusref if charactergen.debug == 1 message "DEBUG: Assassin 3 starting combat with Baurus" endif end begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 ; in case he dies before finishing package setstage charactergen 23 ; advance stage when all Ambush A assassins are dead if characterGen.ambushCount >= 4 && getstage CharacterGen < 26 setstage characterGen 26 set characterGen.ambushCount to 0 endif end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end begin OnActivate if isActionRef player == 1 && getDead == 1 && getstagedone mq01 15 == 1 set MQ01.lootCorpse to 1 setstage MQ01 18 endif Activate end
104CGMythicDawnAmbushA4Scriptscn CGMythicDawnAmbushA4Script begin OnPackageDone CGAssassinsAmbushA4 setstage charactergen 23 startcombat renoteref if charactergen.debug == 1 message "DEBUG: Assassin 4 starting combat with Renote" endif end begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 ; in case he dies before finishing package setstage charactergen 23 ; advance stage when all Ambush A assassins are dead if characterGen.ambushCount >= 4 && getstage CharacterGen < 26 setstage characterGen 26 set characterGen.ambushCount to 0 endif end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end begin OnActivate if isActionRef player == 1 && getDead == 1 && getstagedone mq01 15 == 1 set MQ01.lootCorpse to 1 setstage MQ01 18 endif Activate end
105CGMythicDawnAmbushB1Scriptscn CGMythicDawnAmbushB1Script begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end
106CGMythicDawnAmbushB2Scriptscn CGMythicDawnAmbushB2Script begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end
107CGMythicDawnAssassinGenericScriptscn CGMythicDawnAssassinGenericScript begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end
108CGPrisonSecretWallSwitchSCRIPTscn CGPrisonSecretWallSwitchSCRIPT begin onActivate if getstage charactergen < 19 && isActionRef RenoteRef == 1 if charactergen.debug == 1 messagebox "DEBUG: CGPrisonSecretWallSwitchSCRIPT: Secret wall activated by Renote" endif playgroup forward 1 CGPrisonSecretWallRef.playgroup forward 1 set charactergen.secretDoor to 1 set charactergen.convTimer to 5 ; time for wall to open fully endif end
109CGRatAmbushASCRIPTscn CGRatAmbushASCRIPT begin OnDeath if getdeadcount CGRatAmbushA >= 2 set MQ01.timer to 3 set MQ01.stage to 15 endif end
110CGRatMagicTutorialSCRIPTscn CGRatMagicTutorialSCRIPT begin onLoad set MQ01.timer to 1 set MQ01.stage to 34 end
111CGRatPenGateScriptscn CGRatPenGateScript short gateOpen begin OnActivate if IsActionRef player == 1 || isActionRef CGRatPenRopeREF == 1 unlock set gateOpen to 1 endif if gateOpen == 1 Activate endif end
112CGRenoteScriptscn CGRenoteScript short target short looted ; set to 1 when player activates Renote after she dies short temp short warncount ; how many times has the player hit me -- reset when start combat begin gamemode ; talk when it is time if CharacterGen.speaker == 2 && CharacterGen.convTimer <= 0 set target to CharacterGen.target if target == 0 set CharacterGen.convTimer to Say CharGenMain 1 elseif target == 1 set CharacterGen.convTimer to SayTo BaurusRef, CharGenMain 1 elseif target == 2 set CharacterGen.convTimer to SayTo RenoteRef, CharGenMain 1 elseif target == 3 set CharacterGen.convTimer to SayTo GlenroyRef, CharGenMain 1 elseif target == 4 set CharacterGen.convTimer to SayTo UrielSeptimRef, CharGenMain 1 ; special case: pause after "My job right now..." if charactergen.convCount == 5 set characterGen.convTimer to characterGen.convTimer + 2.5 endif elseif target == 5 set CharacterGen.convTimer to SayTo player, CharGenMain 1 endif endif end ; Renote gets to marker outside player's cell begin onPackageDone CGRenoteToMarkerA ; messagebox "DEBUG: CGRenoteToMarkerA done" setstage CharacterGen 12 ; trigger Baurus to come down stairs end ; Renote gets to marker inside player's cell begin onPackageDone CGRenoteOpenSecretDoor ; messagebox "DEBUG: CGRenoteWalkToMarkerB done" end ; Renote gets to marker at Ambush A room begin onPackageDone CGRenoteWalkToMarkerC ; messagebox "DEBUG: CGRenoteWalkToMarkerC done" setstage CharacterGen 20 end begin OnHit player if getdead == 0 if warncount <= 3 stopcombat player.scaonActor endif SayTo player CharGenRenote 1 set warnCount to warnCount + 1 ; make sure disposition of anybody never goes below 30 ; Baurus set temp to BaurusRef.getdisposition player if temp < 30 set temp to 30 - temp BaurusRef.moddisposition player temp endif ; Renote set temp to RenoteRef.getdisposition player if temp < 30 set temp to 30 - temp RenoteRef.moddisposition player temp endif ; Emperor set temp to UrielSeptimRef.getdisposition player if temp < 30 set temp to 30 - temp UrielSeptimRef.moddisposition player temp endif ; Glenroy set temp to GlenroyRef.getdisposition player if temp < 30 set temp to 30 - temp GlenroyRef.moddisposition player temp endif endif end begin OnStartCombat if getcombattarget != player set warncount to 0 endif end begin onHit CGAssassin01Ref kill setstage CharacterGen 24 end begin onHit CGAssassin02Ref kill setstage CharacterGen 24 end begin onHit CGAssassin03Ref kill setstage CharacterGen 24 end begin onHit CGAssassin04Ref kill setstage CharacterGen 24 end begin OnActivate if isActionRef player == 1 && getDead == 1 && getstagedone mq01 15 == 1 setstage MQ01 18 endif Activate end
113CGRopeBucketScriptscn CGRopeBucketScript begin OnHitWith Arrow1Iron if getstagedone MQ01 58 == 0 set MQ01.stage to 58 set MQ01.timer to .5 endif end
114CGScaredyRate02Scriptscn CGScaredyRate02Script begin OnPackageDone DORatRun02 ; attack the zombie setav confidence 50 startcombat CGZombie01REF end
115CGSewerExitScriptscn CGSewerExitScript short button begin OnActivate if IsActionRef player == 1 && getstagedone MQ01 88 == 0 player.scaonactor messagebox "Before exiting the sewers, you may revise your character.", "Edit Race", "Edit Birthsign", "Edit Class", "Finished - Exit Sewers" else if IsActionRef player == 1 player.scaonactor endif Activate endif end begin gamemode ;if button > 0 && button < 4 ; set button to -1 ; forceweather clear ; activate player 1 ; return ;endif set button to getbuttonpressed if button > -1 if charactergen.debug == 1 message "Button = %.0f", button endif if button == 3 ; exit sewers setstage MQ01 88 activate player elseif button == 0 showracemenu player.moveto CGSewerExitMarker elseif button == 1 showbirthsignmenu elseif button == 2 showclassmenu endif ; nice starry/sunny sky forceweather clear ; just in case player.setcrimegold 0 ; regenerate rat if CGRegenerat.getdead == 1 CGRegenerat.resurrect endif endif end
116CGSewerExteriorDoorScriptscn CGSewerExteriorDoorScript begin OnActivate if IsActionRef player == 1 && getstage MQ02 == 100 messageBox "A sign on the door reads 'No entry on pain of death. Sealed by authority of Commander Adamus Phillida, Imperial Legion'." else Activate endif end
117CGThiefSkeletonScriptscn CGThiefSkeletonScript short looted begin onActivate if IsActionRef player == 1 set looted to 1 endif Activate end
118CGTriggerZoneCellScriptscn CGTriggerZoneCellScript begin onTrigger player ; Glenroy waiting for player to get away from the cell door if getstage charactergen == 13 setstage charactergen 14 disable endif end
119CGTrigZone01SCRIPTscn CGTrigZone01SCRIPT short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef target.evaluatePackage set triggered to 1 endif end
120CGTrigZoneACTORSCRIPTscn CGTrigZoneACTORSCRIPT ; Activates assassins short triggered ref mySelf begin onTriggerActor if triggered == 0 CGGenericAssassin1.setrestrained 0 CGGenericAssassin2.setrestrained 0 CGGenericAssassin3.setrestrained 0 set triggered to 1 endif end
121CGTrigZoneAmbushBSCRIPTscn CGTrigZoneAmbushBSCRIPT ; Triggers start of Ambush B short triggered begin onTrigger player if triggered == 0 setstage charactergen 32 set triggered to 1 endif end
122CGTrigZoneEmperorBirthsignSCRIPTscn CGTrigZoneEmperorBirthsignSCRIPT ; Activates linked Parent object once short triggered begin onTrigger player if triggered == 0 set charactergen.inAmbushBRoom to 1 set triggered to 1 endif end
123CGWeaponScriptscn CGWeaponScript ; this script is used to detect when player equips weapons for CharGen tutorial begin OnAdd player set MQ01.weapon to 1 endif end begin OnEquip player set MQ01.weaponEquip to 1 end
124CGZombieSCRIPTscn CGZombieSCRIPT begin OnDeath DORatRunner01.modav aggression 30 DORatRunner02.modav aggression 30 DORatRunner03.modav aggression 30 DORatRunner01.EVP DORatRunner02.EVP DORatRunner03.EVP end
125CheydinhalNQDScriptscn CheydinhalNQDScript short DerveraVAR short HallgerdaVAR short ShelleyVAR short MachNaVAR short TertiaVAR short HilVAR short GruiandVAR short OhtesseVAR short NaspiaVAR short RaquanarVAR short DeetsanVAR short OrinturVAR short VoranilVAR short GanredhelVAR short DBHouseVAR
126ChorrolGuardHelpTestScriptscn ChorrolGuardHelpTestScript short stageVar
127ClaudeMaricScriptscn ClaudeMaricScript ; QUESTS: ; MS22 ; MS27 short meetPC short threatenPC short holdPosition short temp begin OnPackageStart MS22MaricWaitInTavern additem DrinkWine2TamikaGood 3 end ; make his posse react when he escapes begin OnPackageStart MS22MaricEscapeWithCarving SrazirrRef.evaluatepackage BrucetusFestiniusRef.evaluatepackage RigmorRef.evaluatepackage end begin OnHit player if getstage ms22 == 50 setstage ms22 54 endif if getstage MS22 == 70 setstage ms22 72 endif if getstage MS22 == 72 set temp to getbaseav health set temp to temp / 4 if getav health < temp setstage ms22 75 scaonactor stopcombat player.scaonactor evp if getdead == 0 sayto player MS22Voice endif endif endif end
128CPFallingBrick01SCRIPTscn CPFallingBrick01SCRIPT short activated ref mySelf ref myParent float timer begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if activated == 1 && isActionRef mySelf == 0 playgroup unequip 0 triggerHitShader 4 set activated to 2 set timer to 1 endif end begin gameMode if timer <= 0 && activated == 2 myParent.activate mySelf 1 set activated to 3 endif if timer > 0 set timer to timer - getSecondsPassed endif end
129CPLog01SCRIPTscn CPLog01SCRIPT short activated begin onActivate if isActionRef player == 1 if activated == 0 playgroup unequip 0 set activated to 1 set MQ15AnaxesRef.leverCount to MQ15AnaxesRef.leverCount + 1 MQ15XivCatcherRef.evp MQ15XivCatcherRef.Sayto player MQ15Voice endif endif end
130CPRollingRock01SCRIPTscn CPRollingRock01SCRIPT short stage float timer float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fTrapDeathPushBack short bTrapContinuous begin onActivate if isActionRef player == 1 && stage < 2 message "The boulder is jammed into place, it won't budge." endif end begin gameMode if stage == 0 set fTrapDamage to 0 set fTrapPushBack to 20 set fTrapDeathPushBack to 180 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set stage to 1 endif if MQ15Log01REF.activated == 1 && MQ15Log02REF.activated == 1 && stage == 1 set stage to 2 set timer to 2 ; 2 seconds before boulder moves endif if timer <= 0 && stage == 2 set fTrapDamage to 40 playgroup unequip 0 triggerHitShader 3 set stage to 3 set timer to 2 ; seconds till traps stops hurtin' MQ15XivCatcherHoldBoulderMarker.enablelinkedpathpoints endif ; remove trap damage if timer <= 0 && stage == 3 MQ15AnaxesRef.setrestrained 0 MQ15XivilaiYell.disable MQ15AnaxesRef.addscriptpackage MQ15MinotaurExitCave set fTrapDamage to 0 set fTrapDeathPushBack to 0 set stage to 4 setstage mq15 35 endif if timer > 0 set timer to timer - getSecondsPassed endif end
131CRopeRock01SCRIPTscn CRopeRock01SCRIPT ; activates parent short init short busy ref target ref mySelf begin onActivate if init == 0 set target to getParentRef set mySelf to getSelf set init to 1 endif if isActionRef mySelf == 0 && busy == 0 set busy to 1 target.activate mySelf 1 playgroup forward 0 endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
132CRopeRock02EnableSCRIPTscn CRopeRock02EnableSCRIPT ; enables parent ref short init short busy ref target ref mySelf begin onActivate if init == 0 set target to getParentRef set mySelf to getSelf set init to 1 endif if isActionRef mySelf == 0 && busy == 0 set busy to 1 target.enable playgroup forward 0 endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
133CSecretDoor01SCRIPTscn CSecretDoor01SCRIPT short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " The wall won't shift." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 ;triggerHitShader 3 set open to 1 enableLinkedPathPoints else playgroup backward 1 ;triggerHitShader 3 set open to 0 disableLinkedPathPoints endif set timer to 0.5 set next to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
134CSecretDoorOPEN01SCRIPTscn CSecretDoorOPEN01SCRIPT short init short closed short busy short next float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if closed == 1 message " The wall won't shift." endif elseif isActionRef mySelf == 0 && busy == 0 if closed == 0 playgroup forward 0 ;triggerHitShader 3 set closed to 1 disableLinkedPathPoints else playgroup backward 1 ;triggerHitShader 3 set closed to 0 enableLinkedPathPoints endif set timer to 0.5 set next to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef set init to 1 endif if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set closed to 0 set next to 0 set busy to 0 enableLinkedPathPoints end
135CSwingingTrap01SCRIPTscn CSwingingTrap01SCRIPT short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin OnActivate if activated == 0 playgroup unequip 1 set fTrapDamage to 10 set fTrapPushBack to 1000 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 1 elseif activated == 1 trapUpdate endif end
136CTortureCage01SCRIPTscn CTortureCage01SCRIPT ; on activation, lowers and raises self (anim groups "Forward" & "Backward") ; to open and close the two doors, use the following animation groups ; Door01 open = "FastForward" ; Door01 close = "FastBackward" ; Door02 open = "Left" ; Door02 close = "Right" ; automatically activates parents, so if you want an automatic counterweight effect, link this to a CTortureCageLowered01 object short lowered short busy short initialized ref mySelf ref myParent float timer short door1open ; set to 1 when door01 is open short door2open ; set to 1 when door02 is open begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 && busy == 0 if door1open == 1 playgroup FastBackward 0 set busy to 2 set door1open to 0 set timer to 1 elseif door2open == 1 playgroup Right 0 set busy to 2 set door2open to 0 set timer to 1 elseif lowered == 0 playgroup forward 0 set busy to 2 set lowered to 1 set timer to 1 else playgroup backward 0 set busy to 2 set lowered to 0 set timer to 1 endif endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
137CTrapSwingLog01SCRIPTscn CTrapSwingLog01SCRIPT short triggered float timer ref target ref mySelf float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if isActionRef player == 0 && triggered == 0 ; set up the damage values set fTrapDamage to 15 set fTrapPushBack to 900 set fTrapMinVelocity to 150 set fLevelledDamage to 1.5 set bTrapContinuous to 0 playgroup unequip 0 set triggered to 1 set timer to 5 endif end begin gameMode ; daisy-chain if triggered == 1 && timer <= 4.5 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 2 endif ; reduce trap potency after a delay if triggered == 2 && timer <= 0 set fTrapDamage to 5 set fTrapPushBack to 100 set triggered to 3 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set triggered to 0 end
138CTrapSwingMace01SCRIPTscn CTrapSwingMace01SCRIPT short triggered float timer ref target ref mySelf float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if isActionRef player == 0 && triggered == 0 ; set up the damage values set fTrapDamage to 20 set fTrapPushBack to 900 set fLevelledDamage to 1.5 ;0 - 100 ;set fTrapDeathPushBack to 50 set fTrapMinVelocity to 200 set bTrapContinuous to 0 playgroup unequip 0 set triggered to 1 set timer to 6 endif end begin gameMode ; daisy-chain if triggered ==1 && timer <= 5 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 2 endif ; reduce trap potency after delay if triggered == 2 && timer <= 0 set fTrapDamage to 5 set fTrapPushBack to 100 set triggered to 3 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set triggered to 0 end
139CTrapSwingMaceShort01SCRIPTscn CTrapSwingMaceShort01SCRIPT short triggered float timer ref target ref mySelf float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if isActionRef player == 0 && triggered == 0 ; set up the damage values set fTrapDamage to 10 set fTrapPushBack to 500 set fLevelledDamage to 1.5 set fTrapMinVelocity to 200 set bTrapContinuous to 0 playgroup unequip 0 set triggered to 1 set timer to 5 endif end begin gameMode ; daisy-chain if triggered == 1 && timer <= 4.5 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 2 endif ; reduce trap potency after delay if triggered == 2 && timer <= 0 set fTrapDamage to 5 set fTrapPushBack to 100 set triggered to 3 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set triggered to 0 end
140CTrigPressurePlate01SCRIPTscn CTrigPressurePlate01SCRIPT ; Activates trap linked as Parent short triggered ref target ref mySelf begin onTrigger if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 playgroup forward 0 setdestroyed 1 endif end begin onReset reset3DState set triggered to 0 setdestroyed 0 end
141CTrigTripwire01SCRIPTscn CTrigTripwire01SCRIPT short triggered ref target ref mySelf begin onActivate if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set triggered to 1 setDestroyed 1 endif end begin onTrigger if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set triggered to 1 setDestroyed 1 endif end begin onReset reset3DState set triggered to 0 setDestroyed 0 end
142DABoethiaBridgeRuinGate01Scriptscn DABoethiaBridgeRuinGate01Script ;see TrigZonePlayerDoonce01_DABoethiaSCRIPT01 through TrigZonePlayerDoonce01_DABoethiaSCRIPT10 ; activated by linked child ; activates optionally linked parent after 5 sec delay short activated short open short next short busy float timer short init ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 if GetStageDone DABoethia 30 == 1 playgroup forward 0 set open to 1 enableLinkedpathpoints else message "This gate is sealed by the will of Great Boethia. Your fate lies through the other gate." endif endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedpathpoints ;else ;playgroup backward 0 ;set open to 0 endif set next to 1 set timer to 5 set busy to 1 endif end begin gameMode if init == 0 disablelinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
143DAClavicusDogVARSscn DAClavicusDogVARS short dogtalk1 short dogtalk2 short dogtalk3
144DAClavicusUmbraScriptscn DAClavicusUmbraScript short umbratalk short attack Begin GameMode if ( attack == 1 ) StartCombat Player set attack to 0 endif End
145DaedraLeveledListSCRIPTscn DaedraLeveledListSCRIPT ; this script marks the leveled lists as destroyed when the parent is destroyed short doOnce ref myParent short tempdestroyed short temphaveparent begin OnLoad set doOnce to 0 end begin gamemode if doOnce == 0 set doOnce to 1 set myParent to GetParentRef if myParent > 0 set temphaveparent to 1 if myParent.getdestroyed == 1 setdestroyed 1 set tempdestroyed to 1 else setdestroyed 0 set tempdestroyed to 0 endif endif endif end
146DaedricSiegeEngineSCRIPTscn DaedricSiegeEngineSCRIPT begin OnLoad ; all the stuff to keep player from messing with it setghost 1 end
147DAHermaeusSoulsSpellscn DAHermaeusSoulsSpell short neardead ref newtarget short badtarget short sametarget begin ScriptEffectStart if ( IsActor == 1 ) && ( GetDead == 0 ) && ( GetIsCreature == 0 ) set newtarget to GetSelf if ( DAHermaeusMora.spellworking == 0 ) set DAHermaeusMora.target to GetSelf ;messageBox "DAHermaeusMora.target: %.0f", DAHermaeusMora.target set DAHermaeusMora.spellworking to 1 else if ( newtarget == DAHermaeusMora.target ) && ( DAHermaeusMora.spellworking == 1 ) MessageBox "That person is already affected by Hermaeus Mora's Soul Trap." set DAHermaeusMora.sametarget to 1 else MessageBox "You may only trap one soul at a time for Hermaeus Mora." endif endif else Message "That is not a valid target for Hermaeus Mora's Soul Trap" set badtarget to 1 end begin ScriptEffectFinish if ( badtarget == 0 ) set newtarget to 0 set DAHermaeusMora.doneVAR to 1 endif endif end ;begin ScriptEffectUpdate ;this checks the race of the killed NPC and updates the DAHermaeusMoraScript ; if ( GetAV Health <= 5 ) && ( neardead == 0 ) ; Messagebox "I'm DEAD!!!" ; if ( GetIsRace Argonian == 1 ) ; Set DAHermaeusMora.killedargonian to 1 ; elseif ( GetIsRace Breton == 1 ) ; Set DAHermaeusMora.killedbreton to 1 ; elseif ( GetIsRace darkelf == 1 ) ; Set DAHermaeusMora.killeddunmer to 1 ; elseif ( GetIsRace highelf == 1 ) ; Set DAHermaeusMora.killedaltmer to 1 ; elseif ( GetIsRace imperial == 1 ) ; Set DAHermaeusMora.killedimperial to 1 ; elseif ( GetIsRace khajiit == 1 ) ; Set DAHermaeusMora.killedkhajiit to 1 ; elseif ( GetIsRace nord == 1 ) ; Set DAHermaeusMora.killednord to 1 ; elseif ( GetIsRace orc == 1 ) ; Set DAHErmaeusMora.killedorc to 1 ; elseif ( GetIsRace redguard == 1 ) ; Set DAHermaeusMora.killedredguard to 1 ; elseif ( GetIsRace woodelf == 1 ) ; Set DAHermaeusMora.killedbosmer to 1 ; endif ; Kill Player ; set neardead to 1 ; endif ; ;end ;begin ScriptEffectFinish ; MessageBox "THE SPELL IS DONE" ;end
148DAHermaeusStaffscn DAHermaeusStaff ref target float timer short timerOn Begin GameMode set target to DAHermaeusMora.target if ( DAHermaeusMora.doneVAR == 1 ) && ( timerOn == 0 ) && ( DAHermaeusMora.sametarget == 0 ) set timerOn to 1 elseif ( DAHermaeusMora.doneVAR == 1 ) && ( timerOn == 0 ) && ( DAHermaeusMora.sametarget == 1 ) set DAHermaeusMora.doneVAR to 0 set DAHermaeusMora.sametarget to 0 endif if ( timerOn == 1 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 2 ) set timerOn to 2 endif endif if ( target.GetDead == 1 ) && ( DAHermaeusMora.spellworking == 1 ) && ( timerOn == 2 ) if ( target.GetIsRace Argonian == 1 ) Set DAHermaeusMora.killedargonian to 1 SetStage DAHermaeusMora 30 elseif ( target.GetIsRace Breton == 1 ) Set DAHermaeusMora.killedbreton to 1 SetStage DAHermaeusMora 31 elseif ( target.GetIsRace woodelf == 1 ) Set DAHermaeusMora.killedbosmer to 1 SetStage DAHermaeusMora 32 elseif ( target.GetIsRace imperial == 1 ) Set DAHermaeusMora.killedimperial to 1 SetStage DAHermaeusMora 33 elseif ( target.GetIsRace khajiit == 1 ) Set DAHermaeusMora.killedkhajiit to 1 SetStage DAHermaeusMora 34 elseif ( target.GetIsRace darkelf == 1 ) Set DAHermaeusMora.killeddunmer to 1 SetStage DAHermaeusMora 35 elseif ( target.GetIsRace highelf == 1 ) Set DAHermaeusMora.killedaltmer to 1 SetStage DAHermaeusMora 36 elseif ( target.GetIsRace nord == 1 ) Set DAHermaeusMora.killednord to 1 SetStage DAHermaeusMora 37 elseif ( target.GetIsRace redguard == 1 ) Set DAHermaeusMora.killedredguard to 1 SetStage DAHermaeusMora 38 elseif ( target.GetIsRace orc == 1 ) Set DAHermaeusMora.killedorc to 1 SetStage DAHermaeusMora 39 endif if ( DAHermaeusMora.raceskilled == 0 ) && ( DAHermaeusMora.killedargonian == 1 ) && ( DAHermaeusMora.killedbreton == 1 ) && ( DAHermaeusMora.killedbosmer == 1 ) && ( DAHermaeusMora.killedimperial == 1 ) && ( DAHermaeusMora.killedkhajiit == 1 ) if ( DAHermaeusMora.killeddunmer == 1 ) && ( DAHermaeusMora.killedaltmer == 1 ) && ( DAHermaeusMora.killednord == 1 ) && ( DAHermaeusMora.killedredguard == 1 ) && ( DAHermaeusMora.killedorc == 1 ) set DAHermaeusMora.raceskilled to 1 SetStage DAHermaeusMora 40 endif endif set DAHermaeusMora.spellworking to 0 set DAHermaeusMora.target to 0 set DAHermaeusMora.doneVAR to 0 set timerOn to 0 elseif ( target.GetDead == 0 ) && ( DAHermaeusMora.spellworking == 1 ) && ( timerOn == 2 ) set DAHermaeusMora.Spellworking to 0 set DAHermaeusMora.target to 0 set DAHermaeusMora.doneVAR to 0 set timerOn to 0 endif End
149DAMephalaDalviluDaggerSCRIPTscn DAMephalaDalviluDaggerSCRIPT begin OnAdd player if ( GetStageDone DAMephala 90 == 0 ) && ( GetStageDone DAMephala 115 == 0 ) && ( GetStageDone DAMephala 40 == 0 ) && ( GetStage DAMephala >= 20 ) SetStage DAMephala 40 endif end begin OnAdd HrolUlfgarREF if ( GetStageDone DAMephala 90 == 0 ) && ( GetStageDone DAMephala 115 == 0 ) && ( GetStageDone DAMephala 70 == 1 ) && ( GetStageDone DAMephala 75 == 0 ) SetStage DAMephala 75 RemoveMe endif end
150DAMephalaUlfgarRingSCRIPTscn DAMephalaUlfgarRingSCRIPT begin OnAdd player if ( GetStageDone DAMephala 90 == 0 ) && ( GetStageDone DAMephala 115 == 0 ) && ( GetStageDone DAMephala 50 == 0 ) && ( GetStage DAMephala >= 20 ) SetStage DAMephala 50 endif end begin OnAdd NivanDalviluREF if ( GetStageDone DAMephala 90 == 0 ) && ( GetStageDone DAMephala 115 == 0 ) && ( GetStageDone DAMephala 60 == 1 ) && ( GetStageDone DAMephala 65 == 0 ) SetStage DAMephala 65 RemoveMe endif end
151DAMolagBalMaceScriptscn DAMolagBalMaceScript Begin OnEquip MelusPetilusREF set DAMolagBal.maceequip to 1 End
152DANamiraForgottenScriptscn DANamiraForgottenScript short attack float timer short reset short talkvar short confidenceVAR Begin GameMode if ( GetCombatTarget == Player ) && ( Player.IsActorUsingATorch == 1 ) SetAV Confidence 0 evp endif if ( confidenceVAR == 0 ) SetAV Confidence 100 set confidenceVAR to 1 endif if ( talkvar < 50 ) && ( talkvar > 0 ) && ( player.GetInCell Anga == 1 ) SayTo Priest1REF DANamiraReactions set talkvar to -1 endif if ( DANamira.priest1 == 1 ) && ( attack == 0 ) SetAV Confidence 100 SetAV Energy 100 StartCombat Priest1REF set attack to 1 set talkvar to GetRandomPercent endif set timer to ( timer - GetSecondsPassed ) if ( reset == 1 ) && ( timer < 0 ) set reset to 0 set DANamira.cower to 0 endif if ( attack == 0 ) && ( timer < 0 ) && ( player.GetInCell Anga == 1 ) && ( GetDead == 0 ) if ( GetDistance Priest1REF <= 200 ) && ( Priest1REF.dead == 0 ) set timer to SayTo Priest1REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest2REF <= 200 ) && ( Priest2REF.dead == 0 ) set timer to SayTo Priest2REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest3REF <= 200 ) && ( Priest3REF.dead == 0 ) set timer to SayTo Priest3REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest4REF <= 200 ) && ( Priest4REF.dead == 0 ) set timer to SayTo Priest4REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle ;elseif ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) ; set timer to SayTo Player DANamiraSpeech ; set DANamira.cower to 1 ; set reset to 1 ; PickIdle endif endif if ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) && ( GetDead == 0 ) && ( timer < 0 ) set timer to SayTo Player DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle endif End Begin OnDeath Player if ( GetStage DANamira < 100 ) SetStage DANamira 110 endif End
153DANamiraForgottenScript2scn DANamiraForgottenScript2 short attack float timer short reset short talkvar short confidenceVAR Begin GameMode if ( GetCombatTarget == Player ) && ( Player.IsActorUsingATorch == 1 ) SetAV Confidence 0 evp endif if ( confidenceVAR == 0 ) SetAV Confidence 100 set confidenceVAR to 1 endif if ( talkvar < 50 ) && ( talkvar > 0 ) && ( player.GetInCell Anga == 1 ) SayTo Priest1REF DANamiraReactions set talkvar to -1 endif if ( DANamira.priest2 == 1 ) && ( attack == 0 ) SetAV Confidence 100 SetAV Energy 100 StartCombat Priest2REF set attack to 1 set talkvar to GetRandomPercent endif set timer to ( timer - GetSecondsPassed ) if ( reset == 1 ) && ( timer < 0 ) set reset to 0 set DANamira.cower to 0 endif if ( attack == 0 ) && ( timer < 0 ) && ( player.GetInCell Anga == 1 ) && ( GetDead == 0 ) if ( GetDistance Priest1REF <= 200 ) && ( Priest1REF.dead == 0 ) set timer to SayTo Priest1REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest2REF <= 200 ) && ( Priest2REF.dead == 0 ) set timer to SayTo Priest2REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest3REF <= 200 ) && ( Priest3REF.dead == 0 ) set timer to SayTo Priest3REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest4REF <= 200 ) && ( Priest4REF.dead == 0 ) set timer to SayTo Priest4REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle ;elseif ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) ; set timer to SayTo Player DANamiraSpeech ; set DANamira.cower to 1 ; set reset to 1 ; PickIdle endif endif if ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) && ( GetDead == 0 ) && ( timer < 0 ) set timer to SayTo Player DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle endif End Begin OnDeath Player if ( GetStage DANamira < 100 ) SetStage DANamira 110 endif End
154DANamiraForgottenScript3scn DANamiraForgottenScript3 short attack float timer short reset short talkvar short confidenceVAR Begin GameMode if ( GetCombatTarget == Player ) && ( Player.IsActorUsingATorch == 1 ) SetAV Confidence 0 evp endif if ( confidenceVAR == 0 ) SetAV Confidence 100 set confidenceVAR to 1 endif if ( talkvar < 50 ) && ( talkvar > 0 ) && ( player.GetInCell Anga == 1 ) SayTo Priest1REF DANamiraReactions set talkvar to -1 endif if ( DANamira.priest3 == 1 ) && ( attack == 0 ) SetAV Confidence 100 SetAV Energy 100 StartCombat Priest3REF set attack to 1 set talkvar to GetRandomPercent endif set timer to ( timer - GetSecondsPassed ) if ( reset == 1 ) && ( timer < 0 ) set reset to 0 set DANamira.cower to 0 endif if ( attack == 0 ) && ( timer < 0 ) && ( player.GetInCell Anga == 1 ) && ( GetDead == 0 ) if ( GetDistance Priest1REF <= 200 ) && ( Priest1REF.dead == 0 ) set timer to SayTo Priest1REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest2REF <= 200 ) && ( Priest2REF.dead == 0 ) set timer to SayTo Priest2REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest3REF <= 200 ) && ( Priest3REF.dead == 0 ) set timer to SayTo Priest3REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest4REF <= 200 ) && ( Priest4REF.dead == 0 ) set timer to SayTo Priest4REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle ;elseif ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) ; set timer to SayTo Player DANamiraSpeech ; set DANamira.cower to 1 ; set reset to 1 ; PickIdle endif endif if ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) && ( GetDead == 0 ) && ( timer < 0 ) set timer to SayTo Player DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle endif End Begin OnDeath Player if ( GetStage DANamira < 100 ) SetStage DANamira 110 endif End
155DANamiraForgottenScript4scn DANamiraForgottenScript4 short attack float timer short reset short talkvar short confidenceVAR Begin GameMode if ( GetCombatTarget == Player ) && ( Player.IsActorUsingATorch == 1 ) SetAV Confidence 0 evp endif if ( confidenceVAR == 0 ) SetAV Confidence 100 set confidenceVAR to 1 endif if ( talkvar < 50 ) && ( talkvar > 0 ) && ( player.GetInCell Anga == 1 ) SayTo Priest1REF DANamiraReactions set talkvar to -1 endif if ( DANamira.priest4 == 1 ) && ( attack == 0 ) SetAV Confidence 100 SetAV Energy 100 StartCombat Priest4REF set attack to 1 set talkvar to GetRandomPercent endif set timer to ( timer - GetSecondsPassed ) if ( reset == 1 ) && ( timer < 0 ) set reset to 0 set DANamira.cower to 0 endif if ( attack == 0 ) && ( timer < 0 ) && ( player.GetInCell Anga == 1 ) && ( GetDead == 0 ) if ( GetDistance Priest1REF <= 200 ) && ( Priest1REF.dead == 0 ) set timer to SayTo Priest1REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest2REF <= 200 ) && ( Priest2REF.dead == 0 ) set timer to SayTo Priest2REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest3REF <= 200 ) && ( Priest3REF.dead == 0 ) set timer to SayTo Priest3REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle elseif ( GetDistance Priest4REF <= 200 ) && ( Priest4REF.dead == 0 ) set timer to SayTo Priest4REF DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle ;elseif ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) ; set timer to SayTo Player DANamiraSpeech ; set DANamira.cower to 1 ; set reset to 1 ; PickIdle endif endif if ( GetDistance Player <= 200 ) && ( Player.IsActorUsingATorch == 1 ) && ( GetDead == 0 ) && ( timer < 0 ) set timer to SayTo Player DANamiraSpeech set DANamira.cower to 1 set reset to 1 PickIdle endif End Begin OnDeath Player if ( GetStage DANamira < 100 ) SetStage DANamira 110 endif End
156DANamiraPriestScriptscn DANamiraPriestScript float timer short dead short reactvar Begin GameMode set timer to ( timer - GetSecondsPassed ) if ( timer < -4 ) && ( reactvar == 0 ) && ( GetDead == 0 ) set timer to Say DANamiraSpeech endif if ( reactvar == 0 ) && ( GetItemCount Torch02 == 0 ) && ( GetDead == 0 ) Say DANamiraReactions set reactvar to 1 endif if ( GetStage DANamira == 30 ) If ( Priest1REF.IsSpellTarget DANamiraDarkness ) && ( DANamira.priest1 == 0 ) Set DANamira.priest1 to 1 Priest1REF.RemoveItem Torch02 1 Priest1REF.AddItem DATorch02 1 endif If ( Priest2REF.IsSpellTarget DANamiraDarkness ) && ( DANamira.priest2 == 0 ) Set DANamira.priest2 to 1 Priest2REF.RemoveItem Torch02 1 Priest2REF.AddItem DATorch02 1 endif If ( Priest3REF.IsSpellTarget DANamiraDarkness ) && ( DANamira.priest3 == 0 ) Set DANamira.priest3 to 1 Priest3REF.RemoveItem Torch02 1 Priest3REF.AddItem DATorch02 1 endif If ( Priest4REF.IsSpellTarget DANamiraDarkness ) && ( DANamira.priest4 == 0 ) Set DANamira.priest4 to 1 Priest4REF.RemoveItem Torch02 1 Priest4REF.AddItem DATorch02 1 endif endif End Begin OnDeath set DANamira.priestsdead to ( DANamira.priestsdead + 1 ) set dead to 1 End Begin OnDeath Player SetStage DANamira 105 End
157DANamiraSpellscn DANamiraSpell Begin ScriptEffectStart Set DANamira.target to GetSelf ;MessageBox "SPELL CAST" End
158DAOghmaInfiniumScriptscn DAOghmaInfiniumScript short readOnce short button1 short button2 short basestrength short newstrength short basespeed short newspeed short baseagility short newagility short baseintelligence short newintelligence ;Begin OnActivate ;if ( readOnce == 0 ) && ( IsActionREF player == 1 ) ; MessageBox "Do you wish to read the Oghma Infinium?" "Yes" "No" ; set readOnce to 1 ;endif ;End Begin OnEquip if ( readOnce == 0 ) MessageBox "Do you wish to read the Oghma Infinium?" "Read the Path of Steel" "Read the Path of Shadow" "Read the Path of Spirit" "Do Not Read Anything" ;set button1 to GetButtonPressed set readOnce to 1 endif End Begin MenuMode if ( readOnce == 1 ) set button1 to getbuttonpressed if ( button1 == 0 ) ;MessageBox "INCREASING FIGHTER STUFF" Set basestrength to ( player.GetBaseAV Strength ) set newstrength to ( basestrength + 10 ) set basespeed to ( player.GetBaseAV Speed ) set newspeed to ( basespeed + 10 ) Player.SetAV Strength newstrength Player.SetAV Speed newspeed ModPCSkill Blade 10 ModPCSkill HeavyArmor 10 ModPCSkill Blunt 10 set readOnce to 4 elseif ( button1 == 1 ) ;MessageBox "INCREASING THIEF STUFF" set basespeed to ( player.GetBaseAV Speed ) set newspeed to ( basespeed + 10 ) Player.SetAV Speed newspeed set baseagility to ( player.GetBaseAV Agility ) set newagility to ( baseagility + 10 ) Player.SetAV Agility newagility ModPCSkill Sneak 10 ModPCSkill Security 10 ModPCSkill LightArmor 10 set readOnce to 4 elseif ( button1 == 2 ) ;MessageBox "INCREASING MAGE STUFF" set baseintelligence to ( player.GetBaseAV Intelligence ) set newintelligence to ( baseintelligence + 10 ) Player.SetAV intelligence newintelligence ModPCSkill Destruction 10 ModPCSkill Willpower 10 ModPCSkill Conjuration 10 ModPCSkill Restoration 10 set readOnce to 4 elseif ( button1 == 3 ) set button1 to 0 set readOnce to 0 endif endif if ( readOnce == 4 ) set readOnce to 5 Player.RemoveItem DAOghmaInfinium 1 endif End
159DAPeryiteDoorToTamrielSCRIPTscn DAPeryiteDoorToTamrielSCRIPT ;begin OnActivate ; if IsActionRef player == 1 ; Activate ; if ( GetStage DAPeryite == 80 ) ; SetStage DAPeryite 90 ; endif ; endif ;end
160Dark02PirateScriptscn Dark02PirateScript short PiratesMad short MeanPirate begin gamemode if PiratesMad == 0 if PirateMarker1.GetDistance Player <= 300 moddisposition player, -100 Dark02DeckPirate2.moddisposition player, -100 Dark02DeckPirate1.moddisposition player, -100 set PiratesMad to 1 endif endif if PiratesMad == 0 if PirateMarker2.GetDistance Player <= 400 moddisposition player, -100 Dark02DeckPirate2.moddisposition player, -100 Dark02DeckPirate1.moddisposition player, -100 set PiratesMad to 1 endif endif if PiratesMad == 0 if PirateMarker3.GetDistance Player <= 400 moddisposition player, -100 Dark02DeckPirate2.moddisposition player, -100 Dark02DeckPirate1.moddisposition player, -100 set PiratesMad to 1 endif endif if MeanPirate == 0 if GetDistance Player < 400 ;StartConversation player, Greeting set MeanPirate to 1 endif endif end
161Dark07MercenaryDisableSCRIPTscn Dark07MercenaryDisableSCRIPT begin GameMode if (GetStage Dark07Medicine >= 10) == 1 disable endif end
162Dark09GateLeverSCRIPTscn Dark09GateLeverSCRIPT ref myParent ref mySelf short activated short busy short opened short SkeletonKill float timer begin onActivate if busy == 0 set activated to 1 if ( opened == 0 ) playgroup forward 0 set opened to 1 else playgroup backward 0 set opened to 0 endif set timer to 2 set busy to 1 set SkeletonKill to 1 endif endif end begin gameMode if ( timer <= 0 ) && activated == 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set activated to 0 set SkeletonKill to 0 endif if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set opened to 0 set busy to 0 set SkeletonKill to 0 end
163Dark09PhillidaBodyguardScriptscn Dark09PhillidaBodyguardScript begin gamemode if Dark09Retirement.suicide == 1 if GetDead == 0 if GetInCell LeyawiinCityWatchBarracks AddItem Dark09SuicideNote 1 Kill set Dark09Retirement.suicide to 2 endif endif endif end
164Dark09SkeletonSuicideSCRIPTscn Dark09SkeletonSuicideSCRIPT ref self short doonce begin GameMode if doonce == 0 set self to getself set doonce to 1 elseif doonce == 1 if Dark09LeverRef01.SkeletonKill == 1 self.kill set doonce to 2 elseif Dark09LeverRef02.SkeletonKill == 1 self.kill set doonce to 2 endif endif end begin onReset set doonce to 0 end
165Dark10SpecialHourglassSCRIPTscn Dark10SpecialHourglassSCRIPT short doOnce begin OnAdd player if doOnce == 0 ; OR, do whatever you want to him ;CeledaenRef.kill set Dark10SpecialWizard.nosand to 1 set doOnce to 1 endif end
166DarkVampScriptscn DarkVampScript Float fQuestDelayTime begin MenuMode if Dark00General.VampAccept == 1 && Dark00General.VampPlayer == 0 if player.GetInCell CheydinhalSanctuary == 1 && IsPCSleeping > 0 if GetDeadCount VicenteValtieri == 0 set Dark00General.VampPlayer to 1 endif endif endif End begin gamemode if Dark00General.VampPlayer == 1 set Dark00General.VampPlayer to 2 Player.AddSpell VampDisease SetStage DarkVamp 100 endif end
167DASanguineChestScriptscn DASanguineChestScript short doOnce Begin OnActivate if isActionRef player == 1 if ( GetStage DASanguine == 100 ) SetShowQuestItems 0 Activate else MessageBox "You cannot open this chest without Sanguine's blessing." endif endif End
168DASanguineDoorScriptscn DASanguineDoorScript short openVAR short doOnce short convoVAR float timer short letinVAR Begin OnActivate if ( GetStage DASanguine == 20 ) || ( GetStage DASanguine == 25 ) if ( IsActionRef AlessiaCaroREF == 1 ) Activate set openVAR to 1 elseif ( IsActionREF Player == 1 ) && ( letinVAR == 0 ) MessageBox "You cannot open this door." elseif ( IsActionREF Player == 1 ) && ( letinVAR >= 1 ) Activate endif else ;if ( GetStage DASanguine == 0 ) || ( GetStage DASanguine >= 100 ) ; if ( IsActionREF Player == 1 ) ; MessageBox "You cannot open this door." ; else ; Activate ; endif ;endif Activate endif End Begin GameMode if ( GetStage DASanguine > 0 ) && ( GetStage DASanguine < 30 ) if ( letinVAR == 1 ) SanguineGuardREF.evp set letinVAR to 2 endif if ( openVAR == 1 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 3.5 ) set SanguineGuardREF.throughdoor to 1 SetOpenState 0 set openVAR to 0 ;MessageBox "SHOULD CHANGE HIS VARIABLE" endif endif if ( openVAR == 0 ) && ( GetOpenState == 1 ) && ( letinVAR == 0 ) SetOpenState 0 endif if ( openVAR == 1 ) && ( GetDistance Player <= 256 ) && ( convoVAR == 0 ) SanguineGuardREF.StartConversation Player set convoVAR to 1 endif if ( convoVAR == 2 ) set convoVAR to 0 Player.MoveToMarker DASanguineKickedOutMarker endif endif End
169DASanguineGuardScriptscn DASanguineGuardScript short countessmove short countessinside short throughdoor short moveback float timer short dinnerVAR short doOnce short doOnce2 Begin GameMode if ( GetCurrentTime >= 18 ) && ( GetCurrentTime <=24 ) && ( GetDisabled == 0 ) if ( dinnerVAR == 0 ) Set dinnerVAR to 1 endif else if ( dinnerVAR == 1 ) Set dinnerVAR to 0 endif endif if ( GetDistance AlessiaCaroREF <= 512 ) && ( countessmove == 0 ) && ( countessinside == 0 ) set countessmove to 1 set moveback to 0 ;MessageBox "FIRST PART" if ( doOnce == 0 ) evp set doOnce to 1 endif endif if ( countessmove == 1 ) && ( throughdoor == 1 ) set moveback to 1 set countessinside to 1 set countessmove to 0 set throughdoor to 0 ;MessageBox "SECOND PART" if ( doOnce2 == 0 ) evp set doOnce2 to 1 endif endif if ( moveback == 1 ) && ( countessmove == 1 ) set timer to ( timer + getsecondspassed ) if ( timer >= 4 ) ;set countessmove to 0 set moveback to 0 ;set throughdoor to 0 endif endif End
170DASanguineRoseCreatureScriptscn DASanguineRoseCreatureScript ref target ref me short doOnce short goAway short effOnce short doOnce2 float timer short dead Begin OnLoad if ( doOnce == 0 ) set me to GetSelf set target to DASanguineRoseQuest.spelltarget set doOnce to 1 pme MYTH ;PlayMagicEffectVisuals FIDG endif End Begin GameMode if ( doOnce == 1 ) StartCombat target set doOnce to 2 endif if ( doOnce == 2 ) && ( doOnce2 == 0 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 20 ) if ( effOnce == 0 ) ;PlayMagicShaderVisuals effectFireDamage pme MYTH set effOnce to 1 endif set DASanguineRoseQuest.GoAway to 1 endif endif if ( DASanguineRoseQuest.GoAway == 1 ) ;PlayMagicEffectVisuals FIDG if ( timer >= 21 ) ;StopMagicShaderVisuals effectFireDamage endif if ( timer >= 21 ) me.Disable set DASanguineRoseQuest.GoAway to 0 set DASanguineRoseQuest.spellworking to 0 set doOnce2 to 1 ;MessageBox "SETTING SPELLWORKING TO 0" endif endif if ( dead == 0 ) if ( GetDead == 1 ) set dead to 1 set DASanguineRoseQuest.GoAway to 1 set timer to 20 set DASanguineRoseQuest.spellworking to 0 endif endif End ;Begin OnDeath ; set DASanguineRoseQuest.GoAway to 1 ; set timer to 20 ; set DASanguineRoseQuest.spellworking to 0 ;End
171DASanguineRoseQuestScriptscn DASanguineRoseQuestScript ref spelltarget short GoAway short spellworking
172DASanguineRoseSpellScriptscn DASanguineRoseSpellScript ref self Begin ScriptEffectStart if ( DASanguineRoseQuest.spellworking == 0 ) if ( IsActor == 1 ) ;MessageBox "SPELL WORKING" set self to GetSelf set DASanguineRoseQuest.spelltarget to GetSelf PlaceAtMe DASanguineRoseList 1 128 0 set DASanguineRoseQuest.spellworking to 1 endif endif End Begin ScriptEffectFinish ;set DASanguineRoseQuest.GoAway to 1 ;set DASanguineRoseQuest.spellworking to 0 End
173DASanguineScriptscn DASanguineScript short target short spellworking short dinnertime short nudebomb short guardmove short doonce1 short doonce2 short doonce3 short doonce4 short doonce5 short doperframe short caroVAR short spelldone float fQuestDelayTime short failed short tryagain Begin GameMode if ( GetStage DASanguine >= 20 ) if ( fQuestDelayTime == 0.0 ) set fQuestDelayTime to 0.5 endif if ( GetStage DASanguine <= 25 ) && ( GetStage DASanguine >=10 ) if ( spellworking == 1 ) player.RemoveAllItems DASanguineChestREF SetShowQuestItems 1 set spellworking to 2 ;set fQuestDelayTime to 0.5 endif ;this section is to make sure that the table doesn't block the spell from hitting all the NPCs if ( nudebomb >=3 ) && ( nudebomb < 5 ) && ( failed == 0 ) && ( tryagain < 5 ) if ( VlarimilOriusREF.IsSpellTarget DASanguineStark == 0 ) LeyawiinDiningChairREF1.Cast DASanguineStark VlarimilOriusREF endif if ( TermanweREF.IsSpellTarget DASanguineStark == 0 ) TsaviDiningChairRef.Cast DASanguineStark TermanweREF endif if ( BrittaInvelREF.IsSpellTarget DASanguineStark == 0 ) HlidaraMothrilDiningChairRef.Cast DASanguineStark BrittaInvelREF endif if ( JarasInvelREF.IsSpellTarget DASanguineStark == 0 ) OnstayaSundewDiningChairRef.Cast DASanguineStark JarasInvelREF endif if ( AlessiaCaroREF.IsSpellTarget DASanguineStark == 0 ) MariusCaroDiningChairRef.Cast DASanguineStark AlessiaCaroREF endif set tryagain to ( tryagain + 1 ) endif if ( nudebomb >= 1 ) && ( nudebomb < 5 ) && ( GetStage DASanguine < 100 ) if ( failed == 0 ) && ( player.GetInCell LeyawiinCastleCountyHall == 0 ) set failed to 1 endif if ( player.GetInCell LeyawiinCastleDungeon == 0 ) && ( failed == 1 ) SetStage DASanguine 105 DASanguineChestREF.RemoveAllItems Player SetShowQuestItems 0 SanguineGuardREF.disable endif endif if ( nudebomb >= 5 ) && ( GetStage DASanguine < 30 ) SetStage DASanguine 30 endif set doperframe to 0 if ( VlarimilOriusREF.IsSpellTarget DASanguineStark == 1 ) && ( doonce1 == 0 ) && ( doperframe == 0 ) set nudebomb to ( nudebomb + 1 ) set doonce1 to 1 set doperframe to 1 VlarimilOriusREF.RemoveAllItems endif if ( TermanweREF.IsSpellTarget DASanguineStark == 1 ) && ( doonce2 == 0 ) && ( doperframe == 0 ) set nudebomb to ( nudebomb + 1 ) set doonce2 to 1 set doperframe to 1 TermanweREF.RemoveAllItems endif if ( BrittaInvelREF.IsSpellTarget DASanguineStark == 1 ) && ( doonce3 == 0 ) && ( doperframe == 0 ) set nudebomb to ( nudebomb + 1 ) set doonce3 to 1 set doperframe to 1 BrittaInvelREF.RemoveAllItems endif if ( JarasInvelREF.IsSpellTarget DASanguineStark == 1 ) && ( doonce4 == 0 ) && ( doperframe == 0 ) set nudebomb to ( nudebomb + 1 ) set doonce4 to 1 set doperframe to 1 JarasInvelREF.RemoveAllItems endif if ( AlessiaCaroREF.IsSpellTarget DASanguineStark == 1 ) && ( doonce5 == 0 ) && ( doperframe == 0 ) set nudebomb to ( nudebomb + 1 ) set doonce5 to 1 set doperframe to 1 set caroVAR to 1 AlessiaCaroREF.RemoveAllItems DASanguineChest2 endif endif endif if ( GetStage DASanguine >= 30 ) if ( spelldone == 1 ) if ( player.GetInCell Leyawiin == 0 ) SetShowQuestItems 0 set spelldone to 2 set fQuestDelayTime to 0.0 endif endif if ( SanguineGuardREF.GetDisabled == 0 ) if ( player.GetInCell LeyawiinCastle == 0 ) SanguineGuardREF.Disable ;set fQuestDelayTime to 0.0 endif endif endif End
174DASanguineSpellscn DASanguineSpell short baseenergy ref LOSCheck Begin ScriptEffectStart ;MessageBox "THE SPELL SHOULD BE WORKING" if ( GetInFaction LeyawiinGuards == 0 ) && ( GetinFaction DASanguineNakedFACTION == 1 ) Set DASanguine.target to GetSelf ;Set LOSCheck to GetSelf ;if ( player.GetLOS LOSCheck == 1 ) && ( player.GetDistance DASanguineSpellDistanceREF <= 1000 ) if ( GetSelf !=alessiaCaroREF ) ;RemoveAllItems else ;RemoveAllItems DASanguineChest2 endif if ( DASanguine.SpellWorking == 0 ) set DASanguine.SpellWorking to 1 endif AddScriptPackage DASanguineStarkPackage Set baseenergy to GetAV Energy SetAV Energy 100 ;endif endif End Begin ScriptEffectFinish SetAV Energy baseenergy set DASanguine.spelldone to 1 ;RemoveScriptPackage DASanguineStarkPackage AlessiaCaroREF.AddScriptPackage DASanguineCaroGetClothes End
175DASheogorathDogScriptscn DASheogorathDogScript short doOnce short soundVAR Begin GameMode if ( doOnce == 0 ) && ( GetDisabled == 0 ) PlayMagicShaderVisuals effectFireDamage set doOnce to 1 endif if ( doOnce == 1 ) && ( GetStage DASheogorath == 70 ) StopMagicShaderVisuals effectFireDamage set doOnce to 2 endif if ( soundVAR == 0 ) && ( GetDisabled == 0 ) ;PlaySound NPCDogInjured endif End Begin OnDeath set DASheogorath.dogsdead to ( DASheogorath.dogsdead + 1 ) ;PlaySound set soundvar to 1 End
176DASheogorathPotScriptscn DASheogorathPotScript short doOnce short messageOn short button Begin OnActivate if isActionRef player == 1 if ( GetStage DASheogorath >= 40 ) && ( GetStage DASheogorath <= 45 ) && ( Player.GetItemCount DASheogorathCheese == 1 ) MessageBox "Place the Olroy Cheese in the cooking pot?" "Yes" "No" set messageOn to 1 endif endif endif End Begin GameMode if ( MessageOn == 1 ) set button to GetButtonPressed if ( button >= 0 ) set MessageOn to 0 endif if ( button == 0 ) player.RemoveItem DASheogorathCheese 1 SetStage DASheogorath 47 set messageOn to 0 DASheogorathSmokeREF3.Enable DASheogorathCheese2REF.Enable else set button to 0 endif endif End
177DASheogorathRatScriptscn DASheogorathRatScript short doOnce float timer short poisoned short gotclose Begin OnPackageStart DASheogorathRatWander2 set poisoned to 1 End Begin GameMode if ( poisoned == 1 ) if ( doOnce == 0 ) PlayMagicEffectVisuals PARA set doOnce to 1 endif set timer to ( timer + GetSecondsPassed ) if ( timer >= 45 ) Kill set poisoned to -1 endif endif if ( gotclose == 0 ) && ( GetDistance DASheogorathRatMarker2 <= 300 ) set DASheogorath.ratsclose to ( DASheogorath.ratsclose + 1 ) set gotclose to 1 endif End
178DASheogorathRibassaScriptscn DASheogorathRibassaScript short doOnce Begin OnPackageEnd DASheogorathRibassaPoison2 set DASheogorath.ratpackageVAR to 1 if ( player.getincell borderwatch == 1 ) StartConversation Player endif End Begin GameMode if ( doOnce == 0 ) && ( DASheogorath.weatherOnce == 1 ) && ( GetDistance Player <= 256 ) SayTo Player DASheogorathSpeech set doOnce to 1 setav energy 100 evp endif End
179DASkeletonKeyScriptscn DASkeletonKeyScript short hasKey Begin GameMode if ( player.GetDead == 0 ) if ( player.getitemcount DASkeletonKey == 1 ) if ( player.isspelltarget DASkeletonKeySpell == 0 ) player.addspell DASkeletonKeySpell endif elseif ( player.getitemcount DASkeletonKey == 0 ) if ( player.isspelltarget DASkeletonKeySpell == 1 ) player.removespell DASkeletonKeySpell endif endif endif End
180DASkullofCorruptionActivateScriptscn DASkullofCorruptionActivateScript Begin OnActivate End
181DASkullofCorruptionQuestScriptscn DASkullofCorruptionQuestScript short raceVAR short sexVAR ref target ref summon short spellworking short changeOnce short vampVAR float fquestdelaytime short goAway
182DASkullofCorruptionSpellScriptscn DASkullofCorruptionSpellScript ref target short doOnce ref summon Begin ScriptEffectStart set target to GetSelf set DASkullofCorruption.target to GetSelf ;Find the race of the target if ( DASkullofCorruption.spellworking == 0 ) && ( IsActor == 1 ) && ( IsGuard == 0 ) && ( GetDead == 0 ) && ( GetIsCreature == 0 ) && ( GetItemCount DASkullCorruption == 0 ) ;if ( GetIsRace Argonian == 1 ) ; set DASkullofCorruption.raceVAR to 1 ;elseif ( GetIsRace Breton == 1 ) ; set DASkullofCorruption.raceVAR to 2 ;elseif ( GetIsRace DarkElf == 1 ) ; set DASkullofCorruption.raceVAR to 3 ;elseif ( GetIsRace HighElf == 1 ) ; set DASkullofCorruption.raceVAR to 4 ;elseif ( GetIsRace Imperial == 1 ) ; set DASkullofCorruption.raceVAR to 5 ;elseif ( GetIsRace Khajiit == 1 ) ; set DASkullofCorruption.raceVAR to 6 ;elseif ( GetIsRace Nord == 1 ) ; set DASkullofCorruption.raceVAR to 7 ;elseif ( GetIsRace Orc == 1 ) ; set DASkullofCorruption.raceVAR to 8 ;elseif ( GetIsRace Redguard == 1 ) ; set DASkullofCorruption.raceVAR to 9 ;elseif ( GetIsRace WoodElf == 1 ) ; set DASkullofCorruption.raceVAR to 10 ;endif ;if ( GetIsSex Male == 1 ) ; set DASkullofCorruption.sexVAR to 1 ;elseif ( GetIsSex Female == 1 ) ; set DASkullofCorruption.sexVAR to 2 ;endif ;if ( IsSpellTarget VampDisease == 1 ) ; set DASkullofCorruption.vampVAR to 1 ;endif set DASkullofCorruption.spellworking to 1 endif End Begin ScriptEffectFinish ;set DASkullofCorruption.spellworking to 0 ;set DASkullofCorruption.raceVAR to 0 ;set DASkullofCorruption.sexVAR to 0 ;set DASkullofCorruption.changeOnce to 0 ;set DASkullofCorruption.goAway to 1 End
183DASkullofCorruptionStaffScriptscn DASkullofCorruptionStaffScript ref target ref summon short changeOnce short deadsummon float timer float timer2 float spelltimer Begin GameMode if ( DASkullofCorruption.spellworking == 2 ) set spelltimer to ( spelltimer + GetSecondsPassed ) if ( target.GetDead == 1 ) set spelltimer to 31 endif if ( spelltimer >= 30 ) set DASkullofCorruption.GoAway to 1 endif endif if ( DASkullofCorruption.spellworking == 1 ) ;if ( DASkullofCorruption.raceVAR == 1 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullArgonianMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullArgonianFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 2 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullBretonMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullBretonFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 3 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullDarkElfMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullDarkElfFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 4 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullHighElfMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullHighElfFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 5 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullImperialMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullImperialFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 6 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullKhajiitMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullKhajiitFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 7 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullNordMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullNordFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 8 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullOrcMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullOrcFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 9 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullRedguardMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullRedguardFemaleREF ; endif ;elseif ( DASkullofCorruption.raceVAR == 10 ) ; if ( DASkullofCorruption.sexVAR == 1 ) ; set summon to DASkullWoodElfMaleREF ; elseif ( DASkullofCorruption.sexVAR == 2 ) ; set summon to DASkullWoodElfFemaleREF ; endif ;endif ;set DASkullofCorruption.raceVAR to 0 ;set DASkullofCorruption.sexVAR to 0 ;if ( DASkullofCorruption.raceVAR != 0 ) ;INSERT NEW LINE if ( DASkullofCorruption.spellworking == 1 ) set target to DASkullofCorruption.target set summon to target.CreateFullActorCopy set DASkullofCorruption.summon to summon ;set target to DASkullofCorruption.target set DASkullofCorruption.spellworking to 2 set changeOnce to 1 endif endif if ( changeOnce == 1 ) ;if ( DASkullofCorruption.vampVAR == 1 ) ; summon.AddSpell VampireHuntersSight ; summon.AddSpell Vampirism100 ; summon.AddSpell Vampirism100Att ; summon.AddSpell Vampirism100Skills ;endif set changeOnce to 2 ;summon.DuplicateNPCStats target ;target.DuplicateAllItems summon endif if ( changeOnce == 2 ) summon.SetActorFullName "Corrupted Clone" summon.MoveTo Player set changeOnce to 3 endif if ( changeOnce == 3 ) summon.AddSpell DASkullActivate summon.RemoveItem DASkullCorruption 1 summon.RemoveItem DAClavicusUmbraSword 1 summon.RemoveItem DAWabbajack01 1 summon.startcombat target summon.moddisposition target -200 set changeOnce to 4 endif if ( DASkullofCorruption.goAway == 1 ) if ( timer == 0 ) summon.PlayMagicShaderVisuals effectFireDamage endif set timer to ( timer + GetSecondsPassed ) if ( timer >= 1.5 ) ;summon.movetomarker DASkullMarker ;summon.resurrect ;summon.removeallitems summon.DeleteFullActorCopy set target to 0 set changeonce to 0 set summon to 0 ;set deadsummon to 1 set DASkullofCorruption.spellworking to 0 set DASkullofCorruption.raceVAR to 0 set DASkullofCorruption.sexVAR to 0 set DASkullofCorruption.changeOnce to 0 set DASkullofCorruption.raceVAR to 0 set DASkullofCorruption.sexVAR to 0 set DASkullofCorruption.target to 0 set DASkullofCorruption.summon to 0 set DASkullofCorruption.vampVAR to 0 set DASkullofCorruption.goAway to 0 set timer to 0 set spelltimer to 0 endif endif if ( DASkullofCorruption.spellworking > 0 ) if ( summon.GetAV Health <= 1 ) if ( deadsummon == 0 ) set deadsummon to 1 endif endif endif if ( deadsummon == 1 ) ;if ( timer2 == 0 ) ; summon.PlayMagicShaderVisuals effectFireDamage ;endif ;set timer2 to ( timer2 + GetSecondsPassed ) ;if ( timer2 >= 1.5 ) ; summon.movetomarker DASkullMarker ; summon.resurrect ; summon.removeallitems ; set deadsummon to 0 ; set timer2 to 0 ;endif Set DASkullofCorruption.GoAway to 1 Set deadsummon to 0 endif End
184DASkullofCorruptionTargetScriptscn DASkullofCorruptionTargetScript Begin OnActivate End ;Begin OnDeath ;set DASkullofCorruption.goAway to 1 ;end
185DawnfangScriptscn DawnfangScript ;related to DuskfangScript short ShouldEquip ;This variable is a flag if the weapon was previously equipped for use when the weapons swap ;This block resets the global variable SESwordDawnfangKills and sets the should equip flag if the previous weapon was equipped begin OnAdd Player Set SESwordDawnfangKills to 0 if ( SESwordDuskfangEquip == 1 ) Set ShouldEquip to 1 Set SESwordDuskfangEquip to 0 endif end ;This block sets the equip flag upon equip of this weapon, the second block does the opposite begin OnEquip Player if ( SESwordDawnfangEquip < 1 ) Set SESwordDawnfangEquip to 1 endif end begin OnUnEquip Player if ( SESwordDawnfangEquip > 0 ) Set SESwordDawnfangEquip to 0 endif end ;This block auto-equips the weapon if the should equip flag was set to 1.. it equips the entire list, as we don't know which one the player has begin gamemode if ( ShouldEquip == 1 ) Player.EquipItem SE03Dawnfang01 Player.EquipItem SE03Dawnfang05 Player.EquipItem SE03Dawnfang10 Player.EquipItem SE03Dawnfang15 Player.EquipItem SE03Dawnfang20 Player.EquipItem SE03Dawnfang25 Player.EquipItem SE03Dawnfang30 Player.EquipItem SE03Dawnfang01A Player.EquipItem SE03Dawnfang05A Player.EquipItem SE03Dawnfang10A Player.EquipItem SE03Dawnfang15A Player.EquipItem SE03Dawnfang20A Player.EquipItem SE03Dawnfang25A Player.EquipItem SE03Dawnfang30A Set SESwordDawnfangEquip to 1 Set ShouldEquip to 0 endif end
186DiveRockFrostScriptscn DiveRockFrostScript begin ScriptEffectStart PlayMagicShaderVisuals effectAtronachFrost end
187DreamStairs01SCRIPTscn DreamStairs01SCRIPT ; on activation stairs go up, parent activated 1 sec later short init short busy short raised float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 && raised == 0 message "The stairs are raised remotely." elseif isActionRef player == 0 && raised == 0 && busy == 0 playgroup forward 0 set raised to 1 set timer to 1 set busy to 1 enableLinkedPathPoints elseif isActionRef player == 0 && raised == 2 && busy == 0 playgroup backward 0 set raised to 0 set timer to 1 set busy to 1 disableLinkedPathPoints endif end begin gameMode if init == 0 ; set up parent ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif if raised == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set raised to 2 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set raised to 0 set busy to 0 disableLinkedPathPoints end
188DummyMagicEffectSCRIPTscn DummyMagicEffectSCRIPT begin ScriptEffectStart end begin ScriptEffectUpdate end begin ScriptEffectFinish end
189DuskfangScriptscn DuskfangScript ;related to DawnfangScript short ShouldEquip ;This variable is a flag if the weapon was previously equipped for use when the weapons swap ;This block resets the global variable SESwordDawnfangKills and sets the should equip flag if the previous weapon was equipped begin OnAdd Player Set SESwordDuskfangKills to 0 if ( SESwordDawnfangEquip == 1 ) Set ShouldEquip to 1 Set SESwordDawnfangEquip to 0 endif end ;This block sets the equip flag upon equip of this weapon, the second block does the opposite begin OnEquip Player if ( SESwordDuskfangEquip < 1 ) Set SESwordDuskfangEquip to 1 endif end begin OnUnEquip Player if ( SESwordDuskfangEquip > 0 ) Set SESwordDuskfangEquip to 0 endif end ;This block auto-equips the weapon if the should equip flag was set to 1.. it equips the entire list, as we don't know which one the player has begin gamemode if ( ShouldEquip == 1 ) Player.EquipItem SE03Duskfang01 Player.EquipItem SE03Duskfang05 Player.EquipItem SE03Duskfang10 Player.EquipItem SE03Duskfang15 Player.EquipItem SE03Duskfang20 Player.EquipItem SE03Duskfang25 Player.EquipItem SE03Duskfang30 Player.EquipItem SE03Duskfang01A Player.EquipItem SE03Duskfang05A Player.EquipItem SE03Duskfang10A Player.EquipItem SE03Duskfang15A Player.EquipItem SE03Duskfang20A Player.EquipItem SE03Duskfang25A Player.EquipItem SE03Duskfang30A Set SESwordDuskfangEquip to 1 Set ShouldEquip to 0 endif end
190E3CaptainScriptscn E3CaptainScript float timer float spawnTimer ; times spawning of new daedra from gate ref enemyRef ; parent should be set to daedra to attack short daedraCount ; used to figure out how many daedra to spawn short spawning ; 1 = animating towards spawn ; 0 = gate is idling short temp short specialIdle ; 0 = normal ; 1 = kneel ; 2 = point forward short letsgo ; set to 1 to get him to talk short wellDeadCount ; count how many daedra dead at well attack begin gamemode if timer > 0 set timer to timer - getsecondspassed endif if spawnTimer > 0 set spawnTimer to spawnTimer - getsecondspassed endif if spawnTimer <= 0 && getstage e3 >= 64 && spawning == 0 && daedraCount == 7 E3KvatchOblivionGateRef.playgroup equip 1 set spawnTimer to .83 set spawning to 1 endif if spawning == 1 && spawnTimer <= 0 if daedraCount == 7 set spawning to 2 ; done setstage e3 66 else if daedraCount < 2 set spawning to 0 ; ready to spawn again E3KvatchSpawnMarker.placeatme OGCreatureClannfearRunt 1 elseif daedraCount == 2 set spawning to 2 ; done setstage e3 55 endif set spawnTimer to 5 endif set daedraCount to daedraCount + 1 endif if getstage e3 < 40 && getdistance player < 5000 setstage e3 40 endif if getstage e3 == 52 && timer <= 0 setstage e3 53 endif if getstage e3 == 53 && timer <= 0 setstage e3 54 SayTo E3KvatchStartSoldierRef OblivionGateConv endif if getisalerted == 0 && getstage e3 > 54 setalert 1 endif if getstage e3 == 57 setstage e3 58 endif if getstage e3 == 58 && timer <= 0 setstage e3 59 E3KvatchCaptain.sayto player OblivionGateConv endif if getstage e3 == 60 && getdistance player < 500 && getdistance E3KvatchCaptainGateMarker < 300 setstage e3 62 set timer to sayTo player OblivionGateConv set timer to timer - .5 endif if getstage e3 == 62 && timer <= 0 setstage e3 64 set daedraCount to 7 endif if letsgo == 1 && timer <= 0 set timer to SayTo player OblivionGateConv set letsgo to 0 endif end begin OnPackageDone E3KvatchCaptainToFountain ; message "E3KvatchCaptainToFountain done" if getstage e3 < 50 && getdistance e3KvatchCaptainDismountMarker < 300 setstage e3 50 evp endif end begin OnPackageDone E3KvatchCaptainToPlayer if getstage e3 == 50 && getdistance E3KvatchStartSoldierRef < 300 setstage e3 52 set timer to SayTo E3KvatchStartSoldierRef OblivionGateConv endif end begin OnPackageDone E3KvatchCaptainToGate if getstage e3 < 60 && getdistance e3KvatchCaptainGateMarker < 300 setstage e3 60 endif end begin OnHit player stopcombat player end begin OnHit E3DremoraLordKvatchRef kill E3DremoraLordKvatchRef.setav health 50 E3DremoraLordKvatchRef.startcombat player end begin OnHit if getstage e3 < 60 ; make sure he can't die set temp to GetBaseActorValue health forceav health, temp endif end
191E3clanfearAttackSCRIPTscn E3clanfearAttackSCRIPT short triggered ref myParent ref mySelf begin gameMode if getDistance player < 350 && triggered == 0 set triggered to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 endif end
192E3DaedraScriptscn E3DaedraScript begin OnHitWith arrow2steel if getstage e3 >= 56 kill set MQConversations.OGDeadDaedra to 1 ; tell archer endif end begin OnHitWith WeapSteelLongsword if getstage e3 >= 56 kill set MQConversations.OGDeadDaedra to 2 ; tell soldier to cheer endif end begin OnHit if getstage e3 >= 56 kill endif end begin OnDeath set E3KvatchCaptain.wellDeadCount to E3KvatchCaptain.wellDeadCount + 1 if E3KvatchCaptain.wellDeadCount >= 6 set e3KvatchCaptain.timer to 1.5 set e3kvatchcaptain.letsgo to 1 endif end
193E3DaedrothActivateSCRIPTscn E3DaedrothActivateSCRIPT short triggered ref myParent ref mySelf begin gameMode if getDistance player < 350 && triggered == 0 set triggered to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 endif end
194E3DaedrothAttackSCRIPTscn E3DaedrothAttackSCRIPT short triggered ref myParent ref mySelf begin gameMode if getDistance player < 350 && triggered == 0 set triggered to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 E3KvatchArcherREF.startcombat E3DaedrothREF endif end
195E3DemoOblivionGateScriptscn E3DemoOblivionGateScript begin gamemode if IsAnimPlaying == 0 playgroup specialidle 1 endif if getquestrunning ms94 == 1 && getstage ms94 < 40 && getdistance player < 5000 setstage ms94 40 endif end
196E3DremoraLordKvatchScriptscn E3DremoraLordKvatchScript float timer begin gamemode if timer > 0 set timer to timer - getsecondspassed endif if getstage e3 == 66 setalert 1 moveto E3KvatchSpawnMarker set timer to sayTo E3KvatchCaptain OblivionGateConv set timer to timer + .1 setstage e3 68 endif if getstage e3 == 68 && timer <= 0 setfactionrank daedrafaction 1 setav aggression 100 startCombat E3KvatchCaptain setstage e3 70 endif end begin onDeath playSound E3DremoraDeathSound end
197E3FirstClanfearAttack01SCRIPTscn E3FirstClanfearAttack01SCRIPT short activated ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 setstage e3 55 evaluatePackage startCombat E3KvatchCaptain E3KvatchCaptain.startCombat mySelf myParent.activate mySelf 1 endif end begin OnDeath if E3KvatchAttackAClannfear1.getdead == 1 && E3KvatchAttackAClannfear2.getdead == 1 set e3KvatchCaptain.timer to 1.5 set e3kvatchcaptain.letsgo to 1 endif end
198E3KvatchAttackClanfear01SCRIPTscn E3KvatchAttackClanfear01SCRIPT ref mySelf ref myParent begin onActivate set myParent to getParentRef set mySelf to getSelf if isActionRef mySelf == 0 evaluatePackage myParent.enable myParent.activate mySelf 1 endif end
199E3KvatchAttackDaedroth01SCRIPTscn E3KvatchAttackDaedroth01SCRIPT ref mySelf ref myParent begin onActivate set myParent to getParentRef set mySelf to getSelf if isActionRef mySelf == 0 setstage e3 56 evaluatePackage setav aggression 50 evaluatePackage startcombat E3KvatchArcherREF endif end begin onPackageDone E3KvatchDaedrothChargeArcher end begin OnHit player kill end begin OnDeath set E3KvatchCaptain.wellDeadCount to E3KvatchCaptain.wellDeadCount + 1 if E3KvatchCaptain.wellDeadCount >= 7 set e3KvatchCaptain.timer to 1.5 set e3kvatchcaptain.letsgo to 1 endif end
200E3KvatchAttackDaedroth02SCRIPTscn E3KvatchAttackDaedroth02SCRIPT short doOnce begin onActivate if doOnce == 0 setstage e3 57 setrestrained 1 set doOnce to 1 endif end begin OnHit player kill end begin onDeath set E3KvatchCaptain.letsgo to 1 set E3KvatchCaptain.timer to 2 end
201E3KvatchClannfear03SCRIPTscn E3KvatchClannfear03SCRIPT short init begin gameMode if getDistance E3KvatchCaptain < 500 && init == 0 startCombat E3KvatchCaptain set init to 1 endif end
202E3KvatchSoldierALERT02SCRIPTscn E3KvatchSoldierALERT02SCRIPT short init begin gameMode if init == 0 setalert 1 evaluatePackage set init to 1 endif end
203E3KvatchStartSoldierScriptscn E3KvatchStartSoldierScript short hitcount short kneelOnce begin OnHit set hitcount to hitcount + 1 if hitcount > 1 kill endif end begin gamemode if getdead == 1 return endif if getdead == 0 && getstage e3 > 62 kill endif if getstage e3 < 42 && getdistance player < 400 sayto player OblivionGateConv setstage e3 42 endif if getisalerted == 0 && getstage e3 >= 54 setalert 1 endif if MQConversations.OGDeadDaedra == 2 if getdeadcount OGCreatureClannfearRuntWeak < 3 || GetRandomPercent < 50 Say OblivionGateVoice set MQConversations.OGDeadDaedra to 0 endif endif end begin OnPackageDone E3KvatchSoldierKneelAtBody if kneelOnce == 0 set kneelOnce to 1 set E3KvatchCaptain.specialIdle to 1 pickidle set E3KvatchCaptain.specialIdle to 0 endif end
204E3QuestScriptscn E3QuestScript float timer begin gamemode if timer > 0 set timer to timer - getsecondspassed endif ; start charactergen if getstage E3 == 0 setstage E3 5 endif ; trigger timer for next section of demo if getstage E3 == 5 && getstage charactergen == 19 && BaurusRef.sayPlayer == 1 setstage E3 10 endif if timer <= 0 && getstage e3 == 10 setstage E3 15 endif end
205E3SoldierScriptscn E3SoldierScript short hitcount begin OnHit if getstage e3 >= 56 kill endif end begin gamemode if getdead == 1 return endif if getdead == 0 && getstage e3 > 62 kill endif if getisalerted == 0 setalert 1 endif if MQConversations.OGDeadDaedra == 2 if getdeadcount OGCreatureClannfearRuntWeak < 3 || GetRandomPercent < 50 Say OblivionGateVoice set MQConversations.OGDeadDaedra to 0 endif endif end
206E3TrigLoadCitySCRIPTscn E3TrigLoadCitySCRIPT ; Activates linked Parent object once short triggered begin onTrigger player if triggered == 0 set gamehour to 10 player.moveto E3ChorrolStreetScene set triggered to 1 endif end
207E3TrigZone01SCRIPTscn E3TrigZone01SCRIPT short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef target.evaluatePackage set triggered to 1 endif end
208E3TrigZoneKvatchAttack01SCRIPTscn E3TrigZoneKvatchAttack01SCRIPT short triggered ref myParent ref mySelf begin onTrigger player ; message "Triggered by player" if triggered == 0 set triggered to 1 set myParent to getParentRef set mySelf to getSelf myParent.enable myParent.activate mySelf 1 endif end
209E3TrigZonePickIdleSCRIPTscn E3TrigZonePickIdleSCRIPT short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef set triggered to 1 target.pickidle endif end
210EdlaDarkHeartSCRIPTscn EdlaDarkHeartSCRIPT short arrowcount begin OnLoad set arrowcount to getitemcount Arrow2Steel if arrowcount > 13 set arrowcount to arrowcount - 13 removeitem Arrow2Steel arrowcount endif end
211EldamilScriptscn EldamilScript float timer ; times Eldamil's warnings to you to get in the cage short warningCount ; counts the warnings float resurrectTimer ; times his return to life short suicide ; set to 1 when time to kill himself short dead ; used to resurrect begin OnPackageDone MQ15EldamilEscortPlayerToCage evp end begin OnPackageDone MQ15EldamilActivateCage setstage MQ15 62 evp end begin OnDeath set dead to 1 set resurrectTimer to 30 end begin gamemode if timer > 0 set timer to timer - getsecondspassed endif if timer <= 0 && getstage MQ15 == 58 && OrtheRef.getdead == 0 set timer to 5 sayTo player MQ15EldamilWarning endif if timer <= 0 && getstage MQ15 == 66 && getdistance player < 1000 if suicide == 0 set timer to sayTo player MQ15EldamilWarning set suicide to 1 endif endif if suicide == 1 && getstage MQ15 == 66 && timer <= 0 setstage MQ15 67 endif if dead > 0 if resurrectTimer > 0 set resurrectTimer to resurrectTimer - getsecondspassed elseif getstage MQ15 >= 68 if dead == 1 ; start resurrection set dead to 2 set resurrectTimer to 2 pme BABO ;pms CHAMELEON elseif dead == 2 ; resurrect set dead to 0 resurrect moveto MQ15EldamilResurrectMarker MQ15EldamilResurrectCloud.activate MQ15EldamilResurrectMarker 1 pme BABO ;sms CHAMELEON endif endif endif end
212ErandurScriptscn ErandurScript begin onload if player.getLevel < 23 setghost 1 PMS ghosteffect setav aggression 0 endif end
213ErlineLirrianSCRIPTscn ErlineLirrianSCRIPT short SayWord begin gamemode if ( SayWord == 1 ) ErlineLirrianRef.Say MS11CommandWord set SayWord to 0 endif ;This is to forcegreet player after the amulet switch if ( GetStage MS11 >= 115 ) && ( GetStage MS11 < 120 ) && ( MS11.ForceGive == 1 ) && ( IsTalking == 0 ) StartConversation Player, Greeting set MS11.ForceGive to 2 endif end begin OnDeath if ( GetStage MS11 >= 5 ) && ( GetStage MS11 < 120 ) setstage MS11 200 endif if ( GetStage MS11 >= 130 ) && ( GetStage MS11 < 170 ) setstage MS11 200 endif end
214EvaluatePackage01SCRIPTscn EvaluatePackage01SCRIPT short activated ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 evaluatePackage myParent.activate mySelf 1 endif end
215FanacasBossTrigger01SCRIPTscn FanacasBossTrigger01SCRIPT short triggered begin onTrigger if triggered == 0 FanacasBossREF.enable set triggered to 1 endif end
216FanacasTrigPressurePlate01SCRIPTscn FanacasTrigPressurePlate01SCRIPT short activated ref mySelf begin gameMode if activated == 0 if getDistance player < 64 set mySelf to getSelf FanacasGate01REF.activate mySelf 1 FanacasGate02REF.activate mySelf 1 set activated to 1 playgroup forward 0 endif endif end
217FFTrapGasCloud01SCRIPTscn FFTrapGasCloud01SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if activated == 0 ; set up the damage values set fTrapDamage to 12 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 1 set activated to 1 else trapUpdate endif end
218FGBWTesterscn FGBWTester short conVAR float timer short doOnce Begin GameMode ;set timer to timer - GetSecondsPassed if ( GameHour >= 10 ) if ( GameHour <= 12 ) if ( doOnce == 0 ) startconversation RanaREF FGD02Insults endif endif endif End
219FGC01MountainLion1Scriptscn FGC01MountainLion1Script Begin OnDeath if ( GetStage FGC01Rats == 20 ) SetStage FGC01Rats 30 endif End
220FGC01MountainLion3Scriptscn FGC01MountainLion3Script Begin OnDeath if ( GetStage FGC01Rats == 60 ) SetStage FGC01Rats 65 endif End
221FGC01PiranusScriptscn FGC01PiranusScript short packageVAR Begin OnPackageEnd FGC01PinarusEscort set packageVAR to 2 StartConversation Player End
222FGC01QuillweaveScriptscn FGC01QuillweaveScript short packageVAR Begin OnPackageEnd FGC01QuillWeaveMeatPackage set packageVAR to 1 EvaluatePackage End Begin OnPackageEnd FGC01QuillWeaveDropPackage set packageVAR to 0 if ( GetDistance Player <= 2000 ) && ( GetStage FGC01Rats == 70 ) && ( Player.GetLOS QuillWeaveREF == 1 ) SetStage FGC01Rats 80 EvaluatePackage endif End
223FGC03FlagonScriptscn FGC03FlagonScript Begin GameMode if ( GetStage FGC03Flagon > 0 ) && ( GetStage FGC03Flagon < 33 ) if ( player.GetItemCount FGC03Tankard > 0 ) SetStage FGC03Flagon 33 endif endif End
224FGC07SwordScriptscn FGC07SwordScript short hasboth Begin GameMode if ( Player.GetItemCount FGC07AmelionCuirass > 0 ) if ( Player.GetItemCount FGC07AmelionSword > 0 ) if ( hasboth == 0 ) set hasboth to 1 endif endif endif end
225FGC10CorpseScriptscn FGC10CorpseScript short nearcorpse Begin GameMode if ( GetDistance Player < 200 ) && ( GetStageDone FGC10Swamp 40 == 0 ) if ( GetStage FGC10Swamp > 0 ) SetStage FGC10Swamp 40 endif endif End
226FGC10WispScriptscn FGC10WispScript Begin GameMode if ( GetDistance Player <= 256 ) && ( GetStage FGC10Swamp == 20 ) SetStage FGC10Swamp 30 endif End
227FGD07AjumScriptscn FGD07AjumScript ;this will need to get his health and track it as the player beats on him short gothealth float ajumhealth float currenthealth float talkhealth1 float talkhealth2 float willtalk short doOnce Begin OnDeath Player if ( GetStage FGD07Kidnap != 60 ) SetStage FGD07Kidnap 105 endif End Begin OnDeath if ( GetStage FGD07Kidnap == 60 ) SetStage FGD07Kidnap 80 ;elseif ( GetStage FGD07Kidnap < 60 ) ;SetStage FGD07Kidnap 105 endif End Begin GameMode if ( FGD07Kidnap.AjumFollow == 1 ) if ( Player.GetDistance ModrynOreynREF <= 512 ) if ( Player.GetDistance AjumKajinREF <= 512 ) set FGD07Kidnap.AjumFollow to 2 endif endif endif if ( GetStage FGD07Kidnap == 60 ) && ( doOnce == 1 ) SetRestrained 0 AjumKajinREF.EquipItem FGD07FireRing ;AjumKajinREF.ModAV Health -10000 ;Kill Player set doOnce to 2 endif if ( GetSitting == 3 ) && ( GetRestrained == 0 ) && ( doOnce == 0 ) SetRestrained 1 set doOnce to 1 endif if ( gothealth == 0 ) && ( GetStage FGD07Kidnap == 40 ) set ajumhealth to ajumkajinref.getav health set gothealth to 1 set talkhealth1 to ( ajumhealth * .6 ) set talkhealth2 to ( ajumhealth * .2 ) endif if ( GetStage FGD07Kidnap == 40 ) && ( willtalk == 0 ) && ( GetRestrained == 1 ) set currenthealth to ajumkajinref.getav health if ( currenthealth <= talkhealth1 ) && ( GetStage FGD07Kidnap == 40 ) SetStage FGD07Kidnap 45 endif if ( GetDisposition Player >= 70 ) && ( GetStage FGD07Kidnap == 40 ) SetStage FGD07Kidnap 45 endif endif if ( GetStage FGD07Kidnap == 50 ) && ( willtalk == 1 ) && ( GetRestrained == 1 ) set currenthealth to ajumkajinref.getav health if ( currenthealth <= talkhealth2 ) && ( GetStage FGD07Kidnap == 50 ) SetStage FGD07Kidnap 55 endif if ( GetDisposition Player >= 90 ) && ( GetStage FGD07Kidnap == 50 ) SetStage FGD07Kidnap 55 endif endif End
228FGD08BWCTalkScriptscn FGD08BWCTalkScript short doOnce Begin GameMode if ( GetStage FGD08Infiltration == 40 ) && ( doOnce == 0 ) if ( GetDistance FGD08MassGraveMarker<= 2000 ) SayTo Player FGD08BWCTalk set doOnce to 1 endif endif End
229FGD08JeetumScriptscn FGD08JeetumScript short doOnce Begin GameMode ;if ( FGD08Infiltration.speechVAR == 3 ) && ( doOnce == 0 ) ; StartConversation Player ; set doOnce to 1 ;endif if ( doOnce == 1 ) if ( player.getdistance FGD08JeetumSpeechMarker <= 512 ) DisablePlayerControls FGD08BWCDoorREF.SetOwnership JeetumZe FGD08BWCDoorREF.Lock 100 StartConversation JeetumZeREF FGD08JeetumSpeech set doOnce to 2 endif endif End Begin OnPackageDone FGD08JeetumMovetoMarker ;if ( player.getdistance FGD08JeetumSpeechMarker <= 512 ) ; StartConversation JeetumZeREF FGD08JeetumSpeech ;endif set doOnce to 1 End
230FGD08PotionScriptscn FGD08PotionScript short DoOnce float timer ;Begin GameMode Begin ScriptEffectStart if ( FG00Expulsion.BWbooted == 1 ) set doOnce to -1 endif if ( doOnce == -1 ) Player.AddSpell FGHistHaze set doOnce to -2 endif ;FADE THE PLAYER TO BLACK SetStage FGD08Infiltration 40 set FGD08Infiltration.tookpotion to 1 if ( doOnce == 1 ) BieneAmelionREF.Disable FGD08GoblinSheepREF1.Enable FGD08SheepREF1.Disable FGD08GoblinREF1.Enable FGD08GoblinREF2.Enable JolieRetieneREF.Disable EduardRetieneREF.Disable FGD08GoblinREF4.Enable MarieAlouetteREF.Disable FGD08BWCREF1.MovetoMarker FGD08BWCMoveMarker1 FGD08BWCREF2.MovetoMarker FGD08BWCMoveMarker2 FGD08BWCREF3.MovetoMarker FGD08BWCMoveMarker3 set doOnce to 1 Player.MovetoMarker FGD08PlayerMoveMarker endif End
231FGD09JafazirScriptscn FGD09JafazirScript short doOnce Begin GameMode if ( GetStage FGD09Hist == 10 ) && ( doOnce == 0 ) if ( player.GetInCell LeyawiinBlackwoodCompanyHall == 1 ) StartConversation Player FGD09JafazirGreet set doOnce to 1 endif endif End
232FGExpulsionScriptscn FGExpulsionScript short booted short killer short thief short probation short BWbooted float fQuestDelayTime short doonce Begin GameMode if ( doonce == 0 ) set fquestdelaytime to 0.5 set doonce to 1 endif if ( GetPCFactionMurder FightersGuild == 1 ) && ( player.GetFactionRank FightersGuild < 9 ) if ( GetPCExpelled FightersGuild == 0 ) set booted to ( booted + 1 ) set killer to ( killer + 1 ) SetPCExpelled FightersGuild 1 endif endif if ( GetPCFactionSteal FightersGuild == 1 ) && ( player.GetFactionRank FightersGuild < 9 ) if ( GetPCExpelled FightersGuild == 0 ) set booted to ( booted + 1 ) set thief to ( thief + 1 ) SetPCExpelled FightersGuild 1 endif endif if ( player.GetFactionRank BlackwoodCompanyFaction >= 0 ) if ( GetPCFactionMurder BlackwoodCompanyFaction == 1 ) set BWbooted to 1 SetPCExpelled BlackwoodCompanyFaction 1 Player.SetFactionRank BlackwoodHated 0 elseif ( GetStage FGD08Infiltration >= 70 ) && ( GetPCFactionAttack BlackwoodCompanyFaction == 1 ) set BWbooted to 1 SetPCExpelled BlackwoodCompanyFaction 1 Player.SetFactionRank BlackwoodHated 0 endif endif End
233FGMaglirScriptscn FGMaglirScript short waiting short doOnce short Maglirtalk Begin GameMode if ( doOnce == 0 ) if ( GetStage FGC03Thieves == 100 ) EVP set doOnce to 1 endif endif if ( GetStage FGD09Hist == 40 ) if ( MaglirTalk == 0 ) if ( GetDistance Player <= 512 ) StartConversation Player Greeting set MaglirTalk to 1 endif endif endif if ( MaglirTalk == 2 ) StartCombat Player set MaglirTalk to 3 endif End Begin Ondeath BWCFrontDoor.Unlock End
234FGPostQuestscn FGPostQuest short monthpay short payday short paymonth short payme short payamount short recruit short contract short itemVAR short balanced short doOnce short halfpay short doublepay short orders Begin GameMode if ( doOnce == 0 ) set payday to GameDay set paymonth to GameMonth set doOnce to 1 endif if ( paymonth != GameMonth ) set payme to 1 set paymonth to GameMonth set payamount to ( 10 * GetRandomPercent ) set itemVAR to ( GetRandomPercent ) set halfpay to ( payamount / 2 ) set doublepay to ( payamount * 2 ) endif if ( payme == 1 ) if ( recruit == 1 ) FGMastersChestREF.AddItem Gold001 halfpay if ( itemVAR <= 30 ) FGMastersChestREF.AddItem FGMasterChestLoot 1 endif if ( itemVAR <= 20 ) FGMastersChestREF.AddItem FGMasterChestLoot 1 endif if ( itemVAR <= 10 ) FGMastersChestREF.AddItem FGMasterChestLoot 1 endif elseif ( contract == 1 ) FGMastersChestREF.AddItem Gold001 doublepay if ( itemVAR <= 10 ) FGMastersChestREF.AddItem FGMasterChestLoot 1 endif elseif ( balanced == 1 ) FGMastersChestREF.AddItem Gold001 payamount if ( itemVAR <= 20 ) FGMastersChestREF.AddItem FGMasterChestLoot 1 endif else FGMastersChestREF.AddItem Gold001 payamount if ( itemVAR <= 20 ) FGMastersChestREF.AddItem FGMasterChestLoot 1 endif endif ;if ( orders == 1 ) ; set recruit to 0 ; set contract to 0 ; set balanced to 0 ;endif set payme to 0 set orders to 0 endif End
235FGQuestTrackscn FGQuestTrack short questdone Begin GameMode if ( questdone == 3 ) if ( GetQuestRunning FGD01Default == 0 ) if ( GetStage FGD01Default == 0 ) StartQuest FGD01Default endif endif endif if ( questdone == 5 ) if ( GetQuestRunning FGD03Viranus == 0 ) if ( GetStage FGD03Viranus == 0 ) StartQuest FGD03Viranus endif endif endif if ( questdone == 7 ) if ( GetQuestRunning FGD06DeadViranus == 0 ) if ( GetStage FGD06DeadViranus == 0 ) StartQuest FGD06DeadViranus endif endif endif if ( questdone == 10 ) if ( GetQuestRunning FGD07Kidnap == 0 ) if ( GetStage FGD07Kidnap == 0 ) StartQuest FGD07Kidnap endif endif endif End
236FlamingCorpseSCRIPTscn FlamingCorpseSCRIPT ref mySelf short init short luckyNumber begin gameMode if init == 0 set luckyNumber to GetRandomPercent set init to 1 if luckyNumber >= 90 mySelf.pms effectFireDamage endif endif end begin onReset set init to 0 set luckyNumber to 0 end
237FlashGlow01SCRIPTscn FlashGlow01SCRIPT short stage short next float timer short killWelkynd short killSigil short LightOn float welkyndTimer float sigilTimer float LightTimer ref mySelf ref myParent begin onLoad ; set up ref vars set mySelf to getSelf set myParent to getParentRef end begin onActivate if stage == 0 && isActionRef player == 0 playgroup equip 0 set stage to 1 set next to 1 set timer to 2.1 set killWelkynd to 1 set welkyndTimer to 3.5 set killSigil to 1 set sigilTimer to 3.6 set LightOn to 1 set LightTimer to 7 elseif stage == 2 && isActionRef player == 0 playgroup unequip 0 set stage to 0 set next to 1 set timer to 1.6 endif end begin gameMode if stage == 1 && isAnimPlaying == 0 set stage to 2 playgroup forward 0 endif ; daisy-chain if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if killWelkynd == 1 && welkyndTimer <= 0 MQRitualWelkyndRef.disable set killWelkynd to 0 endif if killSigil == 1 && sigilTimer <= 0 MQRitualSigilRef.disable set killSigil to 0 endif if LightOn == 1 && LightTimer <= 0 MQ15CRTGateLight.enable set LightOn to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif if welkyndTimer > 0 set welkyndTimer to welkyndTimer - getSecondsPassed endif if sigilTimer > 0 set sigilTimer to sigilTimer - getSecondsPassed endif if LightTimer > 0 set LightTimer to LightTimer - getSecondsPassed endif end
238FlashGlow02SCRIPTscn FlashGlow02SCRIPT short stage short next float timer ref mySelf ref myParent begin onLoad ; set up ref vars set mySelf to getSelf set myParent to getParentRef end begin onActivate if stage == 0 && isActionRef player == 0 && isActionRef mySelf == 0 playgroup equip 0 set stage to 1 set next to 1 set timer to 1 elseif stage == 2 && isActionRef player == 0 && isActionRef mySelf == 0 playgroup unequip 0 set stage to 0 endif end begin gameMode if stage == 1 && isAnimPlaying == 0 set stage to 2 playgroup forward 0 endif ; daisy-chain if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
239ForceParentEvalPackSCRIPTscn ForceParentEvalPackSCRIPT ; on activation, force the parent to evaluate his current package... ; good for triggered events where you need an actor to act immediately short activated ref myParent begin onActivate if activated == 0 set myParent to getParentRef myParent.evaluatePackage set activated to 1 endif end
240FrostFireGasTrapscn FrostFireGasTrap float fireTimer short activated ref ImOnFire begin OnTriggerActor if activated == 0 set ImOnFire to GetActionRef cast TRAPGenericFrostDamageLow01 ImOnFire set activated to 1 set fireTimer to 2 endif end begin gameMode if activated == 1 if fireTimer > 0 set fireTimer to fireTimer - getSecondsPassed endif if fireTimer <= 0 set activated to 0 endif if getActionRef != ImOnFire set activated to 0 endif endif end
241FXDustCloudFaint01SCRIPTscn FXDustCloudFaint01SCRIPT ; plays dust anim, immediately activates parent short activated ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if activated == 1 && isActionRef mySelf == 0 playgroup forward 0 set activated to 2 myParent.activate mySelf 1 endif end begin onReset reset3DState set activated to 1 end
242FXDustFall01SCRIPTscn FXDustFall01SCRIPT ; bit of dust come falling down, after 1 sec activated parent (useful for CTrapCaveIn) short activated float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if activated == 1 && isActionRef mySelf == 0 playgroup forward 0 set activated to 2 set timer to 0.5 endif end begin gameMode if activated == 2 && timer <= 0 myParent.activate mySelf 1 set activated to 3 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set activated to 1 end
243FXMQ09Barrier01SCRIPTscn FXMQ09Barrier01SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if activated == 0 ; set up the damage values set fTrapDamage to 5 set fTrapPushBack to 800 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set activated to 1 endif end
244FXMQ09Barrier02SCRIPTscn FXMQ09Barrier02SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if activated == 0 ; set up the damage values set fTrapDamage to 8 set fTrapPushBack to 800 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set activated to 1 endif end
245FXMQ09Barrier03SCRIPTscn FXMQ09Barrier03SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if activated == 0 ; set up the damage values set fTrapDamage to 15 set fTrapPushBack to 800 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set activated to 1 endif end
246FXMQ09Barrier04SCRIPTscn FXMQ09Barrier04SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode if activated == 0 ; set up the damage values set fTrapDamage to 20 set fTrapPushBack to 800 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set activated to 1 endif end
247FXPlasmaCloud01SCRIPTscn FXPlasmaCloud01SCRIPT short activated float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if activated == 1 && isActionRef mySelf == 0 playgroup forward 0 set activated to 2 set timer to 1 endif end begin gameMode if activated == 2 && timer <= 0 myParent.activate mySelf 1 set activated to 3 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set activated to 1 end
248GarrusDarelliunSCRIPTscn GarrusDarelliunSCRIPT begin OnDeath if ( GetStage MS10 >= 10 ) && ( GetStage MS10 < 100 ) setstage MS10 200 endif if ( GetStage MS10 >= 150 ) && ( GetStage MS10 < 180 ) setstage MS10 200 endif end
249GenericFireDamageArena01SCRIPTscn GenericFireDamageArena01SCRIPT float fireTimer short activated begin onTrigger Player if activated == 0 cast TRAPGenericFireDamageVeryHigh01 player set activated to 1 set fireTimer to 3 endif end begin gameMode if activated == 1 if fireTimer > 0 set fireTimer to fireTimer - getSecondsPassed endif if fireTimer <= 0 set activated to 0 endif endif end
250GenericFireDamageHigh01SCRIPTscn GenericFireDamageHigh01SCRIPT float fireTimer short activated begin onTrigger Player if activated == 0 cast TRAPGenericFireDamageHigh01 player set activated to 1 set fireTimer to 3 endif end begin gameMode if activated == 1 if fireTimer > 0 set fireTimer to fireTimer - getSecondsPassed endif if fireTimer <= 0 set activated to 0 endif endif end
251GenericFireDamageLow01SCRIPTscn GenericFireDamageLow01SCRIPT float fireTimer short activated begin onTrigger Player if activated == 0 cast TRAPGenericFireDamageLow01 Player set activated to 1 set fireTimer to 3 endif end begin gameMode if activated == 1 if fireTimer > 0 set fireTimer to fireTimer - getSecondsPassed endif if fireTimer <= 0 set activated to 0 endif endif end
252GenericFireDamageMedium01SCRIPTscn GenericFireDamageMedium01SCRIPT float fireTimer short activated ref ImOnFire begin onTrigger Player if activated == 0 cast TRAPGenericFireDamageMedium01 player set activated to 1 set fireTimer to 3 endif end begin gameMode if activated == 1 if fireTimer > 0 set fireTimer to fireTimer - getSecondsPassed endif if fireTimer <= 0 set activated to 0 endif endif end
253GenericTriggerScriptscn GenericTriggerScript short triggered ref myTrap begin OnTrigger ; message "Triggered..." if triggered == 0 set myTrap to GetParentRef myTrap.playgroup unequip 1 set triggered to 1 endif end
254GhostEffectScriptscn GhostEffectScript begin ScriptEffectStart saa 0.01 pms ghosteffect end begin ScriptEffectUpdate end begin ScriptEffectFinish end
255GoblinHeadScriptscn GoblinHeadScript ; QUESTS: ; MS46 short home ; where do I live? short myLocation ; where am I currently? short playerHasMe ; if player has me ; 0 = not at a Goblin Tribe ; 1 = Tribe A ; 2 = Tribe B ; 3 = Tribe C ; etc begin gamemode ; make sure totem goes into right spot when delivered home if getdistance CrackedWoodTribeMarker > 500 && home == 1 && mylocation == 1 moveto CrackedWoodTribeMarker elseif getdistance TimberscarTribeMarker > 500 && home == 2 && myLocation == 2 moveto TimberscarTribeMarker elseif getdistance WenderbekTribeMarker > 500 && home == 3 && myLocation == 3 moveto WenderbekTribeMarker elseif getdistance GoblinJimTribeMarkerNEW > 500 && home == 4 && myLocation == 4 moveto GoblinJimTribeMarkerNEW elseif getdistance BarrenMineTribeMarker > 500 && home == 5 && myLocation == 5 moveto BarrenMineTribeMarker elseif getdistance PlunderedMineTribeMarker > 500 && home == 6 && myLocation == 6 moveto PlunderedMineTribeMarker elseif getdistance DerelictMineTribeMarker2 > 500 && home == 7 && myLocation == 7 moveto DerelictMineTribeMarker2 endif end ; when player is not nearby, don't allow it to be activated ; (to prevent the "war" from ending in Low) ; NOTE: order matters! if this is after the OnAdd blocks, the flag will be cleared before the OnAdd checks it begin onActivate if getinsamecell player == 1 || myLocation == 0 Activate else ; message "DEBUG: Goblin trying to pick up head from lair when player is not around" endif end begin onDrop ; message "DEBUG: Goblin head dropped" if getdistance CrackedWoodTribeMarker < 500 && home == 1 set myLocation to 1 elseif getdistance TimberscarTribeMarker < 500 && home == 2 set myLocation to 2 elseif getdistance WenderbekTribeMarker < 500 && home == 3 set myLocation to 3 elseif getdistance GoblinJimTribeMarkerNEW < 500 && home == 4 set myLocation to 4 elseif getdistance BarrenMineTribeMarker < 500 && home == 5 set myLocation to 5 elseif getdistance PlunderedMineTribeMarker < 500 && home == 6 set myLocation to 6 elseif getdistance DerelictMineTribeMarker2 < 500 && home == 7 set myLocation to 7 else set myLocation to 0 endif end begin onDrop player set playerHasMe to 0 end ; when the head is in inventory, not at a location begin onAdd ; message "DEBUG: Goblin head picked up" set myLocation to 0 end begin onAdd player set playerHasMe to 1 end
256GoblinTribeASCRIPTscn GoblinTribeASCRIPT begin OnDeath player setfactionreaction goblintribea playerfaction 0 end
257GoblinTribeBSCRIPTscn GoblinTribeBSCRIPT begin OnDeath player setfactionreaction goblintribeb playerfaction 0 end
258GoblinTribeCSCRIPTscn GoblinTribeCSCRIPT begin OnDeath player setfactionreaction goblintribec playerfaction 0 end
259GoblinTribeDSCRIPTscn GoblinTribeDSCRIPT begin OnDeath player setfactionreaction goblintribed playerfaction 0 end
260GoblinTribeESCRIPTscn GoblinTribeESCRIPT begin OnDeath player setfactionreaction goblintribee playerfaction 0 end
261GoblinTribeFSCRIPTscn GoblinTribeFSCRIPT begin OnDeath player setfactionreaction goblintribef playerfaction 0 end
262GoblinTribeGSCRIPTscn GoblinTribeGSCRIPT begin OnDeath player setfactionreaction goblintribeg playerfaction 0 end
263GoblinTribeShamanASCRIPTscn GoblinTribeShamanASCRIPT begin OnDeath set MS46.shamanDead to 1 end begin OnDeath player setfactionreaction goblintribea playerfaction 100 player.scaonactor end
264GoblinTribeShamanBSCRIPTscn GoblinTribeShamanBSCRIPT begin OnDeath player setfactionreaction goblintribeb playerfaction 100 player.scaonactor end
265GoblinTribeShamanCSCRIPTscn GoblinTribeShamanCSCRIPT begin OnDeath player setfactionreaction goblintribec playerfaction 100 player.scaonactor end
266GoblinTribeShamanDSCRIPTscn GoblinTribeShamanDSCRIPT begin OnDeath player setfactionreaction goblintribed playerfaction 100 player.scaonactor end
267GoblinTribeShamanESCRIPTscn GoblinTribeShamanESCRIPT begin OnDeath player setfactionreaction goblintribee playerfaction 100 player.scaonactor end
268GoblinTribeShamanFSCRIPTscn GoblinTribeShamanFSCRIPT begin OnDeath player setfactionreaction goblintribef playerfaction 100 player.scaonactor end
269GoblinTribeShamanGSCRIPTscn GoblinTribeShamanGSCRIPT begin OnDeath player setfactionreaction goblintribeg playerfaction 100 player.scaonactor end
270GoblinWarsScriptscn GoblinWarsScript short init begin gamemode ; below here is run once init stuff if init > 0 return endif if init == 0 set init to 1 set GoblinHeadCrackedWood.home to 1 ; Cracked Wood Cave tribe owns it set GoblinHeadTimberscar.home to 2 ; Timberscar Cave tribe owns set GoblinHeadWenderbek.home to 3 ; Wenderbek Cave tribe owns it set GoblinHeadJim.home to 4 ; Goblin Jim tribe owns it set GoblinHeadBarrenMine.home to 5 ; Barren Mine tribe owns it set GoblinHeadPlunderedMine.home to 6 ; Plundered Mine tribe owns it set GoblinHeadDerelictMine.home to 7 ; Derelict Mine tribe owns it set GoblinHeadCrackedWood.myLocation to 2 ; Timberscar Cave tribe has it set GoblinHeadTimberscar.myLocation to 2 ; Timberscar Cave tribe has it set GoblinHeadWenderbek.myLocation to 3 ; Wenderbek Cave tribe has it set GoblinHeadJim.myLocation to 7 ; Derelict Mine tribe has it set GoblinHeadBarrenMine.myLocation to 5 ; Barren Mine tribe has it set GoblinHeadPlunderedMine.myLocation to 6 ; Plundered Mine tribe has it set GoblinHeadDerelictMine.myLocation to 7 ; Derelict Mine tribe has it stopquest goblinwarsquest endif end
271GrantSigilTESTStoneScript02scn GrantSigilTESTStoneScript02 short opened short onfire ref myParent ref mySelf begin onActivate if onfire == 0 if ( opened == 0 ) playgroup unequip 0 set opened to 1 else playgroup specialIdle 0 set opened to 0 endif set onfire to 1 endif end begin gameMode if onfire == 1 set myParent to getParentRef set mySelf to getSelf if opened == 1 if isAnimPlaying == 0 myParent.activate mySelf 1 set onfire to 0 endif endif if opened == 0 myParent.activate mySelf 1 set onfire to 0 endif endif end
272GrommScriptscn GrommScript short GrommGreet short GrommFirst short GrommAttack float AttackTimer short GrommHelp short GrommDisable short GrommAttack short DeadMaster begin gamemode if DeadMaster == 0 if GetDeadCount Baenlin == 1 if Dark03Accidents.ShatteredElf >= 1 GrommRef.SetAlert 1 GrommRef.EvaluatePackage set DeadMaster to 1 endif endif endif if GrommAttack == 0 if player.GetInCell BrumaBaenlinsHouse == 1 if GrommRef.GetDetectionLevel Player == 3 if GetDeadCount Baenlin == 1 GrommRef.StartCombat Player GrommRef.Moddisposition Player -100 set GrommAttack to 1 endif endif endif endif ;Make Gromm forcegreet the player after he/she enters the house if GrommGreet == 0 if ( GrommRef.GetDistance Player < 1000 ) if player.GetInCell BrumaBaenlinsHouse == 1 if GrommRef.GetDetectionLevel Player == 3 if GetDeadCount Baenlin == 0 GrommRef.StartConversation player, Greeting set GrommGreet to 1 endif endif endif endif endif if GrommFirst == 1 set AttackTimer to ( AttackTimer + GetSecondsPassed ) endif if GrommAttack == 0 if AttackTimer > 20 set AttackTimer to 0 set GrommAttack to 1 endif endif if GrommAttack == 1 && player.GetInCell BrumaBaenlinsHouse == 1 GrommRef.moddisposition player, -100 set GrommAttack to 2 endif if GrommDisable == 0 if GetStage Dark03Accidents >= 100 if GetDead == 1 Disable set GrommDisable to 1 endif endif endif end
273GuilbertJemaneScriptscn GuilbertJemaneScript ; QUESTS: ; MS16 short gotTreasure begin gamemode if getstage ms16A < 100 && getincell weatherleah == 1 setstage ms16A, 100 endif end
274HackdirtCellDoorScriptscn HackdirtCellDoorScript float timer begin onLoad set timer to getrandompercent/5 set timer to timer + 15 end begin onActivate if isactionref player == 1 && getstage ms45 > 0 activate if getlocked == 0 if getstage ms45 == 60 || getstage MS45 == 61 setstage ms45 80 endif endif else activate endif end begin gamemode if MS45.unlockCell == 0 if getlocked == 0 set MS45.unlockCell to 1 endif endif ; timer for ambient "Deep Ones" sound if timer > 0 set timer to timer - getsecondspassed else playsound AMBHackDirtSting set timer to getrandompercent/5 set timer to timer + 15 endif end
275HackdirtMoslinsInnBedScriptscn HackdirtMoslinsInnBedScript ref attackRef begin menumode if IsPCSleeping == 1 && RentHackdirtMoslinsInn == 1 && attackRef == 0 && ( gamehour > 18 || gamehour < 6 ) if HackdirtBrethren01.getdead == 0 set attackRef to HackdirtBrethren01 elseif HackdirtBrethren02.getdead == 0 set attackRef to HackdirtBrethren02 elseif HackdirtBrethren03.getdead == 0 set attackRef to HackdirtBrethren03 endif if attackRef > 0 attackRef.moveto HackdirtMoslinsInnAttackMarker attackRef.startcombat player endif set attackRef to 1 endif end
276HackdirtTrapdoorSCRIPTscn HackdirtTrapdoorSCRIPT begin OnActivate Activate if isActionRef player == 1 if getstage MS45 >= 10 setstage ms45 35 endif endif end
277HenantierDreamScriptscn HenantierDreamScript ; QUESTS: ; MS05 begin onDeath ; if he dies while player is in the dreamworld, player dies also if player.getincell DreamHub == 1 MessageBox "As Henantier dies, you feel your own mind sucked into the black vortex of death along with him." player.Kill endif end
278HenantierScriptscn HenantierScript short Talk short rand short HenantierDies begin onActivate if getstage ms05 < 75 if IsActionRef player == 1 && GetDead == 0 set rand to getrandompercent if rand < 33 messagebox "Henantier stirs and moans in his sleep, but does not wake." elseif rand < 67 messagebox "Henantier sinks into an even deeper sleep." else messagebox "Henantier mutters what sounds like an incantation of some kind, then subsides into sleep." endif endif else Activate endif end begin OnHit Player if ( GetStage MS05 >= 10 ) && ( GetStage MS05 < 90 ) Kill Player endif end begin OnDeath Player if ( GetStage MS05 >= 10 ) && ( GetStage MS05 < 90 ) && ( HenantierDies == 0 ) setstage MS05 90 set HenantierDies to 1 endif if ( GetStage MS05 < 10 ) && ( HenantierDies == 0 ) setstage MS05 200 set HenantierDies to 1 endif end begin gamemode if ( Getstage MS05 >= 80 ) && ( MS05.Talk == 0 ) StartConversation Player, Greeting endif end
279HighFaneBookScriptscn HighFaneBookScript begin OnActivate if IsActionRef player == 1 set MS22.readBook to 1 ShowMap MaladaMapMarker if getstage MS22 >= 10 && getstagedone MS22 20 == 0 setstage ms22 15 endif endif activate end
280ICALLNQDScriptscn ICALLNQDScript short RohssanVAR short PaloniryaVAR short VarnadoVAR short LeyVAR short DulVAR short IreneVAR short DovynVAR short IdaVAR short OthrelosVAR short MandilVAR short AugustaVAR short SamuelVAR short AreldilVAR short RestitaVAR short OgierVAR short PhintiasVAR short RindirVAR short EdgarVAR short ThoronirVAR short ViatorVAR short DelosVAR short JensineVAR short VerusVAR short CalindilVAR short UrbulVAR short ClaudetteVAR short MaroVAR short UrjabhiVAR short ViniciaVAR
281ICElderCouncilChamberDoorSCRIPTscn ICElderCouncilChamberDoorSCRIPT begin OnActivate ; prevent door from opening and closing during battle if ( getstage MQ16 <= 10 || getstage MQ16 >= 100 ) Activate endif end
282ICUmbacanoExitDoorScriptscn ICUmbacanoExitDoorScript short temp begin onActivate activate if isActionRef player == 1 ; evp the post guards so they don't follow you outside usheejaref.evp umoggramaradref.evp endif end begin gamemode set temp to jollringref.getdetected player if jollringref.greeting == 1 && jollringref.getdetected player == 1 jollringref.startconversation player set jollringref.greeting to 0 endif end
283IDSecretWall01SCRIPTscn IDSecretWall01SCRIPT short open begin onActivate if isActionRef player == 0 && open == 0 playgroup forward 0 set open to 1 endif end
284IlendVoniusSCRIPTscn IlendVoniusSCRIPT short ilendvar ;used to track Ilend's movements inside the gate begin OnLoad setignorefriendlyhits 1 if getstage MS48 <= 10 evp endif end begin OnStartCombat if getiscurrentpackage MS48IlendFollowPlayer == 1 && getcombattarget != player SayTo player MS48StartCombatShouts endif end
285JauffreScriptscn JauffreScript short MQ04Voice ; set to 1 after shouting to player float timer short WeynonChest ; set to 1 after he tells player about the chest begin OnLoad ; have Mythic Dawn leader attack Jauffre if getstage MQ04 == 5 || getstage MQ04 == 10 MQ04MythicDawnAgent01Ref.startcombat JauffreRef JauffreRef.startcombat MQ04MythicDawnAgent01Ref set timer to 1 endif end begin OnDeath if getstage MQ04 >= 10 && getstage MQ04 < 20 EssentialDeathReload "You have failed. Jauffre has been slain. All hope is now lost." endif CloudRulerSwordJauffre.enable end begin gamemode if timer > 0 set timer to timer - getsecondspassed endif if getstage MQ04 >= 7 && getstage MQ04 < 20 && getinsamecell player && MQ04Voice == 0 && timer <= 0 setstage mq04 10 SayTo player MQVoice set MQ04Voice to 1 endif end begin OnPackageDone JauffreWeynonPrioryUnlockChest MQ02JauffreChestRef.unlock MQ02JauffreChestRef.setOwnership playerFaction end ; when Jauffre reaches top of Cloud Ruler steps to greet Blades begin OnPackageDone MQ04JauffreToCloudRulerSteps setstage MQ04 41 end begin OnPackageDone MQ04JauffreToAmulet setstage MQ04 27 end begin OnPackageChange MQ14CheerPlayer stoplook end
286JeeliusScriptscn JeeliusScript ; QUESTS: ; MQ06 short button begin OnLoad if getiscurrentpackage MQ06JeeliusPrisoner == 1 setunconscious 1 endif end begin onActivate if MQ06.freePrisoner == 0 && getdead == 0 && getincell LakeArriusShrineDagon == 1 if IsActionRef player == 1 messagebox "Do you want to release the prisoner?", "Yes", "No" endif else Activate endif end begin gamemode set button to GetButtonPressed if button == 0 set MQ06.freePrisoner to 1 setunconscious 0 JeeliusRef.setfactionrank mythicdawnprisoner -1 JeeliusRef.setfactionrank NineDivines 8 JeeliusRef.moddisposition player 50 setstage MQ06 51 JeeliusRef.evp endif end begin OnHit player if getiscurrentpackage MQ06JeeliusPrisoner == 1 JeeliusRef.setfactionrank mythicdawnprisoner -1 JeeliusRef.setfactionrank NineDivines 8 ; he dies from one hit if he's a prisoner kill ; if the player is still playing the part of a cult initiate, don't put out alarm if getstagedone MQ06 41 == 0 && getstagedone MQ06 46 == 0 && getstagedone MQ06 51 == 0 player.scaonactor player.setfactionrank mythicdawn 1 endif ; clear the shrine MQ06Acolyte01Ref.evp MQ06Acolyte02Ref.evp MQ06Acolyte03Ref.evp MQ06Acolyte04Ref.evp endif end
287JensineSCRIPTscn JensineSCRIPT begin OnDeath if ( GetStage MS29 >= 10 ) && ( GetStage MS29 < 150 ) setstage MS29 200 endif end
288JollringScriptscn JollringScript ; QUESTS: ; MS21 ; MS22 ; MS27 short escorting ; if 1, jollring will run his escort package short greeting ; if 1, jollring will run his ambush/greet package begin gamemode if escorting == 1 && getiscurrentpackage ICJollringEscortPlayerToUmbacano == 0 evp ; "failsafe" if getiscurrentpackage ICJollringEscortPlayerToUmbacano == 0 set escorting to 0 endif endif end begin onPackageEnd ICJollringEscortPlayerToUmbacano if escorting == 1 umbacanoref.sayto player ms21Special set escorting to 0 endif end begin onPackageEnd ICJollringEscortPlayerOut set escorting to 0 end begin onPackageStart ICJollringSleep set greeting to 1 end
289KillBox01SCRIPTscn KillBox01SCRIPT ref target begin onTriggerActor set target to getActionRef target.kill end
290KillMagicEffectScriptscn KillMagicEffectScript short Eat float EatTimer short Die begin ScriptEffectFinish if IsEssential == 0 addspell AbApplePoison endif end
291kmktestscn kmktest short stage begin gamemode setstage ms21, stage end
292KurtTestBookScriptscn KurtTestBookScript
293KurtTestMagicEffectscn KurtTestMagicEffect short damage begin ScriptEffectStart messageBox "Bang! You're dead." end begin ScriptEffectUpdate set damage to -50 * ScriptEffectElapsedSeconds modav health, damage end begin ScriptEffectFinish messageBox "Hurt's, don't it?" end
294KurtTestMagicEffect2scn KurtTestMagicEffect2 short realenergy begin ScriptEffectStart message "PantsOnFire start" addscriptpackage KurtTestOnFirePackage ; make their energy high so they run around like their pants are on fire! set realenergy to getav energy setav energy, 100 end begin ScriptEffectUpdate ; don't do anything -- it's just an illusion! ; your pants aren't REALLY on fire end begin ScriptEffectFinish message "PantsOnFire finish" removescriptpackage ; set energy back to original value setav energy, realenergy end
295LeyawiinNQDScriptscn LeyawiinNQDScript short WitseiVAR short ShuraviVAR short BugokVAR short TunVAR short BrodrasVAR short SherinaVAR short DagailVAR short SdrassaVAR short VanashtiVAR short DarJeeVAR short JbariVAR short TsravaVAR short BlackwoodVAR short DericVAR short DelmingoVAR short MargarteVAR short EitarVAR short AhdarjiVAR
296LlevanaNedarenSCRIPTscn LlevanaNedarenSCRIPT short Doonce begin OnDeath if ( GetStage MS10 >= 10 ) && ( GetStage MS10 < 100 ) setstage MS10 200 endif if ( GetStage MS10 >= 150 ) && ( GetStage MS10 < 180 ) setstage MS10 200 endif end begin gamemode if ( Doonce == 0 ) if ( GetStage MS10 == 79 ) UlrichLelandRef.SetAv Health 50 UlrichLelandRef.SetRestrained 1 LlevanaNedarenRef.Cast MS10ParalyzeSpell UlrichLelandRef MS10Rat01Ref.Enable MS10Rat02Ref.Enable MS10Rat01Ref.StartCombat UlrichLelandRef MS10Rat02Ref.StartCombat UlrichLelandRef set Doonce to 1 endif endif end
297LyndaMTVScriptscn LyndaMTVScript short talk short convoVAR float timer Begin GameMode if ( talk == 1 ) set timer to ( timer - GetSecondsPassed ) if ( timer <= -2 ) if ( convoVar == 0 ) set timer to SayTo Player Hello set talk to 0 endif endif endif End
298MaiqScriptscn MaiqScript short maiqloc Begin GameMode if ( GetinCell Anvil == 1 ) && ( maiqloc == 0 ) set maiqloc to 1 endif if ( GetInCell Leyawiin == 1 ) && ( maiqloc == 1 ) set maiqloc to 0 endif End
299MankarCamoransThroneSCRIPTscn MankarCamoransThroneSCRIPT begin OnActivate if IsActionRef player == 1 cast StandardParalyze3Journeyman player else Activate endif end
300MenianGoneldSCRIPTscn MenianGoneldSCRIPT float timer short Cower begin gamemode if getstage ms48 < 30 if getinsamecell player == 1 if getdistance player > 300 if timer >= 0 set timer to timer - getsecondspassed else set timer to SayTo player MS48Convo set timer to timer + 5 + ( getrandompercent / 10 ) endif endif endif endif if Cower == 0 set Cower to 1 endif end
301MG10FloorSmasher01SCRIPTscn MG10FloorSmasher01SCRIPT ; Self-activated, no trigger required short activated float timer float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin GameMode if activated == 0 ; set up the damage values set fTrapDamage to 100 set fTrapPushBack to 1000 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 1 else trapUpdate endif if getDistance player < 200 && timer <= 0 playgroup forward 1 set timer to 10 endif if timer > 0 set timer to timer - getSecondsPassed endif end
302MG10SummonTrigZoneSCRIPTscn MG10SummonTrigZoneSCRIPT ; Plays the summon effect and enables the undead in the room short triggered float timer begin onTrigger player if triggered == 0 set triggered to 1 MG10Summon01REF.enable MG10Summon02REF.enable MG10Summon03REF.enable MG10Summon05BossREF.enable MG10MonsterSpawnSound01REF.PlaySound3D SPLConjurationCast MG10MonsterSpawnSound02REF.PlaySound3D SPLConjurationCast MG10Summon01FXREF.PME COHU MG10Summon02FXREF.PME COHU MG10Summon03FXREF.PME COHU MG10Summon05BossFXREF.PME COHU endif end
303ModrynOreynScriptscn ModrynOreynScript Begin GameMode if ( GetStage FGD05Oreyn == 10 ) && ( FGD05Oreyn.athome == 0 ) if ( GetIsCurrentPackage FGD05ModrynHouseWait == 1 ) set FGD05Oreyn.athome to 1 endif endif if ( GetStage FGD05Oreyn == 35 ) && ( GetCurrentAiProcedure != 13 ) if ( Player.GetDistance ArpeniaInteriorMarkerREF < 200 ) if ( FGD05Oreyn.markerVAR == 0 ) set FGD05Oreyn.markerVAR to 1 endif endif endif End
304MPlanksBreakAway01Scriptscn MPlanksBreakAway01Script short stage short init begin onActivate if init == 0 disableLinkedPathPoints set init to 1 endif if stage == 2 playgroup unequip 1 set stage to 3 enableLinkedPathPoints setDestroyed 1 elseif stage == 1 playgroup backward 1 set stage to 2 elseif stage == 0 playgroup forward 1 set stage to 1 endif end begin onReset reset3DState set stage to 0 disableLinkedPathPoints setDestroyed 0 end
305MQ02Scriptscn MQ02Script begin gamemode if getstage MQ02 == 20 if player.isininterior == 0 if player.getincell chorrol == 1 setstage MQ02 30 endif endif endif if getstage MQ02 < 40 if player.isininterior == 0 if player.getincell weynonpriory == 1 setstage MQ02 40 endif endif endif end
306MQ03OblivionSigilKeeperSCRIPTscn MQ03OblivionSigilKeeperSCRIPT begin gamemode ;Have Sigil Keeper force-greet the player when he enters the tower if ( GetStage MS48 >= 10 ) if ( Player.GetDistance MS48SigilKeeperGreetMark < 300 ) if ( MS48.talkedtomenien == 0 ) setalert 1 startconversation player GREETING set MS48.talkedtomenien to 1 endif endif endif end
307MQ04AmuletChestScriptscn MQ04AmuletChestScript begin OnActivate Activate if IsActionRef player == 1 && getstage MQ04 > 0 && MQ04.playerFoundSecretRoom == 0 set MQ04.playerFoundSecretRoom to 1 if getstage MQ04 == 20 setstage MQ04, 25 endif endif end
308MQ05AstavWirichScriptscn MQ05AstavWirichScript begin gamemode if getstage MQ05 == 25 && getiscurrentpackage MQ05AstavAtLutherBroads == 1 && getdistance BaurusRef > 400 setstage MQ05 30 evp endif end begin OnDeath setstage MQ05, 32 end begin OnHit player if getstage MQ05 < 31 setstage mq05 31 endif end
309MQ05CommentariesChestScriptscn MQ05CommentariesChestScript short bookGone ; set when V3 is removed from the chest (see MQ05CommentariesV3Script)
310MQ05CommentariesV3Scriptscn MQ05CommentariesV3Script begin OnAdd player setstage MQ05 45 setquestobject MQ05CommentariesV3 0 end begin OnDrop MQ05FirstEditionChestRef set MQ05FirstEditionChestRef.bookGone to 1 end
311MQ05CommentariesV4Scriptscn MQ05CommentariesV4Script begin OnAdd player setstage MQ05 90 end
312MQ05GwinasNoteScriptscn MQ05GwinasNoteScript begin onAdd player setstage MQ05 71 end
313MQ05Scriptscn MQ05Script short toldAmulet short toldMartin short ravenSpeech ; tracks progress of Raven's speech float convTimer ; timer for Raven's speech short speaker ; set to 1 to trigger Raven's speech ; set to 2 for Raven to tell pointRef to sit down ; set to 3 when BackupRef is detected ; set to 4 when Raven gets pissed off and decides to kill you short hintDay ; set to the day you last got a hint from Tar-Meena short detectStage ; used to set the stage after Raven detects backup ref pointRef ref backupRef float fQuestDelayTime ; for quest script timing begin gamemode ; trigger Baurus to talk to player when sitting in chair if getstage MQ05 == 20 if BaurusRef.getdistance player < 200 && player.getsitting == 3 BaurusRef.startconversation player endif endif ; trigger MD guy to attack Baurus if getstage MQ05 == 30 if BaurusRef.getdistance MQ05BaurusBasementAmbush < 200 setstage MQ05 31 endif endif ; conversation timer if ( convTimer > 0 ) ; waiting to talk set convTimer to convTimer - getsecondspassed endif ; move Baurus when player enters room, if Baurus isn't here already if getstage MQ05 == 77 && player.getincell ImperialSewersElvenGardens02 == 1 && BaurusRef.getincell ImperialSewersElvenGardens02 == 0 BaurusRef.moveto MQ05BaurusBackupMoveMarker BaurusRef.evp endif ; trigger Raven to enter room if getstage MQ05 == 77 || getstage MQ05 == 78 if pointRef.GetSitting == 3 && player.getincell ImperialSewersElvenGardens02 == 1 setstage MQ05 79 ravenref.evp endif endif if getstage MQ05 == 80 if speaker < 3 && speaker > 0 ; trigger "kill point man" if backup leaves the room during this if ravenref.getinsamecell player == 0 set speaker to 4 setstage MQ05 81 ; trigger the "cover is blown" situation if the backup is detected elseif RavenRef.GetDetected backupRef > 0 set speaker to 3 setstage MQ05 81 else ; he only continues his speech while point is sitting if pointRef.getSitting == 0 set speaker to 2 else set speaker to 1 endif endif endif endif end
314MQ05SecretDoor01SCRIPTscn MQ05SecretDoor01SCRIPT short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " The wall won't shift." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 ;triggerHitShader 3 set open to 1 enableLinkedPathPoints else playgroup backward 1 ;triggerHitShader 3 set open to 0 disableLinkedPathPoints endif set timer to 0.5 set next to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
315MQ05SewerGuardScriptscn MQ05SewerGuardScript ref backupRef short doOnce begin OnDeath if getdeadcount MQ05MythicDawnGuard01 > 0 && getdeadcount MQ05MythicDawnGuard02 > 0 && RavenRef.getdead == 1 && BaurusRef.getdead == 0 BaurusRef.SayTo player HELLO endif end begin gamemode if doOnce == 0 && getStage MQ05 == 80 set backupRef to MQ05.backupRef endif if backupRef > 0 if getstage MQ05 >= 79 && getstage MQ05 < 85 && GetDetected backupRef > 0 sayTo RavenRef MQ05RavenSpeech set MQ05.speaker to 3 setstage MQ05 85 endif endif end Begin OnHit if getstagedone MQ05, 85 == 0 set MQ05.speaker to 4 setstage MQ05 85 endif End Begin OnAlarm 3, player if getstagedone MQ05, 85 == 0 set MQ05.speaker to 4 setstage MQ05 85 endif End Begin OnAlarm 1, player if getstagedone MQ05, 85 == 0 set MQ05.speaker to 4 setstage MQ05 85 endif End
316MQ05TombScriptscn MQ05TombScript short visible ; set to 1 when map is visible begin OnActivate if isActionRef player == 1 if getstage MQ05 >= 90 && getstage MQ05 < 95 if gamehour > 11.8 && gamehour < 12.5 setstage MQ05 95 endif endif endif end begin gamemode if visible == 0 if gamehour > 11.8 && gamehour <= 12.5 playgroup forward 1 set visible to 1 endif elseif visible == 1 if gamehour > 12.5 || gamehour < 11.8 playgroup backward 1 set visible to 0 endif endif end
317MQ06AcolyteScriptscn MQ06AcolyteScript short looking short lastCount ; so they don't repeat themselves begin onStartCombat player setstage MQ06 46 end Begin OnHit player setstage MQ06 46 End Begin OnAlarm 3, player setstage MQ06 46 End Begin OnAlarm 1, player setstage MQ06 46 End begin gamemode if getstage MQ06 < 51 if ( lastCount < MQ06.mankarSpeech && MQ06.speaker == 2 ) ; time to talk (but don't set timer, since Ruma is the "master NPC" of this part SayTo MankarCamoranRef MQ06MankarSpeech set lastCount to MQ06.mankarSpeech endif endif end
318MQ06AntechamberEntranceScriptscn MQ06AntechamberEntranceScript short locked begin gamemode if locked == 0 && getinsamecell player == 1 set locked to 1 lock 100 endif end
319MQ06DagonShrineExitDoorSCRIPTscn MQ06DagonShrineExitDoorSCRIPT begin OnActivate if isActionRef player == 1 if getstagedone MQ06 50 == 0 MankarCamoranRef.moveto MQ06ParadiseMarker MankarCamoranRef.evp setstage mq06 50 endif endif Activate end
320MQ06HarrowScriptscn MQ06HarrowScript short lastCount Begin OnHit player setstage MQ06, 41 End Begin OnAlarm 3, player setstage MQ06, 41 End Begin OnAlarm 1, player setstage MQ06, 41 End begin gamemode if getstage MQ06 < 51 if ( lastCount < MQ06.mankarSpeech && MQ06.speaker == 2 ) ; time to talk (but don't set timer, since Ruma is the "master NPC" of this part SayTo MankarCamoranRef MQ06MankarSpeech set lastCount to MQ06.mankarSpeech endif endif if ( MQ06.convTimer <= 0 && MQ06.speaker == 3 ) ; time to talk set MQ06.convTimer to SayTo RumaRef MQ06MankarSpeech endif end
321MQ06ParadisePortalScriptscn MQ06ParadisePortalScript short stage short next float timer ref mySelf ref myParent begin onLoad ; set up ref vars set mySelf to getSelf set myParent to getParentRef end begin gameMode if stage == 2 && timer <= 0 playgroup unequip 0 setdestroyed 1 MQ06ParadisePortalRealDoor.activate MankarCamoranRef setstage MQ06 49 set stage to 3 set timer to 2 endif if stage == 1 && isAnimPlaying == 0 set stage to 2 set timer to 3 playgroup forward 0 endif if stage == 3 && timer <= 0 set stage to 4 MQ06ParadisePortalExit.disable setstage MQ06 50 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onActivate if stage == 0 && isActionRef MankarCamoranRef == 1 playgroup equip 0 set stage to 1 endif end
322MQ06RumaScriptscn MQ06RumaScript short spokeToPC float resurrectTimer ; used to resurrect her in Paradise short dead begin onStartCombat player setstage MQ06 46 end Begin OnHit player setstage MQ06 46 End Begin OnAlarm 3, player setstage MQ06 46 End Begin OnAlarm 1, player setstage MQ06 46 End begin OnPackageDone MQ15RumaWaitAtThrone look player end begin gamemode if getstage MQ06 < 51 if ( MQ06.convTimer <= 0 && MQ06.speaker == 2 ) ; time to talk set MQ06.convTimer to SayTo MankarCamoranRef MQ06MankarSpeech set MQ06.convTimer to MQ06.convTimer + 1 endif if ( MQ06.convTimer <= 0 && MQ06.speaker == 4 ) ; time to talk set MQ06.convTimer to SayTo player MQ06MankarSpeech set MQ06.convTimer to MQ06.convTimer + 1 endif endif if spokeToPC == 0 && getstagedone MQ06, 41 == 0 && getstage MQ06 == 50 && getdistance player < 400 startConversation player set spokeToPC to 1 endif if spokeToPC < 2 && getstage MQ06 == 60 && getdead == 0 say MQ06MythicDawnAlarm set spokeToPC to 2 endif ; greet player in Paradise if getstage MQ15 >= 70 && getstage MQ15 < 75 && getdistance player < 800 setstage MQ15 75 endif if dead > 0 if getstage MQ15 >= 70 && getstage MQ15 < 89 if resurrectTimer > 0 set resurrectTimer to resurrectTimer - getsecondsPassed else if dead == 1 ; start resurrection set dead to 2 set resurrectTimer to 2 pme BABO ;pms CHAMELEON elseif dead == 2 ; resurrect set dead to 0 resurrect moveto MQ15RumaResurrectMarker MQ15RumaResurrectCloud.activate MQ15RumaResurrectMarker 1 pme BABO ;sms CHAMELEON endif endif endif endif end begin OnDeath if getstage mq15 >= 70 set resurrectTimer to 20 set dead to 1 ; Mankar will attack if you kill both Ruma and Raven if MQ15RavenRef.getdead == 1 && getstage mq15 >= 80 setstage mq15 85 endif endif end
323MQ06Scriptscn MQ06Script short mankarSpeech float convTimer short speaker ; who's talking now short nextSpeaker ; who should talk next short freePrisoner short startSpeech float fQuestDelayTime begin gamemode if getstage MQ06 == 10 if player.getincell LakeArriusCaverns == 1 setstage MQ06, 20 endif endif if getstage MQ06 < 45 if player.getincell LakeArriusShrineDagon == 1 if player.getdistance mankarcamoranref < 2500 setstage MQ06 45 ; start Mankar's speech set speaker to 2 set mankarSpeech to 0 set convTimer to 2 endif endif endif if getstage MQ06 == 60 if player.IsInInterior == 0 setstage MQ06, 70 endif endif ; conversation timer if ( convTimer > 0 ) ; waiting to talk set convTimer to convTimer - getsecondspassed if convTimer <= 0 && nextSpeaker != speaker && nextSpeaker > 0 set speaker to nextSpeaker endif endif end
324MQ06ShrineDoorkeeperScriptscn MQ06ShrineDoorkeeperScript begin OnLoad if GetDisabled == 0 && getstage MQ06 > 40 disable endif end begin OnHit player if getstage MQ06 > 0 setstage MQ06 41 endif end
325MQ06ShrineExteriorDoorSCRIPTscn MQ06ShrineExteriorDoorSCRIPT ref actionRef begin OnActivate if getstage MQ06 >= 20 set actionRef to getActionRef if actionRef.getinfaction MythicDawn == 1 || actionRef == player Activate endif endif end
326MQ06ShrineGuardScriptscn MQ06ShrineGuardScript short lastCount Begin OnStartCombat player if getstage MQ06 > 0 && getstage MQ06 < 45 setstage MQ06 41 else setstage MQ06 46 endif End Begin OnHit player if getstage MQ06 > 0 && getstage MQ06 < 45 setstage MQ06 41 else setstage MQ06 46 endif End Begin OnAlarm 3, player if getstage MQ06 > 0 && getstage MQ06 < 45 setstage MQ06 41 else setstage MQ06 46 endif End Begin OnAlarm 1, player if getstage MQ06 > 0 && getstage MQ06 < 45 setstage MQ06 41 else setstage MQ06 46 endif End begin gamemode if getstage MQ06 < 51 if ( lastCount < MQ06.mankarSpeech && MQ06.speaker == 2 ) ; time to talk (but don't set timer, since Ruma is the "master NPC" of this part SayTo MankarCamoranRef MQ06MankarSpeech set lastCount to MQ06.mankarSpeech endif endif end
327MQ06ShrineSecretExitSCRIPTscn MQ06ShrineSecretExitSCRIPT ; prevent anyone but player and Mythic Dawn from using this door ref actionRef begin OnActivate set actionRef to getActionRef if actionRef.getinfaction MythicDawn == 1 || actionRef == player Activate endif end
328MQ09ArmorScriptscn MQ09ArmorScript begin gamemode ; player approaches shrine while enchantment is still in place if getquestrunning MQ09 == 1 && getstagedone MQ09 40 == 0 && getstagedone MQ09 70 == 0 && getdistance player < 2000 setstage MQ09 40 endif end begin OnAdd player if getstage MQ09 > 10 setstage MQ09, 80 endif end
329MQ09GhostBladeSpawn01scn MQ09GhostBladeSpawn01 begin OnDeath set MQ09.timer to 1 set MQ09.ghostRef to MQ09GhostBladeEntry set MQ09.ghostTarget to this set MQ09.lastBlade to 1 end
330MQ09GhostBladeSpawn02scn MQ09GhostBladeSpawn02 begin OnDeath set MQ09.timer to 3 set MQ09.ghostRef to MQ09GhostBladeHall set MQ09.ghostTarget to this set MQ09.lastBlade to 2 end
331MQ09GhostBladeSpawn03scn MQ09GhostBladeSpawn03 begin OnDeath set MQ09.timer to 3 set MQ09.ghostRef to MQ09GhostBladeStockade set MQ09.ghostTarget to this set MQ09.lastBlade to 3 end
332MQ09GhostBladeSpawn04scn MQ09GhostBladeSpawn04 begin OnDeath set MQ09.timer to 3 set MQ09.ghostRef to MQ09GhostBladeCatacombs set MQ09.ghostTarget to this set MQ09.lastBlade to 4 end
333MQ09GhostBladeTest1scn MQ09GhostBladeTest1 begin OnDeath MQ09GhostBladeCatacombs.MoveTo MQ09GhostBladeSpawn4 playsound MagicFailureSoundIllusion end
334MQ09GhostWalkScript01scn MQ09GhostWalkScript01 begin OnActivate if IsActionRef MQ09GhostBladeCatacombs == 1 Activate endif end
335MQ09OneTimeLeverSCRIPTscn MQ09OneTimeLeverSCRIPT short next short busy short opened float timer ref myParent ref mySelf begin onActivate if busy == 0 set next to 1 if ( opened == 0 ) playgroup forward 0 set opened to 1 else if isActionRef player == 1 message "The lever is stuck and will not budge." , 5 endif set next to 0 endif set timer to 0.5 set busy to 1 endif end begin gameMode if ( timer <= 0 ) && next == 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set next to 0 endif if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
336MQ09PortcullisForGhostSCRIPTscn MQ09PortcullisForGhostSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
337MQ09SancreTorDoorScriptscn MQ09SancreTorDoorScript begin gamemode if getstage MQ09 == 20 && getdistance player < 300 setstage MQ09, 30 endif end begin OnActivate if IsActionRef player == 1 if getlocked == 1 if player.getitemcount MQ09SancreTorKey > 0 player.removeitem MQ09SancreTorKey, 1 unlock activate else MessageBox "A weather-worn iron plaque is affixed to the door above an imposing lock. The inscription is barely legible: 'Sealed by authority of the Grandmaster of the Blades, 36th Year of the Reign of Tiber Septim.'" endif else activate endif endif end
338MQ09Scriptscn MQ09Script short ghostCount ; tracks how many ghosts you've freed short lastBlade ; set 1-4 when final blade is killed (used to set quest target) ref ghostRef ; set to ghost to move when timer runs out ref ghostTarget ; set to marker where to move ghost ref restrainedRef ; ghost is restrained on timer when first appeared, to prevent immediate force-greet float timer float fQuestDelayTime short stage short ghostTalk ; increments to track progress through ghost dialogue short ghostShrine ; how many ghosts have reached the shrine? begin gamemode if timer > 0 set timer to timer - getsecondspassed elseif restrainedRef > 0 restrainedRef.setrestrained 0 restrainedRef.addscriptpackage MQ09GhostBladeToPlayer set restrainedRef to 0 elseif ghostRef != 0 set stage to 50 + ghostCount ; stage 50 is set by dialogue if stage > 50 setstage MQ09, stage endif set ghostCount to ghostCount + 1 ghostRef.setGhost 1 ghostRef.MoveTo ghostTarget ghostRef.pme TURN playsound AMBEnchantmentBreak if ghostCount == 1 ; first ghost talks to player set restrainedRef to ghostRef set timer to 3 else ghostRef.setrestrained 0 endif ; clear ref variables set ghostRef to 0 ; set ghostTarget to 0 endif ; if all ghosts are in their places and player is nearby, remove enchantment if getstage MQ09 < 55 && player.getincell SancreTorTomb == 1 if MQ09GhostBladeEntry.getdistance MQ09GhostMarker1 < 100 && MQ09GhostBladeHall.getdistance MQ09GhostMarker2 < 100 && MQ09GhostBladeStockade.getdistance MQ09GhostMarker3 < 100 && MQ09GhostBladeCatacombs.getdistance MQ09GhostMarker4 < 100 set timer to 5 setstage MQ09 55 endif endif if timer <= 0 && getstage MQ09 == 55 ; remove enchantment setstage MQ09 56 set timer to 5 endif if timer <= 0 && getstage MQ09 == 56 ; remove enchantment setstage MQ09 70 endif end
339MQ09TrigZone01SCRIPTscn MQ09TrigZone01SCRIPT short pcSpeed float timer begin onTrigger player if timer <= 0 cast MQ09DrainWillpower player set timer to 15 ;This section will choose the trap spell based on the PC's speed set pcSpeed to player.getbaseav speed if pcSpeed >= 90 cast MQ09DrainSpeed5 player elseif pcSpeed >= 70 cast MQ09DrainSpeed4 player elseif pcSpeed >= 50 cast MQ09DrainSpeed3 player elseif pcSpeed >= 30 cast MQ09DrainSpeed2 player else cast MQ09DrainSpeed1 player endif endif end begin gamemode if timer > 0 set timer to timer - getsecondspassed endif end
340MQ09UndeadBlade01SCRIPTscn MQ09UndeadBlade01SCRIPT begin OnPackageDone MQ09GhostBlade01ToShrine if getincell SancreTorTomb == 1 setalert 1 endif end begin gamemode if getdisabled == 1 return endif if getiscurrentpackage MQ09GhostBladeToAetherius == 1 if getincell SancreTorHub == 1 disable endif endif end
341MQ09UndeadBlade02SCRIPTscn MQ09UndeadBlade02SCRIPT begin OnPackageDone MQ09GhostBlade02ToShrine if getincell SancreTorTomb == 1 setalert 1 endif end begin gamemode if getdisabled == 1 return endif if getiscurrentpackage MQ09GhostBladeToAetherius == 1 if getincell SancreTorHub == 1 disable endif endif end
342MQ09UndeadBlade03SCRIPTscn MQ09UndeadBlade03SCRIPT short throughDoor begin OnPackageDone MQ09PrisonGhostDoor if throughDoor == 0 set throughDoor to 1 MQ09NewGhostDoor01AREF.activate MQ09GhostBladeStockade endif end begin OnPackageDone MQ09GhostBlade03ToShrine setalert 1 end begin gamemode if getdisabled == 1 return endif if getiscurrentpackage MQ09GhostBladeToAetherius == 1 if getincell SancreTorHub == 1 disable endif endif end
343MQ09UndeadBlade04SCRIPTscn MQ09UndeadBlade04SCRIPT begin OnPackageDone MQ09GhostBlade04ToShrine if getincell SancreTorTomb == 1 setalert 1 endif end begin gamemode if getdisabled == 1 return endif if getiscurrentpackage MQ09GhostBladeToAetherius == 1 if getincell SancreTorHub == 1 disable endif endif end
344MQ10BrumaGuardSCRIPTscn MQ10BrumaGuardSCRIPT begin OnLoad setignorefriendlyhits 1 end begin OnDeath set MQ10.deadGuard to MQ10.deadGuard + 1 end begin OnPackageDone MQ10SoldiersLeaveBattlefield disable end
345MQ10BrumaGuardWaitBehindSCRIPTscn MQ10BrumaGuardWaitBehindSCRIPT begin OnLoad setignorefriendlyhits 1 end begin OnPackageDone MQ10SoldiersLeaveBattlefield disable end
346MQ10OblivionGateScriptscn MQ10OblivionGateScript float timer short count ref mySpawnMarker begin OnLoad if mySpawnMarker == 0 set mySpawnMarker to getParentRef endif end begin OnActivate if IsActionRef player == 1 ; we aren't "near" any gate anymore (we're in Oblivion!) set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride if MQ10.playerInOblivion == 0 set MQ10.playerInOblivion to 1 ; make sure things move along if player goes in early if getstage MQ10 == 31 || getstage MQ10 == 32 setstage mq10 33 endif else set MQ10.playerInOblivion to 0 endif endif Activate end begin gamemode if getstage MQ10 >= 50 return endif ; no need to process further if destroyed if getdestroyed == 1 setstage MQ10 50 return endif if getinworldspace MQ10BrumaOblivionGate == 1 return endif ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 if IsAnimPlaying == 0 playgroup specialidle 1 endif ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 if getdistance player < 4000 if MQ00.nearOblivionGate == 0 && getdistance player < 1000 ; this should only happen when I come out an Oblivion gate into Tamriel -- I'm suddenly close but the "near" variable hasn't been set forceweather OblivionStormTamriel 1 else setweather OblivionStormTamriel 1 endif set MQ00.nearOblivionGate to GetSelf endif else if getdistance player > 5000 ReleaseWeatherOverride endif endif if getstage mq10 >= 33 if timer > 0 set timer to timer - getsecondspassed elseif count < 3 set count to count + 1 playgroup forward 1 mySpawnMarker.placeatme LL1DaedricBeast100 set timer to 10 endif endif endif end
347MQ10Scriptscn MQ10Script short playerInOblivion ; set to 1 when player enters oblivion -- used for Burd's packages short burdSpeech ; used to count burd's speech items short deadGuard ; how many guards have died? begin gamemode if getstage MQ10 == 33 if player.getdistance MQ10BurdWaitInsideGateMarker < 5000 && BurdRef.getdistance MQ10BurdWaitInsideGateMarker < 5000 setstage MQ10 35 endif endif end
348MQ11OblivionGateScriptscn MQ11OblivionGateScript short closed short inOblivion ; set to 1 when you enter the gate float timer short count ref mySpawnMarker float resetTimer begin OnLoad ; destroy me if open after MQ16 finishes if getdestroyed == 0 && getdisabled == 0 && getstage MQ16 >= 100 ForceCloseOblivionGate endif ; reset count if count > 0 set timer to 60 endif set count to 0 if mySpawnMarker == 0 set mySpawnMarker to getParentRef endif end begin gamemode if closed == 0 && getdestroyed == 1 set closed to 1 set MQ11.closedGates to MQ11.closedGates + 1 ; increase the player's fame modpcfame 1 if getself == MQ11AnvilGate if getstagedone MQ11 20 == 1 setstage mq11 40 endif setfactionreaction AnvilFaction playerFaction 20 elseif getself == MQ11SkingradGate if getstagedone MQ11 22 == 1 setstage mq11 41 endif setfactionreaction SkingradFaction playerFaction 20 elseif getself == MQ11ChorrolGate if getstagedone MQ11 24 == 1 setstage mq11 42 endif setfactionreaction ChorrolFaction playerFaction 20 elseif getself == MQ11BravilGate if getstagedone MQ11 26 == 1 setstage mq11 43 endif setfactionreaction BravilFaction playerFaction 20 elseif getself == MQ11LeyawiinGate if getstagedone MQ11 28 == 1 setstage mq11 44 endif setfactionreaction LeyawiinFaction playerFaction 20 elseif getself == MQ11CheydinhalGate if getstagedone MQ11 30 == 1 setstage mq11 45 endif setfactionreaction CheydinhalFaction playerFaction 20 endif endif if inOblivion == 1 if resetTimer > 0 set resetTimer to resetTimer - getsecondspassed elseif getdistance player < 5000 set inOblivion to 0 endif endif ; no need to process further if destroyed if getdestroyed == 1 return endif ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 if IsAnimPlaying == 0 playgroup specialidle 1 endif ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 if getdistance player < 4000 if MQ00.nearOblivionGate == 0 && getdistance player < 1000 ; this should only happen when I come out an Oblivion gate into Tamriel -- I'm suddenly close but the "near" variable hasn't been set forceweather OblivionStormTamriel 1 else setweather OblivionStormTamriel 1 endif set MQ00.nearOblivionGate to GetSelf endif else if getdistance player > 5000 && MQ00.nearOblivionGate == GetSelf set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif endif if timer > 0 set timer to timer - getsecondspassed elseif count < MQ00.maxCreatureCount set count to count + 1 playgroup forward 1 mySpawnMarker.placeatme LL1DaedricBeast100 set timer to 10 endif endif end begin OnActivate if isactionref player == 1 set inOblivion to 1 set resettimer to 1 ; we aren't "near" any gate anymore (we're in Oblivion!) set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif activate end
349MQ11Scriptscn MQ11Script short alliesCount ; number of allies the player has obtained: ; Anvil ; Chorrol ; Skingrad ; Leyawiin ; Bravil ; Kvatch ; Elder Council ; Fighters Guild ; Mages Guild ; MAX = 9 short stage ; used to track the most recent stage short visitSkingrad ; set to 1 when the Count of Skingrad is coming to see you short closedGates ; counts the number of gates closed by the player (6 max)
350MQ12GoblinEnable01Scriptscn MQ12GoblinEnable01Script begin onactivate if IsActionRef player == 1 Activate MQ12GoblinWave01REF.enable endif end
351MQ12GoblinEnable02Scriptscn MQ12GoblinEnable02Script begin onactivate if IsActionRef player == 1 Activate MQ12BridgeGuardREF.enable endif end
352MQ12GoblinInventorySCRIPTscn MQ12GoblinInventorySCRIPT short DoOnce Begin GameMode if (DoOnce == 0) if GetItemCount MQ12GoblinArmorSpoof == 0 AddItem MQ12GoblinArmorSpoof, 1 endif set DoOnce to 1 endif End
353MQ12Scriptscn MQ12Script short gotStone ; set to 1 when player gets Great Welkynd Stone (in case they get it before this quest starts) short convStage ; used to track progress of Jauffre/Martin exchange float timer ; used for Jauffre/Martin "hellos" float fQuestDelayTime short placeStone ; set to 1 when Martin has placed stone begin gamemode if getstage MQ12 == 10 if player.getincell Miscarcand01 == 1 setstage MQ12 20 endif endif if getstage MQ12 == 30 if getstagedone MQ12 25 == 0 if player.getincell CloudRulerTempleGreatHall setstage MQ12 25 endif endif endif if convstage >=6 && getstagedone MQ12 27 == 0 if timer > 0 set timer to timer - getsecondspassed elseif MartinRef.getdistance player < 600 if convStage == 6 set timer to MartinRef.sayto player MQ12Talk elseif convStage == 7 set timer to JauffreRef.sayto player MQ12Talk setstage MQ12 27 endif endif endif end
354MQ12UndeadInventorySCRIPTscn MQ12UndeadInventorySCRIPT short DoOnce Begin GameMode if (DoOnce == 0) if GetItemCount MQ12UndeadArmorSpoof == 0 AddItem MQ12UndeadArmorSpoof, 1 endif set DoOnce to 1 endif End
355MQ13BrumaCitizenCheerMartinSpellscn MQ13BrumaCitizenCheerMartinSpell short doOnce float timer float distance float rand begin ScriptEffectStart if getself == player || getinfaction MQ13BattleAllies == 1 || getinfaction Blades == 1 || getself == BurdRef dispel MQ13BrumaCheeringSpell return endif Look MartinRef end begin ScriptEffectUpdate if timer > 0 set timer to timer - ScriptEffectElapsedSeconds ; message "Timer %.2f", timer else ; message "Speaking..." set distance to getdistance martinRef if distance < 800 set timer to Sayto MartinRef MQ13BrumaCheering ; random extra time between cheers set rand to 1 + (getrandompercent/25) set timer to timer + rand ; messageBox "Timer = %.2f", timer elseif distance > 5000 ; if Martin leaves area, stop cheering dispel MQ13BrumaCheeringSpell endif endif end begin ScriptEffectFinish pickidle StopLook end
356MQ13Dremora1Scriptscn MQ13Dremora1Script begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate1Boss to MQ13.gate1Boss + 1 end
357MQ13Dremora2Scriptscn MQ13Dremora2Script begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate2Boss to MQ13.gate2Boss + 1 end
358MQ13Dremora3Scriptscn MQ13Dremora3Script begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate3Boss to MQ13.gate3Boss + 1 end
359MQ13Dremora4Scriptscn MQ13Dremora4Script begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate4Boss to MQ13.gate4Boss + 1 end
360MQ13Gate1DaedraScriptscn MQ13Gate1DaedraScript begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate1Grunt to MQ13.gate1Grunt + 1 end
361MQ13Gate2DaedraScriptscn MQ13Gate2DaedraScript begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate2Grunt to MQ13.gate2Grunt + 1 end
362MQ13Gate3DaedraScriptscn MQ13Gate3DaedraScript begin OnLoad if getstage MQ14 >= 45 && getdead == 0 disable endif end begin OnDeath set MQ13.gate3Grunt to MQ13.gate3Grunt + 1 end
363MQ13OblivionGate1Scriptscn MQ13OblivionGate1Script float timer short lastBossCount begin OnActivate if isActionRef player == 1 if getstage MQ13 < 100 messageBox "I must protect Martin until the Great Gate opens." else messageBox "I must enter the Great Gate and get its Great Sigil Stone before the Bruma defenders are overwhelmed." endif endif end begin gamemode if getdestroyed == 1 return endif ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 SetSceneIsComplex 1 ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 if getdistance player < 8000 && getstage MQ14 < 40 setweather OblivionStormTamriel 1 endif else if getdistance player > 9000 ReleaseWeatherOverride endif endif if IsAnimPlaying == 0 playgroup specialidle 1 endif if getstage MQ13 >= 41 ; pathing optimization functions SetNoAvoidance 1 SetAllReachable 1 SetAllVisible 1 if timer > 0 set timer to timer - getsecondspassed elseif lastBossCount < MQ13.gate1Boss setstage MQ13 45 set lastBossCount to MQ13.gate1Boss set timer to 20 playgroup forward 1 MQ13Gate1BossMarker.placeatme MQ13OblivionGate1Dremora, 1 ; only spawn extra guys if they are dead, so total numbers don't increase if MQ13.gate1Grunt > 0 MQ13Gate1Creature1Marker.placeatme MQ13OblivionGate1Creature, 1 if MQ13.gate1Grunt > 1 MQ13Gate1Creature2Marker.placeatme MQ13OblivionGate1Creature, 1 endif set MQ13.Gate1Grunt to 0 endif endif endif endif end
364MQ13OblivionGate2Scriptscn MQ13OblivionGate2Script float timer short lastBossCount begin OnLoad if getstage MQ13 < 45 && getdisabled == 0 playgroup left 1 endif end begin OnActivate if isActionRef player == 1 if getstage MQ13 < 100 messageBox "I must protect Martin until the Great Gate opens." else messageBox "I must enter the Great Gate and get its Great Sigil Stone before the Bruma defenders are overwhelmed." endif endif end begin gamemode ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 && getstage MQ13 >= 45 if IsAnimPlaying == 0 playgroup specialidle 1 endif if timer > 0 set timer to timer - getsecondspassed elseif lastBossCount < MQ13.gate2Boss set lastBossCount to MQ13.gate2Boss set timer to 20 playgroup forward 1 MQ13Gate2BossMarker.placeatme MQ13OblivionGate2Dremora, 1 ; only spawn extra guys if they are dead, so total numbers don't increase if MQ13.gate2Grunt > 0 MQ13Gate2Creature1Marker.placeatme MQ13OblivionGate2Creature, 1 if MQ13.gate2Grunt > 1 MQ13Gate2Creature2Marker.placeatme MQ13OblivionGate2Creature, 1 endif set MQ13.Gate2Grunt to 0 endif endif endif end
365MQ13OblivionGate3Scriptscn MQ13OblivionGate3Script float timer short lastBossCount begin OnLoad if getstage MQ13 < 46 && getdisabled == 0 playgroup left 1 endif end begin OnActivate if isActionRef player == 1 if getstage MQ13 < 100 messageBox "I must protect Martin until the Great Gate opens." else messageBox "I must enter the Great Gate and get its Great Sigil Stone before the Bruma defenders are overwhelmed." endif endif end begin gamemode ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 && getstage MQ13 >= 46 if IsAnimPlaying == 0 playgroup specialidle 1 endif if timer > 0 set timer to timer - getsecondspassed elseif lastBossCount < MQ13.gate3Boss set lastBossCount to MQ13.gate3Boss set timer to 240 ; make it take a REALLY long time to respawn from this gate playgroup forward 1 MQ13Gate3BossMarker.placeatme MQ13OblivionGate3Dremora, 1 ; only spawn extra guys if they are dead, so total numbers don't increase if MQ13.gate3Grunt > 0 MQ13Gate3Creature1Marker.placeatme MQ13OblivionGate3Creature, 1 if MQ13.gate3Grunt > 1 MQ13Gate3Creature2Marker.placeatme MQ13OblivionGate3Creature, 1 endif set MQ13.Gate3Grunt to 0 endif endif endif end
366MQ13OblivionGate4Scriptscn MQ13OblivionGate4Script float timer short lastBossCount short destroyed begin OnLoad if getstage MQ13 < 100 && getdisabled == 0 playgroup left 1 endif end begin gamemode if getstage MQ14 >= 10 && getdisabled == 0 if getstage MQ14 < 100 SetSceneIsComplex 1 endif if destroyed == 1 return endif if getdestroyed == 1 setstage MQ14 45 forceweather OblivionStormTamriel set destroyed to 1 endif ; start churning out creatures when I'm turned on if GetDestroyed == 0 if IsAnimPlaying == 0 playgroup specialidle 1 endif if timer > 0 set timer to timer - getsecondspassed elseif lastBossCount <= MQ13.gate4Boss set lastBossCount to MQ13.gate4Boss set lastBossCount to lastBossCount + 3 set timer to 60 playgroup forward 1 MQ13GreatGateCreature1Marker.placeatme MQ13OblivionGate4Dremora, 1 MQ13GreatGateCreature2Marker.placeatme MQ13OblivionGate4Dremora, 1 MQ13GreatGateBossMarker.placeatme MQ13OblivionGate4Dremora, 1 endif endif endif end begin OnActivate if getstage MQ14 > 0 if IsActionRef player == 1 ; stop combat on Martin when player enters gate so Martin doesn't die in resolved combat MartinRef.SCAOnActor ; set variable so we don't kill Martin off-stage set MQ14.inGreatGate to 1 endif Activate endif end
367MQ13Scriptscn MQ13Script short convStage ; tracks conversation short setupBattle ; set to 1 to trigger soldiers placed on battlefield float gateTimer ; timer for opening Oblivion gates in sequence short gateOpening ; set to 1 when in the process of opening short stage ; temp variable short convDone ; set to 1 when conversation has happened short burdConvDone ; set to 1 when countess orders burd to deploy troops float speechTimer ; timer for Martin's battle speech float deathTimer ; timer for Martin to die automatically when player leaves battlefield short playerAbsent ; set to 1 when player leaves battlefield short gate1Boss ; counts number of dead bosses from gate 1 short gate2Boss ; counts number of dead bosses from gate 2 short gate3Boss ; counts number of dead bosses from gate 3 short gate4Boss ; counts number of dead bosses from gate 4 short gate1Grunt ; counts number of dead grunts from gate 1 short gate2Grunt ; counts number of dead grunts from gate 2 short gate3Grunt ; counts number of dead grunts from gate 3 float fQuestDelayTime begin gamemode set stage to getstage MQ13 ; Countess orders Burd to deploy for battle if burdConvDone == 0 && getstage MQ13 == 30 set burdConvDone to 1 NarinaCarvainRef.startconversation BurdRef MQ13Speech endif ; Martin gives speech to troops if speechTimer > 0 ; decrement timer set speechTimer to speechTimer - getSecondsPassed else if stage >= 41 && stage < 44 if MartinRef.getiscurrentpackage MQ13MartinBattleSpeechTravel3 MartinRef.look MQ13MartinBattleMarkerLeft elseif MartinRef.getiscurrentpackage MQ13MartinBattleSpeechTravel2 MartinRef.look MQ13MartinBattleMarkerRight endif set speechTimer to MartinRef.Say MQ13MartinBattleSpeech set speechTimer to speechTimer + .5 endif endif ; Martin's death timer if playerAbsent == 1 if deathTimer > 0 ; decrement timer set deathTimer to deathTimer - getSecondsPassed else EssentialDeathReload "Martin has been slain. All hope is now lost." set MartinRef.scriptKill to 1 endif endif ; open gates in sequence if gateTimer > 0 ; decrement timer set gateTimer to gateTimer - getSecondsPassed else if stage == 47 if gateOpening == 0 MQ13Gate4.playgroup equip 1 set gateOpening to 1 set gateTimer to 5 elseif gateOpening == 1 set gateOpening to 0 ; open great gate setstage MQ13, 100 endif elseif stage == 46 if gateOpening == 0 MQ13Gate3.playgroup equip 1 set gateOpening to 1 set gateTimer to 5 elseif gateOpening == 1 set gateOpening to 0 ; open third gate setstage MQ13 47 endif elseif stage == 45 if gateOpening == 0 set gateOpening to 1 MQ13Gate2.playgroup equip 1 set gateTimer to 5 elseif gateOpening == 1 set gateOpening to 0 ; open second gate setstage MQ13 46 endif elseif stage >= 30 && stage < 40 ; wait for player & Martin to get near the battlefield, then start timer if MQ13GreatGateBossMarker.getdistance player < 2800 && MQ13MartinBattleMarker.getdistance MartinRef < 300 setstage MQ13, 40 elseif MQ13GreatGateBossMarker.getdistance player < 2800 && stage < 39 setstage MQ13, 39 endif endif endif ; if player leaves the battlefield during the battle, Martin dies if getstage MQ13 >= 45 && getstage MQ14 < 50 if player.getdistance MartinRef > 5000 && MQ14.inGreatGate == 0 if playerAbsent == 0 ; set timer for Martin to die set deathTimer to 15 set playerAbsent to 1 endif else ; if player comes back, stop timer set playerAbsent to 0 endif endif if setupBattle == 1 ; enable Bruma troops MQ13CountessBattleMarker.enable MQ13BrumaSoldier01.enable MQ13BrumaSoldier02.enable ; disable surrounding actors MQ13ExtraActorsMarker.disable ; for each ally, check if part of battle: if so, move to battlefield, if not, enable militia if getstagedone MQ11 21 == 1 MQ11AnvilAlly01.moveto MQ13AnvilBattleMarker MQ11AnvilAlly02.moveto MQ13AnvilBattleMarker2 else MQ13AnvilBattleMarker.enable endif if getstagedone MQ11 23 == 1 MQ11SkingradAlly01.moveto MQ13SkingradBattleMarker else MQ13SkingradBattleMarker.enable endif if getstagedone MQ11 25 == 1 MQ11ChorrolAlly01.moveto MQ13ChorrolBattleMarker MQ11ChorrolAlly02.moveto MQ13ChorrolBattleMarker2 else MQ13ChorrolBattleMarker.enable endif if getstagedone MQ11 27 == 1 VieraLerusRef.moveto MQ13BravilBattleMarker VieraLerusRef.setignorefriendlyhits 1 else MQ13BravilBattleMarker.enable endif if getstagedone MQ11 29 == 1 MQ11LeyawiinAlly01.moveto MQ13LeyawiinBattleMarker else MQ13LeyawiinBattleMarker.enable endif if getstagedone MQ11 31 == 1 MQ11CheydinhalAlly01.moveto MQ13CheydinhalBattleMarker if UlrichLelandRef.getdead == 0 UlrichLelandRef.moveto MQ13CheydinhalBattleMarker2 UlrichLelandRef.setignorefriendlyhits 1 endif else MQ13CheydinhalBattleMarker.enable endif if getstagedone MQ11 33 == 1 MQ11KvatchAlly01.moveto MQ13KvatchBattleMarker else MQ13KvatchBattleMarker.enable endif ; set animating gates to "waiting" idle MQ13Gate2.playgroup left 1 MQ13Gate3.playgroup left 1 MQ13Gate4.playgroup left 1 ; add people to factions as necessary MartinRef.setfactionrank MQ13BattleAllies 1 BurdRef.setfactionrank MQ13BattleAllies 1 ; Burd is no longer essential setessential Burd 0 ; Jauffre is no longer essential setessential Jauffre 0 Jauffreref.setav aggression 10 ; give Martin his helmet MartinRef.additem EmperorHelmet 1 ; move Bruma citizens outside cathedral ; OlavRef.moveto MQ13BrumaCitizenMarker1 IstirusBrolusRef.moveto MQ13BrumaCitizenMarker2 HafidHollowlegRef.moveto MQ13BrumaCitizenMarker3 LogvaarRef.moveto MQ13BrumaCitizenMarker4 SnartheCookRef.moveto MQ13BrumaCitizenMarker5 HonmundRef.moveto MQ13BrumaCitizenMarker6 AlgaRef.moveto MQ13BrumaCitizenMarker7 LyraRosentiaRef.moveto MQ13BrumaCitizenMarker8 FetidJofnhildRef.moveto MQ13BrumaCitizenMarker9 JantusBrolusRef.moveto MQ13BrumaCitizenMarker10 JantusBrolusRef.evp IstirusBrolusRef.evp FetidJofnhildRef.evp LyraRosentiaRef.evp AlgaRef.evp HonmundRef.evp SnartheCookRef.evp LogvaarRef.evp HafidHollowlegRef.evp ; OlavRef.evp set setupBattle to 0 endif end
368MQ13SoldierScriptscn MQ13SoldierScript short doOnce float timer short looking begin OnLoad ; always ignore friendly hits setignorefriendlyhits 1 if getstage MQ14 >= 20 setalert 0 setav aggression 5 endif if getstage MQ14 == 45 evp look player endif end begin gamemode if timer > 0 set timer to timer - getsecondspassed elseif doOnce == 1 SayTo MartinRef MQ13MartinBattleSpeech set doOnce to 2 endif if (getstage MQ13 == 44 || getstage MQ13 == 45) && MQ13.speechTimer <= 0 && doOnce == 0 set doOnce to 1 set timer to getrandompercent * .005 endif if looking == 0 if getstage MQ13 == 41 look MartinRef set looking to 1 endif endif if looking == 1 if getstage MQ13 > 41 stoplook set looking to 2 endif endif end begin OnPackageDone MQ14SoldiersLeaveBattlefield disable end begin OnPackageChange MQ14CheerPlayer stoplook setalert 0 end
369MQ14OblivionEntranceGate01Scriptscn MQ14OblivionEntranceGate01Script ; activated by linked child ; activates optionally linked parent after 1 sec delay short activated short open short next short busy float timer ref mySelf ref myParent begin onActivate if activated == 0 ; start the timer setstage MQ14 15 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 0 set open to 0 endif set next to 1 set timer to 5 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 ; give player journal message setstage MQ14 20 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
370MQ14OblivionGateToBrumaSCRIPTscn MQ14OblivionGateToBrumaSCRIPT begin OnActivate if IsActionRef player == 1 set MQ14.inGreatGate to 0 endif Activate end
371MQ14Scriptscn MQ14Script short inGreatGate ; set to 1 if player is in MQ14OblivionWorld float timer ; time elapsed in seconds short totalTime ; total time allowed to close great gate, in minutes short remainingMin ; remaining time, in minutes short remainingSec ; remaining time, in seconds (at the end) short runTimer ; set to 1 to start timer ticking short lastTimeShown ; used to show player the time remaining short victoryYear ; year of victory (used in MQ14StatueScript) short createStatue ; trigger for quest script to create player statue short tempSpellCount ; number of NPCs affected by cheering spell short testSec short placeStone ; set to 1 when Martin has placed the sigil stone float fQuestDelayTime begin gamemode if getstage MQ14 == 45 if player.getincell Bruma == 1 setstage MQ14 48 endif endif if getstage MQ14 == 48 if timer > 0 set timer to timer - getsecondspassed else setstage MQ14 50 endif endif endif ; time the level for the Siege Crawler to get into firing position, er, exit the gate if runTimer == 1 set timer to timer + getsecondspassed ; show the time left periodically set remainingMin to totalTime - timer/60 if getstage MQ14 < 40 if timer >= totalTime * 60 ; timer ran out setstage mq14 40 elseif remainingMin <= 1 set remainingSec to totalTime*60 - timer set testSec to ( remainingSec / 5 ) if testSec * 5 == remainingSec message "%.0f seconds to close Great Gate!", remainingSec, 1 endif elseif remainingMin < lastTimeShown message "%.0f minutes to close Great Gate", remainingMin set lastTimeShown to remainingMin endif endif if timer > totalTime * 60 + 5 ; messageBox "MQ14: TEMP: Timer expired, kill Martin" EssentialDeathReload "Martin has been slain, along with the rest of the Bruma defenders. All hope is now lost." endif endif end
372MQ14SigilStoneScriptscn MQ14SigilStoneScript short onfire ref myParent ref mySelf short gotSigil begin onActivate if onfire == 0 playgroup unequip 0 set onfire to 1 setstage MQ14 45 endif end begin gameMode if onfire == 1 set myParent to getParentRef set mySelf to getSelf if isAnimPlaying == 0 player.additem MQ14GreatSigilStoneItem 1 set gotSigil to 1 player.pms effectFireShield myParent.activate mySelf 1 set onfire to 0 mySelf.disable endif endif end begin onReset set onFire to 0 set gotSigil to 0 end
373MQ14StatueScriptscn MQ14StatueScript short statueYear ref playerStatue short distancecheck begin OnLoad if playerStatue == 0 set playerStatue to MartinRef.playerStatue endif if playerStatue != 0 playerStatue.moveto MQ14PlayerStatueMarker playerStatue.addscriptpackage MQStatuePose ; shouldn't be necessary but oh well set statueYear to MQ14.victoryYear playerStatue.pms effectstone playerStatue.pickidle endif end begin OnActivate if IsActionRef player == 1 MessageBox "The Savior of Bruma. Singlehandedly fought off the hordes of Oblivion, entered their Great Gate and cast down the dread Siege Machine in ruin. Erected by the Grateful Citizens of Bruma, 3E %.0f.", statueYear endif end begin gamemode ; we need to pick idle whenever the player gets close (real problem is switching process levels, but this will have to fake it) if distancecheck == 0 if getdistance player <= 2100 set distancecheck to 1 playerStatue.pickidle endif endif if distancecheck == 1 if getdistance player > 2100 set distancecheck to 0 endif endif end
374MQ15AnaxesDoorSCRIPTscn MQ15AnaxesDoorSCRIPT short activated short open short next float timer ref mySelf begin onActivate if activated == 0 set mySelf to getSelf set activated to 1 endif if isActionRef player == 1 if open == 0 message " The wall won't shift." endif elseif isActionRef mySelf == 0 if open == 0 && MQ15AnaxesRef.leverCount > 1 playgroup forward 0 set open to 1 set timer to 4 set next to 1 MQ15AnaxesRef.setrestrained 0 MQ15AnaxesRef.addscriptpackage MQ15MinotaurExitCave endif endif end begin gameMode if next == 1 && timer <= 0 set next to 0 setstage mq15 35 endif if timer > 0 set timer to timer - getSecondsPassed endif end
375MQ15BracersScriptscn MQ15BracersScript ref tempRef begin OnAdd player setstage mq15 45 end begin OnEquip set tempRef to GetContainer tempRef.equipitem MQ15Bracers 1 end begin OnEquip player MessageBox "The Bands glow red briefly as they lock around your wrists." end begin OnUnequip player MessageBox "The Bands are locked around your wrists, and will not come off." end
376MQ15DremoraGuardSCRIPTscn MQ15DremoraGuardSCRIPT begin OnHit player setstage MQ15 64 end
377MQ15EternalGardenMonsterScriptscn MQ15EternalGardenMonsterScript begin gamemode if GetDead == 1 && getdistance player > 5000 resurrect endif end
378MQ15FortressInteriorDoorScriptscn MQ15FortressInteriorDoorScript begin OnActivate if isActionRef player == 1 message "The door appears to be sealed." else activate endif end
379MQ15GrottoEntranceScriptscn MQ15GrottoEntranceScript short activateOK begin OnActivate if IsActionRef player == 1 if player.GetEquipped MQ15Bracers == 1 MessageBox "The bands emit a red glow and the door opens.", "Done" set activateOK to 1 else MessageBox "The door is smooth and featureless, without any apparent means of opening it." setstage MQ15 22 endif else Activate endif end begin gamemode if getbuttonpressed > -1 && activateOK == 1 set activateOK to 0 player.setfactionrank MQ15EnemyFaction 0 Activate player endif end
380MQ15GrottoExitScriptscn MQ15GrottoExitScript ref actionRef begin OnActivate set actionRef to GetActionRef if actionRef.GetEquipped MQ15Bracers == 1 if actionRef == player MessageBox "The bands on your wrists glow with a fierce red light as you attempt to open the door." endif cast MQ15GrottoDoorSpell actionRef else Activate endif end
381MQ15KathutetSCRIPTscn MQ15KathutetSCRIPT short done begin gamemode if done == 1 return endif if getdead == 1 if getstagedone MQ15 40 == 0 additem MQ15Bracers 1 endif set done to 1 endif end
382MQ15MinotaurLordScriptscn MQ15MinotaurLordScript short leverCount ; each lever that is pulled increases this by 1 begin OnDeath setstage MQ15 36 end
383MQ15MinotaurTrapDoorScriptscn MQ15MinotaurTrapDoorScript begin OnActivate if IsActionRef player == 1 Activate setstage MQ15 35 endif end
384MQ15MythicDawnGarden01Scriptscn MQ15MythicDawnGarden01Script float resurrectTimer ; used to time resurrection short dieRoll ; used to decide where to respawn short dead ; set to when when dead -- because OnDeath now happens after GetDead returns true. begin OnDeath set dead to 1 set resurrectTimer to MQ15.resurrectBase + GetRandomPercent end begin gamemode if dead > 0 if resurrectTimer > 0 set resurrectTimer to resurrectTimer - getsecondsPassed else if dead == 1 ; start resurrection set dead to 2 set resurrectTimer to 2 pme BABO ;pms CHAMELEON elseif dead == 2 ; resurrect set dead to 0 resurrect set dieRoll to GetRandomPercent if dieRoll < 34 moveto MQ15ResurrectPad1 MQ15ResurrectCloud1.activate MQ15ResurrectPad1 1 elseif dieRoll < 67 moveto MQ15ResurrectPad2 MQ15ResurrectCloud2.activate MQ15ResurrectPad2 1 else moveto MQ15ResurrectPad3 MQ15ResurrectCloud3.activate MQ15ResurrectPad3 1 endif pme BABO ;sms CHAMELEON endif endif endif end
385MQ15MythicDawnPrisonerSCRIPTscn MQ15MythicDawnPrisonerSCRIPT float basehealth short inLava begin OnLoad setrestrained 1 end begin OnActivate if IsActionRef player == 0 Say MQ15Voice endif end begin gamemode if getav health < getbaseav health set basehealth to getbaseav health modav health basehealth endif if getdead == 1 resurrect 1 endif if inLava == 0 if IsInDangerousWater == 1 pickidle set inLava to 1 pms effectfiredamage endif endif if inLava == 1 if IsInDangerousWater == 0 pickidle set inLava to 0 sms effectfiredamage endif endif end
386MQ15ParadisePortalScriptscn MQ15ParadisePortalScript float timer begin gamemode if getdisabled == 1 return endif if timer < 5 set timer to timer + getsecondspassed else activate player disable endif end
387MQ15PlasmaCloud01SCRIPTscn MQ15PlasmaCloud01SCRIPT short busy begin onActivate if busy == 0 && isActionRef player == 0 playgroup forward 0 set busy to 1 endif end begin gameMode if busy == 1 && isAnimPlaying == 0 set busy to 0 endif end
388MQ15PlayerCageLeverSCRIPTscn MQ15PlayerCageLeverSCRIPT ref myParent ref mySelf short activated short busy short opened float timer begin onActivate if IsActionRef player == 1 Message "The lever doesn't move. It seems to be locked in position." else if busy == 0 set activated to 1 if ( opened == 0 ) playgroup forward 0 set opened to 1 else playgroup backward 0 set opened to 0 endif set timer to .1 set busy to 1 endif endif end begin gameMode if ( timer <= 0 ) && activated == 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set activated to 0 endif if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
389MQ15PortalSCRIPTscn MQ15PortalSCRIPT short stage short next float timer ref mySelf ref myParent begin onLoad ; set up ref vars set mySelf to getSelf set myParent to getParentRef end begin onActivate if stage == 0 && isActionRef MQRitualDrawingRef == 1 playgroup equip 0 set stage to 1 set next to 1 set timer to 10 elseif stage == 2 && isActionRef MQRitualDrawingRef == 1 setdestroyed 1 playgroup unequip 0 set stage to 0 elseif isActionRef player == 1 activate endif end begin gameMode if stage == 1 && isAnimPlaying == 0 set stage to 2 playgroup forward 0 endif ; daisy-chain if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
390MQ15TortureCage01SCRIPTscn MQ15TortureCage01SCRIPT ; on activation, lowers and raises self (anim groups "Forward" & "Backward") ; to open and close the two doors, use the following animation groups ; Door01 open = "FastForward" ; Door01 close = "FastBackward" ; Door02 open = "Left" ; Door02 close = "Right" ; automatically activates parents, so if you want an automatic counterweight effect, link this to a CTortureCageLowered01 object short lowered short busy short initialized ref mySelf ref myParent float timer short doorToOpen ; which door to open when cage is raised? 0 = none, 1 = door 1, 2 = door 2 short nextStep ; what animation to play when we're finished with this one? ; 0 = none, finished ; 1 = open door1 ; 2 = close door1 ; 3 = open door2 ; 4 = close door2 ; 5 = lower cage ; 6 = raise cage begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 && busy == 0 if lowered == 0 ; at top, close door and lower set lowered to 1 if doorToOpen == 0 playgroup forward 0 set busy to 2 set nextStep to 0 set timer to 1 elseif doorToOpen == 1 playgroup FastBackward 0 set busy to 2 set nextStep to 5 set timer to 1 else playgroup Right 0 set busy to 2 set nextStep to 5 set timer to 1 endif else ; at bottom, raise and open door set lowered to 0 playgroup backward 0 set busy to 2 set lowered to 0 set timer to 1 if doorToOpen == 1 set nextStep to 1 elseif doorToOpen == 2 set nextStep to 3 else set nextStep to 0 endif endif endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 if nextStep == 0 myParent.activate mySelf 1 endif set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 ; what animation to play next? if nextStep > 0 set busy to 2 set timer to 1 if nextStep == 1 playgroup fastforward 0 elseif nextStep == 2 playgroup FastBackward 0 elseif nextStep == 3 playgroup Left 0 elseif nextStep == 4 playgroup Right 0 elseif nextStep == 5 playgroup forward 0 else playgroup backward 0 endif set nextStep to 0 else if lowered == 1 && getstage mq15 == 62 setstage mq15 65 endif if lowered == 0 && getstage mq15 == 65 setstage mq15 66 endif endif endif if timer > 0 set timer to timer - getSecondsPassed endif end
391MQ15TrigZonePLAYERwarp01SCRIPTscn MQ15TrigZonePLAYERwarp01SCRIPT ; warps player to CPHilltopTeleporterSpot xmarker float timer short activated begin onTrigger player if activated == 0 set activated to 1 set timer to 1 playsound SPLAlterationCast TriggerHitShader player.moveto CPHilltopTeleporterSpotREF endif end begin gamemode if activated == 1 && timer <= 0 set activated to 0 endif if timer > 0 set timer to timer - getsecondspassed endif end
392MQ16DaedraScriptscn MQ16DaedraScript begin OnDeath set MQ16.deadDaedra to MQ16.deadDaedra + 1 end begin OnLoad setalert 1 if getstage MQ16 >= 46 disable endif end
393MQ16EndgameBattleScriptscn MQ16EndgameBattleScript short startAnimating ; 1 = trigger animation ; 2 = animating ; 3 = done short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 if GetDayofWeek == DayofLastUse MessageBox "You've already received your blessing this day." else MessageBox "The blessings of Akatosh are upon you." Cast AltarDragonStatue Player Set DayofLastUse to GetDayofWeek endif else set target to GetActionRef Cast AltarNine target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif if startAnimating == 1 ; messagebox "TEMP: start Battle anim" ; disable entry anim MQ16EndgameEntry.disable ; start fire effect pms effectfiredragon playgroup equip 1 set startAnimating to 2 elseif startAnimating == 2 if IsAnimPlaying == 0 set startAnimating to 3 ; stop fire effect sms effectfiredragon setstage MQ16 60 endif endif end
394MQ16EndgameEntryScriptscn MQ16EndgameEntryScript short startAnimating ; 1 = trigger animation ; 2 = animating equip ; 3 = animating unequip ; 4 = done begin gamemode if startAnimating == 1 playgroup equip 1 set startAnimating to 2 elseif startAnimating == 2 if IsAnimPlaying == 0 set startAnimating to 3 playgroup unequip 1 setstage MQ16 54 endif elseif startAnimating == 3 if IsAnimPlaying == 0 set startAnimating to 4 setstage MQ16 58 endif endif end
395MQ16EndgameTransformationScriptscn MQ16EndgameTransformationScript short startAnimating ; 1 = trigger animation ; 2 = animating ; 3 = done begin gamemode if startAnimating == 1 playgroup equip 1 MQ16EndgameSpawn.playgroup equip 1 set startAnimating to 2 endif end
396MQ16LeginoAttackTriggerZoneSCRIPTscn MQ16LeginoAttackTriggerZoneSCRIPT begin onTrigger player if getstage MQ16 < 29 setstage MQ16 29 endif end
397MQ16MehrunesDagonScriptscn MQ16MehrunesDagonScript float staggerTimer short newHealth short baseHealth short minStagger ; min damage to stagger Dagon ; for now = 50% of player's base health begin gamemode ; if getquestrunning MQ16 == 0 ; return ; endif ; if Dagon takes a massive hit, restrain him for a while set newHealth to getav health if newHealth < getbaseav health ; set minStagger to 50 set minStagger to player.getbaseav health * .5 set baseHealth to getbaseav health if baseHealth - newHealth >= minStagger ; "massive hit" -- Dagon is "staggered" setrestrained 1 set MQ16.DagonStaggered to 1 set staggerTimer to 10 pickidle endif forceav health baseHealth endif ; if Dagon is staggered, unstagger him when weather finishes turning clear if MQ16.DagonStaggered > 0 if staggerTimer > 0 set staggerTimer to staggerTimer - getsecondspassed else set MQ16.DagonStaggered to 0 setrestrained 0 pickidle endif endif end
398MQ16MehrunesDagonTriggerZoneSCRIPTscn MQ16MehrunesDagonTriggerZoneSCRIPT ; Activates linked Parent object once begin onTrigger player if getstage MQ16 < 30 setstage MQ16 30 endif end
399MQ16OblivionGate1Scriptscn MQ16OblivionGate1Script float timer short dieRoll ref mySpawnMarker ; ref of where to spawn -- set by master script short respawnCount ; used to respawn group of daedra begin OnActivate if isActionRef player == 1 messageBox "I must help Martin reach the Temple of the One before it is too late!" endif end begin gamemode ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 && getstage MQ16 > 20 && getstage MQ16 < 50 ; make sure Martin has entered Temple District if getstagedone MQ16 27 == 1 SetSceneIsComplex 1 endif ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 forceweather OblivionStormTamriel 1 endif if timer > 0 set timer to timer - getsecondspassed else if MQ16.deadDaedra >= 3 && respawnCount == 0 ; respawn in groups 1 to 3 set respawnCount to (1 + GetRandomPercent / 34) set MQ16.deadDaedra to MQ16.deadDaedra - respawnCount endif if respawnCount > 0 set timer to 30 set respawnCount to respawnCount - 1 ; what kind of creature to spawn? set dieRoll to GetRandomPercent if dieRoll <= 10 ; dremora boss mySpawnMarker.placeatme MQ16DremoraBossLvl100 elseif dieRoll <= 35 ; random dremora mySpawnMarker.placeatme MQ16Dremora100 elseif dieRoll <= 55 ; daedra boss mySpawnMarker.placeatme MQ16DaedraBossLvl100 else ; random daedra mySpawnMarker.placeatme MQ16DaedricBeast100 endif ; spawn all of them at once: if respawnCount == 0 return else set respawnCount to respawnCount - 1 endif ; what kind of creature to spawn? set dieRoll to GetRandomPercent if dieRoll <= 10 ; dremora boss mySpawnMarker.placeatme MQ16DremoraBossLvl100 elseif dieRoll <= 35 ; random dremora mySpawnMarker.placeatme MQ16Dremora100 elseif dieRoll <= 55 ; daedra boss mySpawnMarker.placeatme MQ16DaedraBossLvl100 else ; random daedra mySpawnMarker.placeatme MQ16DaedricBeast100 endif ; spawn all of them at once: if respawnCount == 0 return else set respawnCount to respawnCount - 1 endif ; what kind of creature to spawn? set dieRoll to GetRandomPercent if dieRoll <= 10 ; dremora boss mySpawnMarker.placeatme MQ16DremoraBossLvl100 elseif dieRoll <= 35 ; random dremora mySpawnMarker.placeatme MQ16Dremora100 elseif dieRoll <= 55 ; daedra boss mySpawnMarker.placeatme MQ16DaedraBossLvl100 else ; random daedra mySpawnMarker.placeatme MQ16DaedricBeast100 endif endif endif endif end
400MQ16PalaceDaedraScriptscn MQ16PalaceDaedraScript begin OnLoad if getstage MQ16 >= 40 disable endif end begin OnDeath if getstagedone MQ16 23 == 0 setstage MQ16 23 endif end
401MQ16PalaceDistrictSoldierSCRIPTscn MQ16PalaceDistrictSoldierSCRIPT ; this script disables soldiers who are supposed to only be in the Palace battle begin OnLoad if getinworldspace ICTempleDistrictMQ16 == 1 disable endif end
402MQ16PalaceDistToTempleDistDoorSCRIPTscn MQ16PalaceDistToTempleDistDoorSCRIPT ref actionRef begin OnActivate set actionRef to getActionRef if actionRef.getisID MQ16PalaceGuard == 1 || actionRef.getisID MQ16ImperialSoldier01 == 1 || actionRef.getisID MQ16ImperialArcher01 == 1 actionRef.disable else if isactionref MartinRef == 1 setstage mq16 27 endif activate endif end
403MQ16PalaceDoorSCRIPTscn MQ16PalaceDoorSCRIPT ; this script exists only as a way to set the complex scene flag begin gamemode ; wait until Martin arrives to set complex (or he will never get out of the interior) if getstagedone mq16 26 == 1 setsceneiscomplex 1 endif end
404MQ16PalaceToTempleDistrictDoorSCRIPTscn MQ16PalaceToTempleDistrictDoorSCRIPT begin OnActivate if isActionRef player == 1 if MartinRef.getinworldspace ICTempleDistrictMQ16 == 0 MartinRef.moveto MQ16MartinToTempleDistrictMarker MartinRef.evp endif endif Activate end
405MQ16Scriptscn MQ16Script short setupBattle short deadDaedra ; tracks the number of dead daedra, so gates know when to respawn ref bladeRef ; Baurus or Steffan. set by MQ15 stage 20 short baurusDead ; 1 if Steffan is bladeRef (condition for his packages, so he doesn't show up if Baurus dies during MQ16) short DagonStaggered ; 1 if Dagon has been staggered float timer float fQuestDelayTime begin gamemode if timer > 0 set timer to timer - getsecondspassed endif ; Martin approaches Baurus/Steffan near Palace if getstage MQ16 == 8 if bladeRef.getdistance MartinRef < 600 setstage MQ16 9 bladeRef.startconversation MartinRef endif endif ; Martin and player arrive in Elder Council chamber if getstage MQ16 >= 5 && getstage MQ16 < 9 if MartinRef.getincell ICPalaceElderCouncilChambers == 1 setstage MQ16 9 endif endif if getstage MQ16 >= 5 && getstage MQ16 <= 9 if MartinRef.getdistance MQ16MartinElderCouncilMarker < 600 && player.getdistance MQ16MartinElderCouncilMarker < 600 setstage MQ16 10 endif endif if getstage MQ16 == 10 if player.getincell ICPalaceElderCouncilChambers == 1 && OcatoRef.getincell ICPalaceElderCouncilChambers == 0 ; if Ocato has left the Elder Council chamber, move him back OcatoRef.moveto player OcatoRef.evp endif endif ; timer for messenger if getstage MQ16 == 15 if MQ16MessengerRef.getdistance OcatoRef < 900 setstage mq16 16 MQ16MessengerRef.sayto OcatoRef MQ16Voice 1 endif endif ; player exits council chamber after battle starts if getstage MQ16 >= 21 && getstagedone MQ16 25 == 0 if player.getincell ICPalaceElderCouncilChambers == 0 setstage MQ16 25 endif endif ; Martin exits council chamber after battle starts if getstage MQ16 >= 21 && getstagedone MQ16 26 == 0 if MartinRef.getincell ICPalaceElderCouncilChambers == 0 setstage MQ16 26 endif endif ; player sees Mehrunes Dagon for the first time ; NOTE: moved to MQ16MehrunesDagonTriggerZoneSCRIPT ;if getstage mq16 >= 25 && getstage MQ16 < 30 ; if player.getLOS MehrunesDagonRef == 1 && player.getdistance MehrunesDagonRef < 2300 ; setstage MQ16 30 ; endif ;endif ; player and Martin reach Temple of the One if getstage MQ16 == 35 if player.GetInCell ICTempleDistrictTempleOfTheOneMQ16 == 1 && MartinRef.GetInCell ICTempleDistrictTempleOfTheOneMQ16 == 1 setstage MQ16 40 endif endif ; Endgame finished ; give last journal after timer runs out if getstage MQ16 == 60 && timer <= 0 setstage MQ16 65 endif ; give last journal after timer runs out if getstage MQ16 == 65 && timer <= 0 setstage MQ16 80 endif ; EVERYTHING AFTER THIS IS SETUP CODE (pre and post battle) if setupBattle == 0 return endif if setupBattle == 1 set setupBattle to 0 ; enable all the battle stuff MQ16AttackParentMarker.enable ; disable Mythic Dawn assassins StyrbjornRef.disable ; Martin can die now SetEssential Martin 0 ; set weather forceweather OblivionStormTamriel 1 ; set Oblivion gate variables set MQ16OblivionGate01.mySpawnMarker to MQ16Gate1SpawnMarker set MQ16OblivionGate02.mySpawnMarker to MQ16Gate2SpawnMarker ; set up council chamber attack MQ16CouncilChamberAttacker.setfactionrank MQ16DaedraFaction 1 MQ16CouncilChamberAttacker.startcombat MartinRef MQ16CouncilChamberAttacker.setav aggression 50 MQ16CouncilChamberAttacker2.setfactionrank MQ16DaedraFaction 1 MQ16CouncilChamberAttacker2.startcombat player MQ16CouncilChamberAttacker2.setav aggression 50 MQ16PalaceGuard01.setav aggression 25 MQ16PalaceGuard02.setav aggression 25 MQ16PalaceGuard01.setalert 1 MQ16PalaceGuard02.setalert 1 MQ16MessengerRef.startcombat MQ16CouncilChamberAttacker ; move Baurus/Steffan into battle worldspace bladeRef.moveto MQ16BladeWaitMarker ; add everybody to MQ16AlliesFaction OcatoRef.setfactionrank MQ16AlliesFaction 1 BaurusRef.setfactionrank MQ16AlliesFaction 1 JauffreRef.setfactionrank MQ16AlliesFaction 1 SteffanRef.setfactionrank MQ16AlliesFaction 1 player.setfactionrank MQ16AlliesFaction 1 ; ignore friendly hits during battle OcatoRef.SetIgnoreFriendlyHits 1 SteffanRef.SetIgnoreFriendlyHits 1 BaurusRef.SetIgnoreFriendlyHits 1 MQ16PalaceGuard01.SetIgnoreFriendlyHits 1 MQ16PalaceGuard02.SetIgnoreFriendlyHits 1 MQ16MessengerRef.SetIgnoreFriendlyHits 1 ; restrain/ghost Dagon attackers MQ16DagonAttack1.setghost 1 MQ16DagonAttack2.setghost 1 MQ16DagonAttack3.setghost 1 ; MQ16DagonAttack4.setghost 1 MQ16DagonAttack5.setghost 1 MQ16DagonAttack6.setghost 1 ; MQ16DagonAttack7.setghost 1 MQ16DagonAttack8.setghost 1 MQ16DagonAttack1.setrestrained 1 MQ16DagonAttack2.setrestrained 1 MQ16DagonAttack3.setrestrained 1 ; MQ16DagonAttack4.setrestrained 1 MQ16DagonAttack5.setrestrained 1 MQ16DagonAttack6.setrestrained 1 ; MQ16DagonAttack7.setrestrained 1 MQ16DagonAttack8.setrestrained 1 ; evp everybody OcatoRef.evp MartinRef.evp JauffreRef.evp ; give Dagon his spell (leveled to the player): MehrunesDagonRef.removespell MQ16DagonAreaAttack1 if player.getlevel >= 24 MehrunesDagonRef.addspell MQ16DagonAreaAttack5 elseif player.getlevel >= 18 MehrunesDagonRef.addspell MQ16DagonAreaAttack4 elseif player.getlevel >= 12 MehrunesDagonRef.addspell MQ16DagonAreaAttack3 elseif player.getlevel >= 8 MehrunesDagonRef.addspell MQ16DagonAreaAttack2 else MehrunesDagonRef.addspell MQ16DagonAreaAttack1 endif ; NOTE: he has the Attack1 spell by default endif if setupBattle == 2 MartinRef.disable set setupBattle to 0 ; change weather back releaseweatheroverride setweather clear ; swap doors -- now door leads to "normal" Temple district MQ16TempleToMQ16ExteriorDoor.disable ; disable all the battle stuff ; TODO: this should probably be on a timer eventually MQ16AttackParentMarker.disable ; pathgrid change in Temple District MQ16PathgridRock.activate MQ16PathgridRock ; remove everybody from MQ16AlliesFaction OcatoRef.setfactionrank MQ16AlliesFaction -1 BaurusRef.setfactionrank MQ16AlliesFaction -1 JauffreRef.setfactionrank MQ16AlliesFaction -1 SteffanRef.setfactionrank MQ16AlliesFaction -1 player.setfactionrank MQ16AlliesFaction -1 OcatoRef.SetIgnoreFriendlyHits 0 ; move Ocato and Jauffre into MQ16Temple, if alive if OcatoRef.getdead == 0 OcatoRef.modav health 1000 ; make sure he isn't down for the count OcatoRef.modav fatigue 1000 MQ16DummyDoorToMQ16TempleInterior.activate OcatoRef OcatoRef.evp endif if JauffreRef.getdead == 0 MQ16DummyDoorToMQ16TempleInterior.activate JauffreRef JauffreRef.evp endif ; move real NPCs back to normal world if bladeRef.getdead == 0 MQ16DummyDoorToMQ16TempleInterior.activate bladeRef bladeRef.evp endif ; close Elder Council door ICPalaceElderCouncilMainDoor.SetDoorDefaultOpen 0 ; reenable normal palace guards MQ16PalaceGuard01.disable ; enable all post-battle stuff MQ16AkatoshStatueRef.enable MQ16PathgridRock.disablelinkedpathpoints ; quest cleanup setstage MS94 100 ; player is hero of Cyrodiil modpcfame 3 setfactionreaction ICFaction playerFaction 30 setfactionreaction KvatchFaction playerFaction 20 ; Kvatch already loves the player setfactionreaction BrumaFaction playerFaction 20 ; Bruma already loves the player setfactionreaction ChorrolFaction playerFaction 30 setfactionreaction BravilFaction playerFaction 30 setfactionreaction CheydinhalFaction playerFaction 30 setfactionreaction LeyawiinFaction playerFaction 30 setfactionreaction AnvilFaction playerFaction 30 setfactionreaction SkingradFaction playerFaction 30 ; rulers like the player even more for being Champion AndelIndarysRef.moddisposition player 20 MariusCaroRef.moddisposition player 20 RegulusTerentiusRef.moddisposition player 20 JanusHassildorRef.moddisposition player 20 ArrianaValgaRef.moddisposition player 20 MillonaUmbranoxRef.moddisposition player 20 OcatoRef.moddisposition player 20 ; make Mythic Dawn faction neutral to player (so they won't attack anymore) setfactionreaction MythicDawn playerFaction 0 ; make Blades neutral to MD (so they won't attack MD members) setfactionreaction MythicDawn Blades 0 setfactionreaction MythicDawn WeynonPrioryFaction 0 setfactionreaction Blades MythicDawn 0 ; no more Oblivion Crisis: set MQ00.maxOpenGates to 0 set MQ00.randomGateChance to 0 endif end
406MQ16SoldierSCRIPTscn MQ16SoldierSCRIPT begin OnLoad setalert 1 setignorefriendlyhits 1 end
407MQ16TempleDoorScriptscn MQ16TempleDoorScript begin OnActivate if isactionref player == 1 && getstage MQ16 >= 60 releaseweatheroverride endif activate end
408MQ16TempleExteriorDoorScriptscn MQ16TempleExteriorDoorScript ref actionRef begin OnActivate if IsActionRef player == 1 ; stop combat on Martin when player enters Temple so Martin doesn't die in resolved combat MartinRef.SCAOnActor ; so guys don't follow player in (allow wait menu to work) player.SCAOnActor Activate elseif IsActionRef MartinRef == 1 ; stop combat on Martin so nobody follow inside MartinRef.SCAOnActor Activate elseif getstage MQ16 >= 60 set actionRef to GetActionRef if actionRef.getinfaction MQ16DaedraFaction == 0 Activate endif endif end
409MQ16TempleToPalaceDoorScriptscn MQ16TempleToPalaceDoorScript begin OnActivate if IsActionRef player == 1 if MartinRef.getinworldspace ICImperialPalaceMQ16 == 0 messageBox "The guards have barred the door from the other side. The only way is forward now." else Activate endif endif end
410MQConversationsScriptscn MQConversationsScript ; this is just a holding spot for variables short OGStage ; for oblivion gate conversations ref OGDeadDaedra ; set when daedra dies (for soldiers cheering)
411MQDragonArmorQuestSCRIPTscn MQDragonArmorQuestSCRIPT short armorFinishDay float fQuestDelayTime begin gamemode if getstage MQDragonArmor > 10 return endif if gamedayspassed >= armorFinishDay setstage MQDragonArmor 20 ; create the armor for the player's best armor skill if player.getav lightarmor > player.getav heavyarmor MQDragonArmorLightParent.enable else MQDragonArmorHeavyParent.enable endif endif end
412MQDragonArmorScriptscn MQDragonArmorScript begin OnAdd player setstage MQDragonArmor 30 end
413MQXivBlockRockSCRIPTscn MQXivBlockRockSCRIPT short activated short open short next float timer ref mySelf ref myParent begin onActivate if activated == 0 set myParent to getParentRef set mySelf to getSelf set activated to 1 endif if isActionRef player == 1 if open == 0 message " The wall won't shift." endif elseif isActionRef mySelf == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 1 set open to 0 endif set timer to 0.5 set next to 1 endif end begin gameMode if next == 1 && timer <= 0 myParent.activate mySelf 1 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
414MS04BedSCRIPTscn MS04BedSCRIPT short done begin gamemode if done == 0 if MS04.undressing == 1 && player.getClothingValue == 0 && ms04 < 55 && player.isweaponout == 0 set done to 1 setstage ms04 55 endif endif end
415MS05DreamworldAmuletScriptscn MS05DreamworldAmuletScript short isEquipped short temp short Doonce begin menumode if ( Doonce == 1 ) Return endif if IsPCSleeping > 0 && player.GetInCell DreamHub == 0 && isEquipped == 1 && GetStage MS05 < 75 ; player is sleeping with amulet equipped ; move player return marker to player's current position (so we can return to it) set Doonce to 1 MS05DreamworldReturnMarker.moveto player ; strip all inventory to hidden container setshowquestitems 1 player.removeallitems MS05PlayerInventoryChest ; wake up player WakeUpPC ; if on MS05 quest: if getstage ms05 > 10 && getstage ms05 < 90 setstage ms05, 50 endif ;Add Dreamworld Silencer Player.Additem MS05DreamworldAmuletDupe 1 Player.EquipItem MS05DreamworldAmuletDupe 1 ; move to dreamworld player.moveto MS05DreamworldStartMarker endif end begin onEquip player set isEquipped to 1 end
416MS05DropScriptscn MS05DropScript begin onTrigger Player ;player.moveto MS05Fall end
417MS05TrigZonePLAYER01SCRIPTscn MS05TrigZonePLAYER01SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 set triggered to 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 MS05Mino01Ref.Enable MS05Mino01Ref.StartCombat Player MS05Mino02Ref.Enable MS05Mino02Ref.StartCombat Player endif end begin onReset set triggered to 0 end
418MS08FGGateScriptscn MS08FGGateScript ; activated by linked child ; activates optionally linked parent after 2 sec delay short activated short open short next short busy short wantopen short wantclosed float timer ref mySelf ref myParent begin gameMode if busy == 1 if wantopen == 1 set wantopen to 0 set open to 1 playgroup forward 1 elseif wantclosed == 1 set wantclosed to 0 set open to 0 playgroup backward 1 endif if isanimplaying == 0 set busy to 0 endif endif end begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message "This gate is opened elsewhere." endif elseif busy == 0 if open == 0 set wantopen to 1 else set wantclosed to 1 endif set busy to 1 endif end
419MS08FGgateSwitchBeforeSCRIPTscn MS08FGgateSwitchBeforeSCRIPT begin OnActivate if IsActionRef Player == 1 Messagebox "The handle seems to be rusted in place and won't turn." endif end
420MS08FortGriefIslandSwitchOutdoorScriptscn MS08FortGriefIslandSwitchOutdoorScript ref myParent ref mySelf short open short init short Busy begin OnActivate if Busy == 0 && open == 0 playgroup forward 0 myparent.activate MySelf 1 set Busy to 1 set open to 1 if ( IsActionRef Player == 1 ) message "You have activated the gate to Fort Grief." endif elseif Busy == 0 && open == 1 playgroup backward 0 myparent.activate MySelf 1 set Busy to 1 set open to 0 if ( IsActionRef Player == 1 ) message "You have activated the gate to Fort Grief." endif else if ( IsActionRef Player == 1 ) message "You may not use this switch at this time." endif endif end begin Gamemode if init == 0 set myParent to GetParentRef set mySelf to getSelf set init to 1 endif if IsAnimPlaying == 0 set Busy to 0 endif end
421MS08FortGriefIslandSwitchScriptscn MS08FortGriefIslandSwitchScript ref myParent ref mySelf short open short init short Busy begin OnActivate if Busy == 0 && open == 0 playgroup forward 0 myparent.setopenstate 1 set Busy to 1 set open to 1 if ( IsActionRef Player == 1 ) message "You have activated the gate to Fort Grief." endif elseif Busy == 0 && open == 1 playgroup backward 0 myparent.setopenstate 0 set Busy to 1 set open to 0 if ( IsActionRef Player == 1 ) message "You have activated the gate to Fort Grief." endif else if ( IsActionRef Player == 1 ) message "You may not use this switch at this time." endif endif end begin Gamemode if init == 0 set myParent to GetParentRef set mySelf to getSelf set init to 1 endif if IsAnimPlaying == 0 set Busy to 0 endif end
422MS10ParalyzeEffectscn MS10ParalyzeEffect begin ScriptEffectStart UlrichLelandRef.addSpell MS10ParalyzeAbility end begin ScriptEffectUpdate end begin ScriptEffectFinish UlrichLelandRef.removeSpell MS10ParalyzeAbility end
423MS10UlrichLetterSCRIPTscn MS10UlrichLetterSCRIPT begin onActivate if IsActionRef player == 1 && GetStage MS10 >= 70 activate setstage MS10 90 endif end
424MS12MadstoneScriptscn MS12MadstoneScript begin OnAdd player ;journal when acquiring Draconian Madstone if ( GetStage MS12 >= 100 ) setstage MS12 110 MS12VaultDoorRef.Unlock endif end
425MS12OrdersScriptscn MS12OrdersScript begin OnAdd player ;journal when picking up the orders if ( GetStage MS12 >= 60 ) setstage MS12 70 endif end
426MS16ChorrolSwordScriptscn MS16ChorrolSwordScript begin OnAdd player setstage ms16B, 50 end
427MS21AyleidStatueUmbacanoScriptscn MS21AyleidStatueUmbacanoScript short stolen ; script on the statues in Umbacano's house begin OnAdd player set MS21.stolen to 1 set stolen to 1 end begin OnDrop player set stolen to 1 end
428MS21Scriptscn MS21Script short foundCount ; how many statues has the player found? short sellCount ; how many statues has player sold? short questCount ; how many statues has the player brought to Umbacano? ;short umbacanoCount ; how many statues does Umbacano possess? short umbacanoLastCount ; used to trigger enabling of the statues short startDay short stageVar ; used to set the stage based on umbacanoCount short stolen ; set to 1 if the player steals any of the statues he sold to Umbacano short placeStatues ; set to 1 when it is time to update display case float fQuestDelayTime ; for quest script timing short movestatue1 ; set to 1 when statue1 is moved into its case begin gamemode if placeStatues == 1 if umbacanoLastCount < umbacanoCount set umbacanoLastCount to umbacanoLastCount + 1 ; enable the next statue in Umbacano's house if umbacanoLastCount == 1 ; message "DEBUG: enable statue 1" ms21statue1.enable elseif umbacanoLastCount == 2 ; message "DEBUG: enable statue 2" ms21statue2.enable elseif umbacanoLastCount == 3 ; message "DEBUG: enable statue 3" ms21statue3.enable elseif umbacanoLastCount == 4 ; message "DEBUG: enable statue 4" ms21statue4.enable elseif umbacanoLastCount == 5 ; message "DEBUG: enable statue 5" ms21statue5.enable elseif umbacanoLastCount == 6 ; message "DEBUG: enable statue 6" ms21statue6.enable elseif umbacanoLastCount == 7 ; message "DEBUG: enable statue 7" ms21statue7.enable elseif umbacanoLastCount == 8 ; message "DEBUG: enable statue 8" ms21statue8.enable elseif umbacanoLastCount == 9 ; message "DEBUG: enable statue 9" ms21statue9.enable elseif umbacanoLastCount == 10 ; message "DEBUG: enable statue 10" ms21statue10.enable endif endif if umbacanoLastCount == umbacanoCount ; all statues enabled set placeStatues to 0 set fQuestDelayTime to 10 endif endif end
429MS21statuescriptscn MS21statuescript short found ; set to 1 when player first picks up the statue short playerHasMe ; set to 1 when player has this item in inventory short sellDay ; day the statue is sold (to time when it goes to Umbacano) short toUmbacano ; set to 1 after Umbacano owns this statue begin OnSell player set playerHasMe to 0 set sellDay to gameDaysPassed return ; set ms21.sellCount to ms21.sellCount + 1 ; setstage MS21 5 ; move to Umbacano's house (so player can't buy it right back) ; set umbacanoCount to umbacanoCount + 1 ; set ms21.placeStatues to 1 ; set toUmbacano to 1 ; removeMe end begin OnSell ; generic block, we only get here if player wasn't the one selling (i.e. player was buying it) set sellDay to 0 ; reset sellday if player buys it back before exiting barter menu end begin onAdd player ; first time player finds this statue, mark it in ms21 script if found == 0 if getquestrunning ms21 == 0 startquest ms21 endif set found to 1 set ms21.foundCount to ms21.foundCount + 1 if MS21Statue1.getdisabled == 0 && MS21.movestatue1 == 0 && MS21Statue1.stolen == 0 && getstage MS21 >= 20 MS21Statue1.disable set MS21.movestatue1 to 1 MS21Statue1A.enable endif endif set playerHasMe to 1 end begin gamemode ; immediately when player sells it, put it in Umbacano's house if playerHasMe == 0 if toUmbacano == 0 && sellDay > 0 set ms21.sellCount to ms21.sellCount + 1 setstage MS21 5 ; move to Umbacano's house (so player can't buy it right back) set umbacanoCount to umbacanoCount + 1 set ms21.placeStatues to 1 set toUmbacano to 1 removeMe endif endif end
430MS22AyleidCarvingScriptscn MS22AyleidCarvingScript short activated begin gameMode if activated == 0 set activated to 1 endif end begin onAdd player setstage ms22, 50 ;collapse the wall ARMaladaWall02REF.activate MS22AyleidCarvingRef 1 end ; only way Jollring can get it is if Maric delivers it begin onAdd JollringRef set ms22.gotCarving to 2 removeme end
431MS22ChairScriptscn MS22ChairScript ; this is just to trigger Maric to greet player during MS22 short doOnce begin gamemode if doOnce == 0 if getstage MS22 == 30 && ClaudeMaricRef.getdistance player < 500 set doOnce to 1 ClaudeMaricRef.sayto player HELLO endif endif end
432MS22MaladaInnerDoorScriptscn MS22MaladaInnerDoorScript short done begin onActivate if done == 0 if IsActionRef player == 1 if player.getitemcount MS22AyleidKey > 0 MessageBox "The carved stone that Umbacano gave you fits seamlessly into the hole in the door." player.removeitem ms22AyleidKey, 1 playgroup forward 0 playsound DRSStoneOpen set done to 1 else MessageBox "The block has a irregular gap in it which looks like it could be a keyhole of some kind, but there is no other sign of how to operate it." endif endif endif end
433MS22MaladaMarkerScriptscn MS22MaladaMarkerScript short done begin gamemode if done == 1 return endif if getdistance player < 1000 && player.getheadingangle MS22MaladaEntranceRef < 45 set done to 1 set ms22.visitMalada to 1 ; set MS22 stage if this is first visit if getstagedone ms22, 10 == 1 && getstagedone ms22, 15 == 0 setstage ms22, 20 endif endif end
434MS22Scriptscn MS22Script short visitMalada short meetMaric short thugDeadCount short dealCost ;used to track how much the PC has agreed to pay Srazirr: 0 = no deal; 2 = 1/2; 4 = 1/4 short makeDeal ; used to track if the PC has made a deal with Srazirr: 1 = deal short gotCarving ; 2 = Maric delivered the carving to Umbacano, 1 = player delivered it short readBook ; 1 = player has read High Fane book short targetMalada ; the player knows that High Fane == Malada short pclevel ; player's level when she accepts the quest
435MS22SrazirrScriptscn MS22SrazirrScript short forceGreet begin gamemode if getiscurrentpackage MS22SrazirrFollowPC == 1 && player.GetInCell IC == 0 && getinsamecell player == 1 removescriptpackage moddisposition player -100 startcombat player endif if getiscurrentpackage MS22WaitForPayment == 1 && forceGreet == 0 && getincell ICTalosPlazaTheTiberSeptimHotel == 1 && getstage MS22 >= 90 && getdistance player < 800 set forceGreet to 1 startconversation player endif end begin OnDeath set ms22.thugDeadCount to ms22.thugDeadCount + 1 end
436MS22ThugScriptscn MS22ThugScript begin OnDeath set ms22.thugDeadCount to ms22.thugDeadCount + 1 end begin OnHit player if getstage ms22 == 50 setstage ms22 54 endif if getstage MS22 == 70 setstage ms22 72 endif end
437MS27ARTrapEvilStone02SCRIPTscn MS27ARTrapEvilStone02SCRIPT ; when activated will shoot shockbolt at Umbacano after 3 sec float timer short ready short count begin onActivate if isActionRef player == 0 && timer <= 0 playgroup forward 1 set timer to 9 set ready to 1 set count to 5 endif end begin gameMode if timer <= 4 && ready == 1 if getstagedone ms27 50 == 1 cast MS27FakeShockBolt UmbacanoRef else cast StandardShockDamageTarget1Novice UmbacanoRef endif setstage ms27 86 set ready to 0 endif ; keep shooting at Umbacano until count reaches 0 if timer <= 0 && count > 0 set count to count - 1 set ready to 1 set timer to 1 endif if timer <= 0 && count == 0 && getstage ms27 > 80 && getstage ms27 < 90 if getstagedone ms27 50 == 1 setstage ms27 90 else setstage ms27 95 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end
438MS27HerminiaCinnaCaskScriptscn MS27HerminiaCinnaCaskScript short doOnce begin gamemode if getstagedone ms27 5 == 1 && doOnce == 0 set doOnce to 1 removeitem MS27NenalataCrown 1 removeitem MS27NenalataAyleidCrown01 1 removeitem MS27NenalataAyleidCrown05 1 removeitem MS27NenalataAyleidCrown10 1 removeitem MS27NenalataAyleidCrown15 1 removeitem MS27NenalataAyleidCrown20 1 removeitem MS27NenalataAyleidCrown25 1 endif end
439MS27LindaAyleidCrownScriptscn MS27LindaAyleidCrownScript begin OnAdd player set MS27.lindaiCrown to 1 if getstage ms27 > 0 && getstage ms27 < 50 setstage ms27 35 endif end
440MS27LindaiInnerDoorScriptscn MS27LindaiInnerDoorScript short done begin onActivate if done == 0 if IsActionRef player == 1 if player.getitemcount MS27AyleidKey > 0 MessageBox "The carved stone that Herminia Cinna gave you fits seamlessly into the hole in the door." player.removeitem ms27AyleidKey, 1 playgroup forward 0 playsound DRSStoneOpen set done to 1 else MessageBox "The block has a irregular gap in it which looks like it could be a keyhole of some kind, but there is no other sign of how to operate it." endif endif endif end
441MS27NenalataAyleidCrownScriptscn MS27NenalataAyleidCrownScript begin OnAdd player set MS27.stoleCrown to 1 if getstage ms27 > 0 && getstage ms27 < 50 setstage ms27 30 endif end
442MS27Scriptscn MS27Script short stoleCrown ; set to 1 when player takes crown from Herminia Cinna short lindaiCrown ; set to 1 when player gets crown of Lindai short nextStageDay ; set to day when Umbacano gets Herminia's crown from Maric short meetNenalata ; set to day when Umbacano expects to meet player at Nenalata begin gamemode ; kill Herminia Cinna offstage if player won't help Umbacano get the crown if getstage ms27 == 5 if herminiacinnaref.getdead == 0 && herminiacinnaref.getinsamecell player == 0 herminiacinnaref.kill setstage ms27 50 endif endif if getstage ms27 > 80 && getstage ms27 < 100 if player.isinInterior == 0 setstage ms27 100 endif endif end
443MS27SlidingWallSCRIPTscn MS27SlidingWallSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short open short next short busy float timer ref mySelf ref myParent begin onLoad ; set up parent ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked path nodes disableLinkedPathPoints end begin onActivate if isActionRef player == 0 && isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints playsound DRSStoneOpen endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 UmbacanoRef.sayTo player MS27Voice endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
444MS29AgarmirsShovelSCRIPTscn MS29AgarmirsShovelSCRIPT begin OnAdd player ;sets stage on sword pickup if ( GetStage MS29 >= 90 ) setstage MS29 100 endif end
445MS29MacabreManifestSCRIPTscn MS29MacabreManifestSCRIPT begin OnActivate if IsActionRef player == 1 activate setstage MS29 65 endif end
446MS37FrostSaltsSCRIPTscn MS37FrostSaltsSCRIPT begin OnAdd Player ;Sets stage when Refined Frost Salts acquired if ( GetStage MS37 >= 50 ) setstage MS37 60 endif end
447MS37GarridansTearSCRIPTscn MS37GarridansTearSCRIPT short stage begin OnAdd player ; set the right stage if GetStage MS37 >= 80 && getstage MS37 < 100 set MS37.GotGems to MS37.GotGems + 1 if MS37.GotGems >= 5 set stage to 95 else set stage to MS37.GotGems + 89 endif setstage MS37 stage endif end
448MS37KnightfallSCRIPTscn MS37KnightfallSCRIPT short Doonce begin OnAdd Player if ( GetStage MS37 >= 30 ) && ( Doonce == 0 ) setstage MS37 40 set Doonce to 1 endif end begin OnEquip Player if (GetStage MS37 >= 30 ) && ( Getstage MS37 < 50 ) Activate Setstage MS37 50 MS37FrostSaltsRef.Enable endif end
449MS38GlarthirDoorScriptscn MS38GlarthirDoorScript ; this script turns Glarthir on when player walks near his house in Skingrad short done begin gamemode if done == 0 if getdistance player < 5000 set done to 1 glarthirref.enable startquest MS38 endif endif end
450MS40VampireDustScriptscn MS40VampireDustScript begin GameMode ;Update Quest Stage when player has collected vampire ash if ( Player.GetItemCount MS40VampireDust > 0 ) if ( GetStageDone MS40, 50 == 0 ) if ( MS40.ashvar == 1 ) SetStage MS40 50 endif endif endif end
451MS45DarMaChestScriptscn MS45DarMaChestScript ; Used to move chest after Dar-Ma is kidnapped, and fill it with her clothes & stuff short done begin gamemode if done == 0 && getstage MS45 > 0 set done to 1 ; move everything from other chest HackdirtMoslinsInnChest.removeallitems MS45DarMaChestRef ; add Dar-Ma's stuff additem MS45DarMasDiary 1 additem MiddlePants02 1 additem MiddleShirt01 1 additem MiddleShoes03 1 endif end
452MS46RewardChestSCRIPTscn MS46RewardChestSCRIPT ; chest replenishes itself every week short lastDay short reward begin OnLoad if gameDaysPassed > lastDay + 7 set lastDay to gameDaysPassed removeallitems set reward to 10 * player.getlevel set reward to reward + getrandompercent / 5 additem gold001 reward endif end
453MS46Scriptscn MS46Script short shamanDead short headStolen begin gamemode ; killing ShamanA is one way to win MS46 if shamanDead == 1 if getstage MS46 > 10 && getstage MS46 < 100 setstage ms46 30 set shamanDead to 2 endif endif ; or, you can get the tribal head ; have to handle it this way because the Goblin Staff is a generic object if goblinheadCrackedWood.playerhasme == 1 && headStolen == 0 set headStolen to 1 endif if headStolen == 1 ; once we've talked to Mirisa, we can just set this stage if we already took care of it if getstage MS46 > 10 && getstage MS46 < 100 setstage ms46 40 endif endif end
454MS47AleswellActorScriptscn MS47AleswellActorScript short spellGone begin onLoad if getstagedone MS47 50 == 1 removespell MS47Invisibility set spellgone to 1 endif end begin gamemode if spellGone == 0 if getstagedone ms47 50 == 1 removespell MS47Invisibility set spellgone to 1 endif endif end
455MS47AncotarsRingScriptscn MS47AncotarsRingScript begin OnEquip player set MS47.ringEquipped to 1 end begin OnUnequip player set MS47.ringEquipped to 0 end
456MS47CreatureScriptscn MS47CreatureScript begin onLoad if MS47.AncotarVisible == 1 removespell MS47Invisibility else addspell MS47Invisibility endif end
457MS47ReverseInvisibilityEnchantmentScriptscn MS47ReverseInvisibilityEnchantmentScript ref target ; this script is the reverse invisibility spell begin ScriptEffectStart ; means the player is casting the "self" spell from the scroll ; so cast the area effect version on the player MS47InvisibilityCastingMarker.moveto player MS47InvisibilityCastingMarker.cast MS47ReverseInvisibility player if player.getincell Aleswell == 0 ; failure if the player isn't in Aleswell if ms47.castcount == 0 setstage MS47 40 else setstage MS47 44 endif else ; success setstage ms47, 50 endif ; increment the cast count set ms47.castCount to ms47.castCount + 1 endif end
458MS47ReverseInvisibilityScriptscn MS47ReverseInvisibilityScript ; NOTE: not sure if this scroll will actually need a script, but for now, use it to trigger the "spell" short stage begin ondrop player if MS47.ringEquipped == 1 MessageBox "You cast the Reverse Invisibility spell (ring equipped, no side effect)." else MessageBox "You cast the Reverse Invisibility spell (side effect!)." endif disable ; TEMP -- to make scroll disappear end
459MS47ReverseInvisibilitySpellscn MS47ReverseInvisibilitySpell ref target short stage ; this script is the reverse invisibility spell begin ScriptEffectStart set target to GetSelf ; who am I being cast on? if player.getincell aleswell == 1 || getinfaction AleswellFaction == 0 set MS47.temp to MS47.temp + 1 RemoveSpell MS47Invisibility if getequipped MS47AncotarsRing == 0 && GetSelf == player cast MS47DamageAttribLuck target endif endif ; set journal if target == AncotarRef ; messageBox "DEBUG: Ancotar not invisible anymore" if ms47.AncotarVisible == 0 set MS47.AncotarVisible to 1 AncotarRef.moddisposition player, -30 endif endif end
460MS47Scriptscn MS47Script short castCount ; number of times the player has cast the Reverse Invisibility short ringEquipped ; 1 = player has Ancotar's ring equipped (meaning no side effects on him) short AncotarVisible ; 1 = player used the scroll inside Fort Caractacus short temp ; count actors affected by the spell short spoketoShagol ; used for post-quest dialogue short spoketoDiram ; used for post-quest dialogue short spoketoAdosi ; used for post-quest dialogue short spoketoUrnsi ; used for post-quest dialogue short spoketoSakeepa ; used for post-quest dialogue
461MS48InsideOblivionGateScriptscn MS48InsideOblivionGateScript begin OnActivate if isActionRef player == 1 set MS48.inOblivion to 0 endif Activate end
462MS48OblivionGateScriptscn MS48OblivionGateScript ref mySpawnMarker short count float timer short deadCount ; number of guys killed; if > 3 reset and respawn on load begin OnLoad ; reset count if all mine are dead if deadCount >= 3 set count to 0 set deadCount to 0 set timer to 30 endif ; get parent marker if mySpawnMarker == 0 set mySpawnMarker to getParentRef endif end begin OnActivate if isActionRef player == 1 set MS48.inOblivion to 1 ; we aren't "near" any gate anymore (we're in Oblivion!) set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif Activate end begin gamemode if getdisabled == 1 return endif if getdestroyed == 1 && getstage ms48 < 50 setstage ms48 50 endif ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 if IsAnimPlaying == 0 playgroup specialidle 1 endif ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 if getdistance player < 8000 if MQ00.nearOblivionGate == 0 && getdistance player < 1000 ; this should only happen when I come out an Oblivion gate into Tamriel -- I'm suddenly close but the "near" variable hasn't been set forceweather OblivionStormTamriel 1 else setweather OblivionStormTamriel 1 endif set MQ00.nearOblivionGate to GetSelf endif else if getdistance player > 9000 && MQ00.nearOblivionGate == GetSelf set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif endif if timer > 0 set timer to timer - getsecondspassed elseif count < 3 if ( Player.GetDistance MS48GateSpawnMark < 5000 ) set count to count + 1 playgroup forward 1 mySpawnMarker.placeatme KvatchExteriorCreature set timer to 10 endif endif endif end
463MS48OblivionSigilKeySCRIPTscn MS48OblivionSigilKeySCRIPT begin OnAdd player if getstage MS48 >= 30 setstage MS48 40 endif end
464MS48SigilKeeperDoorSCRIPTscn MS48SigilKeeperDoorSCRIPT ; to keep the sigil keeper from following the player outside begin OnActivate if isActionRef MS48DremoraSigilKeeperRef == 0 if isActionRef player == 1 player.scaonactor endif Activate endif end
465MS48SigilStoneScriptscn MS48SigilStoneScript short onfire ref myParent ref mySelf short gotSigil begin onActivate If ( IsActionRef Player == 1 ) ; make sure Ilend Vonius returns with us (he started inside the gate so won't come automatically) if getstagedone ms48 25 == 1 && IlendVoniusRef.getdead == 0 IlendVoniusRef.moveto MS48GateSpawnMark endif endif if onfire == 0 playgroup unequip 0 set onfire to 1 endif end begin gameMode if onfire == 1 set myParent to getParentRef set mySelf to getSelf if isAnimPlaying == 0 player.additem LL2SigilStones100 1 modpcfame 1 player.pms effectFireShield myParent.activate mySelf 1 set gotSigil to 1 set onfire to 0 mySelf.disable endif endif end begin onReset set onFire to 0 set gotSigil to 0 end
466MS94DaedraScriptscn MS94DaedraScript begin OnDeath set MS94GuardCaptain.deadDaedraCount to MS94GuardCaptain.deadDaedraCount + 1 end begin OnHitWith arrow2steel if getstage ms94 > 50 && getdead == 1 set MQConversations.OGDeadDaedra to 1 ; tell archer endif end begin OnHitWith WeapSteelLongsword if getstage ms94 > 50 && getdead == 1 set MQConversations.OGDeadDaedra to 2 ; tell soldier to cheer endif end
467MS94DremoraLordScriptscn MS94DremoraLordScript float timer ref myTarget begin OnLoad if getdisabled == 0 && getstage MQ16 >= 100 disable endif end begin gamemode if timer > 0 set timer to timer - getsecondspassed endif if getstage ms94 == 62 setalert 1 if getdistance player < getdistance MS94GuardCaptain || MS94GuardCaptain.getdead == 1 set myTarget to player else set myTarget to MS94GuardCaptain endif set timer to sayTo myTarget OblivionGateConv set timer to timer + .1 setstage ms94 64 endif if getstage ms94 == 64 && timer <= 0 setfactionrank daedrafaction 1 setav aggression 100 startCombat myTarget setstage ms94 70 endif end
468MS94ImperialCaptainScriptscn MS94ImperialCaptainScript float timer float spawnTimer ; times spawning of new daedra from gate ref enemyRef ; parent should be set to daedra to attack short daedraCount ; used to figure out how many daedra to spawn short spawning ; 1 = animating towards spawn ; 0 = gate is idling short temp short dremoraSpawn ; 1 = start spawning him short deadDaedraCount ; keep track of how many are dead begin OnLoad if getdisabled == 0 && ( getstage MQ16 >= 100 || getstage MS94 >= 90 ) setstage ms94 100 disable endif ; when loading after gate is closed, setstage to 90 if getstage MS94 >= 80 setstage ms94 90 endif end begin gamemode ; DO NOTHING IF DISABLED if getdisabled == 1 return endif if timer > 0 set timer to timer - getsecondspassed endif if spawnTimer > 0 set spawnTimer to spawnTimer - getsecondspassed endif if spawnTimer <= 0 && getstage ms94 >= 46 && spawning == 0 MS94OblivionGateRef.playgroup equip 1 set spawnTimer to .83 set spawning to 1 endif if spawning == 1 && spawnTimer <= 0 if dremoraSpawn == 1 set spawning to 0 ; done set dremoraSpawn to 0; MS94GateSpawnMarker.placeatme MS94LL1DremoraBossLvl100 1 setstage ms94 62 else if daedraCount < 7 set spawning to 0 ; ready to spawn again if getrandompercent < 33 MS94GateSpawnMarker.placeatme MS94LL1DaedricBeastLvl100 1 else MS94GateSpawnMarker.placeatme MS94LL1DaedricBeast100 1 endif elseif daedraCount == 7 MS94GateSpawnMarker.placeatme MS94LL1DaedricBeastLvl100 1 set spawning to 2 ; done setstage ms94 55 endif if daedraCount == 0 || daedraCount == 3 || daedraCount == 6 || daedraCount == 9 set spawnTimer to 5 else set spawnTimer to 10 endif endif set daedraCount to daedraCount + 1 endif if getquestrunning MS94 == 1 && getstage ms94 < 40 && getdistance player < 5000 setstage ms94 40 endif ; soldier reports if getstage ms94 == 40 && getdistance MS94GuardSoldier < 200 setstage ms94 42 set timer to MS94GuardSoldier.sayTo MS94GuardCaptain OblivionGateConv endif ; captain replies if getstage ms94 == 42 && timer <= 0 setstage ms94 43 set timer to sayTo MS94GuardSoldier OblivionGateConv set timer to timer + 5 endif ; Gate just opened, come on! if getstage ms94 == 43 && timer <= 0 if getdistance player < 800 setstage ms94 44 set timer to sayTo player OblivionGateConv else setstage ms94 46 endif setalert 1 endif ; captain done, move out if getstage ms94 == 44 && timer <= 0 setstage ms94 46 endif ; trigger combat as player comes around corner if getstage ms94 < 50 && E3CaptainTriggerMarker.getdistance player < 200 setstage ms94 50 endif ; Charge! if getstage ms94 < 54 && getdistance E3DemoCaptainStartMarker < 200 set timer to Say OblivionGateConv setstage ms94 54 endif if getstage ms94 == 55 && deadDaedraCount >= 13 setstage ms94 56 endif if getstage ms94 == 56 && getdistance player < 500 && getdistance E3DemoCaptainGateMarker < 150 setstage ms94 58 set timer to sayTo player OblivionGateConv set timer to timer - .5 endif if getstage ms94 == 58 && timer <= 0 setstage ms94 60 endif end
469MS94OblivionGateScriptscn MS94OblivionGateScript begin OnLoad ; destroy me if open after MQ16 finishes if getdestroyed == 0 && getdisabled == 0 && getstage MQ16 >= 100 ForceCloseOblivionGate endif end begin OnActivate if isActionRef player == 1 ; we aren't "near" any gate anymore (we're in Oblivion!) set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif Activate end begin gamemode if getdisabled == 1 return endif if getdestroyed == 1 && getstage ms94 < 80 setstage ms94 80 endif if getdestroyed == 1 return endif ; pathing optimization functions SetNoAvoidance 1 SetAllReachable 1 SetAllVisible 1 SetSceneIsComplex 1 if IsAnimPlaying == 0 playgroup specialidle 1 endif ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 if getdistance player < 4000 if MQ00.nearOblivionGate == 0 && getdistance player < 1000 ; this should only happen when I come out an Oblivion gate into Tamriel -- I'm suddenly close but the "near" variable hasn't been set forceweather OblivionStormTamriel 1 else setweather OblivionStormTamriel 1 endif set MQ00.nearOblivionGate to GetSelf endif else if getdistance player > 5000 ReleaseWeatherOverride endif endif if getquestrunning ms94 == 1 && getstage ms94 < 40 if getdistance player < 5000 setstage ms94 40 endif endif ; trigger soldiers to charge if player nears gate if getstage ms94 >= 40 && getstage ms94 < 50 if getdistance player < 2000 setstage ms94 50 endif endif ; trigger dremora lord if player approaches gate if getstage ms94 >= 40 && getstage ms94 < 60 if getdistance player < 500 setstage ms94 60 endif endif end
470MysteriumXarxesScriptscn MysteriumXarxesScript begin OnAdd player setstage MQ06, 60 end
471NarinaCarvainSCRIPTscn NarinaCarvainSCRIPT begin OnPackageStart MQ13NarinaCarvainToBrumaChapel showdialogsubtitles 0 end ; for safety begin OnPackageChange MQ13NarinaCarvainToBrumaChapel showdialogsubtitles 0 end
472NecroClawTrap01SCRIPTscn NecroClawTrap01SCRIPT ; on activation these bone claws shoot up, re-activate to lower again ; daisy-chainable with other activators short raised short busy ref mySelf ref myParent begin onLoad ; set-up parent ref vars set mySelf to getSelf set myParent to getParentRef end begin onActivate if isActionRef player == 1 ; if player tries to activate if raised == 0 message " The claws won't budge." endif elseif isActionRef mySelf == 0 && busy == 0 ; handle raising/lowering anims if raised== 0 playgroup forward 0 set raised to 1 else playgroup backward 0 set raised to 0 endif ; this will prevent re-activation will anim still playing set busy to 1 ; daisy-chain activation of linked parent myParent.activate mySelf 1 endif end begin gameMode ; flip busy flag when current anim is done if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
473NoActivationScriptscn NoActivationScript ; generic script to block activation of anything begin OnActivate end
474NQDAnvilNPCScriptscn NQDAnvilNPCScript short ArenaPush ;short DumaniaInsulted feature deleted when voice files were reduced
475OBHallBladeTrapLeveredSCRIPTscn OBHallBladeTrapLeveredSCRIPT float timer short activated short stage float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous ref myParent ref mySelf Begin onActivate if activated == 0 set timer to 3 set activated to activated + 1 endif End Begin gameMode if activated == 1 if stage == 0 && timer >= 2 ; set up the damage values set fTrapDamage to 25 set fTrapPushBack to 500 set fTrapMinVelocity to 60 set bTrapContinuous to 0 playgroup forward 0 set stage to 1 set myParent to getParentRef set mySelf to getSelf elseif stage == 1 && timer <= 0 playgroup backward 0 myParent.activate mySelf 1 set stage to 2 ; set up the damage values set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 endif ; check if animation is done playing if stage == 2 && isAnimPlaying == 0 set stage to 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif End
476OBHallBladeTrapSCRIPT01scn OBHallBladeTrapSCRIPT01 float timer short activated short stage float fLevelledDamage float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous ref myParent ref mySelf Begin onActivate if activated == 0 set timer to 2.5 set activated to 1 endif End Begin gameMode if activated == 1 if stage == 0 && timer >= 2 set fLevelledDamage to 1.5 set fTrapDamage to 20 set fTrapPushBack to 500 set fTrapMinVelocity to 60 set bTrapContinuous to 0 playgroup forward 0 triggerHitShader 4 set stage to 1 set myParent to getParentRef set mySelf to getSelf ;elseif stage == 1 && timer <= 1.5 ;set fLevelledDamage to 0 ;set fTrapDamage to 0 ;set fTrapPushBack to 0 ;set fTrapMinVelocity to 0 ;set bTrapContinuous to 0 elseif stage == 1 && timer <= 0 playgroup backward 0 myParent.activate mySelf 1 set stage to 2 ; set up the damage values set fLevelledDamage to 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 endif ; check if animation is done playing if stage == 2 && isAnimPlaying == 0 set stage to 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif End begin onReset reset3DState ;puts animations and havok stuff back in place set timer to 0 ;whatever state variables should go back to set activated to 0 ;initial values set stage to 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 end
477OBHallBladeTrapSCRIPT02scn OBHallBladeTrapSCRIPT02 short start short activated short nextTrap short fLevelledDamage float timer ref target ref mySelf float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if activated == 0 && isActionRef player == 0 ; set up the damage values set fLevelledDamage to 1.5 set fTrapDamage to 25 set fTrapPushBack to 2000 set fTrapMinVelocity to 20 set bTrapContinuous to 0 playgroup unequip 0 set activated to 1 set start to 1 set timer to 6 endif end begin gameMode if activated == 1 && start == 1 ;set the next trap going if its linked as a parent if nextTrap == 0 && timer <= 6 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set nextTrap to 1 endif set timer to timer - getSecondsPassed trapUpdate endif if activated == 1 && timer <= 0 set start to 0 endif if activated == 1 && start == 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 2 endif end begin onReset reset3DState ;puts animations and havok stuff back in place set timer to 0 ;whatever state variables should go back to set start to 0 ;initial values set activated to 0 set nextTrap to 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 end begin onReset reset3DState ;puts animations and havok stuff back in place set timer to 0 ;whatever state variables should go back to set start to 0 ;initial values set activated to 0 set nextTrap to 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 end
478OBHallBladeTrapSCRIPT03scn OBHallBladeTrapSCRIPT03 float timer short activated short stage float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous ref myParent ref mySelf Begin onActivate if activated == 0 set timer to 3 set activated to 1 endif End Begin gameMode if activated == 1 if stage == 0 && timer >= 6 ; set up the damage values set fTrapDamage to 25 set fTrapPushBack to 500 set fTrapMinVelocity to 60 set bTrapContinuous to 0 playgroup forward 0 set stage to 1 set myParent to getParentRef set mySelf to getSelf elseif stage == 1 && timer <= 0 playgroup backward 0 myParent.activate mySelf 1 set stage to 2 ; set up the damage values set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 endif ; check if animation is done playing if stage == 2 && isAnimPlaying == 0 set stage to 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif End
479OblivionAvalanch01Scriptscn OblivionAvalanch01Script ; On activation rocks will come tumbling down and do some damage ; Damage stops after 6 seconds short triggered float timer short next ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if triggered == 0 set fTrapDamage to 10 set fTrapPushBack to 300 set fTrapMinVelocity to 20 set bTrapContinuous to 0 playgroup unequip 1 set triggered to 1 set timer to 6 setdestroyed 1 endif end begin gameMode ;Distance release for rocks if player travels around the entended trigger zone. if triggered == 0 && getDistance Player <= 750 playgroup unequip 1 set triggered to 1 set timer to 6 endif ;after 1 sec delay, activate parent (for daisy-chaining) if triggered == 1 && next == 0 && timer < 5 set next to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 endif if triggered == 1 && timer > 0 trapUpdate elseif triggered == 1 && timer <= 0 set triggered to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState ;puts animations and havok stuff back in place set next to 0 ;initial values set timer to 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 end begin onReset reset3DState ;puts animations and havok stuff back in place set triggered to 0 ;whatever state variables should go back to set timer to 0 ;initial values set next to 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 end
480OblivionBloodFountain01SCRIPTscn OblivionBloodFountain01SCRIPT float timer short triggered short stage short SpellRank begin onActivate if isActionRef player == 1 if timer <= 0 && triggered == 0 set timer to 60 set triggered to 1 set stage to 1 playgroup Forward 1 else Message "The fountain needs time to replenish its energies." endif endif end begin gameMode if triggered == 1 ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif if stage == 1&& timer >= 60 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast TRAPBloodFountainHeal01 player elseif SpellRank == 2 cast TRAPBloodFountainHeal02 player elseif SpellRank == 3 cast TRAPBloodFountainHeal03 player elseif SpellRank == 4 cast TRAPBloodFountainHeal04 player endif set stage to 0 endif endif if triggered == 1 && timer <=0 set triggered to 0 playgroup SpecialIdle 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
481OblivionBloodFountain02SCRIPTscn OblivionBloodFountain02SCRIPT float timer short triggered short stage short SpellRank begin onActivate if isActionRef player == 1 if timer <= 0 && triggered == 0 set timer to 60 set triggered to 1 set stage to 1 playgroup Forward 1 else Message "The fountain needs time to replenish its energies." endif endif end begin gameMode if triggered == 1 ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif if stage == 1&& timer >= 60 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast TRAPBloodFountainHeal05 player elseif SpellRank == 2 cast TRAPBloodFountainHeal05 player elseif SpellRank == 3 cast TRAPBloodFountainHeal05 player elseif SpellRank == 4 cast TRAPBloodFountainHeal05 player endif set stage to 0 endif endif if triggered == 1 && timer <=0 set triggered to 0 playgroup SpecialIdle 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
482OblivionBoneGateTrapSCRIPT01scn OblivionBoneGateTrapSCRIPT01 short triggered ref target ref mySelf ref myParent float timer short next begin onActivate if isActionRef player return endif if triggered == 0 set myParent to getParentRef set mySelf to getSelf set triggered to 1 endif if isActionRef mySelf == 0 set timer to 19 set next to 1 disableLinkedPathPoints playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <= 19 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;reset for next time if timer <= 0 && triggered == 1 set triggered to 0 playgroup backward 0 enableLinkedPathPoints endif if timer >= 0 set timer to timer - getSecondsPassed endif end
483OblivionBridgeGateRD001Scriptscn OblivionBridgeGateRD001Script ; activated by linked child ; activates optionally linked parent after 2 sec delay short activated short open short next short busy float timer short closed ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup backward 0 set open to 1 endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if closed == 0 playgroup forward 0 set closed to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
484OblivionBridgeRuinGate01Scriptscn OblivionBridgeRuinGate01Script ; activated by linked child ; activates optionally linked parent after 1 sec delay short activated short open short next short busy float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 0 set open to 0 endif set next to 1 set timer to 5 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
485OblivionBridgeRuinGate02LAVASCRIPTscn OblivionBridgeRuinGate02LAVASCRIPT ; activated by linked child ; activates optionally linked parent after 2 sec delay short activated short open short next short busy short gateIntro float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup backward 1 set open to 1 set next to 1 set timer to 1 set busy to 1 elseif open == 1 playgroup forward 1 set open to 0 set busy to 1 endif set busy to 1 endif end begin gameMode if getDistance player <= 10000 && gateIntro == 0 playgroup forward 0 set gateIntro to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
486OblivionBridgeRuinGate02Scriptscn OblivionBridgeRuinGate02Script ; activated by linked child ; activates optionally linked parent after 2 sec delay short activated short open short next short busy float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 0 set open to 0 endif set next to 1 set timer to 2 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
487OblivionBridgeRuinGateMQ14Scriptscn OblivionBridgeRuinGateMQ14Script ; activated by linked child ; activates optionally linked parent after 2 sec delay short activated short open short next short busy float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 ;else ;playgroup backward 0 ;set open to 0 endif set next to 1 set timer to .5 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
488OblivionCageSwitch01scn OblivionCageSwitch01 ref myParent ref mySelf short Busy short Open short AlreadyOpened float timer begin OnActivate if Busy == 0 && Open == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf set Busy to 1 set Open to 1 set timer to 2 message "You have released a caged prisoner." elseif Busy == 1 message "You may not use this switch at this time." elseif Busy == 0 && Open == 1 message "The caged prisoner has already been released." set Busy to 1 endif end begin Gamemode if timer > 0 set timer to timer - getSecondsPassed endif if timer <= 0 && Open == 1 && AlreadyOpened == 0 myparent.activate mySelf 1 set AlreadyOpened to 1 endif if IsAnimPlaying == 0 set Busy to 0 endif end
489OblivionCitadelHallDoor01AnimSCRIPTscn OblivionCitadelHallDoor01AnimSCRIPT short Open short init begin gameMode if init == 0 disablelinkedpathpoints set init to 1 endif end begin onActivate if Open == 0 activate enablelinkedpathpoints set Open to 1 else activate disablelinkedpathpoints set Open to 0 endif end begin onReset set Open to 0 set init to 0 end
490OblivionClawTrap01SCRIPTscn OblivionClawTrap01SCRIPT short activated short open short next float timer ref mySelf ref myParent begin onActivate ; prevents self re-activation if there's no parent linked if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif ; if player clicks on me give him a clue if isActionRef player == 1 if open == 1 message "This wall is lowered remotely." endif elseif isActionRef mySelf == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 1 set open to 0 endif set next to 1 set timer to 0.4 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 myParent.activate mySelf 1 if open == 1 set next to 2 set timer to 20 else set next to 0 endif endif ; time's up, lower myself if next == 2 && timer <= 0 playgroup backward 0 set open to 1 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
491OblivionClawWallSwitch01scn OblivionClawWallSwitch01 ref myParent ref mySelf short Busy begin OnActivate if Busy == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end
492OblivionElevatorBrokenTriggerscn OblivionElevatorBrokenTrigger short lowered short busy short initialized ref mySelf ref myParent float timer begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif If isActionRef mySelf == 0 && busy == 0 if lowered == 0 playgroup Forward 0 set busy to 2 set lowered to 1 set timer to 1 elseif isActionRef player == 1 Message "The lift appears to be too damaged for any further use." endif endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
493OblivionElevatorBrokenTriggerSTUCKscn OblivionElevatorBrokenTriggerSTUCK short lowered short busy short initialized ref mySelf ref myParent float timer begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif If isActionRef mySelf == 0 && busy == 0 Message "The lift appears to be too damaged for any further use." endif endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
494OblivionElevatorTrigger01scn OblivionElevatorTrigger01 short lowered short busy short initialized ref mySelf ref myParent float timer begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif If isActionRef mySelf == 0 && busy == 0 if lowered == 0 playgroup forward 0 set busy to 2 set lowered to 1 set timer to 1 else playgroup backward 0 set busy to 2 set lowered to 0 set timer to 1 endif endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
495OblivionElevatorTrigger02scn OblivionElevatorTrigger02 ref myParent ref mySelf begin onTrigger player set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 end
496OblivionGateGearsSCRIPTscn OblivionGateGearsSCRIPT ref mySelf ref myParent short init float chainTimer short next short Busy begin onActivate if isActionRef player == 0 if next == 0 && Busy == 0 playgroup forward 0 set next to 1 set chainTimer to 1 set Busy to 1 endif ;else ;message "Gears are activated by a switch." endif end begin gameMode if isAnimPlaying == 0 && Busy == 1 set Busy to 0 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end
497OblivionGateRandomScriptscn OblivionGateRandomScript float timer short count ref mySpawnMarker short rand ; this can be removed eventually. Put it in just to be able to see the numbers that were being rolled. short destroyed ; set to 1 after destroyed script runs short ignore begin OnLoad disableLinkedPathPoints ; reset count if count > 0 set timer to 60 endif set count to 0 ; if MQ is over, destroy me if I'm open if getdisabled == 0 && getdestroyed == 0 && getstage MQ16 >= 100 ForceCloseOblivionGate enablelinkedpathpoints endif ; if we're not at max gates, we might open a new one here if MQ00.openGates < MQ00.maxOpenGates && ( getdisabled == 1 || ( MQ00.allowGatesToReopen == 1 && destroyed == 1 ) ) set rand to GetRandomPercent if rand <= MQ00.randomGateChance set mySpawnMarker to getParentRef mySpawnMarker.enable enablelinkedpathpoints set MQ00.openGates to MQ00.openGates + 1 if destroyed == 1 setDestroyed 0 set destroyed to 0 endif endif endif end begin OnActivate if isActionRef player == 1 ; we aren't "near" any gate anymore (we're in Oblivion!) set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif Activate set ignore to 1 return end begin gamemode if ignore == 1 set ignore to 0 return endif ; no need to process further if destroyed if destroyed == 1 return endif if getdestroyed == 1 && destroyed == 0 set destroyed to 1 set MQ00.destroyedGates to MQ00.destroyedGates + 1 endif ; start churning out creatures when I'm turned on if GetDisabled == 0 && GetDestroyed == 0 if IsAnimPlaying == 0 playgroup specialidle 1 endif ; make sure weather is eeeevil gate weather if getiscurrentweather OblivionStormTamriel == 0 if getdistance player < 4000 if MQ00.nearOblivionGate == 0 && getdistance player < 1000 ; this should only happen when I come out an Oblivion gate into Tamriel -- I'm suddenly close but the "near" variable hasn't been set forceweather OblivionStormTamriel 1 else setweather OblivionStormTamriel 1 endif set MQ00.nearOblivionGate to GetSelf endif else if getdistance player > 5000 && MQ00.nearOblivionGate == GetSelf set MQ00.nearOblivionGate to 0 ReleaseWeatherOverride endif endif if timer > 0 set timer to timer - getsecondspassed elseif count < MQ00.maxCreatureCount set count to count + 1 playgroup forward 1 mySpawnMarker.placeatme LL1DaedricBeast100 set timer to 10 endif endif end
498OblivionGateSwitch01scn OblivionGateSwitch01 ref myParent ref mySelf short opened short GatesOpen short Busy begin OnActivate if Busy == 0 && Opened == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 set Opened to 1 set GatesOpen to 1 message "You have opened a gate." else if Busy == 1 message "You may not use this switch at this time." else message "The gate has already been opened." endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end begin onReset set opened to 0 set GatesOpen to 0 set Busy to 0 end
499OblivionGateSwitch01MQ03Gatesscn OblivionGateSwitch01MQ03Gates ref myParent ref mySelf short opened short GatesOpen short Busy begin OnActivate if Busy == 0 && Opened == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 set Opened to 1 message "You have opened a gate." set GatesOpen to 1 else if Busy == 1 message "You may not use this switch at this time." else message "The gate has already been opened." endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end begin onReset set opened to 0 set GatesOpen to 0 set Busy to 0 end
500OblivionGateSwitchEruption01scn OblivionGateSwitchEruption01 ref myParent ref mySelf short GatesOpen short Busy begin OnActivate if Busy == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 set GatesOpen to 1 message "You have opened the Eruption Gate." else message "You may not use this switch at this time." endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end begin onReset set GatesOpen to 0 set Busy to 0 end
501OblivionGateSwitchLandslide01scn OblivionGateSwitchLandslide01 ref myParent ref mySelf short GatesOpen short Busy begin OnActivate if Busy == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 set GatesOpen to 1 message "You have opened the Landslide Gate." else message "You may not use this switch at this time." endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end begin onReset set GatesOpen to 0 set Busy to 0 end
502OblivionGateSwitchTornado01scn OblivionGateSwitchTornado01 ref myParent ref mySelf short GatesOpen short Busy begin OnActivate if Busy == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 set GatesOpen to 1 message "You have opened the Tornado Gate." else message "You may not use this switch at this time." endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end begin onReset set GatesOpen to 0 set Busy to 0 end
503OblivionGateSwitchTsunami01scn OblivionGateSwitchTsunami01 ref myParent ref mySelf short GatesOpen short Busy begin OnActivate if Busy == 0 playgroup forward 0 set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set Busy to 1 set GatesOpen to 1 message "You have opened the Tsunami Gate." else message "You may not use this switch at this time." endif end begin Gamemode if IsAnimPlaying == 0 set Busy to 0 endif end begin onReset set GatesOpen to 0 set Busy to 0 end
504OblivionGenericSigilStoneScriptscn OblivionGenericSigilStoneScript begin OnActivate if IsActionRef player == 1 CloseCurrentOblivionGate endif end
505OblivionLavaCloudInitSCRIPTscn OblivionLavaCloudInitSCRIPT begin Gamemode playgroup forward 0 end
506OblivionLiftSwitch01scn OblivionLiftSwitch01 ref myParent ref mySelf short init short Busy begin OnActivate if Busy == 0 playgroup forward 0 myparent.activate mySelf 1 set Busy to 1 endif end begin Gamemode if init == 0 set myParent to GetParentRef set mySelf to getSelf set init to 1 endif if IsAnimPlaying == 0 set Busy to 0 endif end
507OblivionMagickaFountain01SCRIPTscn OblivionMagickaFountain01SCRIPT float timer short triggered short stage short SpellRank begin onActivate if isActionRef player == 1 if timer <= 0 && triggered == 0 set timer to 60 set triggered to 1 set stage to 1 playgroup Forward 1 else Message "The fountain needs time to replenish its energies." endif endif end begin gameMode if triggered == 1 ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif if stage == 1 && timer >= 60 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast TRAPBloodFountainMagicka01 player elseif SpellRank == 2 cast TRAPBloodFountainMagicka02 player elseif SpellRank == 3 cast TRAPBloodFountainMagicka03 player elseif SpellRank == 4 cast TRAPBloodFountainMagicka04 player endif set stage to 0 endif endif if triggered == 1 && timer <=0 set triggered to 0 playgroup SpecialIdle 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
508OblivionMagickaFountain02SCRIPTscn OblivionMagickaFountain02SCRIPT float timer short triggered short stage short SpellRank begin onActivate if isActionRef player == 1 if timer <= 0 && triggered == 0 set timer to 60 set triggered to 1 set stage to 1 playgroup Forward 1 else Message "The fountain needs time to replenish its energies." endif endif end begin gameMode if triggered == 1 ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif if stage == 1 && timer >= 60 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast TRAPBloodFountainMagicka05 player elseif SpellRank == 2 cast TRAPBloodFountainMagicka05 player elseif SpellRank == 3 cast TRAPBloodFountainMagicka05 player elseif SpellRank == 4 cast TRAPBloodFountainMagicka05 player endif set stage to 0 endif endif if triggered == 1 && timer <=0 set triggered to 0 playgroup SpecialIdle 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
509OblivionMine01SCRIPTscn OblivionMine01SCRIPT short activated short open short next float timer ref mySelf ref myParent begin onActivate ; prevents self re-activation if there's no parent linked if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif ; if player clicks on me give him a clue if isActionRef player == 1 if open == 1 message "This wall is lowered remotely." endif elseif isActionRef mySelf == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 1 set open to 0 endif set next to 1 set timer to 0.4 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 myParent.activate mySelf 1 if open == 1 set next to 2 set timer to 20 else set next to 0 endif endif ; time's up, lower myself if next == 2 && timer <= 0 playgroup backward 0 set open to 1 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
510OblivionRD004Bridge01Scriptscn OblivionRD004Bridge01Script ; activated by linked child ; activates optionally linked parent after 1 sec delay short activated short open short next short busy float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 ;message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 0 set open to 0 endif set next to 1 set timer to 5 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
511OblivionRD004LeverSwitchLeft01scn OblivionRD004LeverSwitchLeft01 ref myParent ref mySelf short opened short bridgeExtend begin OnActivate if bridgeExtend == 0 && IsActionRef player == 1 ;if never activated before ;init parent refs set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set bridgeExtend to 1 if OblivionRD004TowerRightSwitch.bridgeExtend == 0 ;If this switch is activated first playgroup forward 0 ;play switch anim Message "Lock one of two has been released" endif if OblivionRD004TowerRightSwitch.bridgeExtend == 1 ;if this switch is activated second playgroup forward 0 ;play switch anim Message "Lock two of two has been released" Message "Bridges have been extended." endif elseif bridgeExtend >=1 && IsActionRef player == 1 if OblivionRD004TowerRightSwitch.bridgeExtend == 0 ;If this switch is activated first message "You may not use this switch at this time." elseif OblivionRD004TowerRightSwitch.bridgeExtend == 1 Message "Bridges have been extended." endif endif end
512OblivionRD004LeverSwitchRight01scn OblivionRD004LeverSwitchRight01 ref myParent ref mySelf short opened short bridgeExtend begin OnActivate if bridgeExtend == 0 && IsActionRef player == 1 ;if never activated before ;init parent refs set myParent to GetParentRef set mySelf to getSelf myparent.activate mySelf 1 set bridgeExtend to 1 if OblivionRD004TowerLeftSwitch.bridgeExtend == 0 ;If this switch is activated first playgroup forward 0 ;play switch anim Message "Lock one of two has been released" endif if OblivionRD004TowerLeftSwitch.bridgeExtend == 1 ;if this switch is activated second playgroup forward 0 ;play switch anim Message "Lock two of two has been released" Message "Bridges have been extended." endif elseif bridgeExtend >=1 && IsActionRef player == 1 if OblivionRD004TowerLeftSwitch.bridgeExtend == 0 ;If this switch is activated first message "You may not use this switch at this time." elseif OblivionRD004TowerLeftSwitch.bridgeExtend == 1 Message "Bridges have been extended." endif endif end
513OblivionSmallHallPressurePlate01repeatSCRIPTscn OblivionSmallHallPressurePlate01repeatSCRIPT ; Activates trap linked as Parent short activated short busy short timer ref myParent ref mySelf float timer begin onActivate if activated == 1 set timer to 6 endif end begin gameMode if activated == 0 if getDistance player < 256 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set activated to 1 playgroup forward 0 endif endif ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif if busy ==0 && timer <=0 set timer to 0 set activated to 0 endif end
514OblivionSmallHallPressurePlate01SCRIPTscn OblivionSmallHallPressurePlate01SCRIPT ; Activates trap linked as Parent short activated ref target ref mySelf begin gameMode if activated == 0 if getDistance player < 256 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set activated to 1 playgroup forward 0 endif endif end
515OblivionSmallHallSpikeTrap01SCRIPTscn OblivionSmallHallSpikeTrap01SCRIPT short Busy short activated float timer float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous ref myParent ref mySelf begin onActivate if Busy == 0 playgroup Forward 0 set busy to 2 set timer to 3 endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif if activated == 0 ; set up the damage values set fTrapDamage to 35 set fTrapPushBack to 256 set fTrapMinVelocity to 0 set bTrapContinuous to 0 set activated to 1 else trapUpdate endif end
516OblivionSmallHallSpikeTrap02SCRIPTscn OblivionSmallHallSpikeTrap02SCRIPT float timer short busy short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous ref myParent ref mySelf Begin onActivate if activated == 0 && busy == 0 playgroup forward 0 set activated to 1 set busy to 2 set mySelf to getSelf set myParent to getParentRef endif End Begin gameMode ; set up the damage values set fLevelledDamage to 1.5 set fTrapDamage to 20 set fTrapPushBack to 50 set fTrapMinVelocity to 0 set bTrapContinuous to 0 ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif End
517OblivionSmallHallSpikeTrapBrokenSCRIPTscn OblivionSmallHallSpikeTrapBrokenSCRIPT float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous Begin gameMode ; set up the damage values set fTrapDamage to 1 set fTrapPushBack to 25 set fTrapMinVelocity to 0 set bTrapContinuous to 0 End
518OblivionSmallTowerLiftscn OblivionSmallTowerLift short lowered short busy short initialized ref mySelf ref myParent float timer begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif If isActionRef mySelf == 0 && busy == 0 if lowered == 0 playgroup forward 0 set busy to 2 set lowered to 1 set timer to 1 else playgroup backward 0 set busy to 2 set lowered to 0 set timer to 1 endif endif end begin gameMode ; daisy-chain activation if busy == 2 && timer <= 0 myParent.activate mySelf 1 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
519OblivionTortureCageSCRIPTscn OblivionTortureCageSCRIPT ref mySelf ref myParent short init float chainTimer short next short Busy begin onActivate if isActionRef player == 0 if next == 0 && Busy == 0 playgroup forward 0 set next to 1 set chainTimer to 1 set Busy to 1 endif else message "Cage is opened by a switch." endif end begin gameMode if isAnimPlaying == 0 && Busy == 1 set Busy to 0 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end
520OblivionTowerGateLatch01SCRIPTscn OblivionTowerGateLatch01SCRIPT ref mySelf ref myParent short busy short next short activated float Timer begin onActivate if isActionRef player == 0 if activated == 0 set myself to getSelf set myParent to getParentRef set activated to 1 set Timer to 1 set next to 1 endif if busy == 0 playgroup forward 0 set busy to 1 endif ;else ;message "Gears are activated by a switch." endif end begin gameMode ;Timer for linked parent if Timer > 0 set Timer to Timer - getSecondsPassed endif ; daisy-chain activation if next == 1 && Timer <=0 set next to 0 myParent.activate mySelf 1 endif if IsAnimPlaying == 0 set Busy to 0 endif end
521OblivionTowerPedestalSCRIPTscn OblivionTowerPedestalSCRIPT ref myTarget ref mySelf begin onActivate set myTarget to GetActionRef set mySelf to getSelf myTarget.pms effectDestruction mySelf.pms effectDestruction activate end
522OblivionTrapGroundClawSCRIPT01scn OblivionTrapGroundClawSCRIPT01 short stage short busy short initialized ref mySelf ref myParent float timer begin onActivate ; run once, sets-up ref vars if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 If isActionRef mySelf == 0 && busy == 0 && stage == 0 playgroup forward 0 set busy to 2 set stage to 1 myParent.activate mySelf 1 ;Time trap remains in up position set timer to 3 endif endif end begin gameMode if initialized == 1 if busy == 2 && timer <= 0 playgroup backward 0 set stage to 2 set busy to 1 endif ; check if animation is done playing if busy == 1 && isAnimPlaying == 0 set busy to 0 set initialized to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif end
523OblivionTurretTrapSCRIPT01scn OblivionTurretTrapSCRIPT01 ; come within range ( 700 ) and this will fire a fireball at you ; when activated will shoot fireball at player after 2 sec float timer short ready ref mySelf ref myParent short next short spellRank short disabled begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if disabled == 0 if getDistance player < 700 && timer <= 0 playgroup forward 5 set ready to 1 set timer to 6 endif ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif if timer <= 4 && ready == 1 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast StandardFireDamageTarget1Novice player elseif SpellRank == 2 cast StandardFireDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFireDamageArea3Journeyman player elseif SpellRank == 4 cast StandardFireDamageArea4Expert player endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif end
524OblivionTurretTrapSCRIPT02scn OblivionTurretTrapSCRIPT02 ; when activated will shoot fireball at player after 2 sec float timer short ready ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 && timer <= 0 playgroup forward 5 set timer to 6 set ready to 1 set next to 1 endif end begin gameMode ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif if timer <= 4 && ready == 1 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast StandardFireDamageTarget1Novice player elseif SpellRank == 2 cast StandardFireDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFireDamageArea3Journeyman player elseif SpellRank == 4 cast StandardFireDamageArea4Expert player endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
525OblivionWarGatesMessageSCRIPTscn OblivionWarGatesMessageSCRIPT begin onActivate if isActionRef player == 1 message "The War Gates can not be opened from here." endif end
526OBMineScript01scn OBMineScript01 float mineTimer float chainTimer ref mySelf ref myParent short next short busy short activated short chainActivate short stage ;stage 0 = untriggered ;stage 1 = triggered but not detonated ;stage 2 = BOOM ;stage 3 = detonated ;stage 4 = disabled after 10 seconds begin gameMode if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if activated == 1 if stage == 1 && busy == 0 playgroup Forward 0 set mineTimer to 11.5 set busy to 1 endif ;Distance check for deactivation if stage == 1 && mineTimer >= 10.5 && getDistance player >= 330 && chainActivate == 0 playgroup Backward 10 set stage to 0 set mineTimer to 0 set busy to 0 endif if stage == 1 && mineTimer <= 10 set stage to 2 endif if stage == 2 cast TRAPFireDamage10Self mySelf playgroup Unequip 0 set stage to 3 set chainTimer to 2 set next to 1 endif if stage == 3 && mineTimer <= 0 disable mySelf set stage to 4 set activated to 2 endif ;Timer for deactivating mine if mineTimer > 0 set mineTimer to mineTimer - getSecondsPassed endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif endif end begin onTriggerActor if stage == 0 set stage to 1 endif end begin onActivate if stage == 0 && isActionRef player == 0 && isActionRef mySelf == 0 set stage to 1 set chainActivate to 1 set next to 1 set chainTimer to 2 endif end begin onReset reset3DState ;puts animations and havok stuff back in place set mineTimer to 0 ;whatever state variables should go back to set chainTimer to 0 ;initial values set next to 0 set busy to 0 set activated to 0 set chainActivate to 0 end
527OBMineScript02scn OBMineScript02 ;Detonates mine using an arrow or spell float mineTimer float chainTimer ref mySelf ref myParent short next short busyUP short SpellRank short activated short chainActivate short stage short detonated ;stage 0 = untriggered ;stage 1 = triggered but not detonated ;stage 2 = BOOM ;stage 3 = detonated ;stage 4 = disabled after 10 seconds begin gameMode if SpellRank == 0 ;This section will choose the trap spell based on the PC's level (hopefully) if player.GetLevel <= 4 set SpellRank to 1 elseif ( player.GetLevel >= 5) && ( player.GetLevel <= 8 ) set SpellRank to 2 elseif ( player.GetLevel >= 9 ) && ( player.GetLevel <= 12 ) set SpellRank to 3 elseif ( player.GetLevel >= 13 ) && ( player.GetLevel <= 16 ) set SpellRank to 4 elseif ( player.GetLevel >= 17 ) && ( player.GetLevel <= 20 ) set SpellRank to 5 elseif ( player.GetLevel >= 21 ) && ( player.GetLevel <= 24 ) set SpellRank to 6 endif endif if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if Detonated == 1 return endif if activated == 1 if getDistance Player <= 330 && detonated == 0 && stage == 0 set stage to 1 ;messagebox "stage 1" endif if stage == 1 && busyUP == 0 playgroup Forward 0 set mineTimer to 8 set busyUP to 1 endif ;Distance check for deactivation if stage == 1 && getDistance player >= 330 if mineTimer >= 7 && chainActivate == 0 playgroup Backward 0 set stage to 0 set mineTimer to 0 endif endif if stage == 1 && mineTimer <= 6 set stage to 2 ;messagebox "Stage 2" endif if stage == 2 if SpellRank == 1 cast TRAPFireDamageSelf01 player elseif SpellRank == 2 cast TRAPFireDamageSelf02 player elseif SpellRank == 3 cast TRAPFireDamageSelf03 player elseif SpellRank == 4 cast TRAPFireDamageSelf04 player elseif SpellRank == 5 cast TRAPFireDamageSelf05 player elseif SpellRank == 6 cast TRAPFireDamageSelf06 player endif playgroup Unequip 0 set stage to 3 set chainTimer to 2 set next to 1 endif if stage == 3 && mineTimer <= 0 disable mySelf set stage to 4 set activated to 2 set detonated to 1 ;messagebox "stage 3" endif ;Check if anim is playing if isAnimPlaying == 0 && busyUP == 1 set busyUP to 0 endif ;Timer for deactivating mine if mineTimer > 0 set mineTimer to mineTimer - getSecondsPassed endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif endif end begin onTrigger ;Detonates right away if detonated == 0 if SpellRank == 1 cast TRAPFireDamageSelf01 player elseif SpellRank == 2 cast TRAPFireDamageSelf02 player elseif SpellRank == 3 cast TRAPFireDamageSelf03 player elseif SpellRank == 4 cast TRAPFireDamageSelf04 player elseif SpellRank == 5 cast TRAPFireDamageSelf05 player elseif SpellRank == 6 cast TRAPFireDamageSelf06 player endif set detonated to 1 playgroup Unequip 0 set stage to 3 set chainTimer to 2 set next to 1 endif end begin onActivate if stage == 0 && isActionRef player == 0 && isActionRef mySelf == 0 set stage to 1 set chainActivate to 1 set next to 1 set chainTimer to 2 endif end begin onReset reset3DState ;puts animations and havok stuff back in place set mineTimer to 0 ;whatever state variables should go back to set chainTimer to 0 ;initial values set next to 0 set busyUP to 0 set Spellrank to 0 set Detonated to 0 set activated to 0 set chainActivate to 0 end
528OBTortueCageSCRIPT01scn OBTortueCageSCRIPT01 short triggered short busy begin onActivate if triggered == 0 && isActionRef player == 1 && busy == 0 playgroup forward 0 set triggered to 2 set busy to 1 endif if triggered == 2 && isActionRef player == 1 && busy == 0 playgroup backward 0 set triggered to 1 set busy to 1 endif end begin gameMode if triggered >= 1 if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if triggered == 1 && busy == 0 set triggered to 0 endif endif end begin onReset reset3DState ;puts animations and havok stuff back in place set triggered to 0 ;whatever state variables should go back to set busy to 0 end
529OBTortureCage02SCRIPTscn OBTortureCage02SCRIPT short activated short nextTrap float timer ref target ref mySelf begin onActivate if activated == 0 && isActionRef player == 0 playgroup forward 0 set activated to 1 set timer to 2 endif end begin gameMode if activated == 1 ;set the next trap going if its linked as a parent if nextTrap == 0 && timer <= 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set nextTrap to 1 endif if timer <= 0 set activated to 2 endif set timer to timer - getSecondsPassed endif end
530OBTrapGasCloud01SCRIPTscn OBTrapGasCloud01SCRIPT ; spurt gas on activation short initialized float timer short next ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if initialized == 0 set mySelf to getSelf set myParent to getParentRef set initialized to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 ; set up the damage values set fTrapDamage to 2 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 1 set timer to 2 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 0 && timer <= 0 set next to 1 myParent.activate mySelf 1 endif if timer > 0 trapUpdate endif set timer to timer - getSecondsPassed end
531OBTrapLavaColumn01SCRIPTscn OBTrapLavaColumn01SCRIPT ; Self-activated, no trigger required short activated ref Deadguy begin onTriggerActor if activated == 0 set Deadguy to GetActionRef ;Fire Effect on Deadguy Deadguy.pms effectFireDamage 5 ;Instant Death cast TRAPFireColumnDEATH Deadguy set activated to 1 endif end begin gameMode if activated == 1 if getActionRef != Deadguy set activated to 0 endif endif end
532OBTrapSmallTowerSpike01SCRIPTscn OBTrapSmallTowerSpike01SCRIPT ; Self-activated, no trigger required short activated float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin gameMode ; set up the damage values set fTrapDamage to 15 set fTrapPushBack to 32 set fTrapMinVelocity to 128 set bTrapContinuous to 0 set activated to 1 else trapUpdate endif end
533OBTurretBig01SCRIPTscn OBTurretBig01SCRIPT ; come within range and this thing will shoot a fireball at you (range is 1200) float timer short ready short inRange short disabled ref mySelf ref myParent short next short SpellRank begin onActivate if isActionRef player == 0 if disabled == 0 set disabled to 1 set timer to 0 else set disabled to 0 endif endif end begin gameMode if disabled == 0 if getDistance player < 1200 && timer <= 0 if getDistance player > 600 set inRange to 1 endif endif if timer <= 0 && inRange == 1 playgroup forward 0 set ready to 1 set timer to 6 set inRange to 0 endif ;This section will choose the trap spell based on the PC's level... hopefully if player.GetLevel <= 7 set SpellRank to 1 elseif ( player.GetLevel >= 8 ) && ( player.GetLevel <= 15 ) set SpellRank to 2 elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) set SpellRank to 3 elseif ( player.GetLevel >= 21 ) set SpellRank to 4 endif ; daisy-chain if next == 1 && timer <= 5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if timer <= 4 && ready == 1 ; check to make sure player is still in range if getDistance player < 1200 && getDistance player > 400 ;Debug message ;message "Rank %.0f Fireball", SpellRank, 10 if SpellRank == 1 cast StandardFireDamageTarget1Novice player elseif SpellRank == 2 cast StandardFireDamageTarget2Apprentice player elseif SpellRank == 3 cast StandardFireDamageArea3Journeyman player elseif SpellRank == 4 cast StandardFireDamageArea4Expert player endif endif set ready to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif endif end
534OcatoScriptscn OcatoScript begin OnPackageDone OcatoSitInElderCouncil ICPalaceElderCouncilMainDoor.setopenstate 0 end begin OnPackageChange OcatoLeaveCouncilChamber ICPalaceElderCouncilMainDoor.setopenstate 0 end
535OGCreatureDaedraScriptscn OGCreatureDaedraScript begin OnLoad if MS94OblivionGateRef.getdestroyed == 1 disable endif end begin OnDeath set MS94GuardCaptain.deadDaedraCount to MS94GuardCaptain.deadDaedraCount + 1 end begin OnHitWith arrow2steel if getstage ms94 > 50 && getdead == 1 set MQConversations.OGDeadDaedra to 1 ; tell archer endif end begin OnHitWith WeapSteelLongsword if getstage ms94 > 50 && getdead == 1 set MQConversations.OGDeadDaedra to 2 ; tell soldier to cheer endif end
536OghashgraMagulSCRIPTscn OghashgraMagulSCRIPT short skoomaCount short goldCount begin OnPackageDone OrumGangMagulDeliverDrugs ; how much drugs and cash are we dealing with? set skoomaCount to getitemcount potionSkooma set goldCount to OrumGangCourier1Ref.getgold ; deliver drugs to courier removeitem potionSkooma skoomaCount OrumGangCourier1Ref.additem potionSkooma skoomaCount ; get cash from courier OrumGangCourier1Ref.removeitem gold001 goldCount additem gold001 goldCount end begin OnPackageStart OrumGangMagulGetDrugs if OrumGangDrugDropICWaterfront.getitemcount potionSkooma == 0 OrumGangDrugDropICWaterfront.additem potionSkooma 10 endif ; clean out gold set goldCount to OrumGangDrugDropICWaterfront.getitemcount gold001 OrumGangDrugDropICWaterfront.removeitem gold001 goldCount end begin OnPackageDone OrumGangMagulGetDrugs ; deliver cash to drop barrel in waterfront set skoomaCount to getitemcount potionSkooma set goldCount to skoomaCount * 25 if goldCount > getgold set goldCount to getGold endif removeitem gold001 goldCount OrumGangDrugDropICWaterfront.additem gold001 goldCount end begin OnPackageStart OrumGangMagulDeliverCash ; cull gold from Dulfish so it doesn't accumulate set goldCount to DulfishgroOrumRef.getgold set goldCount to goldCount - 300 if goldCount > 0 DulfishgroOrumRef.removeitem gold001 goldCount endif end begin OnPackageDone OrumGangMagulDeliverCash ; deliver cash to Dolfish set goldCount to getGold set goldCount to goldCount - 100 if goldCount > 0 removeitem gold001 goldCount DulfishgroOrumRef.additem gold001 goldCount endif end
537OGImperialArcherScriptscn OGImperialArcherScript begin OnLoad if getdisabled == 0 && ( getstage MQ16 >= 100 || getstage MS94 >= 90 ) setstage ms94 100 disable endif end begin gamemode if getdead == 1 return endif if MQConversations.OGDeadDaedra == 1 if GetRandomPercent < 50 Say OblivionGateVoice set MQConversations.OGDeadDaedra to 0 endif endif end
538OGImperialSoldierScriptscn OGImperialSoldierScript begin OnLoad if getdisabled == 0 && ( getstage MQ16 >= 100 || getstage MS94 >= 90 ) setstage ms94 100 disable endif end begin gamemode if getdead == 1 return endif if MQConversations.OGDeadDaedra == 2 if GetRandomPercent < 50 Say OblivionGateVoice set MQConversations.OGDeadDaedra to 0 endif endif end
539OrtheScriptscn OrtheScript ; used in MQ15 float timer ; used to time warning begin gamemode if timer > 0 set timer to timer - getsecondspassed endif ; question player if he goes into Dremora area before talking to Eldamil if getDead == 0 && getstage MQ15 < 58 && MQ15OrtheLairMarker.getdistance player < 1500 && timer <= 0 set timer to 30 if getstagedone MQ15 51 == 1 setstage MQ15 64 startcombat player else startconversation player endif endif ; attack player if he doesn't get in cage and moves away if getstage MQ15 >= 58 && getstage MQ15 < 62 && player.getdistance MQ15PlayerCageMarker > 1500 setstage MQ15 64 startcombat player endif end begin OnHit player setstage MQ15 64 end begin OnDeath setstage mq15 64 end begin OnStartCombat player setstage MQ15 64 end
540OrumGangCourier1SCRIPTscn OrumGangCourier1SCRIPT short skoomaCount ; deliver all my skooma to secret rock begin OnPackageChange OrumGangCourierDeliverDrugsToKingcrestCavern set skoomaCount to getitemcount potionSkooma removeitem potionSkooma skoomaCount if OrumGangHollowRockREF.getitemCount potionSkooma <= 1 OrumGangHollowRockREF.additem potionSkooma skoomaCount endif end
541OrumGangHollowRockSCRIPTscn OrumGangHollowRockSCRIPT ; someone mysteriously takes everything from this rock when you're not around begin OnLoad removeallitems end
542PalaceAlcoveBlock01SCRIPTscn PalaceAlcoveBlock01SCRIPT short open short busy float timer begin onActivate if open == 0 && isActionRef player == 0 playgroup forward 1 set open to 1 set busy to 1 set timer to 20 endif end begin gameMode if timer <= 0 && open == 1 && busy == 0 playgroup backward 1 set open to 0 set busy to 1 endif if busy == 1 && isAnimPlaying == 0 && timer <= 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set busy to 0 end
543QSTxMQ05CommentariesV1Scriptscn QSTxMQ05CommentariesV1Script begin OnActivate if IsActionRef player == 1 if getstage MQ05 >= 25 && getstage MQ05 < 35 setstage MQ05 35 endif endif Activate end begin OnDrop MQ05AstavWirichRef setstage MQ05 35 end
544QuestRefTestscn QuestRefTest ref questref
545RallusOdiilSCRIPTscn RallusOdiilSCRIPT float timer float convtimer short dialogue begin gamemode ;start conversation between the boys when the player gets close enough ;(so they're not just standing there, looking stupid) if ( GetStage MS18 >= 10 ) if ( MS18.conv == 0 ) if ( GetDistance Player < 500 ) StartConversation AntusOdiil01 MS18Convo set timer to 0 endif ;build in pauses, so it's not one continuous conversation... elseif ( MS18.conv == 6 ) if ( timer >= 45 ) set MS18.conv to 7 AntusOdiil01.StartConversation RallusOdiil01 MS18Convo set timer to 0 else set timer to ( timer + getsecondspassed ) endif endif elseif ( MS18.conv == 10 ) if ( timer >= 30 ) set MS18.conv to -1 StartConversation AntusOdiil01 MS18Convo else set timer to ( timer + getsecondspassed ) endif endif endif ;Have Rallus Evaluate AI Package when he reaches each travel marker along the way ;First marker in cell WeynonPriory if ( GetStage MS18 == 30 && RallusOdiil01.GetDistance MS18XMarker2 < 200 && MS18.travelupdate == 1 ) set MS18.travelupdate to 2 RallusOdiil01.EvaluatePackage ;second marker on road south of Weynon Priory elseif ( GetStage MS18 == 30 && RallusOdiil01.GetDistance MS18XMarker3 < 200 && MS18.travelupdate == 2 ) set MS18.travelupdate to 3 RallusOdiil01.EvaluatePackage endif ;Update Rallus while he waits at the marker for Antus if ( GetStage MS18 == 30 && RallusOdiil01.GetDistance MS18Xmarker4 < 100 ) if ( MS18.Travelupdate == 3 ) set MS18.travelupdate to 4 RallusOdiil01.evaluatePackage endif endif ;Update Quest Stage when both NPCs are at the final marker if ( GetStage MS18 == 30 && RallusOdiil01.GetDistance MS18XMarker4 < 400 && AntusOdiil01.GetDistance MS18XMarker4 < 400 && Player.GetDistance MS18XMarker4 < 400 ) SetStage MS18 40 RallusOdiil01.EvaluatePackage AntusOdiil01.EvaluatePackage endif ;Dialogue between Rallus and Antus before starting combat if ( dialogue == 0 ) if ( GetStage MS18 == 40 && RallusOdiil01.GetDistance AntusOdiil01 <= 400 ) if ( RallusOdiil01.GetDistance Player <= 300 ) RallusOdiil01.setAlert 1 set dialogue to 1 set convtimer to AntusOdiil01.SayTo RallusOdiil01, MS18OdiilTalk01 endif endif elseif ( dialogue == 1 ) if ( convtimer > 0 ) set convtimer to ( convtimer - getsecondspassed ) else set dialogue to 2 set convtimer to RallusOdiil01.SayTo AntusOdiil01, MS18OdiilTalk02 set MS18.timetofight to 1 endif elseif ( dialogue == 2 ) if ( convtimer > 0 ) set convtimer to ( convtimer - getsecondspassed ) else AntusOdiil01.setAlert 1 set convtimer to AntusOdiil01.SayTo RallusOdiil01, MS18OdiilTalk03 set dialogue to 3 endif elseif ( dialogue == 3 ) if ( convtimer > 0 ) set convtimer to ( convtimer - getsecondspassed ) else RallusOdiil01.SayTo AntusOdiil01, MS18OdiilTalk04 MS18Goblin01.Enable MS18Goblin02.Enable MS18Goblin03.Enable RallusOdiil01.Evp set dialogue to -1 endif endif end
546RatPenGateScriptscn RatPenGateScript short gateOpen begin OnActivate if IsActionRef player == 1 || isActionRef CGRatPenRopeREF == 1 unlock set gateOpen to 1 endif Activate end
547RefTestscn RefTest short state Begin OnMagicEffectHit FIDG messageBox "correct" return end begin OnMagicEffectHit messagebox "ZAP!" End
548RewardTestscn RewardTest short rewardVAR
549RFPitDrawBridgeRAISED01SCRIPTscn RFPitDrawBridgeRAISED01SCRIPT short init short next short lowered short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if lowered == 0 message "This drawbridge is lowered remotely." else message "This drawbridge is raised remotely." endif elseif isActionRef mySelf == 0 && busy == 0 if lowered == 0 playgroup forward 0 set lowered to 1 enableLinkedPathPoints else playgroup backward 0 set lowered to 0 disableLinkedPathPoints endif set next to 1 set timer to 2 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathgrid points disableLinkedPathPoints set init to 1 endif if ( timer <= 0 ) && next == 1 myParent.activate mySelf 1 set next to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set next to 0 set lowered to 0 set busy to 0 disableLinkedPathPoints end
550RFSwitch03SCRIPTscn RFSwitch03SCRIPT ; activates parent after a 2 sec delay short open short next short busy float timer ref mySelf ref myParent begin onActivate if busy == 0 if open == 0 playgroup forward 1 set open to 1 set next to 1 set timer to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set next to 0 set open to 0 set busy to 0 end
551RFSwitchLever01SCRIPTscn RFSwitchLever01SCRIPT short next short busy short opened float timer ref myParent ref mySelf begin onActivate if busy == 0 set next to 1 if ( opened == 0 ) playgroup forward 0 set opened to 1 else playgroup backward 0 set opened to 0 endif set timer to 0.5 set busy to 1 endif end begin gameMode if ( timer <= 0 ) && next == 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set next to 0 endif if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set opened to 0 set next to 0 set busy to 0 end
552RFTrapDarts01SCRIPTscn RFTrapDarts01SCRIPT float timer short next short activated ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if activated == 0 set myParent to getParentRef set mySelf to getSelf set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 ; set up the damage values set fTrapDamage to 5 set fLevelledDamage to 1 set fTrapPushBack to 0 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set timer to 2 set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <= 1.5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;reset for next time if timer <= 0 && activated == 1 set fTrapDamage to 0 set fLevelledDamage to 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
553RFTrapDartsDEADLY01SCRIPTscn RFTrapDartsDEADLY01SCRIPT short next short activated float timer ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if activated == 0 set myParent to getParentRef set mySelf to getSelf set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 ; set up the damage values set fTrapDamage to 90 ;set fLevelledDamage to 90 set fTrapPushBack to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 1 playgroup forward 1 myParent.activate mySelf 1 endif end begin gameMode if activated == 1 && isAnimPlaying == 0 set fTrapDamage to 0 playgroup forward 0 set activated to 0 endif end
554RFTrapPitGrate01SCRIPTscn RFTrapPitGrate01SCRIPT short activated begin gameMode if getDistance player < 64 && activated == 0 playgroup unequip 0 set activated to 1 endif end begin onReset reset3DState set activated to 0 end
555RFTrapSpikes01SCRIPTscn RFTrapSpikes01SCRIPT ; Self-activated, no trigger required float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onLoad ; set up the damage values set fTrapDamage to 10 set fTrapPushBack to 500 set fLevelledDamage to 1.5 set fTrapMinVelocity to 0 set bTrapContinuous to 0 end
556RFTrigPressurePlate01SCRIPTscn RFTrigPressurePlate01SCRIPT ref mySelf ref myParent short activated begin gameMode if activated == 0 if getDistance player < 64 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set activated to 1 playgroup forward 0 endif endif end begin onReset reset3DState set activated to 0 end
557RFWHallPortcullis01SCRIPTscn RFWHallPortcullis01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set busy to 0 set next to 0 disableLinkedPathPoints end
558RFWSecretWall01SCRIPTscn RFWSecretWall01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset ;reset3DState ;set open to 0 ;set busy to 0 ;set next to 0 ;disableLinkedPathPoints end
559RootGateMania02SCRIPTscn RootGateMania02SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 1 if open == 0 message " The roots will not budge." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
560RootLeverMania01DOONCESCRIPTscn RootLeverMania01DOONCESCRIPT short busy short activated ref target ref mySelf begin onActivate set target to getParentRef set mySelf to getSelf if busy == 0 && activated == 0 target.activate mySelf 1 playgroup forward 0 set activated to 1 set busy to 1 endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset Reset3DState set busy to 0 set activated to 0 end
561RootLeverMania01SCRIPTscn RootLeverMania01SCRIPT short busy ref target ref mySelf begin onActivate set target to getParentRef set mySelf to getSelf if busy == 0 target.activate mySelf 1 playgroup forward 0 set busy to 1 endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset Reset3DState set busy to 0 end
562RootTRAPSpike01SCRIPTscn RootTRAPSpike01SCRIPT ; Extend spike on activation, with optional daisy-chain link for parent object float timer short triggered short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 ; set up the damage values set fTrapDamage to 5 set fTrapPushBack to 0 set fLevelledDamage to 1 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set triggered to 1 set next to 1 set timer to 5.5 playgroup forward 0 endif end begin gameMode ; daisy chain to next spike in the group if next == 1 && timer <= 5.40 && timer > 0 myParent.activate mySelf 1 set next to 0 endif if triggered == 1 && timer <= 0 set triggered to 0 set next to 0 set timer to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set timer to 0 set triggered to 0 set next to 0 end
563RootTRAPSpike02KnockbackSCRIPTscn RootTRAPSpike02KnockbackSCRIPT ; Extend spike on activation, with optional daisy-chain link for parent object ; This one is really just for testing -- does much less damage but a lot of knockback float timer short triggered short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 ; set up the damage values set fTrapDamage to 0.25 set fTrapPushBack to 1 set fLevelledDamage to 0.25 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set triggered to 1 set next to 1 set timer to 5 playgroup forward 0 ; Temp sound FX playSound CGrassSmall endif end begin gameMode ; daisy chain to next spike in the group if next == 1 && timer <= 4.90 && timer > 0 myParent.activate mySelf 1 set next to 0 endif if triggered == 1 && timer <= 0 set triggered to 0 set next to 0 set timer to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
564RootTRAPSpikeTrigger01SCRIPTscn RootTRAPSpikeTrigger01SCRIPT float timer short triggered short busy ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && busy == 0 playgroup forward 0 set triggered to 1 set busy to 1 set timer to 6 myParent.activate mySelf 1 endif end begin onHitWith ; Can be activated by an arrow hit if triggered == 0 && busy == 0 set mySelf to getSelf activate mySelf 1 endif end begin onMagicEffectHit ; Can be activated by a spell if triggered == 0 && busy == 0 set mySelf to getSelf activate mySelf 1 endif end begin gameMode if triggered == 0 && busy == 0 if getDistance player <= 80 set mySelf to getSelf activate myself 1 endif endif if triggered == 1 && timer <= 0 && isAnimPlaying == 0 playgroup backward 0 set triggered to 2 endif if triggered == 2 && timer <= 0 && isAnimPlaying == 0 set triggered to 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset Reset3DState set triggered to 0 set busy to 0 end
565RootTRAPSporePod02SCRIPTscn RootTRAPSporePod02SCRIPT short triggered short stage float timer ref mySelf begin onActivate if triggered == 0 set triggered to 1 set stage to 1 playgroup forward 1 set timer to 17 endif end begin onTrigger Player ; Activated when players walks into trigger collision if triggered == 0 && timer <= 0 set mySelf to getSelf activate mySelf 1 endif end begin onHitWith ; Activated when shot by an arrow if triggered == 0 && timer <= 0 set mySelf to getSelf activate mySelf 1 endif end begin onMagicEffectHit ; Activated when hit by a spell if triggered == 0 && timer <= 0 set mySelf to getSelf activate mySelf 1 endif end begin gameMode if timer > 0 set timer to timer - getSecondsPassed endif if stage == 1 && timer <= 16.75 set stage to 2 if player.GetLevel <= 7 cast TRAPSporePod01Area mySelf elseif ( player.GetLevel >= 8 ) && ( player.GetLevel <= 15 ) cast TRAPSporePod02Area mySelf elseif ( player.GetLevel >= 16) && ( player.GetLevel <= 23 ) cast TRAPSporePod03Area mySelf elseif player.GetLevel >= 24 cast TRAPSporePod04Area mySelf endif endif if triggered == 1 && timer <= 0 set triggered to 0 endif end begin onReset Reset3DState set triggered to 0 set stage to 0 end
566RootTRAPSporeTriggerSCRIPTscn RootTRAPSporeTriggerSCRIPT ; Activates linked Parent object once ; Will only trigger on the player, but the Spore trap can be shot with arrows or spells to set it off on other creatures ; 15 second reset timer short triggered short init ref myParent ref mySelf float timer begin onTrigger Player if triggered == 0 && isActionRef myParent == 0 myParent.activate mySelf 1 set triggered to 1 set timer to 15 endif end ; Disabled to test onHitWith block in the spore trap script ;begin onTriggerMob ; ; if triggered == 0 && isActionRef myParent == 0 ; ; myParent.activate mySelf 1 ; ; set triggered to 1 ; set timer to 15 ; endif ; ;end begin gameMode if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 0 endif if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
567RootTRAPWorm01SCRIPTscn RootTRAPWorm01SCRIPT ; Extend spike on activation, with optional daisy-chain link for parent object ; This trap requires a trigger -- invisible trigger zones work best float timer short triggered short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 ; set up the damage values set fTrapDamage to 3 set fTrapPushBack to 0 set fLevelledDamage to 0.5 set fTrapMinVelocity to 30 set bTrapContinuous to 0 set triggered to 1 set next to 1 set timer to 5 playgroup forward 0 endif end begin gameMode ; daisy chain to next trap in the group if next == 1 && timer <= 4.90 && timer > 0 myParent.activate mySelf 1 set next to 0 endif if triggered == 1 && timer <= 0 set triggered to 0 set next to 0 set timer to 0 endif if triggered == 0 && timer == 0 set fTrapDamage to 0 set fTrapPushBack to 0 set fLevelledDamage to 0 set fTrapMinVelocity to 0 set bTrapContinuous to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
568RootTRAPWorm02SCRIPTscn RootTRAPWorm02SCRIPT ; Duplicate of RFDart script, with slight modifications for timing float timer short next short activated ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if activated == 0 set myParent to getParentRef set mySelf to getSelf set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 ; set up the damage values set fTrapDamage to 5 set fLevelledDamage to 1 set fTrapPushBack to 0 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set timer to 4 set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <= 3.65 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;reset for next time if timer <= 2 set fTrapDamage to 0 set fLevelledDamage to 0 endif if timer <= 0 && activated == 1 set activated to 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset Reset3DState set next to 0 set activated to 0 end
569RottenDen02TrigZonePLAYER01SCRIPTscn RottenDen02TrigZonePLAYER01SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf01 ref mySelf02 float timer begin onTrigger player set triggered to 1 if triggered == 1 && (timer >= 0 && timer <=0.5) set mySelf01 to Xirethard02StatueHungerTarget01REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget02REF.getSelf Xirethard02StatueHungerTarget01REF.activate mySelf01 1 Xirethard02StatueHungerTarget02REF.activate mySelf02 1 endif if triggered == 1 && (timer >= 1 && timer <=1.5) set mySelf01 to Xirethard02StatueHungerTarget03REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget04REF.getSelf Xirethard02StatueHungerTarget03REF.activate mySelf01 1 Xirethard02StatueHungerTarget04REF.activate mySelf02 1 endif if triggered == 1 && (timer >= 2 && timer <=2.5) set mySelf01 to Xirethard02StatueHungerTarget05REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget06REF.getSelf Xirethard02StatueHungerTarget05REF.activate mySelf01 1 Xirethard02StatueHungerTarget06REF.activate mySelf02 1 endif if triggered == 1 && (timer >= 3 && timer <=3.5) set mySelf01 to Xirethard02StatueHungerTarget07REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget08REF.getSelf Xirethard02StatueHungerTarget07REF.activate mySelf01 1 Xirethard02StatueHungerTarget08REF.activate mySelf02 1 endif end begin gameMode if triggered == 1 && timer >= 5 set triggered to 0 set timer to 0 endif if timer >= 0 && triggered == 1 set timer to timer + getSecondsPassed endif end begin onReset set triggered to 0 end
570RottenDen03ScalonStatue01SCRIPTscn RottenDen03ScalonStatue01SCRIPT short activated short count short counter float timer ref mySelf ref myTarget01 begin onActivate set mySelf to getSelf if isActionRef player == 0 set mySelf to getSelf set activated to 1 if activated == 1 && count == 1 set myTarget01 to RottenDen03ScalonStatueTarget01REF.getSelf ; Leveled spell casting, tops out at lvl 21+ if player.GetLevel <= 5 cast TRAPDamageHealthTarget01 myTarget01 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) cast TRAPDamageHealthTarget02 myTarget01 elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) cast TRAPDamageHealthTarget03 myTarget01 elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget04 myTarget01 elseif player.GetLevel >= 21 cast TRAPDamageHealthTarget05 myTarget01 endif elseif activated == 1 && count == 2 set myTarget01 to RottenDen03ScalonStatueTarget02REF.getSelf ; Leveled spell casting, tops out at lvl 21+ if player.GetLevel <= 5 cast TRAPDamageHealthTarget01 myTarget01 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) cast TRAPDamageHealthTarget02 myTarget01 elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) cast TRAPDamageHealthTarget03 myTarget01 elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget04 myTarget01 elseif player.GetLevel >= 21 cast TRAPDamageHealthTarget05 myTarget01 endif elseif activated == 1 && count == 3 set myTarget01 to RottenDen03ScalonStatueTarget03REF.getSelf ; Leveled spell casting, tops out at lvl 21+ if player.GetLevel <= 5 cast TRAPDamageHealthTarget01 myTarget01 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) cast TRAPDamageHealthTarget02 myTarget01 elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) cast TRAPDamageHealthTarget03 myTarget01 elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget04 myTarget01 elseif player.GetLevel >= 21 cast TRAPDamageHealthTarget05 myTarget01 endif endif endif end begin gameMode if activated == 1 && timer >= 5 set activated to 0 set count to 0 set counter to 0 set timer to 0 endif if timer >= 0 && activated == 1 set mySelf to getSelf if (timer >=0 && timer <=0.5) && counter == 0 set count to 1 set counter to 1 activate mySelf 1 elseif (timer >=1.5 && timer <=2.0) && counter == 1 set count to 2 set counter to 2 activate mySelf 1 elseif (timer >=2.5 && timer <=3) && counter == 2 set count to 3 set counter to 0 activate mySelf 1 endif set timer to timer + getSecondsPassed endif end begin onReset set activated to 0 set count to 0 set counter to 0 end
571RuinsButtonBothDoOnceSCRIPTscn RuinsButtonBothDoOnceSCRIPT ; Activates parent immediately & only works once, hence the creative name. short triggered ref mySelf ref myParent begin onActivate if triggered == 0 playgroup forward 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set triggered to 1 Player.SetCrimeGold 0 endif end begin OnReset reset3DState set triggered to 0 end
572RuinsButtonBothSCRIPTscn RuinsButtonBothSCRIPT ; activates parent after a 2 sec delay short open short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 if open == 0 playgroup forward 1 set open to 1 set next to 1 set timer to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set next to 0 set open to 0 set busy to 0 end
573RuinsButtonDisableParentSCRIPTscn RuinsButtonDisableParentSCRIPT ; Disable/Enable toggles Parent object short open short next short busy float timer ref mySelf ref myParent begin onLoad set mySelf to getSelf set myParent to getParentRef end begin onActivate if busy == 0 if open == 0 playgroup forward 1 set open to 1 set next to 1 set timer to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 if myParent.getDisabled == 1 myParent.enable set next to 0 else myParent.disable set next to 0 endif endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set next to 0 set open to 0 set busy to 0 end
574RuinsButtonResetSCRIPTscn RuinsButtonResetSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
575RuinsGATEclosedSCRIPTscn RuinsGATEclosedSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
576RuinsGATEopenSCRIPTscn RuinsGATEopenSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short closed short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 1 if closed == 1 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if closed == 0 playgroup forward 0 set closed to 1 disableLinkedPathPoints else playgroup backward 0 set closed to 0 enableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points enableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set closed to 0 set next to 0 set busy to 0 enableLinkedPathPoints end
577RuinsTrapFloorLoopingSCRIPTscn RuinsTrapFloorLoopingSCRIPT short timer ref mySelf ref myParent short busy short LoopActive short TrapOpen ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set mySelf to getSelf set myParent to getParentRef set LoopActive to 1 set TrapOpen to 0 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate if LoopActive == 1 set LoopActive to 0 elseif LoopActive != 1 set LoopActive to 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if Timer > 0 set Timer to (timer - getSecondsPassed) endif if timer <= 0 && LoopActive == 1 if TrapOpen == 0 playgroup forward 0 set TrapOpen to 1 disableLinkedPathpoints elseIf TrapOpen == 1 playgroup backward 0 set TrapOpen to 0 enableLinkedPathpoints endif set timer to 70 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onReset reset3DState enableLinkedPathPoints set mySelf to getSelf set myParent to getParentRef set LoopActive to 1 set TrapOpen to 0 end
578RuinsTRAPFloorSCRIPTscn RuinsTRAPFloorSCRIPT float timer ref mySelf ref myParent short init short triggered short busy short next begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 if busy == 0 playgroup forward 0 set triggered to 1 set busy to 1 set timer to 2 set next to 1 disableLinkedPathPoints endif elseif triggered == 1 && isActionRef player == 0 if busy == 0 playgroup backward 0 set timer to 2 set busy to 1 set triggered to 2 enableLinkedPathPoints endif endif end begin gameMode if timer > 0 set timer to timer - getSecondsPassed endif if next == 1 && triggered >= 1 && timer <= 1 myParent.activate mySelf 1 set next to 2 endif if busy == 1 && isAnimPlaying == 0 && timer <= 0 set busy to 0 endif if triggered == 2 && isAnimPlaying == 0 && timer <= 0 set triggered to 0 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif end begin onReset reset3DState enableLinkedPathPoints set triggered to 0 set next to 0 set busy to 0 enableLinkedPathPoints end
579RuinsTRAPHallWColumnASCRIPTscn RuinsTRAPHallWColumnASCRIPT ; On activation rocks will come tumbling down and do some damage ; Damage stops after 6 seconds short triggered float timer short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 set fTrapDamage to 3 set fTrapPushBack to 150 set fLevelledDamage to 0.75 set fTrapMinVelocity to 150 set bTrapContinuous to 0 playgroup unequip 1 enableLinkedPathPoints set triggered to 1 set timer to 6 setDestroyed 1 triggerHitShader 2 endif end begin gameMode ;after 1 sec delay, activate parent (for daisy-chaining) if triggered == 1 && next == 0 && timer < 5 set next to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 endif if triggered == 1 && timer <= 0 set fTrapDamage to 0 set fTrapPushBack to 0 set triggered to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set triggered to 0 setDestroyed 0 enableLinkedPathPoints end
580RuinsTRAPRoomColmASCRIPTscn RuinsTRAPRoomColmASCRIPT ; On activation rocks will come tumbling down and do some damage ; Damage stops after 6 seconds short triggered float timer short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 set fTrapDamage to 5 set fTrapPushBack to 300 set fLevelledDamage to 0.75 set fTrapMinVelocity to 150 set bTrapContinuous to 0 playgroup unequip 1 disableLinkedPathPoints set triggered to 1 set timer to 6 setDestroyed 1 triggerHitShader 4 endif end begin gameMode ;after 1 sec delay, activate parent (for daisy-chaining) if triggered == 1 && next == 0 && timer < 5 set next to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 endif if triggered == 1 && timer <= 0 set fTrapDamage to 0 set fTrapPushBack to 0 set triggered to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set triggered to 0 setDestroyed 0 enableLinkedPathPoints end
581RuinsTRAPRoomColmSpellSCRIPTscn RuinsTRAPRoomColmSpellSCRIPT ; On activation or TRAP spell hit, column will crumble ; Damage stops after 6 seconds short triggered float timer short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 set fTrapDamage to 5 set fTrapPushBack to 300 set fLevelledDamage to 1 set fTrapMinVelocity to 150 set bTrapContinuous to 0 playgroup unequip 1 enableLinkedPathPoints set triggered to 1 set timer to 6 setDestroyed 1 triggerHitShader 4 endif end begin onMagicEffectHit DGHE ; Can only be spell triggered by a Damage Health effect (which the Hunger statue traps use) activate mySelf 1 end begin gameMode ;after 1 sec delay, activate parent (for daisy-chaining) if triggered == 1 && next == 0 && timer < 5 set next to 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 endif if triggered == 1 && timer <= 0 set fTrapDamage to 0 set fTrapPushBack to 0 set triggered to 2 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set triggered to 0 setDestroyed 0 enableLinkedPathPoints end
582RuinsTRAPSecretWallSCRIPTscn RuinsTRAPSecretWallSCRIPT short init short busy short open short next float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 && isActionRef myself == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 1 set open to 0 disableLinkedPathPoints endif set next to 1 set busy to 1 set timer to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
583RuinsTRAPStatueHunger02MULTISCRIPTscn RuinsTRAPStatueHunger02MULTISCRIPT ; when activated will shoot custom Damage Health spell at player ; Requires a trigger zone that is parent-linked to the statue ; ; can daisy-chain to another activator (just parent-link the statue to any activator OTHER THAN the ; trigger box that sets it off -- The Lipari will hurt you if you do that) ; ; The damage output of this version is scaled down so that it can be used in pairs / groups without ; insta-killing the player... too often. ref mySelf ref myParent short next short triggered float timer begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 && triggered == 0 set next to 1 set triggered to 1 set timer to 4 if player.GetLevel <= 10 cast TRAPDamageHealthTarget01 player elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget02 player elseif ( player.GetLevel >= 21) cast TRAPDamageHealthTarget03 player endif endif end begin gameMode if next == 1 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if triggered == 1 && timer <= 0 set triggered to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset Reset3DState set next to 0 set triggered to 0 end
584RuinsTRAPStatueHunger02MULTITargetSCRIPTscn RuinsTRAPStatueHunger02MULTITargetSCRIPT ; When activated will shoot custom Damage Health spell at parent-linked ref ; A trigger parent-links to this statue and the statue then parent-links to a target ref (such as an X Marker) ; ; NOTE - This version will NOT daisy-chain to another activator ; ; Scaled-down version that can be used in groups & that will hopefully not slaughter the player instantly. ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 set mySelf to getSelf set myParent to getParentRef ; Leveled spell casting, tops out at lvl 21+ if player.GetLevel <= 10 cast TRAPDamageHealthTarget01 myParent elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget02 myParent elseif ( player.GetLevel >= 21) cast TRAPDamageHealthTarget03 myParent endif endif end begin onReset Reset3DState end
585RuinTRAPStatueHunger01SCRIPTscn RuinTRAPStatueHunger01SCRIPT ; when activated will shoot custom Damage Health spell at player ; Requires a trigger zone that is parent-linked to the statue ; ; can daisy-chain to another activator (just parent-link the statue to any activator OTHER THAN the ; trigger box that sets it off -- The Lipari will hurt you if you do that) ref mySelf ref myParent short next short triggered float timer begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 && triggered == 0 set next to 1 set triggered to 1 set timer to 4 if player.GetLevel <= 6 cast TRAPDamageHealthTarget01 player elseif ( player.GetLevel >= 7 ) && ( player.GetLevel <= 12 ) cast TRAPDamageHealthTarget02 player elseif ( player.GetLevel >= 13) && ( player.GetLevel <= 18 ) cast TRAPDamageHealthTarget03 player elseif ( player.GetLevel >= 19 ) && ( player.GetLevel <= 25 ) cast TRAPDamageHealthTarget04 player elseif player.GetLevel >= 26 cast TRAPDamageHealthTarget05 player endif endif end begin gameMode if next == 1 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if triggered == 1 && timer <= 0 set triggered to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset Reset3DState set triggered to 0 set next to 0 end
586RuinTRAPStatueHunger02TargetSCRIPTscn RuinTRAPStatueHunger02TargetSCRIPT ; When activated will shoot custom Damage Health spell at parent-linked ref ; A trigger parent-links to this statue and the statue then parent-links to a target ref (such as an X Marker) ; ; NOTE - This version will NOT daisy-chain to another activator ref mySelf ref myParent short automate ; set to > 0 begin continuous fire (without needing to be retriggered) -- will fire for specified number of shots float fireRate ; set to number of seconds between shots (3.5 by default) float timer ; time continuous fire begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 set mySelf to getSelf set myParent to getParentRef ; Leveled spell casting, tops out at lvl 23+ if player.GetLevel <= 6 cast TRAPDamageHealthTarget01 myParent elseif ( player.GetLevel >= 7 ) && ( player.GetLevel <= 12 ) cast TRAPDamageHealthTarget02 myParent elseif ( player.GetLevel >= 13 ) && ( player.GetLevel <= 18 ) cast TRAPDamageHealthTarget03 myParent elseif player.GetLevel >= 19 cast TRAPDamageHealthTarget04 myParent endif endif end begin gamemode if automate == 0 return endif ; if automated, shoot every fireRate seconds if fireRate == 0 set fireRate to 3.5 endif if timer > 0 set timer to timer - getSecondsPassed else ; decrement shot counter set automate to automate - 1 ; Leveled spell casting, tops out at lvl 23+ if player.GetLevel <= 6 cast TRAPDamageHealthTarget01 myParent elseif ( player.GetLevel >= 7 ) && ( player.GetLevel <= 12 ) cast TRAPDamageHealthTarget02 myParent elseif ( player.GetLevel >= 13 ) && ( player.GetLevel <= 18 ) cast TRAPDamageHealthTarget03 myParent elseif player.GetLevel >= 19 cast TRAPDamageHealthTarget04 myParent endif set timer to fireRate endif end begin onReset Reset3DState set automate to 0 set firerate to 0 end
587SdrassaSCRIPTscn SdrassaSCRIPT begin OnDeath if ( GetStage MS37 >= 10 ) && ( GetStage MS37 < 100 ) setstage MS37 200 endif end
588SE01BelmyneScriptscn SE01BelmyneScript short doOnce float timer Begin OnActivate ;prevents talking to NPC during scene if ( GetDead == 0 ) return else activate endif End Begin GameMode ;makes npc say things during scene if ( GetDisabled == 0 ) if ( SE01Door.BelmyneStart == 2 ) set timer to ( timer - GetSecondsPassed ) if ( timer <= 0 ) if ( doOnce == 0 ) set timer to Say SE01BelmyneRant set doOnce to 1 elseif ( doOnce == 1 ) set timer to Say SE01BelmyneRant set doOnce to 2 elseif ( doOnce == 2 ) SEGaiusPrentusREF.Say SE01GaiusTalk StartCombat SEGaiusPrentusREF set doOnce to 3 endif endif endif endif End ;this triggers the gate speech Begin OnDeath set SEGaiusPrentusREF.moveOnce to 2 set SE01Door.BelmyneDead to 1 End
589SE01DoorScriptscn SE01DoorScript short doOnce short doOnce2 short startday short BelmyneStart short BelmyneDead float timer short gatespeechVAR short goAway float timer2 short metroOnce short weatherOnce float weathertimer Begin GameMode ;this times the weather transition if ( weatheronce == 1 ) set weathertimer to ( weathertimer + GetSecondsPassed ) if ( weathertimer >= 3 ) sw SEClearTrans set weatheronce to 2 endif endif ;this section sets a journal to let the player know a door has appeared to the Shivering Isles if ( GetStageDone MQ01 90 == 1 ) if ( doOnce2 == 0 ) set startday to GameDaysPassed set doOnce2 to 1 endif endif if ( doOnce2 == 1 ) if ( GameDaysPassed >= ( startday + 1 ) ) if ( GetStage SE01Door == 0 ) SetStage SE01Door 10 endif endif endif if ( GetStage SE01Door == 40 ) if ( Player.GetDistance SE01DoorMarkerREF <= 512 ) ;SetStage SE01Door 200 endif endif ; this section handles Belmyne coming out of the door and attacking the guard if ( BelmyneStart == 1 ) if ( SEBelmyneDrelethREF.GetDisabled == 1 ) SEBelmyneDrelethREF.Enable set BelmyneStart to 2 endif endif ;this section handles the gate speech and variables if ( BelmyneDead == 1 ) set timer to ( timer - getsecondspassed ) if ( timer <= 0 ) if ( gatespeechVAR == 0 ) set timer to DAClavicusDogStatueREF.say SE01GateSpeech 1 SE01GateVoice1 1 set gatespeechVAR to 1 elseif ( gatespeechVAR == 1 ) set timer to DAClavicusDogStatueREF.say SE01GateSpeech 1 SE01GateVoice1 1 set gatespeechVAR to 2 elseif ( gatespeechVAR == 2 ) set timer to DAClavicusDogStatueREF.say SE01GateSpeech 1 SE01GateVoice1 1 set gatespeechVAR to 3 elseif (gatespeechVAR == 3 ) set timer to DAClavicusDogStatueREF.say SE01GateSpeech 1 SE01GateVoice1 1 set gatespeechVAR to 4 set BelmyneDead to 2 endif endif endif ;this section handles the Waiting Room disappearing if ( SEHaskillREF.leavevar == 2 ) && ( goAway == 0 ) ;SE01WaitingRoomREF.playgroup forward 1 SE01MetronomeREF.playgroup forward 4 SE01MetronomeSoundREF.Disable set weatheronce to 1 set goAway to 1 endif if ( goAway == 1 ) set timer2 to ( timer2 + GetSecondsPassed ) if ( timer2 >= 5 ) && ( metroOnce == 0 ) SE01WaitingRoomREF.playgroup forward 1 set metroOnce to 1 endif if ( timer2 >= 23 ) EnablePlayerControls SetStage SE01Door 201 ; SetStage SE02 5 set goAway to 3 endif endif If GetStage SE01Door == 201 && GetStage SE02 < 5 If Player.GetSitting == 0 SetStage SE02 5 EndIf EndIf End
590SE01GaiusScriptscn SE01GaiusScript ;makes Gaius greet player at beginning of se01 short doOnce short sayOnce short moveOnce Begin OnHit SEBelmyneDrelethREF StopCombat Player StartCombat SEBelmyneDrelethREF End Begin GameMode ;if guard gets knocked out, start combat again if ( SE01Door.BelmyneDead == 0 ) && ( SEBelmyneDrelethREF.doonce == 3 ) && ( IsInCombat == 0 ) StartCombat SEBelmyneDrelethREF endif ;forcegreet if ( GetStage SE01Door == 10 ) && ( SEBelmyneDrelethREF.GetDead == 1 ) if ( doOnce == 0 ) if ( GetDistance Player <= 512 ) StartConversation Player SE01GaiusForceGreet set doOnce to 1 endif endif endif if ( SEBelmyneDrelethREF.GetDisabled == 0 ) && ( SEBelmyneDrelethREF.GetDead == 0 ) Look SEBelmyneDrelethREF endif ;say things during scene if ( SEBelmyneDrelethREF.GetDisabled == 0 ) && ( sayOnce == 0 ) set moveOnce to 1 evp SayTo SEBelmyneDrelethREF SE01GaiusTalk ;SetAlert 1 set sayOnce to 1 endif End
591SE01MetronomeScriptscn SE01MetronomeScript short weatherVAR float weathertimer Begin OnLoad if ( GetStage SE01Door < 200 ) fw SEWaitingRoomWeather endif End
592SE01TrigZoneScriptscn SE01TrigZoneScript short doOnce Begin OnTrigger Player if ( doOnce == 0 ) set SE01Door.BelmyneStart to 1 set doOnce to 1 endif End
593SE01WaitingDoorScriptscn SE01WaitingDoorScript Begin OnActivate ;this controls the player's spells in and out of the Shivering Isles if ( isActionRef Player == 1 ) if ( GetStage SE14 >= 6 ) ;Player.RemoveSpell SE14RezSpell ;Player.RemoveSpell SE14WeatherSpell ;Player.RemoveSpell SELpSummonHaskill endif Player.SCAOnActor setPlayerInSEWorld 0 SEJailMarkerParentTamriel.Enable ; turns ON jail markers in Tamriel, turns OFF jail markers in SE SEJailMarkerCrucible.Disable SEJailMarkerBliss.Disable SEPrisonMarkerAichan.Disable SEPrisonMarkerCorpserot.Disable ReleaseWeatherOverride If Player.GetEquipped TGGrayFoxCowl == 1 Set SECrime.LeftSECowlOn to 1 EndIf Activate endif End
594SE01WaitingRoomScriptscn SE01WaitingRoomScript ;this script makes the waiting room disappear into a dazzling display of psychedelic butterflies. crazy, yo. Begin OnActivate Player if ( SEHaskillREF.leaveVAR == 2 ) playgroup forward 1 set SE01Metronome.weatherVAR to 1 endif End
595SE02GardenCourtyardGateScriptscn SE02GardenCourtyardGateScript short doOnce Begin GameMode if doOnce == 0 if getLocked == 0 SE02GardensSpawn1Ref.enable SE02GardensSpawn2Ref.enable SE02GardensSpawn3Ref.enable set doOnce to 1 endif endif End
596SE02GatekeeperScriptscn SE02GatekeeperScript ;GLOBAL SEGatekeeperPerimeterLength ;this is used to trigger a drop out of combat if his target is outside this range from an xmarker ;GLOBAL SEGatekeeperLeashTimer ;this is used to set how many seconds target needs to be outside the SEGatekeeperPerimeterLength before the Gatekeeper stops combat ;GLOBAL SEGatekeeperDebugNoLeash ;0 = normal, 1 = debug with no leash, this is used to turn of the leash scripting so that you can test the Gatekeeper in a different cell without him dropping out of combat float leashTimer ;how many seconds the Gatekeeper is outside his leash distance, when zero he ends combat short startingAggression ;holds the Gatekeeper's starting Aggression (as set up in his AI form in the editor) Ref HitTarget ; used to hold the target of the PushActorAway function short PushAwayForce Float JournalTimer ;These are used to have the Bone Arrows harm the Gatekeeper. short ArrowEffectOn float ArrowEffectTimer ;set onHitWith one of the bone arrows Begin GameMode if startingAggression == 0 set startingAggression to GetAv Aggression setAv Aggression 5 endif if PushAwayForce == 0 set PushAwayForce to 35 endif ResetFallDamageTimer ;this should prevent the player from training a low level Gatekeeper over the rocks and falling to his death if getStage SE02 >= 10 if SEGatekeeperDebugNoLeash == 0 if getDisabled == 0 ;there are multiple versions of the Gatekeeper in the world running this script, disabled until we figure out which one to spawn for the players level (this happens in a different script) if IsInCombat == 1 if GetCombatTarget == Player if Player.GetDistance XSEGatekeeperProtectGates > SEGatekeeperPerimeterLength && player.GetDistance SEFringeToDementiaREF > 1600 && player.GetDistance SEFringeToManiaREF > 1600 if leashTimer < 0 setAv Aggression 5 stopCombat else set leashTimer to leashTimer - GetSecondsPassed endif endif endif else ;not in combat If Player.getDistance XSEGatekeeperProtectGates < SEGatekeeperPerimeterLength setav Aggression startingAggression ;we want him mean so he will attack the player else setav Aggression 5 ;make him passive if the player isn't inside his patrol radius endif endif endif endif endif ;Gatekeeper knock back effect If SECrime.GatekeeperHit == 1 ;Blame Bruce for having this variable live in SECrime quest script. This variabe is set by a scripted spell effect cast by the Gatekeeper. PushActorAway HitTarget PushAwayForce ; Message "Called PushActorAway" Set SECrime.GatekeeperHit to 0 EndIf ;Gatekeeper being harmed by bone arrows: if getStage SE02 >= 90 ;because Jayred always uses "bone arrows" from his previous kills, we want to be sure that if the player gets his hands on some before Jayred makes him Bone Arrows from the Gatekeeper corpse, it doesn't work on the Gatekeeper (this is so i don't need two sets of "bone arrows") ;because Jayred always uses "bone arrows" from his previous kills, we want to be sure that if the player gets his hands on some before Jayred makes him Bone Arrows from the Gatekeeper corpse, it doesn't work on the Gatekeeper (this is so i don't need two sets of "bone arrows") if arrowEffectTimer > 0 if arrowEffectOn == 0 if getIsID SE02Gatekeeper1 == 1 addSpell SE02AbGKArrowWeakness1 elseif getIsID SE02Gatekeeper2 == 1 addSpell SE02AbGKArrowWeakness2 elseif getIsID SE02Gatekeeper3 == 1 addSpell SE02AbGKArrowWeakness3 elseif getIsID SE02Gatekeeper4 == 1 addSpell SE02AbGKArrowWeakness4 elseif getIsID SE02Gatekeeper5 == 1 addSpell SE02AbGKArrowWeakness5 elseif getIsID SE02Gatekeeper6 == 1 addSpell SE02AbGKArrowWeakness6 elseif getIsID SE02Gatekeeper7 == 1 addSpell SE02AbGKArrowWeakness7 elseif getIsID SE02Gatekeeper8 == 1 addSpell SE02AbGKArrowWeakness8 endif playMagicShaderVisuals effectDamage 30 set arrowEffectOn to 1 else ;the arrow effect has already been applied, so start counting down set arrowEffectTimer to arrowEffectTimer - getSecondsPassed endif else ;arrowEffectTimer <= 0 if arrowEffectOn == 1 removeSpell SE02AbGKArrowWeakness1 removeSpell SE02AbGKArrowWeakness2 removeSpell SE02AbGKArrowWeakness3 removeSpell SE02AbGKArrowWeakness4 removeSpell SE02AbGKArrowWeakness5 removeSpell SE02AbGKArrowWeakness6 removeSpell SE02AbGKArrowWeakness7 removeSpell SE02AbGKArrowWeakness8 stopMagicShaderVisuals effectDamage set arrowEffectOn to 0 endif endif endif If JournalTimer > 0 Set JournalTimer to JournalTimer - GetSecondsPassed If JournalTimer < 0 SetStage SE02 150 EndIf EndIf End ;GameMode Begin OnPackageStart SE02GatekeeperVisitRelmyna setav Aggression 5 End Begin OnStartCombat if getStage SE02 >= 10 if SEGatekeeperDebugNoLeash == 0 set leashTimer to SEGatekeeperLeashTimer ;this prevents abuse by standing outside perimeter and shooting him setav Aggression startingAggression endif endif ;End the visit with Gatekeeper Scene early if GetIsCurrentPackage SE02GatekeeperVisitRelmyna == 1 set SERelmynaVerenimRef.RelmynaVisitDone to 1 set SERelmynaVerenimRef.RelmynaVisitStage to 0 SERelmynaVerenimRef.stopLook SERelmynaVerenimRef.evp EVP endif End ;OnStartCombat Begin OnHit if getStage SE02 >= 10 if SEGatekeeperDebugNoLeash == 0 set leashTimer to SEGatekeeperLeashTimer ;this prevents abuse by standing outside perimeter and shooting him setav Aggression startingAggression endif endif End ;OnHit Begin OnHit Player if getStage SE02 < 10 if SE02OrcCaptainRef.endSceneEarly == 0 set SE02OrcCaptainRef.endSceneEarly to 1 endif endif End Begin OnHitWith SE02GKBoneArrow1 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow2 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow3 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow4 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow5 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow6 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow7 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnHitWith SE02GKBoneArrow8 if getDead == 0 set arrowEffectTimer to 5 endif End Begin OnDeath If GetStage SE02 < 150 Set JournalTimer to 4 ; wait for GateKeeper's body to finish settling before popping message addItem SE02KeyToMania 1 addItem SE02KeyToDementia 1 EndIf SERelmynaVerenimRef.EVP ;so if she is near by will perform her inspect the Gatekeeper corpse package SEJayredIceVeinsRef.EVP ;so he will hang around the Gates waiting for you to unlock the door. End ;OnDeath ;Begin OnPackageStart SE02GatekeeperVisitRelmyna ; pickidle ;End ; ;Begin OnPackageChange SE02GatekeeperVisitRelmyna ; pickidle ;End
597SE02LoveLetterScriptscn SE02LoveLetterScript ;When the player reads this love letter from Relmyna to Sheogorath, he learns about the two ways the gatekeeper can be hurt, so we set a stage and journal update Begin OnActivate Player Activate setStage SE02 30 End
598SE02MaidenTearsEffectScriptscn SE02MaidenTearsEffectScript ;This is the script that is used by SE02MaidensTearsPoison ;It's purpose is to take off the special "invincibility" spell abilities of the Gatekeeper begin ScriptEffectStart if GetIsID SE02Gatekeeper1 == 1 removeSpell SEAbGKMagicResistance1 removeSpell SEAbGKRegenerate1 elseif GetIsID SE02Gatekeeper2 == 1 removeSpell SEAbGKMagicResistance2 removeSpell SEAbGKRegenerate2 elseif GetIsID SE02Gatekeeper3 == 1 removeSpell SEAbGKMagicResistance3 removeSpell SEAbGKRegenerate3 elseif GetIsID SE02Gatekeeper4 == 1 removeSpell SEAbGKMagicResistance4 removeSpell SEAbGKRegenerate4 elseif GetIsID SE02Gatekeeper5 == 1 removeSpell SEAbGKMagicResistance5 removeSpell SEAbGKRegenerate5 elseif GetIsID SE02Gatekeeper6 == 1 removeSpell SEAbGKMagicResistance6 removeSpell SEAbGKRegenerate6 elseif GetIsID SE02Gatekeeper7 == 1 removeSpell SEAbGKMagicResistance7 removeSpell SEAbGKRegenerate7 elseif GetIsID SE02Gatekeeper8 == 1 removeSpell SEAbGKMagicResistance8 removeSpell SEAbGKRegenerate8 endif end ;ScriptEffectStart
599SE02NanettesBookScriptscn SE02NanettesBookScript Begin OnAdd Player setStage SE02 115 End ;onAdd Player
600SE02OrcAdventurerScriptscn SE02OrcAdventurerScript ;This is used in conjuction with SE02OrcCaptainScript to handle the scripted fight scene at the Gatekeeper in SE02 ;This script checks for SE02OrcCaptainRef.killOrcX variables, checks to see what objectID it is running on, and if there is a match, kills the actor. ;This same script is applied to all the "Adventurer" actors in that scene. short KillMe ;0 = unset, 1 = the next time the Gatekeeper hits me, kill me ref self ;holds reference to the actor this script is running on Begin GameMode if self == 0 set self to getSelf endif if killMe == 0 if getIsID SE02OrcAdventurer1 if SE02OrcCaptainRef.killOrc1 == 1 set KillMe to 1 endif endif if getIsID SE02OrcAdventurer2 if SE02OrcCaptainRef.killOrc2 == 1 set KillMe to 1 endif endif if getIsID SE02OrcAdventurer3 if SE02OrcCaptainRef.killOrc3 == 1 set KillMe to 1 endif endif if getIsID SE02OrcAdventurer4 if SE02OrcCaptainRef.killOrc4 == 1 set KillMe to 1 endif endif endif End ;There are leveled versions of the Gatekeeper, so I need to process hits from all of them Begin OnHit SE02Gatekeeper1Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper2Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper3Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper4Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper5Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper6Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper7Ref if killMe == 1 kill endif End Begin OnHit SE02Gatekeeper8Ref if killMe == 1 kill endif End ;If the player gets involved, set a variable in the SE02OrcCaptainScript running on the SE02OrcCaptainRef to end the scene (making all the orcs ready to die in one hit from Gatekeeper) Begin OnHit Player if getStage SE02 < 10 if SE02OrcCaptainRef.endSceneEarly == 0 set SE02OrcCaptainRef.endSceneEarly to 1 endif endif End Begin OnDeath ;this handles making the spectators say something when each orc dies -- the conditions are set up in the conversation topic SE02OrcSpectators if SEFelasSarandasRef.getDistance XSE02Spectator1 < 512 SEFelasSarandasRef.sayTo SE02OrcAdventurer3Ref SE02OrcSpectators 1 endif if SESheldenRef.getDistance XSE02Spectator1 < 512 SESheldenRef.sayTo SE02OrcAdventurer1Ref SE02OrcSpectators 1 endif End ;Just in case they manage to get away without being killed the Gatekeeper they run this package and then look like they are going through the waiting room door Begin OnPackageDone SE02AdventurersRunToWaitingRoom disable End
601SE02OrcCaptainScriptscn SE02OrcCaptainScript short fightStage ;This is used as conditions on SE02OrcCaptainOrders Topic, and as a means of keeping track of the fight scene float sayLength ;Used to control scripted say timing short startFightDoOnce short warnPlayerDoOnce short GatekeeperAggression ;holds the value of the Gatekeeper's aggression so we can mod it back short endSceneEarly ;0 = normal, 1= player got involved so wrap things up now short killOrc1 ;0 = keep alive, 1 = have the Gatekeeper kill short killOrc2 ;0 = keep alive, 1 = have the Gatekeeper kill short killOrc3 ;0 = keep alive, 1 = have the Gatekeeper kill short killOrc4 ;0 = keep alive, 1 = have the Gatekeeper kill ref GatekeeperRef ;same as SE02.GatekeeperRef Begin MenuMode if isTimePassing == 1 if getStage SE02 < 10 if warnPlayerDoOnce > 0 if endSceneEarly == 0 SE02OrcAdventurer1Ref.kill SE02OrcAdventurer2Ref.kill SE02OrcAdventurer3Ref.kill SE02OrcAdventurer4Ref.kill set endSceneEarly to 1 endif endif endif endif End Begin GameMode if GatekeeperRef == 0 set GatekeeperRef to SE02.GatekeeperRef endif ;make the Gatekeeper essential until the end of the battle if fightStage < 5 if GatekeeperRef.IsEssential == 0 ;because setEssential runs on base objects and not on references, I'm simply setting all the base ids to essential setEssential SE02Gatekeeper1 1 setEssential SE02Gatekeeper2 1 setEssential SE02Gatekeeper3 1 setEssential SE02Gatekeeper4 1 setEssential SE02Gatekeeper5 1 setEssential SE02Gatekeeper6 1 setEssential SE02Gatekeeper7 1 setEssential SE02Gatekeeper8 1 endif else if GatekeeperRef.IsEssential == 1 ;because setEssential runs on base objects and not on references, I'm simply setting all the base ids to essential setEssential SE02Gatekeeper1 0 setEssential SE02Gatekeeper2 0 setEssential SE02Gatekeeper3 0 setEssential SE02Gatekeeper4 0 setEssential SE02Gatekeeper5 0 setEssential SE02Gatekeeper6 0 setEssential SE02Gatekeeper7 0 setEssential SE02Gatekeeper8 0 endif endif if startFightDoOnce == 1 if endSceneEarly == 1 set warnPlayerDoOnce to 1 set fightStage to 5 set killOrc1 to 1 set killOrc2 to 1 set killOrc3 to 1 set killOrc4 to 1 set endSceneEarly to 2 endif if fightStage < 7 ;keep combatants alive until they are supposed to die if killOrc1 == 1 ;QUESTION to SELF: These execute even after the actor is already dead... is that overly inefficient?? SE02OrcAdventurer1Ref.removeSpell SE02AbInvincibility GatekeeperRef.startCombat SE02OrcAdventurer1Ref endif if killOrc2 == 1 SE02OrcAdventurer2Ref.removeSpell SE02AbInvincibility GatekeeperRef.startCombat SE02OrcAdventurer2Ref endif if killOrc3 == 1 SE02OrcAdventurer3Ref.removeSpell SE02AbInvincibility GatekeeperRef.startCombat SE02OrcAdventurer3Ref endif if killOrc4 == 1 SE02OrcAdventurer4Ref.removeSpell SE02AbInvincibility GatekeeperRef.startCombat SE02OrcAdventurer4Ref endif endif endif ;wait until the player is close enough then begin the fight if startFightDoOnce == 0 if getDistance Player < 3000 set GatekeeperAggression to GatekeeperRef.getAv Aggression GatekeeperRef.addSpell SE02AbInvincibility ;a 1000 pt restore health... because forceAv calls modAv which adds an "invisible" script modifier which boosts the maximum health, and since he has a restore health, using forceAv health caused him restore up past his "base" hitpoints to have tons of hit points GatekeeperRef.forceAv Aggression 5 GatekeeperRef.setFactionRank SE02SpecialCombatFaction 0 forceAv Aggression 5 SE02OrcAdventurer1Ref.addSpell SE02AbInvincibility SE02OrcAdventurer2Ref.addSpell SE02AbInvincibility SE02OrcAdventurer3Ref.addSpell SE02AbInvincibility SE02OrcAdventurer4Ref.addSpell SE02AbInvincibility SE02OrcAdventurer1Ref.forceAv Aggression 5 SE02OrcAdventurer2Ref.forceAv Aggression 5 SE02OrcAdventurer3Ref.forceAv Aggression 5 SE02OrcAdventurer4Ref.forceAv Aggression 5 setFactionRank SE02SpecialCombatFaction 0 SE02OrcAdventurer1Ref.setFactionRank SE02SpecialCombatFaction 0 SE02OrcAdventurer2Ref.setFactionRank SE02SpecialCombatFaction 0 SE02OrcAdventurer3Ref.setFactionRank SE02SpecialCombatFaction 0 SE02OrcAdventurer4Ref.setFactionRank SE02SpecialCombatFaction 0 SE02OrcCaptainRef.setFactionRank SE02SpecialCombatFaction 0 GatekeeperRef.startCombat SE02OrcAdventurer1Ref SE02OrcAdventurer1Ref.startCombat GatekeeperRef SE02OrcAdventurer2Ref.startCombat GatekeeperRef SE02OrcAdventurer3Ref.startCombat GatekeeperRef SE02OrcAdventurer4Ref.startCombat GatekeeperRef set startFightDoOnce to 1 endif endif if getDistance player < 1024 if warnPlayerDoOnce == 0 if sayLength < 0 set sayLength to sayTo Player SE02OrcCaptainToPlayer ;bring up the spectators if they aren't there already: set SESheldenRef.orcConversationFinished to 1 set SE02.orcSpectate to 1 SEFelasSarandasRef.evp SESheldenRef.evp set warnPlayerDoOnce to 1 startCombat GatekeeperRef endif endif endif if sayLength < 0 && warnPlayerDoOnce == 1 if fightStage == 0 set sayLength to sayTo SE02OrcAdventurer1Ref SE02OrcCaptainOrders set sayLength to sayLength + 4 ;to pad the dialog and give the scene time to develop set fightStage to 1 elseif fightStage == 1 set sayLength to sayTo SE02OrcAdventurer2Ref SE02OrcCaptainOrders set sayLength to sayLength + 4 ;to pad the dialog and give the scene time to develop set fightStage to 2 elseif fightStage == 2 set sayLength to sayTo SE02OrcAdventurer1Ref SE02OrcCaptainOrders set sayLength to sayLength + 4 ;to pad the dialog and give the scene time to develop set fightStage to 3 set killOrc1 to 1 elseif fightStage == 3 if SE02OrcAdventurer1Ref.getDead == 1 set sayLength to sayTo SE02OrcAdventurer2Ref SE02OrcCaptainOrders set sayLength to sayLength + 4 ;to pad the dialog and give the scene time to develop set fightStage to 4 set killOrc2 to 1 endif elseif fightStage == 4 if SE02OrcAdventurer2Ref.getDead == 1 set sayLength to sayTo SE02OrcAdventurer3Ref SE02OrcCaptainOrders set sayLength to sayLength + 4 ;to pad the dialog and give the scene time to develop set fightStage to 5 set killOrc3 to 1 endif elseif fightStage == 5 if SE02OrcAdventurer3Ref.getDead == 1 set sayLength to sayTo SE02OrcAdventurer4Ref SE02OrcCaptainOrders set fightStage to 6 set killOrc4 to 1 endif elseif fightStage == 6 set fightStage to 7 setStage SE02 10 setEssential SE02OrcCaptain 0 set startFightDoOnce to 2 setForceRun 1 stopCombat EVP ;so he picks his "run away" to the waiting room package endif else ;sayLength >= 0 Set sayLength to sayLength - GetSecondsPassed endif if startFightDoOnce == 2 GatekeeperRef.stopCombat GatekeeperRef.forceAv Aggression GatekeeperAggression GatekeeperRef.setFactionRank SE02SpecialCombatFaction -1 GatekeeperRef.removeSpell SE02AbInvincibility SE02OrcAdventurer1Ref.setFactionRank SE02SpecialCombatFaction -1 SE02OrcAdventurer2Ref.setFactionRank SE02SpecialCombatFaction -1 SE02OrcAdventurer3Ref.setFactionRank SE02SpecialCombatFaction -1 SE02OrcAdventurer4Ref.setFactionRank SE02SpecialCombatFaction -1 SE02OrcCaptainRef.setFactionRank SE02SpecialCombatFaction -1 ;just incase: set killOrc1 to 1 set killOrc2 to 1 set killOrc3 to 1 set killOrc4 to 1 set startFightDoOnce to 3 endif End ;GameMode Begin OnHit Player if getStage SE02 < 10 if SE02OrcCaptainRef.endSceneEarly == 0 set endSceneEarly to 1 endif endif End Begin OnDeath GatekeeperRef.stopCombat ;Just incase he dies before the scene completes: setStage SE02 10 set startFightDoOnce to 2 End ;OnDeath Begin OnPackageDone SE02OrcCaptainRunToWaitingRoom disable End
602SE02QuestScriptscn SE02QuestScript ;Actors: ;SESheldenScript -- runs the talking about Orcs scene ;SEFelasSarandasScript -- ends the talking about Orcs scene if attacked by player ;SEJayredIceVeinsScript -- package handling, wait/follow toggle, and dialog handling ;SERelmynaVerenimScript -- runs the spying on Gatekeeper and Sorceress scene (also has scripting for SE09) ;SEGatekeeperScript -- scripted for "leash" behavior to allow player a chance to run away, and adds the keys on death and sets stage ;SE02OrcCaptainScript -- runs the Orc attack on the Gatekeeper scene ;SE02OrcAdventurerScript -- on death of Orc Adventurers trigger the spectators to say something ;Objects ;SE02MaidenTearsEffectScript -- the spell effect that hurts the Gatekeeper ;OBSOLETE SE02NanettesBookScript -- when player adds this it sets quest stage ;SE02GatesKeysScript -- sets stage when you pick up both keys ;SEGatesOfMadnessDoorScript ;"Meta stages" and "Meta Active Quest" help me conditionalize dialog and quest tagets in overlapping branches short metaStageArrows ;this holds a value of the current "quest stage" for the Arrows branch... set by results fields in SE02 Stages short metaStageTears ;this holds a value of the current "quest stage" for the Tears branch... set by results fields in SE02 Stages short metaActiveQuest 0 = not set or both, 1 = arrows, 2 = tears -- used to "turn on and off" the branches so only one set QTs are up at once short JayredWillEscort ;used as condition on package short orcSpectate ;0 = not set, 1 = NPCs should go watch the orcs get killed by the Gatekeeper scene ;set In SESheldenScript and SEFelasSarandasScript short NanetteSecretTears ;used as a condition for a "I'm done talking to you" dialog choice... I prevent the player from leaving dialog until he has heard all of Nanette's secrets about the Sorceress short NanetteSecretJayred ;OBSOLETE used as a condition for a "I'm done talking to you" dialog choice... I prevent the player from leaving dialog until he has heard all of Nanette's secrets about the Sorceress short JayredGardens ;used as as a topic block condition (Jayred won't display the Gardens topic until the player has talked to him about the Gatekeeper topic) short haskillGreet ;used to summon Haskill after getting keys from Gatekeeper short pickedDoor ;used when giving player power for going through a madness door. He only gets one power for the first door he goes thru - see SEGatesOfMadnessDoorScript ;GATEKEEPER ;there are multiple "levels" of Gatekeeper, these are originally disabled in the world (near the Gates of Madness). ;Since he needs to process in low so we aren't pulling from a list ref GatekeeperRef ;holds the reference to the actual Gatekeeper the player will fight short whichGatekeeper ;1, 2, 3, 4, 5, 6, 7, 8 -- used on quest target conditions to point to each Gatekeeper ;SHEOGORATH SPEECH short SpeechVAR Begin GameMode if getStage SE02 < 22 if getStageDone SE02 20 == 1 && getStageDone SE02 21 == 1 setStage SE02 22 endif endif if getStage SE02 >= 150 if getStage SE02 < 162 if player.getItemCount SE02KeyToMania > 0 if player.getItemCount SE02KeyToDementia > 0 ;player has both setStage SE02 162 else ;player has just mania key setStage SE02 160 endif elseif player.getItemCount SE02KeyToDementia > 0 ;player only has the key to dementia setStage SE02 161 endif endif endif if getStage SE02 >= 160 if haskillGreet == 0 SEHaskillRef.Moveto player SEHaskillRef.look player SEHaskillRef.pme STRP 5 set haskillGreet to 1 SEHaskillRef.evp elseif haskillGreet == 2 ;set in dialog ;set variables on Haskill to make him disappear as if he was summoned set SEHaskillRef.summoned to 1 set SEHaskillRef.summontimer to 5 set SEHaskillRef.summonblocker to 0 set haskillGreet to 3 endif endif if getStage SE02 < 190 if player.getInCell SEGatesOfMadness == 1 setStage SE02 190 endif endif End
603SE02TearFilledHanderchiefScriptscn SE02TearFilledHanderchiefScript Begin OnActivate if getActionRef == player setStage SE02 140 disable endif End
604SE03AScriptscn SE03AScript ;Actors ;SEKilibanNyrandil - The 'dungeon caretaker' for Xedilian ;SEGrommokgroBarak - The Orc member of the adventurers group that the player terrorizes in Xedilian ;SESyndeliusGatharian - The Dark Elf member of the adventurers group that the player terrorizes in Xedilian ;SELewinTilwald - The Breton member of the adventurers group that the player terrorizes in Xedilian ;SE03KnightofOrder - The template for the leveled Knights of Order that ambush the player at the end of SE03A ;SE03CreatureGnarlDementia1 - The original Gnarl that appears in the first chamber when the adventurers enter ;SE03MiniGnarl - If the player chooses Dementia in chamber one, these are the tiny ones that swarm the adventurers ;SE03ZombieRiser01DONTBALANCE - If the player chooses Dementia in chamber three, these are the special zombies that attack Grommok ;Objects ;SE03ChamberSwitchDementiaRoom1 - This is the actual button the player presses for Dementia in chamber one ;SE03ChamberSwitchDementiaRoom2 - This is the actual button the player presses for Dementia in chamber two ;SE03ChamberSwitchDementiaRoom3 - This is the actual button the player presses for Dementia in chamber three ;SE03ChamberSwitchManiaRoom1 - This is the actual button the player presses for Mania in chamber one ;SE03ChamberSwitchManiaRoom1 - This is the actual button the player presses for Mania in chamber two ;SE03ChamberSwitchManiaRoom1 - This is the actual button the player presses for Mania in chamber three ;SE03DisablePathTrigger - This activator shuts down pathgrids to chmaber one so Gnarls won't pick nodes outside the chamber ;SE03GnarlGoalie - This activator enables collision boxes that attempt to keep the Gnarls and adventurers in chamber one ;SE03Keys - This is the object (special animation object) that represents the keys falling in chamber two if the player picked Mania ;SE03Room02KeyTester - This is the offline activator that sets the key animation in motion ;SE03Room03ZombieRisingStart - This activator enables the Zombies and evp's them so they attack Grommok in chamber three for Dementia ;SE03RuinGasCloudTrap - This is the actual spore gas cloud object that rises from the grating in chamber one if player picked Mania ;SE03TeleporterGate - This handles all of the teleporter pads that the player uses to travel from one observation area to the next ;SE03Trophy - This is the trophy that is enabled in Sheogorath's Palace upon completion of SE03A ;SE03WaitingRoomExitTrigger - This is a trigger box that opens the final gate from the reception chamber to the original lobby of Xedilian ;SE03XedilianTriggerZoneChamber1 - This is a trigger box that starts the adventurers in motion in chamber one ;SE03XedilianTriggerZoneChamber2 - This is a trigger box that starts the adventurers in motion in chamber two ;SE03XedilianTriggerZoneChamber3 - This is a trigger box that starts the adventurers in motion in chamber three ;SE03XedilianVoxTrigger001 - This is a trigger box that causes the adventurer to utter lines in chamber one ;SE03XedilianVoxTrigger005 - This is a trigger box that causes the adventurer to utter lines in chamber two ;SE03XedilianVoxTrigger007 - This is a trigger box that causes the adventurer to utter lines in chamber three ;SE03TeleportationPad01 - This door is a teleporter pad ;SE03ExitCrystalsREF - This is a bunch of crystals that block the exit from Xedilian when the Knights attack short OrcCount ;Counts how many Orcs are left either alive or sane for use with journal short OrcRoom1 ;Helps for counting when an Orc is done experiencing the room if alive short OrcRoom2 ;Helps for counting when an Orc is done experiencing the room if alive short GrommokMan ;A variable for use post-quest checking insanity result short LewinMan ;A variable for use post-quest checking insanity result short SyndelMan ;A variable for use post-quest checking insanity result short PackGromGo ;Used to push Orc adventurers along through the chamber set piece rooms short PackSyndelGo ;Used to push Orc adventurers along through the chamber set piece rooms short PackLewinGo ;Used to push Orc adventurers along through the chamber set piece rooms short PackGromExit ;Used to push Orc adventurers along through the chamber set piece rooms short PackSyndelExit ;Used to push Orc adventurers along through the chamber set piece rooms short PackLewinExit ;Used to push Orc adventurers along through the chamber set piece rooms short DimentiaTrigger ;Used to count which way the room was triggered for packages short ManiaTrigger ;Used to count which way the room was triggered for packages short Kiligreet ;A variable for Kiliban's forcegreet short Kiligreet2 ;A variable for Kiliban's last forcegreet short DoOnce ;DoOnce variable short DoOnce1 ;DoOnce variable short DoOnce2 ;DoOnce variable short DoOnce3 ;DoOnce variable short DoOnce4 ;DoOnce variable short KnightCount ;Counts how many Knights of Order are killed for Quest Update purposes short FirstWander ;This variable is for Kiliban's positioning in the various Chambers (AI Package Condition) short SecondWander ;This variable is for Kiliban's positioning in the various Chambers (AI Package Condition) short ThirdWander ;This variable is for Kiliban's positioning in the various Chambers (AI Package Condition) short FourthWander ;This variable is for Kiliban's positioning in the various Chambers (AI Package Condition) short Ambush ;For Kiliban forcegreeting player (kicks off his Ambush package) short ChamberOne ;Each of these Chamber variables tells the NPC if they have done Dementia (1) or Mania (2) short ChamberTwo ;Each of these Chamber variables tells the NPC if they have done Dementia (1) or Mania (2) short ChamberThree ;Each of these Chamber variables tells the NPC if they have done Dementia (1) or Mania (2) short ZombieKills ;Counts the Zombie deaths in Chamber Three for update purposes short LewinInsaneJail ;Puts NPC in the holding pen if they went insane short GrommokInsaneJail ;Puts NPC in the holding pen if they went insane short SyndelInsaneJail ;Puts NPC in the holding pen if they went insane short SwitchOne ;This variable is used to toggle the switches in the rooms on (0) or off (1), so there is no reactivation short SwitchTwo ;This variable is used to toggle the switches in the rooms on (0) or off (1), so there is no reactivation short SwitchThree ;This variable is used to toggle the switches in the rooms on (0) or off (1), so there is no reactivation short DoorOpen1 ;This variable is a DoOnce that notes when a Chamber exit is open short DoorOpen2 ;This variable is a DoOnce that notes when a Chamber exit is open short GnarlCount ;Counts the number of Gnarls killed in Chamber One, Dementia (for Lewin's death and Stage Set) short Keys ;A variable that tells Syndelius to use the Key searching idle short GateGo ;A DoOnce variable for opening the Gate to Room 3 short Reward ;Used to give proper reward short KiliMeetOne ;A DoOnce that triggers Kiliban's Forcegreet after room three is completed short KiliMeetTwo ;A DoOnce that triggers Kiliban's Forcegreet after Knights encounter float fQuestDelayTime ;Delay Timer override begin gamemode ;This is for Kiliban's first forcegreet if ( Kiligreet == 0 ) if ( GetStage SE03A >= 5 ) if ( SEKilibanRef.GetDistance Player < 300 ) SE03TeleportToRoom01REF.Lock 100 SEKilibanRef.StartConversation Player, Greeting Set Kiligreet to 5 endif endif endif ; These "Orc Room" blocks help to do the quest update when Orcs are done encountering a room if ( OrcRoom1 == 1 ) SetStage SE03A 15 SE03CollisionBox01.Disable Set PackGromExit to 1 Set PackSyndelExit to 1 Set OrcRoom1 to 2 endif if ( OrcRoom2 == 1 ) SetStage SE03A 20 Set PackGromExit to 1 Set OrcRoom2 to 2 endif ;This block takes care of the gates opening to Chambers 2 - 4 after the previous one is completed if ( DoorOpen1 == 0 ) if ( GetStage SE03A >= 15 ) if ( SEGrommokRef.GetDistance Chamber2GrommokStarts <= 200 ) SE03ControlRoom01ExitGateREF.Activate SEKilibanRef 1 Set DoorOpen1 to 1 endif endif endif if ( DoorOpen2 == 0 ) if ( GetStage SE03A >= 20 ) if ( SEGrommokRef.GetDistance Chamber3GrommokStarts <= 200 ) SE03ControlRoom02ExitGateREF.Activate SEKilibanRef 1 Set DoorOpen2 to 1 endif endif endif ;This is the quest update block for Knights of Order dying if ( GetStage SE03A >= 60 ) if ( KnightCount == 3 ) SE03Knight01ListRef.Disable SE03Knight02ListRef.Disable SE03Knight03ListRef.Disable SetStage SE03A 70 endif endif ;This Evp's Kiliban so he moves with the player, but not in a follow for all the chambers if ( GetStage SE03A >= 15 ) && ( DoOnce == 0 ) if ( Player.GetDistance SE03KilibanRoom2WanderMarker < 500 ) SEKilibanRef.Moveto SE03KilibanChamber2Arrival Set FirstWander to 1 SEKilibanRef.Evp Set DoOnce to 1 endif endif if ( GetStage SE03A >= 20 ) && ( DoOnce1 == 0 ) if ( Player.GetDistance SE03KilibanRoom3WanderMarker < 500 ) SEKilibanRef.Moveto SE03KilibanChamber3Arrival Set SecondWander to 1 SEKilibanRef.Evp Set DoOnce1 to 1 endif endif ;This block handles Kiliban's Third Chamber Forcegreet (after completed) if ( KiliMeetOne == 0 ) if ( GetStage SE03A >= 50 ) if ( SEKilibanRef.GetDistance Player < 300 ) SEKilibanRef.StartConversation Player, Greeting Set KiliMeetOne to 1 endif endif endif ;This block handles Kiliban's Knights Forcegreet (after completed) if ( KiliMeetTwo == 0 ) if ( GetStage SE03A >= 70 ) if ( SEKilibanRef.GetDistance Player < 1000 ) SEKilibanRef.StartConversation Player, Greeting Set KiliMeetTwo to 1 endif endif endif ;This is for Kiliban's last Ambush when player is in reception area if ( Kiligreet2 == 0 ) if ( GetStage SE03A == 55 ) if ( SEKilibanRef.GetDistance Player < 600 ) if ( Player.GetDistance SE03KilibanFinalMarker < 800 ) SEKilibanRef.StartConversation Player, Greeting Set Kiligreet2 to 1 endif endif endif endif ;This block moves the insane to the holding pen if needed if ( LewinInsaneJail == 0 ) if ( GetStage SE03A >= 55 ) if ( SELewinRef.LewinInsane == 1 ) SELewinRef.Moveto LewinInsaneMarker SELewinRef.Evp SELewinRef.Pickidle Set LewinInsaneJail to 1 endif endif endif if ( SyndelInsaneJail == 0 ) if ( GetStage SE03A >= 55 ) if ( SESyndelRef.SyndelInsane == 1 ) SESyndelRef.Moveto SyndelInsaneMarker SESyndelRef.Evp SESyndelRef.Pickidle Set SyndelInsaneJail to 1 endif endif endif if ( GrommokInsaneJail == 0 ) if ( GetStage SE03A >= 55 ) if ( SEGrommokRef.GrommokInsane == 1 ) SEGrommokRef.Moveto GrommokInsaneMarker SEGrommokRef.Evp SEGrommokRef.Pickidle Set GrommokInsaneJail to 1 endif endif endif ;This block handles which blade is given to the player as a reward (since reward is time-sensitive) if ( Reward == 1 ) if ( Gamehour >= 6 ) && ( Gamehour < 18 ) Player.AddItem SE03DawnfangLeveled 1 Set Reward to 2 elseif ( Gamehour >= 18 ) || ( Gamehour < 6 ) Player.Additem SE03DuskfangLeveled 1 Set Reward to 2 endif endif end
605SE03ChamberSwitchScriptDementiaRoom1scn SE03ChamberSwitchScriptDementiaRoom1 short Busy ;Standard variable that notes when switch is busy ref target ;Used in switch movement ref mySelf ;Used in switch movement short DoOnce ;DoOnce variable ;These blocks tell the game what to do when the switch is activated begin onActivate if ( GetStage SE03A >= 12 ) if ( SE03A.SwitchOne < 1 ) if ( Busy == 0 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 Set SE03A.ChamberOne to 1 SE03CollisionBox01.Enable SE03CollisionBox02.Enable SE03GnarlGoalieREF.Activate MySelf 1 SELewinRef.SetAv Health 100 SEGrommokRef.SetAv Health 10000 SESyndelRef.SetAv Health 10000 Set SEGrommokRef.RoomOneTalk to 1 set busy to 1 endif else Message "Chamber One has already been activated." endif else Message "You must wait until the victims are in position." endif end begin gameMode if ( IsAnimPlaying == 0 ) && ( Busy == 1 ) Set SE03A.SwitchOne to 1 Set SE03A.DimentiaTrigger to 1 set Busy to 0 endif if ( DoOnce == 0 ) if ( GetDisabled == 0 ) pms effectRestore set DoOnce to 1 endif endif end
606SE03ChamberSwitchScriptDementiaRoom2scn SE03ChamberSwitchScriptDementiaRoom2 short Busy ;Standard variable that notes when switch is busy ref target ;Used in switch movement ref mySelf ;Used in switch movement short DoOnce ;DoOnce variable ;These blocks tell the game what to do when the switch is activated begin onActivate if ( GetStage SE03A >= 18 ) if ( SE03A.SwitchTwo < 1 ) if ( Busy == 0 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set SE03A.ChamberTwo to 1 set SEGrommokRef.RoomTwoTalk to 1 set busy to 1 endif else Message "Chamber Two has already been set." endif else Message "You must wait until the victims are in position." endif end begin gameMode if ( IsAnimPlaying == 0 ) && ( Busy == 1 ) Set SE03A.SwitchTwo to 1 Set SE03A.DimentiaTrigger to 1 set Busy to 0 endif if ( DoOnce == 0 ) if ( GetDisabled == 0 ) pms effectRestore set DoOnce to 1 endif endif end
607SE03ChamberSwitchScriptDementiaRoom3scn SE03ChamberSwitchScriptDementiaRoom3 short Busy ;Standard variable that notes when switch is busy ref target ;Used in switch movement ref mySelf ;Used in switch movement short DoOnce ;DoOnce variable ;These blocks tell the game what to do when the switch is activated begin onActivate if ( GetStage SE03A >= 47 ) if ( SE03A.SwitchThree < 1 ) if ( Busy == 0 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set SE03A.ChamberThree to 1 SE03Room03ZombieRisingStartREF.Activate Player 1 SEGrommokRef.SetAv Health 100 SEGrommokRef.Say SE03GrommokChamberThreeDem01 1 set busy to 1 endif else Message "Chamber Three has already been set." endif else Message "You must wait until the victims are in position." endif end begin gameMode if ( IsAnimPlaying == 0 ) && ( Busy == 1 ) Set SE03A.SwitchThree to 1 Set SE03A.DimentiaTrigger to 1 set Busy to 0 endif if ( DoOnce == 0 ) if ( GetDisabled == 0 ) pms effectRestore set DoOnce to 1 endif endif end
608SE03ChamberSwitchScriptManiaRoom1scn SE03ChamberSwitchScriptManiaRoom1 short Busy ;Standard variable that notes when switch is busy ref target ;Used in switch movement ref mySelf ;Used in switch movement short DoOnce ;DoOnce Variable ;These blocks tell the game what to do when the switch is activated begin onActivate if ( GetStage SE03A >= 12 ) if ( SE03A.SwitchOne < 1 ) if ( Busy == 0 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 Set SE03A.ChamberOne to 2 Set SEGrommokRef.RoomOneTalkC to 1 set busy to 1 endif else Message "Chamber One has already been activated." endif else Message "You must wait until the victims are in position." endif end begin gameMode if ( IsAnimPlaying == 0 ) && ( Busy == 1 ) Set SE03A.SwitchOne to 1 Set SE03A.ManiaTrigger to 1 set Busy to 0 endif if ( DoOnce == 0 ) if ( GetDisabled == 0 ) pms effectRestore set DoOnce to 1 endif endif end
609SE03ChamberSwitchScriptManiaRoom2scn SE03ChamberSwitchScriptManiaRoom2 short Busy ;Standard variable that notes when switch is busy ref target ;Used in switch movement ref mySelf ;Used in switch movement short DoOnce ;DoOnce Variable ;These blocks tell the game what to do when the switch is activated begin onActivate if ( GetStage SE03A >= 18 ) if ( SE03A.SwitchTwo < 1 ) if ( Busy == 0 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set SE03A.ChamberTwo to 2 set SEGrommokRef.RoomTwoTalkB to 1 set busy to 1 endif else Message "Chamber Two has already been set." endif else Message "You must wait until the victims are in position." endif end begin gameMode if ( IsAnimPlaying == 0 ) && ( Busy == 1 ) Set SE03A.SwitchTwo to 1 Set SE03A.ManiaTrigger to 1 set Busy to 0 endif if ( DoOnce == 0 ) if ( GetDisabled == 0 ) pms effectRestore set DoOnce to 1 endif endif end
610SE03ChamberSwitchScriptManiaRoom3scn SE03ChamberSwitchScriptManiaRoom3 short Busy ;Standard variable that notes when switch is busy ref target ;Used in switch movement ref mySelf ;Used in switch movement short DoOnce ;DoOnce variable ;These blocks tell the game what to do when the switch is activated begin onActivate if ( GetStage SE03A >= 47 ) if ( SE03A.SwitchThree < 1 ) if ( Busy == 0 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 set SE03A.ChamberThree to 2 set SEGrommokRef.RevivalTimer to 3 set SEGrommokRef.GoGhosts to 1 set busy to 1 endif else Message "Chamber Three has already been set." endif else Message "You must wait until the victims are in position." endif end begin gameMode if ( IsAnimPlaying == 0 ) && ( Busy == 1 ) Set SE03A.SwitchThree to 1 Set SE03A.ManiaTrigger to 1 set Busy to 0 endif if ( DoOnce == 0 ) if ( GetDisabled == 0 ) pms effectRestore set DoOnce to 1 endif endif end
611SE03DemPuzzleTempSCRIPTscn SE03DemPuzzleTempSCRIPT ; No longer used - Does delete EVER work?
612SE03DisabledButtonScriptscn SE03DisabledButtonScript begin onActivate Message "The switch will not move." end
613SE03DisablePathTriggerSCRIPTscn SE03DisablePathTriggerSCRIPT short triggered begin onActivate if triggered == 0 && isActionRef player == 0 disableLinkedPathPoints set triggered to 1 elseif triggered == 1 && isActionRef player == 0 enableLinkedPathPoints set triggered to 0 endif end
614SE03FastTreasureButtonSCRIPTscn SE03FastTreasureButtonSCRIPT ; Activates parent floor trap immediately, without waiting for self anim to play first. ; Also can only be activated once. short triggered ref mySelf ref myParent begin onActivate if triggered == 0 && isActionRef player == 1 set triggered to 1 set mySelf to getSelf set myParent to getParentRef playgroup forward 0 myParent.activate mySelf 1 endif end begin onReset reset3DState set triggered to 0 end
615SE03FocusCrystalPlacedSCRIPTscn SE03FocusCrystalPlacedSCRIPT ;This is used if the focus crystal that is now in place is activated begin onActivate if isActionRef player == 1 message "The crystal is fixed in place and cannot be moved." endif end
616SE03FocusCrystalScriptscn SE03FocusCrystalScript ;Both of these blocks are designed to handle the stage changes when picking up a Focus Crystal begin OnAdd Player if ( GetStage SE03 >= 8 ) if ( SE03.FocusCrystals < 3 ) set SE03.FocusCrystals to ( SE03.FocusCrystals + 1 ) endif endif if player.GetItemCount SE03ObeliskStaff01 >= 1 player.removeitem SE03ObeliskStaff01 1 elseif player.GetItemCount SE03ObeliskStaff02 >= 1 player.removeitem SE03ObeliskStaff02 1 elseif player.GetItemCount SE03ObeliskStaff03 >= 1 player.removeitem SE03ObeliskStaff03 1 elseif player.GetItemCount SE03ObeliskStaff04 >= 1 player.removeitem SE03ObeliskStaff04 1 elseif player.GetItemCount SE03ObeliskStaff05 >= 1 player.removeitem SE03ObeliskStaff05 1 endif end begin gamemode if ( GetStage SE03 >= 8 ) if ( SE03.CrystalDone < 3 ) if ( SE03.FocusCrystals == 1 ) && ( SE03.CrystalDone == 0 ) SetStage SE03 20 Set SE03.CrystalDone to 1 elseif ( SE03.FocusCrystals == 2 ) && ( SE03.CrystalDone == 1 ) SetStage SE03 30 Set SE03.CrystalDone to 2 elseif ( SE03.FocusCrystals == 3 ) && ( SE03.CrystalDone == 2 ) SetStage SE03 40 Set SE03.CrystalDone to 3 endif endif endif end
617SE03GnarlGoalieSCRIPTscn SE03GnarlGoalieSCRIPT ; To correct issues with the SE03 Gnarls leaving the combat room, we added ; this activator. When called, it enables collision boxes at both ends of the room ; and also disables the path points near those two ends of the space. Keeps the ; Gnarls and the NPCs in the room... usually. short triggered short init ref mySelf begin onLoad ; Theoretically, this enables the path points when you first load the cell if init == 0 enableLinkedPathPoints set init to 1 endif end begin onActivate ; Activated in the Room01 button script (I think) if isActionRef player == 0 if triggered == 0 disableLinkedPathPoints set triggered to 1 elseif triggered == 1 enableLinkedPathPoints set triggered to 2 endif endif end begin onReset Reset3DState set triggered to 0 set init to 0 end
618SE03GnarlRoomDefenseTriggerSCRIPTscn SE03GnarlRoomDefenseTriggerSCRIPT ; Toggles a variable that should trigger the Gnarl Room Grummites to move toward the player & defend their dance floor ; (Basically an anti-sniper system, if it works) short triggered short GrummitesSmash begin onTriggerMob ; Trigger box is activate whenever an arrow or spell passes through if triggered == 0 set triggered to 1 set GrummitesSmash to 1 ; Variable that kicks off a Travel AI PKG on the Grummites endif end begin onReset set triggered to 0 end
619SE03GnarlRoomGrummiteSCRIPTscn SE03GnarlRoomGrummiteSCRIPT ; Double do onces control A) When the Grummites disappear (for second half of SE03 ; and B) An EVP when they get their new AI PKG when the ref'd trigger variable is set to 1 short doOnceA short doOnceB begin gameMode if ( doOnceB == 0 ) && ( SE03GnarlRoomDefenseTriggerREF.GrummitesSmash == 1 ) evp set doOnceB to 1 endif if ( GetStage SE03A >= 10 ) && ( doOnceA == 0 ) set doOnceA to 1 disable endif end
620SE03GnarlScriptscn SE03GnarlScript float ScaleTimer ;Float variable used for the Gnarl scaling float TestScale ;Float variable used for the Gnarl Scaling float alpha ;Float variable used for the Gnarl alpha fade short StartMeUp ;This is essentially a DoOnce used to cascade one block into the next short Vox ;This is a DoOnce for when the vox trigger is done short DoOnce ;A DoOnce variable short DoOnce1 ;A DoOnce variable short MakeMad ;A flag that is set if the Dementia button is pressed in the first chamber ;This block handles the actual scaling of the gnarl begin gamemode if ( ScaleTimer > 0 ) Set ScaleTimer to ( ScaleTimer - GetSecondsPassed ) Set TestScale to ( 8.5 - ScaleTimer / 5 ) ; scales from 0.5 to 8.5 over 40 seconds SetScale TestScale endif ;Small block to boost the Gnarl's Aggression if Dementia was selected if ( MakeMad == 0 ) if ( SEGrommokRef.RoomOneTalk == 6 ) ModAv Aggression 90 StartCombat SEGrommokRef Set MakeMad to 1 endif endif ;This starts the scaling process if ( StartMeUp == 3 ) Set ScaleTimer to 40 Set StartMeUp to 5 SetRestrained 1 endif ;This starts the fading process if ( StartMeUp == 7 ) set alpha to alpha - .005 setactoralpha alpha if alpha < 0 Disable Set SE03A.LewinMan to 3 SELewinRef.Evp Set StartMeUp to 8 endif endif ;These are the vox lines said at specific times if ( Vox == 0 ) if ( StartMeUp == 5 ) && ( TestScale >= 1.35 ) SELewinRef.Say SE03LewinChamberOneGnarl02 1 Set Vox to 1 endif endif ;When the Gnarl reaches a certain height, it triggers the NPCs to begin running around and a vox trigger, then the Gnarl runs after Lewin if ( StartMeUp == 5 ) && ( TestScale >= 2.00 ) SetRestrained 0 SEGrommokRef.Evp SELewinRef.Evp SESyndelRef.Evp SESyndelRef.Say SE03SyndelChamberOneGnarl02 1 Set StartMeUp to 6 endif if ( DoOnce == 0 ) if ( StartMeUp == 6 ) Evp Set DoOnce to 1 endif endif ;This begins the alpha process on the Gnarl (so it stops and fades away) when all of the NPCs are done running around if ( DoOnce1 == 0 ) if ( SELewinRef.LewinGo == 2 ) && ( SESyndelRef.SyndelGo == 2 ) && ( SEGrommokRef.GrommokGo == 2 ) Set Alpha to 1 Set StartMeUp to 7 Evp Set DoOnce1 to 1 endif endif end
621SE03GrommokScriptscn SE03GrommokScript short RoomOne ;A DoOnce variable short RoomTwo ;A DoOnce variable short RoomThree ;A DoOnce variable short GrommokDied ;A DoOnce variable short GrommokCrazy ;A DoOnce variable short GnarlGo ;A flag that tells the Gnarl when to begin its movement short GrommokGo ;A flag that is used to tell Grommok when to begin executing his AI packages short RoomTwoTrap ;A DoOnce for the RoomTwoTrap being triggered short BlastNPC ;A cascading DoOnce variable for use with the fire trap in room two short RoomTwoPostDem ;A DoOnce variable that tells when the second room is completed short RoomTwoMania ;A flag that is set if the second room was set for mania short RoomTwoManiaMove ;A flag that is set if the second room was set for mania and executes the adventurer's AI packages short Keyfalls ;A flag that is set when all of the keys are dropped in room two short GoKey ;A DoOnce that is set when the key block is exectued short RoomTwoDone ;A DoOnce variable that tells when the second room is completed short GoGhosts ;A Flag that is set when the ghosts in room three are set to go short GnarlChat ;A flag that is set to begin the conversation the adventurers have about the Gnarl short Vox ;A flag that is set to begin the conversation the adventurers have about room one short BiteMe ;A DoOnce that is used in chamber one short DoOnce ;A DoOnce variable short DoOnce1 ;A DoOnce variable short DoOnce2 ;A DoOnce variable short DoOnce6 ;A DoOnce variable short SayOnce ;A DoOnce variable used for the adventurers conversations short ZombiesGo ;A flag that is set to get the zombies to attack the orc in room three short RoomOneTalk ;A cascading flag that is set to move along the conversation in room one short RoomOneTalkB ;A cascading flag that is set to move along the conversation in room one short RoomOneTalkC ;A cascading flag that is set to move along the conversation in room one short RoomOneTalkD ;A cascading flag that is set to move along the conversation in room one short RoomTwoTalk ;A cascading flag that is set to move along the conversation in room two short RoomTwoTalkB ;A cascading flag that is set to move along the conversation in room two short RoomTwoTalkC ;A cascading flag that is set to move along the conversation in room two short RoomTwoTalkD ;A cascading flag that is set to move along the conversation in room two short RoomThreeTalk ;A cascading flag that is set to move along the conversation in room three short GrommokInsane ;A flag that is set when mania is chosen for chamber three to note orc insanity short IdleOne ;A flag that is set when adventurers are in position to kick off their idle chatter - room one short IdleTwo ;A flag that is set when adventurers are in position to kick off their idle chatter - room two short IdleThree ;A flag that is set when adventurers are in position to kick off their idle chatter - room three short GrommokCrazyTalk ;A flag that is set to help set off Syndel's insanity chatter loop float RoomOneTalkLength ;Float variable used to measure the length of spoken lines for the say command in room one float RoomOneTalkLengthB ;Float variable used to measure the length of spoken lines for the say command in room one float RoomOneTalkLengthC ;Float variable used to measure the length of spoken lines for the say command in room one float RoomOneTalkLengthD ;Float variable used to measure the length of spoken lines for the say command in room one float RoomTwoTalkLength ;Float variable used to measure the length of spoken lines for the say command in room two float RoomTwoTalkLengthB ;Float variable used to measure the length of spoken lines for the say command in room two float RoomTwoTalkLengthC ;Float variable used to measure the length of spoken lines for the say command in room two float RoomTwoTalkLengthD ;Float variable used to measure the length of spoken lines for the say command in room two float RoomThreeTalkLength ;Float variable used to measure the length of spoken lines for the say command in room three float RoomOneIdleLength ;Float variable used to measure the length of spoken lines for the say command in room one for idles float RoomTwoIdleLength ;Float variable used to measure the length of spoken lines for the say command in room one for idles float RoomThreeIdleLength ;Float variable used to measure the length of spoken lines for the say command in room one for idles float BlastNPCTimer ;Float variable used for the fire trap for a time delay measurement float RevivalTimer ;Float variable used for the aftermath of the fire trap for a time delay measurement float GhostTimer ;Float variable used for the ghost effect appearance for a time delay measurement float GromEndTimer ;Float variable used to seperate the final effects of the insanity in time delay measurement float GromEndTimer2 ;Float variable used to seperate the final effects of the insanity in time delay measurement float GrommokChatterTalkLength ;A float that is used for measuring line length in Syndel's insanity chatter loop ;This handles when Grommok dies (chamber three) begin OnDeath If ( GetStage SE03A >= 45 ) SetStage SE03A 50 endif end begin gamemode ;This handles if Grommok goes insane if ( GrommokInsane == 0 ) if ( SE03A.GrommokMan == 3 ) Evp Set GrommokInsane to 1 endif endif ;This handles Grommok's Insanity Chatter loop if ( Player.GetDistance SE03XedilianTriggerC3 < 700 ) if ( GrommokInsane == 1 ) if ( GrommokCrazyTalk == 1 ) && ( GrommokChatterTalkLength <= -5 ) Set GrommokChatterTalkLength to SEGrommokRef.Say SE03GrommokCrazyChatter SEGrommokRef.Say SE03GrommokCrazyChatter 1 Set GrommokCrazyTalk to 2 elseif ( GrommokCrazyTalk == 2 ) && ( GrommokChatterTalkLength <= -5 ) Set GrommokCrazyTalk to 1 endif endif endif if ( GrommokCrazyTalk > 0 ) && ( GrommokCrazyTalk < 3 ) Set GrommokChatterTalkLength to GrommokChatterTalkLength - GetSecondsPassed endif ;This handles Journal Update when Adventurers are in position Chamber One if ( GetStage SE03A == 10 ) if ( RoomOne == 1 ) if ( SELewinRef.RoomOne == 1 ) && ( SESyndelRef.RoomOne == 1 ) SetStage SE03A 12 endif endif endif ;This handles Room One's Idle Chatter if ( SE03A.SwitchOne == 0 ) if ( IdleOne == 1 ) && ( RoomOneIdleLength <= -5 ) Set RoomOneIdleLength to SEGrommokRef.Say SE03GrommokC1Idle01 SEGrommokRef.Say SE03GrommokC1Idle01 1 Set IdleOne to 2 elseif ( IdleOne == 2 ) && ( RoomOneIdleLength <= -5 ) Set RoomOneIdleLength to SELewinRef.Say SE03LewinC1Idle01 SELewinRef.Say SE03LewinC1Idle01 1 Set IdleOne to 3 elseif ( IdleOne == 3 ) && ( RoomOneIdleLength <= -5 ) Set RoomOneIdleLength to SESyndelRef.Say SE03SyndelC1Idle01 SESyndelRef.Say SE03SyndelC1Idle01 1 Set IdleOne to 4 elseif ( IdleOne == 4 ) && ( RoomOneIdleLength <= -5 ) Set IdleOne to 1 endif endif if ( IdleOne > 0 ) && ( IdleOne < 5 ) Set RoomOneIdleLength to RoomOneIdleLength - GetSecondsPassed endIf ;This handles Room One's Dementia Conversation if ( RoomOneTalk == 1 ) && ( RoomOneTalkLength == 0 ) Set RoomOneTalkLength to SEGrommokRef.Say SE03GrommokChamberOneGrow01 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow01 1 Set RoomOneTalk to 2 elseif ( RoomOneTalk == 2 ) && ( RoomOneTalkLength <= 0 ) Set RoomOneTalkLength to SELewinRef.Say SE03LewinChamberOneGnarl01 SELewinRef.Sayto SEGrommokRef SE03LewinChamberOneGnarl01 1 Set RoomOneTalk to 3 elseif ( RoomOneTalk == 3 ) && ( RoomOneTalkLength <= 0 ) Set RoomOneTalkLength to SEGrommokRef.Say SE03GrommokChamberOneGrow02 SEGrommokRef.Sayto SELewinRef SE03GrommokChamberOneGrow02 1 Set RoomOneTalk to 4 elseif ( RoomOneTalk == 4 ) && ( RoomOneTalkLength <= 0 ) Set RoomOneTalkLength to SESyndelRef.Say SE03SyndelChamberOneGrow01 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGrow01 1 Set RoomOneTalk to 5 elseif ( RoomOneTalk == 5 ) && ( RoomOneTalkLength <= 0 ) Set RoomOneTalkLength to SEGrommokRef.Say SE03GrommokChamberOneGrow04 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow04 1 SetAlert 1 SESyndelRef.SetAlert 1 SELewinRef.SetAlert 1 SELewinRef.StartCombat SE03ParentGnarl SESyndelRef.StartCombat SE03ParentGnarl02 SEGrommokRef.StartCombat SE03ParentGnarl03 Set RoomOneTalk to 6 endif if ( RoomOneTalk > 0 ) && ( RoomOneTalk < 6 ) Set RoomOneTalkLength to RoomOneTalkLength - GetSecondsPassed endIf ;This kicks of the NPC leaving Chamber One, Dementia if ( SE03A.GnarlCount >= 11 ) if ( RoomOneTalkB == 0 ) && ( RoomOneTalkLengthB == 0 ) SEGrommokRef.SetAlert 0 SESyndelRef.SetAlert 0 Set RoomOneTalkLengthB to SEGrommokRef.Say SE03GrommokChamberOneGrow03 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow03 1 Set RoomOneTalkB to 2 elseif ( RoomOneTalkB == 2 ) && ( RoomOneTalkLengthB <= 0 ) Set RoomOneTalkLengthB to SESyndelRef.Say SE03SyndelChamberOneGrow02 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGrow02 1 Set RoomOneTalkB to 3 elseif ( RoomOneTalkB == 3 ) && ( RoomOneTalkLengthB <= 0 ) Set SE03A.OrcRoom1 to 1 Set RoomOneTalkB to 4 endif endif if ( RoomOneTalkB > 0 ) && ( RoomOneTalkB < 4 ) Set RoomOneTalkLengthB to RoomOneTalkLengthB - GetSecondsPassed endIf ;This handles Room One's Mania Conversation if ( SE03A.ChamberOne == 2 ) if ( RoomOneTalkC == 1 ) && ( RoomOneTalkLengthC == 0 ) Set RoomOneTalkLengthC to SEGrommokRef.Say SE03GrommokChamberOneGnarl01 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGnarl01 1 Set RoomOneTalkC to 2 elseif ( RoomOneTalkC == 2 ) && ( RoomOneTalkLengthC <= 0 ) Set RoomOneTalkLengthC to SELewinRef.Say SE03LewinChamberOneGnarl01 SELewinRef.Sayto SEGrommokRef SE03LewinChamberOneGnarl01 1 SE03GasCloudRef.Playgroup Forward 1 Set RoomOneTalkC to 3 elseif ( RoomOneTalkC == 3 ) && ( RoomOneTalkLengthC <= 0 ) Set RoomOneTalkLengthC to SESyndelRef.Say SE03SyndelChamberOneGnarl SESyndelRef.Sayto SELewinRef SE03SyndelChamberOneGnarl 1 Set RoomOneTalkC to 4 elseif ( RoomOneTalkC == 4 ) && ( RoomOneTalkLengthC <= 0 ) Set RoomOneTalkLengthC to SEGrommokRef.Say SE03GrommokChamberOneGrow02 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow02 1 Set RoomOneTalkC to 5 elseif ( RoomOneTalkC == 5 ) && ( RoomOneTalkLengthC <= 0 ) Set RoomOneTalkLengthC to SESyndelRef.Say SE03SyndelChamberOneGnarl01 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGnarl01 1 SetAlert 1 SESyndelRef.SetAlert 1 SELewinRef.SetAlert 1 Set SE03ManiaGnarl.StartMeUp to 3 Set RoomOneTalkC to 6 endif endif if ( RoomOneTalkC > 0 ) && ( RoomOneTalkC < 6 ) Set RoomOneTalkLengthC to RoomOneTalkLengthC - GetSecondsPassed endIf ;This kicks off the NPC leaving Chamber One, Mania if ( SE03ManiaGnarl.StartMeUp == 8 ) if ( RoomOneTalkD == 0 ) && ( RoomOneTalkLengthD == 0 ) SEGrommokRef.SetAlert 0 SESyndelRef.SetAlert 0 Set RoomOneTalkLengthD to SESyndelRef.Say SE03SyndelChamberOneGnarl03 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGnarl03 1 Set RoomOneTalkD to 2 elseif ( RoomOneTalkD == 2 ) && ( RoomOneTalkLengthD <= 0 ) Set RoomOneTalkLengthD to SEGrommokRef.Say SE03GrommokChamberOneGnarl03 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGnarl03 1 Set RoomOneTalkD to 3 elseif ( RoomOneTalkD == 3 ) && ( RoomOneTalkLengthD <= 0 ) Set RoomOneTalkLengthD to SELewinRef.Say SE03LewinChamberOneGrow02 SELewinRef.Sayto SEGrommokRef SE03LewinChamberOneGrow02 1 Set RoomOneTalkD to 4 elseif ( RoomOneTalkD == 4 ) && ( RoomOneTalkLengthD <= 0 ) Set RoomOneTalkLengthD to SESyndelRef.Say SE03SyndelChamberOneGnarl04 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGnarl04 1 Set RoomOneTalkD to 5 elseif ( RoomOneTalkD == 5 ) && ( RoomOneTalkLengthD <= 0 ) Set RoomOneTalkLengthD to SEGrommokRef.Say SE03GrommokChamberOneDone02 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneDone02 1 Set RoomOneTalkD to 6 elseif ( RoomOneTalkD == 6 ) && ( RoomOneTalkLengthD <= 0 ) Set SE03A.OrcRoom1 to 1 Set RoomOneTalkD to 7 endif endif if ( RoomOneTalkD > 0 ) && ( RoomOneTalkD < 7 ) Set RoomOneTalkLengthD to RoomOneTalkLengthD - GetSecondsPassed endif ;This handles Journal Update when Adventurers are in position Chamber Two if ( GetStage SE03A == 15 ) if ( RoomTwo == 1 ) if ( SESyndelRef.RoomTwo == 1 ) SetStage SE03A 18 endif endif endif ;This handles Room Two's Idle Chatter if ( SE03A.SwitchTwo == 0 ) if ( IdleTwo == 1 ) && ( RoomTwoIdleLength <= -5 ) Set RoomTwoIdleLength to SEGrommokRef.Say SE03GrommokC2Idle01 SEGrommokRef.Say SE03GrommokC2Idle01 1 Set IdleTwo to 2 elseif ( IdleTwo == 2 ) && ( RoomTwoIdleLength <= -5 ) Set RoomTwoIdleLength to SESyndelRef.Say SE03SyndelC2Idle01 SESyndelRef.Say SE03SyndelC2Idle01 1 Set IdleTwo to 3 elseif ( IdleTwo == 3 ) && ( RoomTwoIdleLength <= -5 ) Set IdleTwo to 1 endif endif if ( IdleTwo > 0 ) && ( IdleTwo < 4 ) Set RoomTwoIdleLength to RoomTwoIdleLength - GetSecondsPassed endIf ;This handles Room Two's Dementia Conversation if ( RoomTwoTalk == 1 ) && ( RoomTwoTalkLength == 0 ) Set RoomTwoTalkLength to SEGrommokRef.Say SE03GrommokChamberTwoStart SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoStart 1 Set RoomTwoTalk to 2 elseif ( RoomTwoTalk == 2 ) && ( RoomTwoTalkLength <= 0 ) Set RoomTwoTalkLength to SESyndelRef.Say SE03SyndelChamberTwoStart SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoStart 1 Set RoomTwoTalk to 3 elseif ( RoomTwoTalk == 3 ) && ( RoomTwoTalkLength <= 0 ) Set RoomTwoTalkLength to SEGrommokRef.Say SE03GrommokChamberTwoDem01 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoDem01 1 Set RoomTwoTalk to 4 elseif ( RoomTwoTalk == 4 ) && ( RoomTwoTalkLength <= 0 ) Set RoomTwoTalkLength to SESyndelRef.Say SE03SyndelChamberTwoDem01 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoDem01 1 Set RoomTwoTalk to 5 elseif ( RoomTwoTalk == 5 ) && ( RoomTwoTalkLength <= 0 ) Set RoomTwoTrap to 1 Set RoomTwoTalk to 6 endif if ( RoomTwoTalk > 0 ) && ( RoomTwoTalk < 6 ) Set RoomTwoTalkLength to RoomTwoTalkLength - GetSecondsPassed endIf ;This kicks off the Dementia Trap (Hunger Statues) in Chamber Two and handles the knockout and revival of the NPCs if ( BlastNPC == 0 ) if ( RoomTwoTrap == 1 ) SE03DementiaTrapTrigger.Activate Player 1 SEGrommokRef.ModAv Fatigue -300 SESyndelRef.ModAv Fatigue -200 Set BlastNPCTimer to 6 Set BlastNPC to 1 endif endif if ( BlastNPC == 1 ) if ( BlastNPCTimer > 0 ) Set BlastNPCTimer to ( BlastNPCTimer - GetSecondsPassed ) else SEGrommokRef.ForceAv Fatigue 300 SESyndelRef.Kill set BlastNPC to 2 endif endif ;This recovers the NPCs after the Blast in Chamber Two, and sends them to the last markers if ( BlastNPC == 2 ) if ( RoomTwoTalkD == 0 ) && ( RoomTwoTalkLengthD == 0 ) Set RoomTwoTalkLengthD to SEGrommokRef.Say SE03GrommokChamberTwoDone SEGrommokRef.Say SE03GrommokChamberTwoDone 1 Set RoomTwoTalkD to 1 elseif ( RoomTwoTalkD == 1 ) && ( RoomTwoTalkLengthD <= 0 ) Set SE03A.OrcRoom2 to 1 Set BlastNPC to 3 endif endif if ( RoomTwoTalkD > 0 ) && ( RoomTwoTalkD < 2 ) Set RoomTwoTalkLengthD to RoomTwoTalkLengthD - GetSecondsPassed endIf ;This handles Room Two's Mania Conversation if ( RoomTwoTalkB == 1 ) && ( RoomTwoTalkLengthB == 0 ) Set RoomTwoTalkLengthB to SEGrommokRef.Say SE03GrommokChamberTwoStart SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoStart 1 Set RoomTwoTalkB to 2 elseif ( RoomTwoTalkB == 2 ) && ( RoomTwoTalkLengthB <= 0 ) Set RoomTwoTalkLengthB to SESyndelRef.Say SE03SyndelChamberTwoStart SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoStart 1 Set RoomTwoTalkB to 3 elseif ( RoomTwoTalkB == 3 ) && ( RoomTwoTalkLengthB <= 0 ) Set RoomTwoTalkLengthB to SEGrommokRef.Say SE03GrommokChamberTwoMan01 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoMan01 1 Set RoomTwoTalkB to 4 elseif ( RoomTwoTalkB == 4 ) && ( RoomTwoTalkLengthB <= 0 ) Set RoomTwoTalkLengthB to SESyndelRef.Say SE03SyndelChamberTwoMani01 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoMani01 1 Set RoomTwoTalkB to 5 elseif ( RoomTwoTalkB == 5 ) && ( RoomTwoTalkLengthB <= 0 ) Set RoomTwoTalkLengthB to SEGrommokRef.Say SE03GrommokChamberTwoMan02 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoMan02 1 Set RoomTwoTalkB to 6 elseif ( RoomTwoTalkB == 6 ) && ( RoomTwoTalkLengthB <= 0 ) Set RoomTwoTalkLengthB to SESyndelRef.Say SE03SyndelChamberTwoMani02 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoMani02 1 Set RoomTwoTalkB to 7 elseif ( RoomTwoTalkB == 7 ) && ( RoomTwoTalkLengthB <= 0 ) Set Keyfalls to 1 Set SE03A.Keys to 1 Evp SESyndelRef.Evp Set RoomTwoTalkB to 8 endif if ( RoomTwoTalkB > 0 ) && ( RoomTwoTalkB < 8 ) Set RoomTwoTalkLengthB to RoomTwoTalkLengthB - GetSecondsPassed endIf ;This triggers the Keyfall in Chamber Two at the proper time if ( GoKey == 0 ) if ( Keyfalls == 1 ) SE03ManiaTrapTrigger.Activate Player 1 Set SE03A.Keys to 1 Set GoKey to 1 endif endif ;This handles Room Two's Post-Mania Conversation if ( RoomTwoTalkC == 1 ) && ( RoomTwoTalkLengthC == 0 ) Set RoomTwoTalkLengthC to SESyndelRef.Say SE03SyndelChamberTwoManEnd01 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoManEnd01 1 Set RoomTwoTalkC to 2 elseif ( RoomTwoTalkC == 2 ) && ( RoomTwoTalkLengthC <= 0 ) Set RoomTwoTalkLengthC to SEGrommokRef.Say SE03GrommokChamberTwoManEnd01 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoManEnd01 1 Set RoomTwoTalkC to 3 elseif ( RoomTwoTalkC == 3 ) && ( RoomTwoTalkLengthC <= 0 ) Set RoomTwoTalkLengthC to SESyndelRef.Say SE03SyndelChamberTwoManEnd02 SESyndelRef.Sayto SESyndelRef SE03SyndelChamberTwoManEnd02 1 Set RoomTwoTalkC to 4 elseif ( RoomTwoTalkC == 4 ) && ( RoomTwoTalkLengthC <= 0 ) Set RoomTwoTalkLengthC to SEGrommokRef.Say SE03GrommokChamberTwoManEnd02 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoManEnd02 1 Set RoomTwoTalkC to 5 elseif ( RoomTwoTalkC == 5 ) && ( RoomTwoTalkLengthC <= 0 ) Set RoomTwoTalkLengthC to SESyndelRef.Say SE03SyndelChamberTwoManEnd03 SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoManEnd03 1 Set RoomTwoTalkC to 6 elseif ( RoomTwoTalkC == 6 ) && ( RoomTwoTalkLengthC <= 0 ) Set RoomTwoTalkLengthC to SEGrommokRef.Say SE03GrommokChamberTwoManEnd03 SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoManEnd03 1 Set RoomTwoTalkC to 7 elseif ( RoomTwoTalkC == 7 ) && ( RoomTwoTalkLengthC <= 0 ) Set SE03A.OrcRoom2 to 1 Evp Set RoomTwoTalkC to 8 endif if ( RoomTwoTalkC > 0 ) && ( RoomTwoTalkC < 8 ) Set RoomTwoTalkLengthC to RoomTwoTalkLengthC - GetSecondsPassed endIf ;This handles Room Three's Idle Chatter if ( SE03A.SwitchThree == 0 ) if ( IdleThree == 1 ) && ( RoomThreeIdleLength <= -5 ) Set RoomThreeIdleLength to SEGrommokRef.Say SE03GrommokC3Idle01 SEGrommokRef.Say SE03GrommokC3Idle01 1 Set IdleThree to 2 elseif ( IdleThree == 2 ) && ( RoomThreeIdleLength <= -5 ) Set IdleThree to 1 endif endif if ( IdleThree > 0 ) && ( IdleThree < 3 ) Set RoomThreeIdleLength to RoomThreeIdleLength - GetSecondsPassed endIf ;This handles Grommok "dying" and his "ghost" appearing at its position for Chamber Three Mania if ( GoGhosts == 1 ) if ( RevivalTimer > 0 ) Set RevivalTimer to ( RevivalTimer - GetSecondsPassed ) else ModAv Fatigue -800 pme BABO SEGrommokGhostRef.Enable Set GhostTimer to 3 Set GoGhosts to 2 endif endif ;This is a timer to give the ghost NPC a moment to be ready before speech if ( GoGhosts == 2 ) if ( GhostTimer > 0 ) Set GhostTimer to ( GhostTimer - GetSecondsPassed ) else Set RoomThreeTalk to 1 Set GoGhosts to 3 endif endif ;This handles Room Three's Post-Mania Conversation if ( RoomThreeTalk == 1 ) && ( RoomThreeTalkLength == 0 ) Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamberThreeMan01 SEGrommokGhostRef.Say SE03GrommokChamberThreeMan01 1 Set RoomThreeTalk to 2 elseif ( RoomThreeTalk == 2 ) && ( RoomThreeTalkLength <= 0 ) Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamberThreeMan02 SEGrommokGhostRef.Say SE03GrommokChamberThreeMan02 1 Set RoomThreeTalk to 3 elseif ( RoomThreeTalk == 3 ) && ( RoomThreeTalkLength <= 0 ) Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamThreeMan04 SEGrommokGhostRef.Say SE03GrommokChamThreeMan04 1 Set RoomThreeTalk to 4 elseif ( RoomThreeTalk == 4 ) && ( RoomThreeTalkLength <= 0 ) Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamThreeMan05 SEGrommokGhostRef.Say SE03GrommokChamThreeMan05 1 Set RoomThreeTalk to 5 elseif ( RoomThreeTalk == 5 ) && ( RoomThreeTalkLength <= 0 ) Set GoGhosts to 4 Set RoomThreeTalk to 6 endif if ( RoomThreeTalk > 0 ) && ( RoomThreeTalk < 6 ) Set RoomThreeTalkLength to RoomThreeTalkLength - GetSecondsPassed endIf ;This is the GhostTimer until they return to normal in Chamber Three Mania if ( GoGhosts == 4 ) SEGrommokGhostRef.Disable SEGrommokRef.pme BABO SEGrommokRef.ModAv Fatigue 800 Set GromEndTimer to 1 Set GoGhosts to 5 endif if ( GoGhosts == 5 ) if ( GromEndTimer > 0 ) Set GromEndTimer to ( GromEndTimer - GetSecondsPassed ) else Set SE03A.GrommokMan to 3 SEGrommokRef.Evp Pickidle Set GromEndTimer2 to 2 Set GoGhosts to 6 endif endif if ( GoGhosts == 6 ) if ( GromEndTimer2 > 0 ) Set GromEndTimer2 to ( GromEndTimer2 - GetSecondsPassed ) else Setstage SE03A 50 Set GoGhosts to 7 endif endif end ;This long series of OnPackage End Blocks is designed to help move the orcs through the dungeon begin OnPackageEnd SE03GrommokChamber1Start if ( RoomOne == 0 ) Set SE03A.PackGromGo to 0 Set RoomOne to 1 endif end begin OnPackageEnd SE03GrommokChamber1Done if ( RoomOneTalkB == 4 ) || ( RoomOneTalkD == 7 ) Set SE03A.PackGromExit to 0 Moveto Chamber2GrommokStarts Set SE03A.DimentiaTrigger to 0 Set SE03A.ManiaTrigger to 0 Set RoomOneTalkB to 5 Set RoomOneTalkD to 8 else Return endif end begin OnPackageEnd SE03GrommokActionChamber1Mania01 if ( DoOnce == 0 ) Set GrommokGo to 1 Evp Set DoOnce to 1 endif end begin OnPackageEnd SE03GrommokActionChamber1Mania02 if ( DoOnce1 == 0 ) Say SE03GrommokChamberOneGnarl02 1 Set GrommokGo to 2 Evp Set DoOnce1 to 1 endif end begin OnPackageEnd SE03GrommokChamber2Start if ( GetDead == 0 ) && ( RoomTwo == 0 ) Set SE03A.PackGromGo to 0 Set RoomTwo to 1 else Return endif end begin OnPackageEnd SE03GrommokActionChamber2Mania if ( DoOnce2 == 0 ) Set RoomTwoTalkC to 1 Set DoOnce2 to 1 endif end begin OnPackageEnd SE03GrommokChamber2Done if ( GetDead == 0 ) && ( RoomTwo == 1 ) Set SE03A.PackGromExit to 0 Moveto Chamber3GrommokStarts Set SE03A.DimentiaTrigger to 0 Set SE03A.ManiaTrigger to 0 Set RoomTwo to 2 endif end begin OnPackageEnd SE03GrommokChamber3Start if ( GetDead == 0 ) && ( RoomThree == 0 ) Set SE03A.PackGromGo to 0 SetStage SE03A 47 Set RoomThree to 1 endif end begin OnPackageStart SE03GrommokCrazyDuring PickIdle end begin OnPackageStart SE03GrommokCrazyPost PickIdle end
622SE03Grummite01TempSCRIPTscn SE03Grummite01TempSCRIPT short doOnceA begin gameMode if ( GetStage SE03A >= 10 ) && doOnceA == 0 set doOnceA to 1 disable endif end
623SE03GrummiteStaffHoldingSCRIPTscn SE03GrummiteStaffHoldingSCRIPT short doOnce begin onLoad if doOnce == 0 EquipItem SE03ObeliskStaff01 1 EquipItem SE03ObeliskStaff02 1 EquipItem SE03ObeliskStaff03 1 EquipItem SE03ObeliskStaff04 1 EquipItem SE03ObeliskStaff05 1 set doOnce to 1 endif end
624SE03HungerShooter01SCRIPTscn SE03HungerShooter01SCRIPT ; When activated will shoot custom Damage Health spell at parent-linked ref ; A trigger parent-links to this statue and the statue then parent-links to a target ref (such as an X Marker) ; ; NOTE - This version will NOT daisy-chain to another activator ref mySelf ; Self-explan ref myParent ; The target for the spell short triggered ; Do once variable float timer ; Self-explan (probably not nec. in this quest) begin onActivate ; In this block, the ref variables are set up & the spell is fired at the target if triggered == 0 && isActionRef player == 0 set triggered to 1 set timer to 3 set mySelf to getSelf set myParent to getParentRef cast TRAPDamageHealthTargetFAKE myParent endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
625SE03JudgmentNexusScript01scn SE03JudgmentNexusScript01 short Activated ;Basically, a glorified DoOnce variable ref target ref mySelf ; These blocks handle adding a Focus Crystal (SE03FocusCrystalScript) to a Judgment Nexus Begin onActivate if ( isActionRef Player == 1 ) if ( Player.GetItemCount SE03FocusCrystal > 0 ) && ( Activated == 0 ) set target to getParentRef set mySelf to getSelf SE03CrystalShiny01REF.enable SE03CrystalEffect01LightDimREF.disable Player.RemoveItem SE03FocusCrystal, 1 SetStage SE03 25 set activated to 1 target.activate mySelf 1 endif endif end
626SE03JudgmentNexusScript02scn SE03JudgmentNexusScript02 short Activated ;Basically, a glorified DoOnce variable ref target ref mySelf ; These blocks handle adding a Focus Crystal (SE03FocusCrystalScript) to a Judgment Nexus Begin onActivate if ( isActionRef Player == 1 ) if ( Player.GetItemCount SE03FocusCrystal > 0 ) && ( Activated == 0 ) set target to getParentRef set mySelf to getSelf SE03CrystalShiny02REF.enable SE03CrystalEffect02LightDimREF.disable Player.RemoveItem SE03FocusCrystal, 1 SetStage SE03 35 set activated to 1 target.activate mySelf 1 endif endif end
627SE03JudgmentNexusScript03scn SE03JudgmentNexusScript03 short Activated ;Basically, a glorified DoOnce variable ref target ref mySelf ; These blocks handle adding a Focus Crystal (SE03FocusCrystalScript) to a Judgment Nexus Begin onActivate if ( isActionRef Player == 1 ) if ( Player.GetItemCount SE03FocusCrystal > 0 ) && ( Activated == 0 ) set target to getParentRef set mySelf to getSelf SE03CrystalShiny03REF.enable SE03CrystalEffect03LightDimREF.disable Player.RemoveItem SE03FocusCrystal, 1 SetStage SE03 45 set activated to 1 target.activate mySelf 1 endif endif end
628SE03KnightofOrderScriptscn SE03KnightofOrderScript ; This is used to count the number of Knights that die begin OnDeath if ( GetStage SE03A >= 35 ) Set SE03A.KnightCount to ( SE03A.KnightCount + 1 ) endif end
629SE03KnightsTriggerSCRIPTscn SE03KnightsTriggerSCRIPT ; When the player exits the reception chamber, and they break this trigger zone, the 3 Knights of Order will enable at the door to Xedilian to ambush the player. short triggered ref mySelf begin onTrigger player if triggered == 0 && GetStage SE03 >= 8 set triggered to 1 set mySelf to getSelf SE03Knight01ListRef.Enable SE03Knight02ListRef.Enable SE03Knight03ListRef.Enable SE03NewCrystal01REF.playgroup forward 1 ; Added to animate the Order crystal when the Knights spawn SE03NewCrystal02REF.Enable ; Turns on the Crystals & triggers that the player or SE03NewCrystal03REF.Enable ; the Knights can trigger SE03NewCrystal04REF.Enable SE03NewCrystal05REF.Enable SE03ExitCrystalsREF.playgroup forward 1 ;Activates the crystals that block the door to Xedilian endif end
630SE03LewinScriptscn SE03LewinScript short RoomOne ;A DoOnce variable short LewinDied ;A DoOnce variable short LewinCrazy ;A DoOnce variable short LewinCower ;A flag that is set to make Lewin do his cower idle short GnarlGo ;A flag that is set to tell the gnarl in room one when to go short LewinGo ;A cascading flag that is used to move Lewin around the first chamber when he runs from gnarl short LewinInsane ;A flag that is set when lewin goes insane in room two short Vox ;A DoOnce for the vox short DoOnce ;A DoOnce variable short DoOnce1 ;A DoOnce variable short DoOnce2 ;A DoOnce variable short LewinDiesTalk ;A flag that is set when Lewin is to be killed in the first combat short LewinCrazyTalk ;A flag that is set when Lewin goes insane for his insane chatter loop float LewinDiesTalkLength ;A float variable used to measure the length of Lewin's final words float LewinChatterTalkLength ;A float variable used to measure the length of Lewin's crazy talk ;These two blocks are checking the threshold of the orc to see if they die or go crazy after a chamber begin gamemode if ( LewinInsane == 0 ) if ( SE03A.LewinMan == 3 ) Set LewinCrazy to 1 Evp Set LewinInsane to 1 endif endif ;This handles Lewin's Insanity Chatter loop if ( Player.GetDistance SE03XedilianTriggerC1 < 700 ) if ( LewinCrazy == 1 ) if ( LewinCrazyTalk == 1 ) && ( LewinChatterTalkLength <= -5 ) Set LewinChatterTalkLength to SELewinRef.Say SE03LewinCrazyChatter SELewinRef.Say SE03LewinCrazyChatter 1 Set LewinCrazyTalk to 2 elseif ( LewinCrazyTalk == 2 ) && ( LewinChatterTalkLength <= -5 ) Set LewinCrazyTalk to 1 endif endif endif if ( LewinCrazyTalk > 0 ) && ( LewinCrazyTalk < 3 ) Set LewinChatterTalkLength to LewinChatterTalkLength - GetSecondsPassed endif ;This handles Lewin's death Chamber One, Dementia if ( SE03A.GnarlCount >= 6 ) && ( GetDead == 0 ) if ( LewinDiesTalk == 0 ) && ( LewinDiesTalkLength == 0 ) StopCombat Set LewinDiesTalkLength to SELewinRef.Say SE03LewinChamberOneGrow01 SELewinRef.Say SE03LewinChamberOneGrow01 1 Set LewinDiesTalk to 1 elseif ( LewinDiesTalk == 1 ) && ( LewinDiesTalkLength <= 0 ) Kill endif endif if ( LewinDiesTalk > 0 ) && ( LewinDiesTalk < 2 ) Set LewinDiesTalkLength to LewinDiesTalkLength - GetSecondsPassed endIf ;This kicks off the NPC leaving Chamber One, Dementia if ( RoomOne == 4 ) Set SE03A.OrcRoom1 to ( SE03A.OrcRoom1 + 1 ) Set RoomOne to 5 endif ;This kicks off the NPC leaving Chamber One, Mania if ( SE03ManiaGnarl.StartMeUp == 8 ) && ( RoomOne < 5 ) Set SE03A.OrcRoom1 to ( SE03A.OrcRoom1 + 1 ) Set RoomOne to 5 endif end ;This long series of OnPackage End Blocks is designed to help move the orcs through the dungeon begin OnPackageEnd SE03LewinChamber1Start if ( RoomOne == 0 ) Set SE03A.PackLewinGo to 0 Set RoomOne to 1 endif end begin OnPackageEnd SE03LewinActionChamber1Mania01 if ( DoOnce == 0 ) Set LewinGo to 1 Evp Set DoOnce to 1 endif end begin OnPackageEnd SE03LewinActionChamber1Mania02 if ( DoOnce1 == 0 ) Set LewinGo to 2 Evp Set DoOnce1 to 0 endif end begin OnPackageEnd SE03LewinActionChamber1Mania03 if ( DoOnce2 == 0 ) Set LewinGo to 3 Evp Set DoOnce2 to 1 endif end begin OnPackageStart SE03LewinGoesInsaneDuring PickIdle end begin OnPackageStart SE03LewinGoesInsanePost PickIdle end
631SE03ManiaPuzzleTempSCRIPTscn SE03ManiaPuzzleTempSCRIPT short busy ref target ref mySelf begin onActivate if busy == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 playgroup forward 0 message "You have just solved a very complex puzzle. Huzzah!" set busy to 1 endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
632SE03ManualofXedilianScriptscn SE03ManualofXedilianScript ;This is for the first time the player reads the Manual of Xedilian begin OnEquip if ( GetStage SE03 >= 5 ) && ( GetStage SE03 < 10 ) SetStage SE03 10 endif Activate end
633SE03MiniGnarlScriptscn SE03MiniGnarlScript short Execute ;This causes the "mini gnarls" in room one to attack after the last line of dialog is spoken short Killed ;This variable is used in the counting of deaths of mini gnarls ;This causes the "mini gnarls" in room one to attack after the last line of dialog is spoken begin gamemode if ( SEGrommokRef.RoomOneTalk == 6 ) if ( Execute == 0 ) Enable Evp Set Execute to 1 endif endif end ;This is a count if the mini Gnarl is killed begin OnDeath if ( Killed == 0 ) Set SE03A.GnarlCount to ( SE03A.GnarlCount + 1 ) endif end
634SE03ObeliskStaff01SCRIPTscn SE03ObeliskStaff01SCRIPT short doOnce begin onAdd player if doOnce == 0 player.addItem SE03FocusCrystal, 1 set doOnce to 1 endif end
635SE03ObeliskStaff02SCRIPTscn SE03ObeliskStaff02SCRIPT short doOnce begin onAdd player if doOnce == 0 player.addItem SE03FocusCrystal 1 set doOnce to 1 endif end
636SE03ObeliskStaff03SCRIPTscn SE03ObeliskStaff03SCRIPT short doOnce begin onAdd player if doOnce == 0 player.addItem SE03FocusCrystal 1 set doOnce to 1 endif end
637SE03QuestGateOpenTriggerSCRIPTscn SE03QuestGateOpenTriggerSCRIPT ; Activates the gate leading into the main section of Xedilian. Does not reset & should only work once. short triggered ref mySelf begin onTrigger player if triggered == 0 && GetStage SE03 >= 8 set triggered to 1 set mySelf to getSelf SE03NothingToSeeHereREF.activate mySelf 1 endif end
638SE03ResonatorEnergyScriptscn SE03ResonatorEnergyScript short Trigger ;This script is a companion to the one on SE03ResonatorRef ;This is the second set of animations the resonator in SE03 plays begin gamemode if getStage SE03 >= 200 if IsAnimPlaying == 0 if Trigger == 2 playgroup backward 1 Set Trigger to 3 endif endif endif if Trigger == 1 playgroup fastforward 0 Set Trigger to 2 endif end
639SE03ResonatorGrummiteSCRIPTscn SE03ResonatorGrummiteSCRIPT ; Modified version of the SE03Grummite script (which disables the Grummites for the 2nd half of the quest) ; This version just adds an EVP after the ref'd trigger is set off, so that the Grummites quickly move ; to their travel package (which takes them towards the trigger and hopefully the player) short doOnceA short doOnceB begin gameMode if ( doOnceB == 0 ) && ( SE03ResonatorSceneTriggerREF.GrummitesSmash == 1 ) evp set doOnceB to 1 endif if ( GetStage SE03A >= 10 ) && ( doOnceA == 0 ) set doOnceA to 1 disable endif end
640SE03ResonatorRoomDefenseTriggerSCRIPTscn SE03ResonatorRoomDefenseTriggerSCRIPT ; Toggles a variable that should trigger the Resonator Grummites to move toward the player & defend the Resonator ; (Basically an anti-sniper system, if it works) short triggered ; Do once variable short GrummitesSmash ; Controlling variable for Grummites' travel PKG begin onTriggerMob if triggered == 0 ; When the player shoots an arrow or fires a spell through this trigger set triggered to 1 ; the GrummitesSmash variable flips to kick off a Travel PKG on the set GrummitesSmash to 1 ; Grummites, moving them towards the trigger & hopefully the player endif end begin onReset set triggered to 0 end
641SE03ResonatorScriptscn SE03ResonatorScript short Playing ;A flag that is set to tell the object when the animation is playing short SetOff ; A flag that is set when the timer is done float Timer ;A float variable for timer ;When the Resonator is activated, and the player has the attenuator of judgment, set the proper stage ;Even though it is impossible to get to it early, we check if the proper stage is in progress as well begin OnActivate if ( IsActionRef Player == 1 ) if ( GetStage SE03 >= 45 ) && ( GetStage SE03 < 200 ) if ( Player.GetItemCount SE03TuningFork == 1 ) && SetOff == 0 Playsound AMBTuningFork Set Timer to 5 Set SetOff to 1 endif endif endif end begin gamemode if ( SetOff == 1 ) if timer > 0 set timer to timer - getSecondsPassed else SetStage SE03 200 Set SetOff to 2 endif endif ;These gamemode blocks set stage 200 (ending SE03) and control the complex animation for the obelisk if ( SetOff == 2 ) playgroup forward 1 SE03ObeliskEnergyBox.playgroup backward 1 Set SetOff to 3 endif if getStage SE03 >= 200 if IsAnimPlaying == 0 playgroup fastforward 1 if ( Playing == 0 ) set SE03Resonator01Ref.Trigger to 1 set playing to 1 endif endif endif end
642SE03Room02HungerTesterSCRIPTscn SE03Room02HungerTesterSCRIPT ; Starts the Hunger trap in XPXedilian01, set piece room 2 ; Not even sure if Al is still using this, but keeping it in just in case short powerOn ; Do once variable short onceOnly ; Another, only this one does not seem to be used now... short busy ; Can't be triggered again while the timer is > 0 float timer ; Timer ref mySelf ; Self-explan begin onActivate ; Called from the button in the observation deck for Room02 if powerOn == 0 && busy == 0 playgroup forward 0 set powerOn to 1 set busy to 1 set mySelf to getSelf SE03TreasureRoomHunger01REF.activate mySelf 1 ; Hunger statue, activated to shoot its spell SE03TreasureRoomHunger02REF.activate mySelf 1 ; The other Hunger statue set timer to 4 endif end begin gameMode if busy == 1 && isAnimPlaying == 0 && timer <= 2 ; Legacy script to control the button anims set busy to 2 playgroup backward 0 endif if busy == 2 && isAnimPlaying == 0 && timer <= 0 ; Resets the script when everything is done set busy to 0 set powerOn to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
643SE03Room02KeyGeneratorSCRIPTscn SE03Room02KeyGeneratorSCRIPT ; Legacy script for old way of making the keys fall in Room02 ; Not deleting this one, just in case we need to call on it again at ; some point... short keyCount ; Total number of keys to generate short triggered ; Do once float timer ; Timer begin onActivate if isActionRef player == 0 ; Probably unnecessary check on the ActionRef set triggered to 1 ; Do once set keyCount to 15 ; Sets up the nummber of keys to drop, per Generator placed endif end begin gameMode ; Generates 1 key every 0.25 seconds until keyCount is reached if triggered == 1 && keyCount > 0 && timer <=0 placeatme SE03TestKey 1 set keyCount to keyCount -1 set timer to 0.25 endif if timer > 0 set timer to timer - getSecondsPassed endif end
644SE03Room02KeyTesterSCRIPTscn SE03Room02KeyTesterSCRIPT ; Enables the key generators in the XPXedilian01 treasure room ; No further documentation needed here -- when script is run, the keys fall from the ceiling short triggered begin onActivate if triggered == 0 SE03KeysAnimREF.playgroup forward 0 set triggered to 1 endif end
645SE03Room03ZombieRisingSCRIPTscn SE03Room03ZombieRisingSCRIPT ; Zombies die again after Grommok is defeated. Neat! short DoOnce ; Exactly what it says it is, used for Quest script update in onDeath block short DoOnceB ; Second doOnce used locally, for killing the zombies after Grommok dies float timer ; Delay between Grommok's death & the zombies falling down begin gameMode if ( GetStage SE03a >= 50 ) && ( DoOnceB == 0 ) ; Grommok dies, variable flips & timer set set DoOnceB to 1 set timer to 2 endif if DoOnceB == 1 && timer <= 0 ; After timer expires, the zombies collapse set DoOnceB to 2 kill endif if timer > 0 set timer to timer - getSecondsPassed endif end Begin OnDeath if ( DoOnce == 0 ) Set SE03A.ZombieKills to ( SE03A.ZombieKills + 1 ) Set DoOnce to 1 endif end
646SE03Room03ZombieRisingStartSCRIPTscn SE03Room03ZombieRisingStartSCRIPT ; Modified script to simply enable the new zombies, rather than raise them from the dead. ; This script is about as straightforward as you can get, but I'll add notes anyway... begin onActivate if isActionRef player == 1 SE03Room03Enable02REF.enable ; SpellTarget object gets enabled; zombies linked to it SE03ZombieRiser01REF.evp ; Zombie 1 gets evp'd so that he goes after Grommok SE03ZombieRiser02REF.evp ; Zombie 2 gets evp'd so that he goes after Grommok SE03ZombieRiser03REF.evp ; Zombie 3 gets evp'd so that he goes after Grommok SE03ZombieRiser04REF.evp ; Zombie 4 gets evp'd so that he goes after Grommok SE03ZombieRiser05REF.evp ; Zombie 5 gets evp'd so that he goes after Grommok endif end
647SE03Room03ZombieTesterSCRIPTscn SE03Room03ZombieTesterSCRIPT ; Enables the dead stuff in the XPXedilian02 dead stuff room ; ; Legacy tester button script from the original mockup of Xedilian ; still used by Al in his Quest script, but some of these lines no longer do anything short triggered ; All of these variables are self-explanatory short init ref mySelf float timer begin onActivate if triggered == 0 playgroup forward 0 ; This block used to animate the button set triggered to 1 SE03Room03EnableREF.enable ; The important bits, sets up the room with SE03Room03Enable02REF.enable ; the proper set dressing set timer to 4 endif end begin gameMode if timer <= 0 && triggered == 1 SE03Room03ZombieRisingStartREF.activate mySelf 1 ; Activator sets up the zombies for Room03 set triggered to 2 endif if init == 0 set mySelf to getSelf set init to 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
648SE03RuinsGATEclosedSCRIPTscn SE03RuinsGATEclosedSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end ; begin onReset ; reset3DState ; set open to 0 ; set next to 0 ; set busy to 0 ; disableLinkedPathPoints ; end
649SE03Scriptscn SE03Script ;Actors ;All of the actors in SE03 are Grummites that are used in various parts of Xedilian for the first wave ;SE03Grummite01TEMP - Grummite template ;SE03GrummiteShamanDementia1 - The shaman that carries the focus crystal staff ;SE03GrummiteShamanDementia2 - The shaman that carries the focus crystal staff ;SE03GrummiteShamanDementia3 - The shaman that carries the focus crystal staff ;SE03GrummiteShamanResonatorTEMP - Grummites guarding resonator with special AI package template ;SE03GrummiteShamanTEMP - Shaman template ;Objects ;SE03JudgmentNexus01 - The activator that accepts when the player has a focus crystal from the shaman staff ;SE03JudgmentNexus02 - The activator that accepts when the player has a focus crystal from the shaman staff ;SE03JudgmentNexus03 - The activator that accepts when the player has a focus crystal from the shaman staff ;SE03Resonator - The Resonator of Judgment which accepts when the player has the tuning fork and has done SE03 ;SE03ObeliskStaff01 - Leveled shaman staff with focus crystal ;SE03ObeliskStaff02 - Leveled shaman staff with focus crystal ;SE03ObeliskStaff03 - Leveled shaman staff with focus crystal ;SE03ObeliskStaff04 - Leveled shaman staff with focus crystal ;SE03ObeliskStaff05 - Leveled shaman staff with focus crystal ;SE03ObeliskStaff06 - Leveled shaman staff with focus crystal short FocusCrystals ;This will keep track of how many Focus Crystals the player has picked up short CrystalDone ;This is a ticking variable for when a Crystal is picked up (DoOnce) float fQuestDelayTime short xedHungerRoom01 ;Added by Mike R. to track Hunger deaths in Xedilian01 short xedHungerRoom02 ;Added by Mike R. just in case he needs it... short xedHungerRoom03 ;Added by Mike R. to track Hunger deaths in Xedilian03 (shock room) short xedBigHunger ;Added by Mike R. because the small Hunger / big Hunger thing didn't work... begin gamemode ;This is the proximity trigger for intial entry into Xedilian if ( GetStage SE03 >= 10 ) && ( GetStage SE03 < 15 ) if ( Player.GetDistance SE03EntryMarker <= 800 ) SetStage SE03 15 endif endif end
650SE03SyndelScriptscn SE03SyndelScript short RoomOne ;A DoOnce variable short RoomTwo ;A DoOnce variable short SyndelDied ;A DoOnce variable used for the block where Syndel is killed short SyndelCrazy ;A DoOnce variable used for the block where Syndel goes insane short SyndelCower ;A flag that is set when Syndel needs to do his cower animation short GnarlGo ;A flag that is set when the gnarl is ready to go short SyndelGo ;A cascading flag that is used to move Syndel into his run away packages from the gnarl short RoomTwoPostDem ;A flag that is set when room two is completed for dementia short Keyfalls ;A flag that is set for the keys falling short SyndelInsane ;A DoOnce that is set for when Syndel goes insane in room two short RoomTwoDone ;A DoOnce that is set when room two is completed short Vox ;A DoOnce variable for vox short DoOnce ;A DoOnce variable short DoOnce1 ;A DoOnce variable short DoOnce2 ;A DoOnce variable short ExitRoomOne ;A flag that is set to help trigger Syndel exiting chamber one short IdleGo ;A flag that is set to assist in Syndel's pickidle for sifting through the keys short SyndelCrazyTalk ;A flag that is set to help set off Syndel's insanity chatter loop float SyndelChatterTalkLength ;A float that is used for measuring line length in Syndel's insanity chatter loop ;These two blocks are checking the threshold of the orc to see if they die or go crazy after a chamber begin gamemode if ( SyndelInsane == 0 ) if ( SE03A.SyndelMan == 3 ) Set SyndelCrazy to 1 Set SyndelInsane to 1 endif endif ;This handles Syndel's Insanity Chatter loop if ( Player.GetDistance SE03XedilianTriggerC2 < 700 ) if ( SyndelCrazy == 1 ) if ( SyndelCrazyTalk == 1 ) && ( SyndelChatterTalkLength <= -5 ) Set SyndelChatterTalkLength to SESyndelRef.Say SE03SyndelCrazyChatter SESyndelRef.Say SE03SyndelCrazyChatter 1 Set SyndelCrazyTalk to 2 elseif ( SyndelCrazyTalk == 2 ) && ( SyndelChatterTalkLength <= -5 ) Set SyndelCrazyTalk to 1 endif endif endif if ( SyndelCrazyTalk > 0 ) && ( SyndelCrazyTalk < 3 ) Set SyndelChatterTalkLength to SyndelChatterTalkLength - GetSecondsPassed endif ;This kicks of the NPC leaving Chamber One, Dementia if ( RoomOne == 4 ) Set SE03A.OrcRoom1 to ( SE03A.OrcRoom1 + 1 ) Set RoomOne to 5 endif ;This kicks of the NPC leaving Chamber One, Mania if ( SE03ManiaGnarl.StartMeUp == 8 ) && ( RoomOne < 5 ) Set SE03A.OrcRoom1 to ( SE03A.OrcRoom1 + 1 ) Set RoomOne to 5 endif end ;This long series of OnPackage End Blocks is designed to help move the orcs through the dungeon begin OnPackageEnd SE03SyndelChamber1Start if ( RoomOne == 0 ) Set SE03A.PackSyndelGo to 0 Set RoomOne to 1 endif end begin OnPackageEnd SE03SyndelChamber1Done if ( ExitRoomOne == 0 ) if ( GetStage SE03A == 15 ) if ( SE03A.OrcRoom1 == 2 ) Set SE03A.PackSyndelExit to 0 Moveto Chamber2SyndelStarts Set SE03A.DimentiaTrigger to 0 Set SE03A.ManiaTrigger to 0 Set ExitRoomOne to 1 endif endif endif end begin OnPackageEnd SE03SyndelActionChamber1Mania01 if ( DoOnce == 0 ) Set SyndelGo to 1 Evp Set DoOnce to 1 endif end begin OnPackageEnd SE03SyndelActionChamber1Mania02 if ( DoOnce1 == 0 ) Set SyndelGo to 2 Evp Set DoOnce1 to 1 endif end begin OnPackageEnd SE03SyndelActionChamber1Mania03 if ( DoOnce2 == 0 ) Set SyndelGo to 3 Evp Set DoOnce2 to 1 endif end begin OnPackageEnd SE03SyndelChamber2Start if ( GetDead == 0 ) && ( RoomTwo == 0 ) Set SE03A.PackSyndelGo to 0 Set RoomTwo to 1 else Return endif end begin OnPackageEnd SE03SyndelChamber2StartMania if ( IdleGo == 0 ) Set SE03A.Keys to 2 Evp Pickidle Set SE03A.SyndelMan to 3 Set IdleGo to 1 endif end begin OnPackageEnd SE03SyndelActionChamber2Mania01 if ( RoomTwoDone == 0 ) Set SE03A.OrcRoom2 to ( SE03A.OrcRoom2 + 1 ) Set RoomTwoDone to 1 endif end begin OnPackageStart SE03SyndelGoesCrazyDuring PickIdle end begin OnPackageStart SE03SyndelGoesCrazyPost PickIdle end
651SE03TeleporterGateSCRIPTscn SE03TeleporterGateSCRIPT ; Standard gate script from Oblivion, only modification ; is a different message to indicate why the gate will ; not open for the player. ; ; activated by linked child ; activates optionally linked parent after 1 sec delay short init ; do once variable to set up ref's short open ; self-explan short next ; daisy-chain can start when set to 1 short busy ; cannot be activated again while animating float timer ; self-explan ref mySelf ; this gate - the one that does the activating in daisy-chain ref myParent ; target that gets activated in daisy-chain begin onActivate set mySelf to getSelf ; added ref init here to avoid Black Brugo bug set myParent to getParentRef if isActionRef player == 1 if open == 0 message "Gates don't unlock until adventurers have left the chamber." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
652SE03TsaesciBladeScriptscn SE03TsaesciBladeScript ;DawnfangScript related ;DuskfangScript related short Dawnblade ;This is the trigger variable to make the change (sets off the gamemode block) to Dawnfang short Duskblade ;This is the trigger variable to make the change (sets off the gamemode block) to Duskfang short Exchange ;This is a DoOnce variable that is set after the change then reset in the timing blocks short Daytime ;This is a DoOnce variable for the timing block in the daytime mode short Dusktime ;This is a DoOnce variable for the timing block in the evening mode short Test ;This is a DoOnce variable for the original rewarding of the weapon short Reward ;This is a trigger variable for the original rewarding of the weapon from Kiliban in SE03 float fQuestDelayTime begin gamemode ;These blocks determine when the blades will "change form" if ( Daytime == 0 ) if ( Gamehour >= 6 ) && ( Gamehour < 18 ) Set Dusktime to 0 Set Exchange to 0 Set Duskblade to 0 Set Dawnblade to 1 Set Daytime to 1 endif endif if ( Dusktime == 0 ) if ( Gamehour >= 18 ) || ( Gamehour < 6 ) Set Daytime to 0 Set Exchange to 0 Set Dawnblade to 0 Set Duskblade to 1 Set Dusktime to 1 endif endif ;These blocks handle the actual exchange. Because we don't know what type of blade (level) the player will have, we test for all of them. if ( Dawnblade == 1 ) if ( Player.IsInCombat == 0 ) && Player.IsRidingHorse == 0 if ( Exchange == 0 ) if ( Player.GetItemCount SE03Duskfang01 == 1 ) || ( Player.GetItemCount SE03DuskFang01A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang01 1 Player.Removeitem SE03Duskfang01 1 Player.Removeitem SE03Duskfang01A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang01A 1 Player.Removeitem SE03Duskfang01 1 Player.Removeitem SE03Duskfang01A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Duskfang05 == 1 ) || ( Player.GetItemCount SE03DuskFang05A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang05 1 Player.Removeitem SE03Duskfang05 1 Player.Removeitem SE03Duskfang05A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang05A 1 Player.Removeitem SE03Duskfang05 1 Player.Removeitem SE03Duskfang05A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Duskfang10 == 1 ) || ( Player.GetItemCount SE03DuskFang10A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang10 1 Player.Removeitem SE03Duskfang10 1 Player.Removeitem SE03Duskfang10A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang10A 1 Player.Removeitem SE03Duskfang10 1 Player.Removeitem SE03Duskfang10A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Duskfang15 == 1 ) || ( Player.GetItemCount SE03DuskFang15A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang15 1 Player.Removeitem SE03Duskfang15 1 Player.Removeitem SE03Duskfang15A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang15A 1 Player.Removeitem SE03Duskfang15 1 Player.Removeitem SE03Duskfang15A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Duskfang20 == 1 ) || ( Player.GetItemCount SE03DuskFang20A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang20 1 Player.Removeitem SE03Duskfang20 1 Player.Removeitem SE03Duskfang20A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang20A 1 Player.Removeitem SE03Duskfang20 1 Player.Removeitem SE03Duskfang20A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Duskfang25 == 1 ) || ( Player.GetItemCount SE03DuskFang25A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang25 1 Player.Removeitem SE03Duskfang25 1 Player.Removeitem SE03Duskfang25A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang25A 1 Player.Removeitem SE03Duskfang25 1 Player.Removeitem SE03Duskfang25A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Duskfang30 == 1 ) || ( Player.GetItemCount SE03DuskFang30A == 1 ) if ( SESwordDuskfangKills < 12 ) Player.Additem SE03Dawnfang30 1 Player.Removeitem SE03Duskfang30 1 Player.Removeitem SE03Duskfang30A 1 Set Exchange to 1 else Player.Additem SE03Dawnfang30A 1 Player.Removeitem SE03Duskfang30 1 Player.Removeitem SE03Duskfang30A 1 Set Exchange to 1 endif endif endif endif endif if ( Duskblade == 1 ) if ( Player.IsInCombat == 0 ) && Player.IsRidingHorse == 0 if ( Exchange == 0 ) if ( Player.GetItemCount SE03Dawnfang01 == 1 ) || ( Player.GetItemCount SE03Dawnfang01A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang01 1 Player.Removeitem SE03Dawnfang01 1 Player.Removeitem SE03Dawnfang01A 1 Set Exchange to 1 else Player.Additem SE03Duskfang01A 1 Player.Removeitem SE03Dawnfang01 1 Player.Removeitem SE03Dawnfang01A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Dawnfang05 == 1 ) || ( Player.GetItemCount SE03Dawnfang05A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang05 1 Player.Removeitem SE03Dawnfang05 1 Player.Removeitem SE03Dawnfang05A 1 Set Exchange to 1 else Player.Additem SE03Duskfang05A 1 Player.Removeitem SE03Dawnfang05 1 Player.Removeitem SE03Dawnfang05A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Dawnfang10 == 1 ) || ( Player.GetItemCount SE03Dawnfang10A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang10 1 Player.Removeitem SE03Dawnfang10 1 Player.Removeitem SE03Dawnfang10A 1 Set Exchange to 1 else Player.Additem SE03Duskfang10A 1 Player.Removeitem SE03Dawnfang10 1 Player.Removeitem SE03Dawnfang10A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Dawnfang15 == 1 ) || ( Player.GetItemCount SE03Dawnfang15A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang15 1 Player.Removeitem SE03Dawnfang15 1 Player.Removeitem SE03Dawnfang15A 1 Set Exchange to 1 else Player.Additem SE03Duskfang15A 1 Player.Removeitem SE03Dawnfang15 1 Player.Removeitem SE03Dawnfang15A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Dawnfang20 == 1 ) || ( Player.GetItemCount SE03Dawnfang20A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang20 1 Player.Removeitem SE03Dawnfang20 1 Player.Removeitem SE03Dawnfang20A 1 Set Exchange to 1 else Player.Additem SE03Duskfang20A 1 Player.Removeitem SE03Dawnfang20 1 Player.Removeitem SE03Dawnfang20A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Dawnfang25 == 1 ) || ( Player.GetItemCount SE03Dawnfang25A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang25 1 Player.Removeitem SE03Dawnfang25 1 Player.Removeitem SE03Dawnfang25A 1 Set Exchange to 1 else Player.Additem SE03Duskfang25A 1 Player.Removeitem SE03Dawnfang25 1 Player.Removeitem SE03Dawnfang25A 1 Set Exchange to 1 endif elseif ( Player.GetItemCount SE03Dawnfang30 == 1 ) || ( Player.GetItemCount SE03Dawnfang30A == 1 ) if ( SESwordDawnfangKills < 12 ) Player.Additem SE03Duskfang30 1 Player.Removeitem SE03Dawnfang30 1 Player.Removeitem SE03Dawnfang30A 1 Set Exchange to 1 else Player.Additem SE03Duskfang30A 1 Player.Removeitem SE03Dawnfang30 1 Player.Removeitem SE03Dawnfang30A 1 Set Exchange to 1 endif endif endif endif endif end
653SE03WaitingRoomExitTriggerSCRIPTscn SE03WaitingRoomExitTriggerSCRIPT ; Opens the door out of the teleporter area of the waiting room & closes a gate to prevent ; players from going back into Xedilian. So there. short triggered ref mySelf begin onTrigger player if triggered == 0 set triggered to 1 set mySelf to getSelf SE03WaitingRoomExitREF.activate mySelf 1 SE03NothingToSeeHereREF.activate mySelf 1 endif end
654SE03XedilianC1TriggerScriptscn SE03XedilianC1TriggerScript ; Activates linked Parent object once short triggered ref target ref mySelf ;This block is used when a player breaks the trigger zone between the switches in chamber one. It makes the adventurers enter the room automatically by forcing them to change package. begin onTrigger Player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 Set SE03A.PackGromGo to 1 Set SE03A.PackSyndelGo to 1 Set SE03A.PackLewinGo to 1 SEGrommokRef.Evp SESyndelRef.Evp SELewinRef.Evp set triggered to 1 endif end begin onReset set triggered to 0 end
655SE03XedilianC2TriggerScriptscn SE03XedilianC2TriggerScript ; Activates linked Parent object once short triggered ref target ref mySelf ;This block is used when a player breaks the trigger zone between the switches in chamber two. It makes the adventurers enter the room automatically by forcing them to change package. begin onTrigger Player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 Set SE03A.PackGromGo to 1 Set SE03A.PackSyndelGo to 1 SEGrommokRef.Evp SESyndelRef.Evp set triggered to 1 endif end begin onReset set triggered to 0 end
656SE03XedilianC3TriggerScriptscn SE03XedilianC3TriggerScript ; Activates linked Parent object once short triggered ref target ref mySelf ;This block is used when a player breaks the trigger zone between the switches in chamber three. It makes the adventurers enter the room automatically by forcing them to change package. begin onTrigger Player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 Set SE03A.PackGromGo to 1 SEGrommokRef.Evp set triggered to 1 endif end begin onReset set triggered to 0 end
657SE03XedilianGrummiteTriggerScriptscn SE03XedilianGrummiteTriggerScript ; Disables the Grummite leveled lists & considerable chunks ; of geometry, lighting, etc. (during the second half of SE03, to ; speed up the framerate). short triggered begin onTriggerActor if triggered == 0 SE03GrummiteDisposal01REF.Disable SE03GrummiteDisposal02REF.Disable set triggered to 1 endif end begin onReset set triggered to 0 end
658SE03XedilianPCBSCRIPTscn SE03XedilianPCBSCRIPT ; Uses PCB (purge cell buffer) on load to free up more memory for this beast of a dungeon. begin onLoad pcb end
659SE03XedilianVoxTrigger001Scriptscn SE03XedilianVoxTrigger001Script ; Activates linked Parent object once short triggered ref target ref mySelf ;This is for use when the adventurers enter Xedilian and encounter the first room. When Grommok breaks the trigger zone, sets off a say. begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 SEGrommokRef.Say SE03GrommokChamberOneStart 1 set triggered to 1 endif end begin onReset set triggered to 0 end
660SE03XedilianVoxTrigger005Scriptscn SE03XedilianVoxTrigger005Script ; Activates linked Parent object once short triggered ref target ref mySelf ;This is for use when the adventurers enter Xedilian and encounter the first room. When Grommok breaks the trigger zone, sets off a say. begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 SEGrommokRef.Say SE03GrommokChamberTwoStartD 1 set triggered to 1 endif end begin onReset set triggered to 0 end
661SE03XedilianVoxTrigger007Scriptscn SE03XedilianVoxTrigger007Script ; Activates linked Parent object once short triggered ref target ref mySelf ;When Grommok enters chamber three, he says a line. This is accomplished by this script when the trigger zone is broken. begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 SEGrommokRef.Say SE03GrommokChamberThreeStart 1 set triggered to 1 endif end begin onReset set triggered to 0 end
662SE04ExitScriptscn SE04ExitScript ;If I point a QT at Thadon while in XPDunrootBurrow05, even after unlocking the door ;in stage 60, it routes the player all the way through the dungeon again ;So we point to this door instead, then update a blank journal stage to 65 ;Then the QT points to Thadon with a condition of Stage = 65 Begin OnActivate if getStage SE04 == 60 setStage SE04 65 endif activate End
663SE06DarkSeducerSCRIPTscn SE06DarkSeducerSCRIPT short hatePlayer ; set to 1 after player hits them during battle (when allied with other side) ref combatRef begin OnHit player ; when the player hits me, all dark seducers hate the player (if allied to other side) if getstage SE06 >= 100 && getstagedone SE06 80 == 1 player.setfactionrank SE06GoldenSaintFaction 0 set hatePlayer to 1 endif end begin OnDeath ; count seducers killed set SE06.DeadSeducers to SE06.DeadSeducers + 1 ; all dead? if SE06.DeadSeducers >= SE06.TotalSeducers && getstage SE06 < 150 setstage SE06 140 endif end begin OnStartCombat ; scripted "start combat" voice if fighting golden saints set combatRef to GetCombatTarget if combatRef.getInFaction SE06GoldenSaintFaction == 1 if getRandomPercent <= 20 sayTo combatRef SE06ShoutStartCombat endif endif end
664SE06DarkSeducerWardenSCRIPTscn SE06DarkSeducerWardenSCRIPT begin OnPackageDone SE06DSWardenUnlockMainDoor ; unlock the door permanently SE06DoorExteriorToMainPassageRef.unlock 1 ; open it, and make it default to open SE06DoorExteriorToMainPassageRef.setopenstate 1 SE06DoorExteriorToMainPassageRef.setDoorDefaultOpen 1 end begin OnDeath if getstage SE06 > 5 ; count seducers killed set SE06.DeadSeducers to SE06.DeadSeducers + 1 ; all dead? if SE06.DeadSeducers >= SE06.TotalSeducers && getstage SE06 < 150 setstage SE06 140 endif endif end
665SE06FlameDementiaScriptscn SE06FlameDementiaScript short FlameOn float timer ; animating flame at Altar of Despair begin gameMode ; triggered by SEUlfri/SEKanah script when they reach suicide location if ( FlameOn == 1 ) playgroup equip 0 set FlameOn to 2 elseif ( FlameOn == 2 ) && ( IsAnimPlaying == 0 ) playgroup forward 0 set FlameOn to 3 set timer to 2 endif if FlameOn >= 3 && FlameOn < 5 if timer > 0 set timer to timer - GetSecondsPassed else if FlameOn == 3 ; turn on ambient sound SE06DespairFireSound.enable set FlameOn to 4 set timer to 3 elseif FlameOn == 4 set FlameOn to 5 if getStageDone SE06 130 == 1 ; DS victory setstage SE06 175 else ; GS victory setstage SE06 170 endif endif endif endif end
666SE06FlameEffectScriptscn SE06FlameEffectScript float timer ; Flame effect for SE06FlameOfAgnonSpell begin ScriptEffectStart pms SE06FlameOfAgnonEffect end begin ScriptEffectUpdate ; make sure flame effect continues playing even after fast travel ; every few seconds, restart flame effect if timer > 0 set timer to timer - ScriptEffectElapsedSeconds else sms SE06FlameOfAgnonEffect pms SE06FlameOfAgnonEffect set timer to 5 endif end begin ScriptEffectFinish sms SE06FlameOfAgnonEffect end
667SE06FlameOfAgnonSCRIPTscn SE06FlameOfAgnonSCRIPT float fireTimer ; timer for journal popup short activated ; 1 = activated (no triggering), reset to 0 when fireTimer runs out begin onTrigger Player if activated == 0 ; give player the Flame spell player.addspell SE06FlameOfAgnonSpell set activated to 1 set fireTimer to 4 ; timer to delay retriggering endif end begin gameMode ; trigger journal when player approaches if getstage SE06 == 8 if SE06CylarnJournalMarkerREF.getdistance player < 500 setstage SE06 9 endif endif if activated == 1 if fireTimer > 0 set fireTimer to fireTimer - getSecondsPassed else setstage se06 190 set activated to 2 endif endif end
668SE06GoldenSaintSCRIPTscn SE06GoldenSaintSCRIPT short hatePlayer ; set to 1 after player hits them during battle (when allied with other side) ref combatRef begin OnHit player ; when the player hits me, all golden saints hate the player (if allied to other side) if getstage SE06 >= 100 && getstagedone SE06 90 == 1 player.setfactionrank SE06DarkSeducerFaction 0 set hatePlayer to 1 endif end begin OnDeath ; count saints killed set SE06.DeadSaints to SE06.DeadSaints + 1 ; all dead? if SE06.DeadSaints >= SE06.TotalSaints && getstage SE06 < 150 setstage SE06 130 endif end begin OnStartCombat ; scripted "start combat" voice when fighting seducers set combatRef to GetCombatTarget if combatRef.getInFaction SE06DarkSeducerFaction == 1 if getRandomPercent <= 20 sayTo combatRef SE06ShoutStartCombat endif endif end
669SE06GoldenSaintWardenSCRIPTscn SE06GoldenSaintWardenSCRIPT begin OnPackageDone SE06GSWardenUnlockMainDoor ; unlock the door permanently SE06DoorExteriorToRaptureRef.unlock 1 ; open it, and make it default to open SE06DoorExteriorToRaptureRef.setopenstate 1 SE06DoorExteriorToRaptureRef.setDoorDefaultOpen 1 end begin OnDeath if getstage SE06 > 5 ; count saints killed set SE06.DeadSaints to SE06.DeadSaints + 1 ; all dead? if SE06.DeadSaints >= SE06.TotalSaints && getstage SE06 < 150 setstage SE06 130 endif endif end
670SE06GreatFlameDementiaSCRIPTscn SE06GreatFlameDementiaSCRIPT short activated ; 1 = activated (no more triggering) float timer begin onTrigger Player if activated == 0 set activated to 1 set timer to 5 ; if player has Flame spell, light this flame if player.isSpellTarget SE06FlameOfAgnonSpell == 1 set timer to 4 SE06FlameDementiaSacellumREF.enable player.removespell SE06FlameOfAgnonSpell if getstage SE13 < 100 DisablePlayerControls SESheogorathRef.SetGhost 0 SESheogorathRef.SetDestroyed 0 SESheogorathRef.SAA 1 endif elseif SE06FlameDementiaSacellumREF.GetDisabled == 0 ; dementia flame is lit -- disable and light player on fire if he is Sheogorath if getstage SE13 >= 100 SE06FlameDementiaSacellumREF.disable player.dispel SE14GreatTorchDementiaSpell player.dispel SE14GreatTorchManiaSpell cast SE14GreatTorchDementiaSpell player player.addspell SE06FlameOfAgnonSpell set timer to 5 endif endif endif end begin gamemode ; run timer to avoid repeated reactivation if timer > 0 set timer to timer - getSecondsPassed elseif activated == 1 set activated to 0 ; update journal setstage SE06 200 endif end ; swaps out Mania/Dementia clutter after SE06 is done begin OnLoad if getStage SE06 >= 200 NormalStateLighting.enable If SE06FlameManiaSacellumREF.GetDisabled == 0 ; I'm disabled, so turn on Mania clutter DementiaControlledClutter.Disable ManiaControlledClutter.Enable Elseif SE06FlameDementiaSacellumREF.GetDisabled == 0 DementiaControlledClutter.Enable ManiaControlledClutter.Disable Endif endif end
671SE06GreatFlameManiaSCRIPTscn SE06GreatFlameManiaSCRIPT short activated ; 1 = activated (no more triggering) float timer begin onTrigger Player if activated == 0 set activated to 1 set timer to 5 ; if player has Flame spell, light this flame if player.isSpellTarget SE06FlameOfAgnonSpell == 1 set timer to 4 SE06FlameManiaSacellumREF.enable player.removespell SE06FlameOfAgnonSpell if getstage SE13 < 100 DisablePlayerControls SESheogorathRef.SetGhost 0 SESheogorathRef.SetDestroyed 0 SESheogorathRef.SAA 1 endif elseif SE06FlameManiaSacellumREF.GetDisabled == 0 ; mania flame is lit -- disable and light player on fire if he is Sheogorath if getstage SE13 >= 100 SE06FlameManiaSacellumREF.disable player.dispel SE14GreatTorchDementiaSpell player.dispel SE14GreatTorchManiaSpell cast SE14GreatTorchManiaSpell player player.addspell SE06FlameOfAgnonSpell set timer to 5 endif endif endif end begin gamemode ; run timer to avoid repeated reactivation if timer > 0 set timer to timer - getSecondsPassed elseif activated == 1 set activated to 0 ; update journal setstage SE06 200 endif end
672SE06GreatFlameSCRIPTscn SE06GreatFlameSCRIPT short activated ; 1 = activated (no more triggering) begin onTrigger Player if activated == 0 ; if player has Flame spell, light this flame if player.isSpellTarget SE06FlameOfAgnonSpell == 1 set activated to 1 ; update journal setstage SE06 200 endif endif end
673SE06PortcullisSCRIPTscn SE06PortcullisSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay ; allows "force close" or "force open" through the defaultState variable short defaultState ; state it will start out in: 0 = closed, 1 = open short forceDefaultState ; set to 1 to force the gate to its default state (cleared after it triggers) short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 ; messagebox "TEMP: gate activated remotely" if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 || forceDefaultState == 1 ; messagebox "TEMP: forceDefaultState=%.0f", forceDefaultState ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points if defaultState == 0 ; close the gate if open == 1 playgroup backward 0 endif set open to 0 disableLinkedPathPoints else ; open the gate if open == 0 playgroup forward 0 endif set open to 1 enableLinkedPathPoints endif set init to 1 set forceDefaultState to 0 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set busy to 0 set next to 0 disableLinkedPathPoints end
674SE06RuinsGateClosedSCRIPTscn SE06RuinsGateClosedSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay ; allows "force close" or "force open" through the defaultState variable short defaultState ; state it will start out in: 0 = closed, 1 = open short forceDefaultState ; set to 1 to force the gate to its default state (cleared after it triggers) short init short open short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 ; messagebox "TEMP: gate activated remotely" if open == 0 playgroup forward 1 set open to 1 enableLinkedPathPoints else playgroup backward 1 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 ; special cases for specific gates if getIsReference SE06NewLockedGate01REF == 1 if getstagedone SE06Battle 5 == 1 setstage SE06Battle 28 endif endif endif end begin gameMode if init == 0 || forceDefaultState == 1 ; messagebox "TEMP: forceDefaultState=%.0f", forceDefaultState ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points if defaultState == 0 ; close the gate if open == 1 playgroup backward 1 endif set open to 0 disableLinkedPathPoints else ; open the gate if open == 0 playgroup forward 1 endif set open to 1 enableLinkedPathPoints endif set init to 1 set forceDefaultState to 0 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 0 set busy to 0 set next to 0 disableLinkedPathPoints end
675SE06RuinsGateOpenSCRIPTscn SE06RuinsGateOpenSCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay ; allows "force close" or "force open" through the defaultState variable short defaultState ; state it will start out in: 0 = closed, 1 = open short forceDefaultState ; set to 1 to force the gate to its default state (cleared after it triggers) short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 ; messagebox "TEMP: gate activated remotely" if open == 0 playgroup forward 1 set open to 1 enableLinkedPathPoints else playgroup backward 1 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 || forceDefaultState == 1 ; messagebox "TEMP: forceDefaultState=%.0f", forceDefaultState ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points if defaultState == 0 ; close the gate if open == 1 playgroup backward 1 endif set open to 0 disableLinkedPathPoints else ; open the gate if open == 0 playgroup forward 1 endif set open to 1 enableLinkedPathPoints endif set init to 1 set forceDefaultState to 0 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end begin onReset reset3DState set open to 1 set busy to 0 set next to 0 enableLinkedPathPoints end
676SE06ScalonMGSwitchSCRIPTscn SE06ScalonMGSwitchSCRIPT ; Disables / Enables the target boxes controlling the Scalon machine gun trap in XPCylarne01 short busy short stage float timer ref mySelf begin onActivate ; animate the switch, trigger the trap if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode ; trigger the trap if stage == 1 && timer <= 3 set mySelf to getSelf SE06ScalonMGTriggerREF.activate mySelf 1 set stage to 2 endif ; animate button if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif ; reset button -- can now be pressed again if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
677SE06ScalonMGTriggerSCRIPTscn SE06ScalonMGTriggerSCRIPT ; Fires the two facing Scalon statues in XPCylarne02; once triggered, statues will continue to fire until turned off ; Can be turned off by linked switch in next room & is ON by default short triggered ; set to 1 when triggered by someone entering trigger zone short active ; set to 1 when trap is active ref mySelf ref myTrigger float timer begin onActivate ; when activated by button, toggle state (turn on or off) if active == 1 set active to 0 ; turn off automated firing scalon traps set SE06ScalonMG01REF.automate to 0 set SE06ScalonMG02REF.automate to 0 else set active to 1 ; turn on automated firing scalon traps set SE06ScalonMG01REF.automate to 5 ; 5 shots in initial volley set SE06ScalonMG01REF.fireRate to 5 ; every 5 seconds set SE06ScalonMG02REF.automate to 5 ; ditto set SE06ScalonMG02REF.fireRate to 5 endif end begin onTriggerActor if triggered == 0 && active == 1 set mySelf to getSelf set myTrigger to GetActionRef ; don't fire spells at Dark Seducers if myTrigger.GetInFaction SE06DarkSeducerFaction == 0 if SE06ScalonMG01REF.automate == 0 set active to 1 set SE06ScalonMG01REF.automate to 5 ; 5 shots set SE06ScalonMG01REF.fireRate to 5 ; shoot every 5 seconds set SE06ScalonMG01REF.timer to 5 ; start timer SE06ScalonMG01REF.activate mySelf 1 ; tell it to go set SE06ScalonMG02REF.automate to 5 ; 5 shots set SE06ScalonMG02REF.fireRate to 5 ; shoot every 5 seconds set SE06ScalonMG02REF.timer to 5 ; start timer SE06ScalonMG02REF.activate mySelf 1 ; tell it to go endif endif set triggered to 1 ; I've been triggered set timer to 5.5 ; don't check again for a few seconds endif end begin gameMode ; reset triggered state after timer expires if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
678SE06SCRIPTscn SE06SCRIPT ; Actors ; SEUlfri - Dark Seducer commander ; SEKaneh - Golden Saint commander ; SEMirel - Golden Saint lieutenant ; SE06GoldenSaintWardenSCRIPT -- script on GS warden, used to trigger them to unlock the door ; SE06DarkSeducerWardenSCRIPT -- script on DS warden, used to trigger them to unlock the door ; Objects used by scripts ; SE06DoorSidePassageToDespair - script sets PlayerScout variable ; SE06FlameOfAgnon - script on flame which lights player on fire when he walks into it ; SE06FlameEffectScript - magic effect script, puts shader on player when on fire ; SE06TrigZoneAltarScoutSCRIPT -- script on trigger zones, used to set PlayerScout variables int DSDeployment ; 0 = main passage, 1 = side passage int GSDeployment ; 0 = main passage, 1 = side passage int PlayerScout ; 1 = player has scouted Dark Seducer position (i.e. is aware of which passage they are defending) -- set when both PlayerScoutMain and PlayerScountSide are 1 int convStage ; used to track conversation stage int ManiaSolution ; 1 = player solved this quest in a "Mania" way; 0 = Dementia solution int LastStage ; set by quest stages to the _last_ stage set (for middle part). Helps quest targets work right with multiple paths. int TotalSaints ; how many saints to kill before victory -- initialized in stage 5 int TotalSeducers ; how many seducers to kill before victory - init in stage 5 int DeadSaints ; count number killed int DeadSeducers ; count number killed float timer ; timer for speeches float fQuestDelayTime ; Makes the script run more frequently than every 5 seconds short maniagateVAR ;handles opening one of the two gates for the sacellum short dementiagateVAR short SheoMove ;handles moving Sheogorath to the Sacellum when flame is ignited short SheoIntroVAR ;handles Sheo's intro speech int resetAggression ; set to 1 when GS aggro set to 0 ; set to 2 when GS aggro set back to 10 begin gamemode if timer > 0 set timer to timer - getSecondsPassed else ; trigger certain events: ; Ulfri's speech done if getstagedone SE06 70 == 1 && getstagedone SE06 71 == 0 setstage SE06 71 endif ; Kaneh's speech done if getstagedone SE06 50 == 1 && getstagedone SE06 51 == 0 setstage SE06 51 endif ; ***************************************************************************** ; try to get Saints to progress past the first ambush room in side passage ; set aggression back if it got set to 0 if resetAggression == 1 SE06GoldenSaint01REF.setav aggression 10 SE06GoldenSaint02REF.setav aggression 10 SE06GoldenSaint03REF.setav aggression 10 SE06GoldenSaint04REF.setav aggression 10 set resetAggression to 2 endif if getStage SE06Battle >= 100 && getStage SE06Battle < 120 if resetAggression == 0 ; pick 4 saints and set aggression to 0, stopcombat to get them to go SE06GoldenSaint01REF.setav aggression 0 SE06GoldenSaint02REF.setav aggression 0 SE06GoldenSaint03REF.setav aggression 0 SE06GoldenSaint04REF.setav aggression 0 SE06GoldenSaint01REF.stopcombat SE06GoldenSaint02REF.stopcombat SE06GoldenSaint03REF.stopcombat SE06GoldenSaint04REF.stopcombat set resetAggression to 1 set timer to 60 endif endif ; ***************************************************************************** endif ; trigger conversation between Kaneh and Mirel if convStage == 0 ; quest is started, haven't agreed to help either side yet if getstage SE06 > 0 && getstagedone SE06 50 == 0 && getstagedone SE06 70 == 0 && getstagedone SE06 35 == 0 && getstagedone SE06 30 == 0 if player.getdistance SEKanehRef < 1100 && player.getdistance SEMirelRef < 1100 SEMirelRef.startconversation SEKanehRef SE06KanehMirel endif endif endif ; trigger battle stages if getstage SE06 == 100 if GSDeployment == 0 ; main passage attack if SEKanehRef.getincell XPCylarne01 == 1 && ( SEKanehRef.getdistance player < 750 || getstagedone SE06 70 == 1 ) setstage SE06Battle 5 endif else ; side passage attack if SEKanehRef.getincell XPCylarne02 == 1 && SEKanehRef.getdistance player < 750 setstage SE06Battle 100 endif endif endif ;open gates in sacellum if ( maniagateVAR == 1 ) SE06TorchGateManiaRef.playgroup forward 1 set maniagateVAR to 2 endif if ( dementiagateVAR == 1 ) SE06TorchGateDementiaRef.playgroup forward 1 set dementiagateVAR to 2 endif end
679SE06TorchGateSCRIPTscn SE06TorchGateSCRIPT ; close and lock onload, after player has lit torch begin OnLoad if getstage SE06 < 190 || getstage SE06 >= 200 setopenstate 0 lock 100 endif ; if player has become Sheogorath, unlock if getstage SE13 >= 100 unlock endif end
680SE06TRIGGEStatueTrap02ResetSCRIPTscn SE06TRIGGEStatueTrap02ResetSCRIPT ; Activates linked Hunger Statue traps ; 5 second reset timer short active ; set to 1 to turn trap on short triggered ref mySelf float timer ref myTrigger ; when activated (by switch), flip active state begin OnActivate if IsActionRef player == 0 if active == 0 set active to 1 ; turn on automated hunger cannons set SE06HungerCannon04REF.automate to 3 ; shoot 3 times set SE06HungerCannon04REF.fireRate to 3 ; every 3 seconds set SE06HungerCannon06REF.automate to 3 ; ditto set SE06HungerCannon06REF.fireRate to 3.5 else set active to 0 set SE06HungerCannon04REF.automate to 0 ; turn off cannons set SE06HungerCannon06REF.automate to 0 endif endif end begin onTriggerActor if triggered == 0 set mySelf to getSelf set myTrigger to GetActionRef ; don't fire spells at Dark Seducers if myTrigger.GetInFaction SE06DarkSeducerFaction == 0 && active == 1 ; only shoot cannon05 once per trigger SE06HungerCannon05REF.activate mySelf 1 ; other cannons have auto-fire if SE06HungerCannon04REF.automate == 0 set SE06HungerCannon04REF.automate to 3 ; volley of 3 shots set SE06HungerCannon04REF.fireRate to 3 ; every 3 seconds set SE06HungerCannon04REF.timer to 3 ; turn on timer SE06HungerCannon04REF.activate mySelf 1 ; tell it to start set SE06HungerCannon06REF.automate to 3 ; volley of 3 shots set SE06HungerCannon06REF.fireRate to 3.5 ; every 3.5 seconds (to stagger shots) set SE06HungerCannon06REF.timer to 3.5 ; turn on timer SE06HungerCannon06REF.activate mySelf 1 ; tell it to start endif set timer to 5 else set timer to 2 ; check again sooner if not triggered for real endif set triggered to 1 endif end begin gameMode ; reset triggered state if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
681SE06TRIGGEStatueTrap03ResetSCRIPTscn SE06TRIGGEStatueTrap03ResetSCRIPT ; Tells specific dark seducer to hit button to trigger trap ; 5 second reset timer short triggered ref mySelf float timer ref myTrigger begin onTriggerActor if triggered == 0 set mySelf to getSelf set myTrigger to GetActionRef ; don't trigger on Dark Seducers if myTrigger.GetInFaction SE06DarkSeducerFaction == 0 && IsActionRef player == 0 ; trigger NPC alive, nearby, not already triggering if SE06DarkSeducerMeleeRedeploy01Ref.getdead == 0 && getdistance SE06DarkSeducerMeleeRedeploy01Ref < 1200 && SE06DarkSeducerMeleeRedeploy01Ref.getiscurrentpackage SE06DSTriggerTrapA == 0 ; drop NPC out of combat, tell him to activate trap button SE06DarkSeducerMeleeRedeploy01Ref.stopcombat SE06DarkSeducerMeleeRedeploy01Ref.addscriptpackage SE06DSTriggerTrapA endif set timer to 5 else set timer to 2 ; if not triggered for real, check again soon endif set triggered to 1 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
682SE06TRIGGEStatueTrap04ResetSCRIPTscn SE06TRIGGEStatueTrap04ResetSCRIPT ; Activates linked Hunger Statue traps ; 8 second reset timer short active ; set to 1 to turn trap on short triggered ref mySelf float timer ref myTrigger ; when activated (by switch), flip active state begin OnActivate if IsActionRef player == 0 if active == 0 set active to 1 ; set traps to auto-fire volley of 3 shots set SE06ExtraScalon01REF.automate to 3 set SE06ExtraScalon01REF.fireRate to 3 set SE06ExtraScalon02REF.automate to 3 set SE06ExtraScalon02REF.fireRate to 3 else set active to 0 ; turn off trap auto-fire set SE06ExtraScalon01REF.automate to 0 set SE06ExtraScalon02REF.automate to 0 endif endif end begin onTriggerActor if triggered == 0 set mySelf to getSelf set myTrigger to GetActionRef ; don't fire spells at Dark Seducers if myTrigger.GetInFaction SE06DarkSeducerFaction == 0 && active == 1 ; turn on auto-fire if SE06ExtraScalon01REF.automate == 0 ; tell trap 1 to fire set SE06ExtraScalon01REF.automate to 3 ; volley of 3 shots set SE06ExtraScalon01REF.fireRate to 3 set SE06ExtraScalon01REF.timer to 3 SE06ExtraScalon01REF.activate mySelf 1 ; tell trap 2 to fire set SE06ExtraScalon02REF.automate to 3 ; volley of 3 shots set SE06ExtraScalon02REF.fireRate to 3 set SE06ExtraScalon02REF.timer to 3 SE06ExtraScalon02REF.activate mySelf 1 endif set timer to 8 else set timer to 2 ; if not triggered for real, check again sooner endif set triggered to 1 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
683SE06TRIGGEStatueTrap05ResetSCRIPTscn SE06TRIGGEStatueTrap05ResetSCRIPT ; Activates linked Parent object once short triggered short active ref mySelf ref myTrigger begin onTriggerActor if triggered == 0 set myTrigger to GetActionRef ; don't fire spells at Dark Seducers if myTrigger.GetInFaction SE06DarkSeducerFaction == 0 && active == 1 set mySelf to getSelf SE06ExtraColumnTrapREF.activate mySelf 1 set triggered to 1 endif endif end
684SE06TrigZoneAltarScoutSCRIPTscn SE06TrigZoneAltarScoutSCRIPT ; sets PlayerScout variable when player triggers short triggered ref target ref mySelf begin onTrigger player if triggered == 0 set triggered to 1 ; use a single script for all "scout" triggers if getincell XPCylarne01 == 1 ; main passage setstage SE06 38 elseif getincell XPCylarne02 == 1 ; side passage setstage SE06 37 endif endif end
685SE06TrigZoneGoldenSaintsReachAltarSCRIPTscn SE06TrigZoneGoldenSaintsReachAltarSCRIPT short triggered ref target begin onTriggerActor if triggered == 0 set target to getActionRef ; if golden saint activates it under right circumstances, setstage to trigger Dark Seducers to try to retake the altar if target.GetInFaction SE06GoldenSaintFaction == 1 if getstage SE06 >= 100 && getstage SE06 < 130 setstage SE06Battle 200 set triggered to 1 endif endif endif end
686SE06TrigZoneGSEnablePathgridSCRIPTscn SE06TrigZoneGSEnablePathgridSCRIPT ; this script enables linked path points when a Golden Saint triggers it short init ; set to 1 when initialized short triggered ; set to 1 when triggered ref target ; who triggered me? begin OnLoad if init == 0 && getstage SE06 >= 100 && getstage SE06 < 130 ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif end begin onTriggerActor if triggered == 0 set target to getActionRef ; if golden saint activates it under right circumstances, setstage to trigger Dark Seducers to try to retake the altar if target.GetInFaction SE06GoldenSaintFaction == 1 if getstage SE06 >= 100 && getstage SE06 < 130 enablelinkedPathPoints set triggered to 1 ; special cases if getincell XPCylarne01 == 1 && getstagedone SE06Battle 5 == 1 ; main passage battle: if getstagedone SE06Battle 20 == 0 setstage SE06Battle 20 ; Golden Saints past first ambush room ; if player is helping seducers, enable all pathpoints if getstagedone SE06 90 == 1 SE06PathgridTrigger01B.enablelinkedpathpoints endif elseif getstagedone SE06Battle 50 == 0 setstage SE06Battle 30 ; just to be sure setstage SE06Battle 50 ; Golden Saints past trap room endif ; golden saints reach altar if getIsReference SE06PathgridTrigger01C setstage SE06Battle 90 endif elseif getincell XPCylarne02 == 1 && getstagedone SE06Battle 100 == 1 ; side passage battle if getIsReference SE06PathgridTrigger02A SE06DarkSeducerMeleeRedeploy01Ref.setav aggression 10 setstage SE06Battle 120 ; Golden Saints past first ambush zone elseif getIsReference SE06PathgridTrigger02B setstage SE06Battle 150 ; Golden Saints past second ambush zone elseif getIsReference SE06PathgridTrigger02C setstage SE06Battle 170 ; Golden Saints past second ambush zone elseif getIsReference SE06PathgridTrigger02D || getIsReference SE06PathgridTrigger02E setstage SE06Battle 190 ; Golden Saints reach end of side passage elseif getIsReference SE06PathgridTrigger02TrapA ; get Dark Seducer ready to spring trap on Saints SE06DarkSeducerMeleeRedeploy01Ref.setav aggression 0 endif endif endif endif endif end
687SE07ADarkSeducerEliteQuartersGuard01Scriptscn SE07ADarkSeducerEliteQuartersGuard01Script ;This script is used for the Guard Patrol outside of Syl's Private Bedchambers ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat begin OnPackageEnd SE07ADSEliteGuard01Patrol01 Set SE07A.Guard01Go to 1 Evp end begin OnPackageEnd SE07ADSEliteGuard01Patrol02 Set SE07A.Guard01Go to 2 Evp end begin OnPackageEnd SE07ADSEliteGuard01Patrol03 Set SE07A.Guard01Go to 3 Evp end begin OnPackageEnd SE07ADSEliteGuard01PatrolEnd Set SE07A.Guard02Go to 0 Evp end
688SE07ADarkSeducerEliteQuartersGuard02Scriptscn SE07ADarkSeducerEliteQuartersGuard02Script ;This script is used for the Guard Patrol outside of Syl's Private Bedchambers ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat begin OnPackageEnd SE07ADSEliteGuard02Patrol01 Set SE07A.Guard02Go to 1 Evp end begin OnPackageEnd SE07ADSEliteGuard02Patrol02 Set SE07A.Guard02Go to 2 Evp end begin OnPackageEnd SE07ADSEliteGuard02Patrol03 Set SE07A.Guard02Go to 3 Evp end begin OnPackageEnd SE07ADSEliteGuard02PatrolEnd Set SE07A.Guard02Go to 0 Evp end
689SE07AltarScriptscn SE07AltarScript ;This handles bringing back either Syl's Heart or Thadon's Blood, and triggering appropriate effects including Ambush packages for Priests float DayofLastUse short HeartPlaying short BloodPlaying short FXplay ;This states that when the heart is removed, to command Arctus or Dervenin to ambush the player ;It also EVP's the priests so that they will move at the same time begin OnActivate if ( IsActionRef Player == 1 ) if ( GetStage SE07A >= 35 ) && ( GetStage SE07A < 200 ) && ( SE07A.ArctusMove < 1 ) && ( FXplay == 0) set HeartPlaying to 1 set FXplay to 1 ;pms effectOpen ;Player.RemoveItem SE07SylHeart 1 ;Set SE07A.ArctusMove to 1 ;SEArctusRef.Evp elseif ( GetStage SE07B >= 45 ) && ( GetStage SE07B < 200 ) && ( SE07B.DerveninMove < 1 ) && (FXplay == 0) set BloodPlaying to 1 set FXplay to 1 ;pms effectOpen ;Player.RemoveItem SE07ThadonBlood 1 ;Set SE07B.DerveninMove to 1 ;SEDerveninRef.Evp else if FXplay != 1 ; Don't bless while running SE07 effects if GameDaysPassed == DayofLastUse ; No blessing if you got one today MessageBox "You've already received your blessing this day." else Cast SE07SacellumAltarBlessing Player ; cast the blessing spell on the player MessageBox "You receive the blessing of Arden-Sul" Set DayofLastUse to GameDaysPassed ; record the day so it can be tested the next time the altar is activated. endif endif endif endif end begin GameMode if FXplay == 1 if HeartPlaying == 1 Player.RemoveItem SE07SylHeart 1 playgroup backward 1 set Heartplaying to 2 elseif BloodPlaying == 1 Player.RemoveItem SE07ThadonBlood 1 playgroup forward 1 set BloodPlaying to 2 endif if HeartPlaying == 2 && IsAnimPlaying == 0 Set SE07A.ArctusMove to 1 SEArctusRef.Evp set HeartPlaying to 3 set FXplay to 2 elseif BloodPlaying == 2 && IsAnimPlaying == 0 Set SE07B.DerveninMove to 1 SEDerveninRef.Evp set BloodPlaying to 3 set FXplay to 2 endif endif end
690SE07AScriptscn SE07AScript ;Actors ;SESyl - Syl is the target of this branch of the quest. She will be pretty much gone from the beginning until the battle at the end. ;SEKithlan - Syl's courtier ;SEAnyaHerrick - Syl's courtier ;SESE07ADarkSeducerEliteBodyguard - The two bodyguards that appear with Syl at the end. ;SE07ADarkSeducerEliteChambersGuard01 - A Seducer that patrols her private chambers. ;SE07ADarkSeducerEliteChambersGuard02 - A Seducer that patrols her private chambers. ;SE07ADarkSeducerEliteQuartersGuard01 - A Seducer that patrols her private gardens. ;SE07ADarkSeducerEliteQuartersGuard02 - A Seducer that patrols her private gardens. ;SE07ASESylDouble - This NPC is only encountered dead and looks like a duplicate of Syl (to throw off player). ;Objects ;SE07SylHeart - This misc item comes from Syl's death. It is the item needed to finish SE07A. ;SE07DementiaKey - Key carried by Syl, Anya Herrick and Kithlan. It is given to player by Kithlan if dispo high enough. ;SE07AltarDementia - The activator is used to complete the quest ;SE07TrophyHeart - The trophy for completing SE07A that appears in the Palace of Sheogorath short DoOnce ;DoOnce variable short DoOnce1 ;DoOnce variable short DoOnce2 ;DoOnce variable short DoOnce3 ;DoOnce variable short DoOnce4 ;DoOnce variable short DoOnce5 ;DoOnce variable short Seducers ;DoOnce variable short CourtTalk ;Assists with the journal selection when speaking in no particular order short AnyaTold ;Assists with the journal selection when speaking in no particular order short AlasonTold ;Assists with the journal selection when speaking in no particular order short AlasonMove ;For triggering an Ambush package on Kithlan and moving her to door of Syl's Chambers short ArctusMove ;For triggering an Ambush package on Arctus short ThadonMove ;For triggering an Ambush package on Thadon short ThadonLeaves ;For triggering a gamemode block that makes Thadon vanish short Convo ;Variable to track a back and forth conversation short Guard01Go ;Variable for making Guard01's Patrol work short Guard02Go ;Variable for making Guard02's Patrol work short MiniTalk ;Variable used for the last 2 lines of the endgame speech between Thadon and Sheogorath (to get them to run) float fQuestDelayTime ; Makes the script run more frequently than every 5 seconds float MiniTalkTimer ;A float variable used to measure the line length for the Says in the endgame speech between Thadon and Sheo float DelayTimer ;A float variable used to measure a tiny delay needed in endgame speech between weapons drawn and last 2 lines of it begin gamemode ;This covers no particular order in which you speak to Syl's Court if ( CourtTalk == 1 ) && ( DoOnce == 0 ) SetStage SE07A 15 Set DoOnce to 1 endif if ( CourtTalk == 2 ) && ( DoOnce1 == 0 ) SetStage SE07A 20 Set DoOnce1 to 1 endif ;This triggers the journal when the player enters Syl's chambers if ( GetStage SE07A >= 10 ) && ( DoOnce2 == 0 ) if ( Player.GetDistance SE07AAlasonMarker <= 200 ) SetStage SE07A 22 Set DoOnce2 to 1 endif endif ;This makes 2 Dark Seducers inside Syl's bedroom go away if the player tipped off Anya if ( GetStage SE07A >= 22 ) && ( Seducers == 0 ) if ( AnyaTold == 2 ) SE07ADSEliteInQuartersG01.Disable SE07ADSEliteInQuartersG02.Disable set Seducers to 1 endif endif ;This makes Kithlan appear in Syl's Quarters when finally getting near Syl's bed in her Palace if ( GetStage SE07A >= 22 ) && ( DoOnce3 == 0 ) if ( Player.GetDistance SE07ASylBed <= 512 ) && Player.IsInCombat == 0 Set AlasonMove to 1 SEKithlanRef.Moveto SE07AAlasonMarker Set DoOnce3 to 1 endif endif ;This is a proximity trigger for Stage 28 if ( GetStage SE07A >= 25 ) && ( GetStage SE07A < 28 ) if ( Player.GetDistance SE07DementiaSecretDoorRef <= 300 ) SetStage SE07A 28 endif endif ;This makes the Saints flanking Thadon and the Seducers flanking Sheo draw weapons at the right point in the endgame conversation if ( DoOnce5 == 0 ) if ( SE07A.Convo == 11 ) SE07SaintEnd01Ref.SetAlert 1 SE07SaintEnd02Ref.SetAlert 1 SE07EndSeducer01Ref.SetAlert 1 SE07EndSeducer02Ref.SetAlert 1 Set DelayTimer to 1 Set DoOnce5 to 1 endif endif if ( DoOnce5 == 1 ) if ( DelayTimer > 0 ) Set DelayTimer to ( DelayTimer - GetSecondsPassed ) else Set DoOnce5 to 2 endif endif if ( DoOnce5 == 2 ) if ( MiniTalk == 0 ) && ( MiniTalkTimer == 0 ) Set MiniTalkTimer to SESheogorathRef.Say SE07AThadonLeaves SESheogorathRef.SayTo SEThadonRef SE07AThadonLeaves Set Convo to 12 Set MiniTalk to 1 elseif ( MiniTalk == 1 ) && ( MiniTalkTimer <= 0 ) Set MiniTalkTimer to SEThadonRef.Say SE07AThadonLeaves SESheogorathRef.Look SEThadonRef SEThadonRef.SayTo SESheogorathRef SE07AThadonLeaves Set MiniTalk to 2 elseif ( MiniTalk == 2 ) && ( MiniTalkTimer <= 0 ) Set SE07A.ThadonLeaves to 1 SE07SaintEnd01Ref.SetAlert 0 SE07SaintEnd02Ref.SetAlert 0 SESheogorathRef.StopLook SEThadonRef SEThadonRef.StopLook SESheogorathRef Set MiniTalk to 3 Set DoOnce5 to 3 endif endif if ( MiniTalk > 0 ) && ( MiniTalk < 3 ) Set MiniTalkTimer to MiniTalkTimer - GetSecondsPassed endif ;This handles Thadon's quick exit if ( GetStage SE07A >= 40 ) && ( DoOnce4 == 0 ) if ( ThadonLeaves == 1 ) SEThadonRef.Evp SE07SaintEnd01Ref.Evp SE07SaintEnd02Ref.Evp Set DoOnce4 to 1 endif endif end
691SE07BGoldenSaintGreenmoteSiloGuard01Scriptscn SE07BGoldenSaintGreenmoteSiloGuard01Script ;This script is used for the Guard Patrol inside of Greenmote Silo ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat Short QuickResponse begin OnPackageEnd SE07BGSGreenmote01Patrol Set SE07B.Silo01Go to 1 Evp end begin OnPackageEnd SE07BGSGreenmote01PatrolEnd Set SE07B.Silo01Go to 0 Evp end Begin GameMode If QuickResponse == 0 If GetDetectionLevel Player == 3 Evp If GetCrimeGold == 0 SetCrimeGold 5 EndIf Set QuickResponse to 1 EndIf EndIf End
692SE07BGoldenSaintGreenmoteSiloGuard02Scriptscn SE07BGoldenSaintGreenmoteSiloGuard02Script ;This script is used for the Guard Patrol inside of Greenmote Silo ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat Short QuickResponse begin OnPackageEnd SE07BGSGreenmote02Patrol Set SE07B.Silo02Go to 1 Evp end begin OnPackageEnd SE07BGSGreenmote02PatrolEnd Set SE07B.Silo02Go to 0 Evp end Begin GameMode If QuickResponse == 0 If GetDetectionLevel Player >= 3 Evp Set QuickResponse to 1 EndIf EndIf End
693SE07BGoldenSaintGreenmoteSiloGuard03Scriptscn SE07BGoldenSaintGreenmoteSiloGuard03Script ;This script is used for the Guard Patrol inside of Greenmote Silo ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat Short QuickResponse begin OnPackageEnd SE07BGSGreenmote03Patrol Set SE07B.Silo03Go to 1 Evp end begin OnPackageEnd SE07BGSGreenmote03PatrolEnd Set SE07B.Silo03Go to 0 Evp end Begin GameMode If QuickResponse == 0 If GetDetectionLevel Player >= 3 Evp Set QuickResponse to 1 EndIf EndIf End
694SE07BGoldenSaintGreenmoteSiloGuard04Scriptscn SE07BGoldenSaintGreenmoteSiloGuard04Script ;This script is used for the Guard Patrol inside of Greenmote Silo ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat Short QuickResponse begin OnPackageEnd SE07BGSGreenmote04Patrol Set SE07B.Silo04Go to 1 Evp end begin OnPackageEnd SE07BGSGreenmote04PatrolEnd Set SE07B.Silo04Go to 0 Evp end Begin GameMode If QuickResponse == 0 If GetDetectionLevel Player >= 3 Evp Set QuickResponse to 1 EndIf EndIf End
695SE07BGoldenSaintQuartersPatrol02Scriptscn SE07BGoldenSaintQuartersPatrol02Script ;This script is used for the Guard Patrol inside of Thadon's Private Bedchambers/Living Area ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat begin OnPackageEnd SE07BGSGuard02Patrol01 Set SE07B.Guard02Go to 1 Evp end begin OnPackageEnd SE07BGSGuard02Patrol02 Set SE07B.Guard02Go to 2 Evp end begin OnPackageEnd SE07BGSGuard02Patrol03 Set SE07B.Guard02Go to 3 Evp end begin OnPackageEnd SE07BGSGuard02Patrol04 Set SE07B.Guard02Go to 4 Evp end begin OnPackageEnd SE07BGSGuard02Patrol05 Set SE07B.Guard02Go to 5 Evp end begin OnPackageEnd SE07BGSGuard02PatrolEnd Set SE07B.Guard02Go to 0 Evp end
696SE07BGoldenSaintQuartersPatrolScriptscn SE07BGoldenSaintQuartersPatrolScript ;This script is used for the Guard Patrol inside of Thadon's Private Bedchambers/Living Area ;At the beginning of each package, a variable is set and the guard is EVP'd, so they may pass into the next package smoothly ;At the end of the last package, the variable is reset so the process may repeat begin OnPackageEnd SE07BGSGuard01Patrol01 Set SE07B.Guard01Go to 1 Evp end begin OnPackageEnd SE07BGSGuard01Patrol02 Set SE07B.Guard01Go to 2 Evp end begin OnPackageEnd SE07BGSGuard01Patrol03 Set SE07B.Guard01Go to 3 Evp end begin OnPackageEnd SE07BGSGuard01Patrol04 Set SE07B.Guard01Go to 4 Evp end begin OnPackageEnd SE07BGSGuard01Patrol05 Set SE07B.Guard01Go to 5 Evp end begin OnPackageEnd SE07BGSGuard01PatrolEnd Set SE07B.Guard01Go to 0 Evp end
697SE07BGreenmotePileScriptscn SE07BGreenmotePileScript short MoteCount ;This counts how many doses the player has picked up and pops journal at right time ;When the player activates the pile object, increase the MoteCount by 1 each time and give the player the ingrediant object ;Otherwise, upon activation, simply give the ingrediant object begin OnActivate if ( IsActionRef Player == 1 ) if ( GetStage SE07B >= 15 ) if ( SE07B.MoteCount < 2 ) set SE07B.MoteCount to ( SE07B.MoteCount + 1 ) Player.additem SE07Greenmote 1 else Player.additem SE07Greenmote 1 endif endif endif end ;Taking the variable from above, if it hits 2, set the stage in SE07B begin gamemode if ( GetStage SE07B >= 15 ) if ( SE07B.MoteCount >= 2 ) SetStage SE07B 25 endif endif end
698SE07BGreenmoteScriptscn SE07BGreenmoteScript short MoteCount ;This counts how many doses the player has picked up and pops journal at right time ;This counts how many doses the player has picked up and pops journal at right time begin OnAdd Player if ( GetStage SE07B >= 15 ) if ( SE07B.MoteCount < 2 ) set SE07B.MoteCount to ( SE07B.MoteCount + 1 ) endif endif end begin gamemode if ( GetStage SE07B >= 15 ) if ( SE07B.MoteCount >= 2 ) SetStage SE07B 25 endif endif end
699SE07BScriptscn SE07BScript ;Actors ;SEWideEye - Thadon's steward and main source of help for the player ;SEGundlar - The chef for Thadon. No real interaction is required, but Gundlar figures into the feast portion of the quest and has a key ;SEThadon - The target of the quest, the Duke of Mania ;Objects ;SE07AltarMania - The altar in the Sacellum that must be activated with Thadon's Blood to finish quest ;SE07ThadonBlood - When Thadon dies, this item will be in his inventory. This is the quest's main goal. ;SE07BWatchTrigger - When this trigger is broken, the player will be observing Wide-Eye's entry to Greenmote Silo ;SE07GreenmotePile01 - The actual pile of Greenmote in Greenmote Silo that yields Greenmote ingrediant ;SE07ThadonMealPreDrug - Thadon's meal tray when encountered in his quarters in the kitchen area ;SE07ThadonMealPreDrugWine - Thadon's wine when encountered in his quarters in the kitchen area ;SE07ThadonMealSpiked - Thadon's meal when encountered at the feast table in the main hall of the House of Mania ;SE07ThadonWineSpiked - Thadon's wine when encountered at the feast table in the main hall of the House of Mania ;SE07TrophyBlood - The trophy for completing SE07B that appears in the Palace of Sheogorath ;SE07Greenmote - The drug the player uses to spike Thadon's meal and his wine and can be ingested if desired short DoOnce ;DoOnce variable short DoOnce1 ;DoOnce variable short DoOnce2 ;DoOnce variable short DoOnce3 ;DoOnce variable short DoOnce4 ;DoOnce variable short DoOnce5 ;DoOnce variable short Seducers ;DoOnce variable short WEPatrol ;Notes Wide-Eye is on his Patrol mode where she may be suspicious of player following short Serves ;For marking which phase of Gundlar's serving finds he is in (package toggle) short DerveninMove ;For triggering an Ambush package on Dervenin short SylMove ;For triggering an Ambush package on Thadon short SylLeaves ;For triggering a gamemode block that makes Thadon vanish short MoteCount ;This counts how many doses the player has picked up and pops journal at right time short Alarm ;This counts the levels of alarm for Wide-Eye (2 Stages) short WideEyeAttack ;Wide-Eye's attack trigger short Convo ;Conversation trigger short Go ;Doonce variable short FoodBeenDrugged ;This is a blocker so you can't re-spike the food and lose the other dose of Greenmote short WineBeenDrugged ;This is a blocker so you can't re-spike the wine and lose the other dose of Greenmote short DrugsDone ;When this variable is set to 1, it sets up the final part of SE07B short Failsafe ;This guarantees the wine/food will appear whether Gundlar is loaded or not short Guard01Go ;This is used for the patrols in Thadon's Living Quarters short Guard02Go ;This is used for the patrols in Thadon's Living Quarters short Silo01Go ;This is used for the patrols in Greenmote Silo short Silo02Go ;This is used for the patrols in Greenmote Silo short Silo03Go ;This is used for the patrols in Greenmote Silo short Silo04Go ;This is used for the patrols in Greenmote Silo short MealSetUp ;This is a failsafe backup to make sure meal and wine appears at the right time short MealServed ;This is a failsafe backup to make sure served meal and wine appears at the right time short MoveGundlar ;This is a failsafe backup to make sure Gundlar makes it to the feast in timely manner short MoveWideEye ;This is a failsafe backup to make sure WideEye makes it to the feast in timely manner short OffScreenKill ;Kill Thadon offscreen short OffScreenKillSS ;DoOnce for the Offscreen Kill Distance Check short MiniTalk ;Variable used for the last 2 lines of the endgame speech between Thadon and Sheogorath (to get them to run) float fQuestDelayTime ; Makes the script run more frequently than every 5 seconds float DayServed float MiniTalkTimer ;A float variable used to measure the line length for the Says in the endgame speech between Thadon and Sheo float DelayTimer ;A float variable used to measure a tiny delay needed in endgame speech between weapons drawn and last 2 lines of it begin gamemode ;This makes the Seducers flanking Syl and the Saints flanking Sheo draw weapons at the right point in the endgame conversation if ( DoOnce5 == 0 ) if ( SE07B.Convo == 11 ) SE07SaintEnd01Ref.SetAlert 1 SE07SaintEnd02Ref.SetAlert 1 SE07EndSeducer01Ref.SetAlert 1 SE07EndSeducer02Ref.SetAlert 1 Set DelayTimer to 1 Set DoOnce5 to 1 endif endif if ( DoOnce5 == 1 ) if ( DelayTimer > 0 ) Set DelayTimer to ( DelayTimer - GetSecondsPassed ) else Set DoOnce5 to 2 endif endif if ( DoOnce5 == 2 ) if ( MiniTalk == 0 ) && ( MiniTalkTimer == 0 ) Set MiniTalkTimer to SESheogorathRef.Say SE07BSylLeaves SESheogorathRef.SayTo SEThadonRef SE07BSylLeaves Set Convo to 12 Set MiniTalk to 1 elseif ( MiniTalk == 1 ) && ( MiniTalkTimer <= 0 ) Set MiniTalkTimer to SESylRef.Say SE07BSylLeaves SESheogorathRef.Look SESylRef SESylRef.SayTo SESheogorathRef SE07BSylLeaves Set MiniTalk to 2 elseif ( MiniTalk == 2 ) && ( MiniTalkTimer <= 0 ) Set SE07B.SylLeaves to 1 SE07SaintEnd01Ref.SetAlert 0 SE07SaintEnd02Ref.SetAlert 0 SESheogorathRef.StopLook SESylRef SESylRef.StopLook SESheogorathRef Set MiniTalk to 3 Set DoOnce5 to 3 endif endif if ( MiniTalk > 0 ) && ( MiniTalk < 3 ) Set MiniTalkTimer to MiniTalkTimer - GetSecondsPassed endif ;This handles Syl's quick exit if ( GetStage SE07B >= 50 ) && ( DoOnce == 0 ) if ( SylLeaves == 1 ) SESylRef.Evp SE07EndSeducer01Ref.Evp SE07EndSeducer02Ref.Evp Set DoOnce to 1 endif endif ;This denotes that both the wine and the food was spiked, which progresses the quest if ( DrugsDone == 0 ) if ( SE07B.FoodBeenDrugged == 1 ) && ( SE07B.WineBeenDrugged == 1 ) SetStage SE07B 30 Set DrugsDone to 1 endif endif ;This is a failsafe in case Gundlar is not loaded, so the player can't observe him making the food ; if ( MealSetUp == 0 ) ; if ( GetStage SE07B >= 15 ) && ( GetStage SE07B < 30 ) ; if ( GameHour >= 12 ) && ( GameHour < 20 ) ; if ( Player.GetInCell SENSDukesQuarters == 0 ) ; SE07ThadonMealRef.Enable ; Set MealSetUp to 1 ; endif ; endif ; endif ; endif ;This is a failsafe in case Gundlar is not loaded, so the player can't observe him serving the food ; if ( MealServed == 0 ) ; if ( GetStage SE07B >= 25 ) && ( GetStage SE07B < 30 ) ; if ( GameHour >= 20 ) && ( GameHour < 21 ) ; if ( Player.GetInCell SENSHouseofMania == 0 ) ; SE07ThadonMealServedRef.Enable ; SE07ThadonMealRef.Disable ; Set Serves to 2 ; Set DayServed to GameDaysPassed ; SEGundlarRef.Evp ; SEWideEyeRef.Evp ; SEThadonRef.Evp ; Set MealSetUp to 0 ; Set SEGundlarRef.MealDone to 0 ; Set MealServed to 1 ; endif ; endif ; endif ; endif ;This moves Gundlar and WideEye to the feast at 20 in case they are at Level 2 or 3 if ( MoveGundlar == 0 ) if ( GetStage SE07B >= 30 ) && ( GetStage SE07B < 40 ) if ( GameHour >= 20 ) && ( GameHour < 21 ) if ( SEGundlarRef.GetInCell SENSHouseofMania == 0 ) SEGundlarRef.Moveto SE07BMealTimeMarker Set SE07B.Serves to 1 SEGundlarRef.Evp set MoveGundlar to 1 endif endif endif endif if ( MoveWideEye == 0 ) if ( GetStage SE07B >= 30 ) && ( GetStage SE07B < 40 ) if ( GameHour >= 20 ) && ( GameHour < 21 ) if ( SEWideEyeRef.GetInCell SENSHouseofMania == 0 ) SEWideEyeRef.Moveto SE07BMealTimeMarker SEWideEyeRef.Evp set MoveWideEye to 1 endif endif endif endif ;This is a failsafe for people who don't go see Thadon die (which is beyond me). if ( OffScreenKill == 0 ) if ( GetStage SE07B >= 30 ) && ( GetStage SE07B < 35 ) if ( GameHour >= 22 ) || ( DayServed < GameDaysPassed ) if ( Player.GetInCell SENSHouseofMania == 0 ) if ( Serves == 2 ) SetEssential SEThadon 0 SEThadonRef.Moveto SE07WEServingMarker SEThadonRef.Kill Set OffScreenKill to 1 endif endif endif endif endif if ( OffScreenKill == 1 ) SEWideEyeRef.Evp SEGundlarRef.Evp Set OffScreenKill to 2 endif ;This is the distance check from Thadon's corpse that sets Stage 35 if OffScreenKill was in effect if ( OffScreenKillSS == 0 ) if ( Player.GetDistance SEThadonRef < 500 ) if ( OffScreenKill >= 1 ) Set SEThadonRef.CleanUp to 0 SetStage SE07B 35 Set OffScreenKillSS to 1 endif endif endif end
700SE07BWatchDoorScriptscn SE07BWatchDoorScript ; Activates linked Parent object once short triggered ref target ref mySelf ;This block controls Wide-Eye finding the Greenmote Door and the Player's rection by Disabling Player Controls and then Setting a Stage when the if's are satisfied. begin onTrigger player if ( GetStage SE07B >= 15 ) && ( GetStage SE07B < 20 ) if ( SEWideEyeRef.GetDistance SE07BWEGreenmoteMarker01 < 1100 ) if triggered == 0 set triggered to 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 DisablePlayerControls SetStage SE07B 18 endif endif endif end
701SE07DementiaSwitchSCRIPTscn SE07DementiaSwitchSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf begin onActivate set mySelf to getSelf if ( GetStage SE07A >= 25 ) if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf SE07DementiaSecretDoorRef.activate mySelf 1 set stage to 2 endif ; if (isAnimPlaying == 0) && stage == 2 && timer <= 2 ; playgroup backward 0 ; set stage to 3 ; endif if (isAnimPlaying == 0) && stage == 2 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
702SE07GreenmoteRaptureAbilityScriptscn SE07GreenmoteRaptureAbilityScript short Rapture float timer short Init ;SE07GreenmoteFlag ; initialize vars (needed in case of multiple items consumed at once) begin ScriptEffectStart set Rapture to 0 set timer to 0 set Init to 0 set SE07GreenmoteFlag to 0 end begin ScriptEffectUpdate ;upon ingestion, add the SE07Greenmote Rapture spell to the player... if ( Init == 0 ) addspell SE07GreenmoteRapture set Init to 1 endif ;...add the visual effect for the duration and... TriggerHitShader 3 if Rapture == 0 && timer >= 1 set Rapture to 1 endif ; run timer for duration set timer to timer + ScriptEffectElapsedSeconds if( SE07GreenmoteFlag == 1 ) set SE07GreenmoteFlag to 0 RemoveSpell SE07GreenmoteRapture set timer to 0 set Init to 0 set Rapture to 0 endif ;...when timer elapses, remove the spell and remove the flag for overdose test if timer > 60 removespell SE07GreenmoteRapture removespell SE07GreenmoteControl endif end begin ScriptEffectFinish Set SE07GreenmoteEffect to 0 end
703SE07GreenmoteRaptureEffectScriptscn SE07GreenmoteRaptureEffectScript short Doonce ;This script handles the ingestion of Greenmote by the Player Begin ScriptEffectStart Set Doonce to 0 End Begin ScriptEffectUpdate ;Increase the flag saying the Greenmote was taken by one, and set the flag that its ingested to 1 (overdose test). if ( GetSelf == Player ) if ( Doonce == 0 ) Set SE07GreenmoteEffect to ( SE07GreenmoteEffect + 1 ) Set SE07GreenmoteFlag to 1 AddSpell SE07GreenmoteControl set doonce to 1 endif ;if the player ingests 3 doses, kill the player and play the message if ( SE07GreenmoteEffect >= 3 ) Messagebox "You have overdosed on Greenmote." Kill endif else AddSpell SE07GreenmoteRapture endif End
704SE07ManiaSwitchSCRIPTscn SE07ManiaSwitchSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf begin onActivate set mySelf to getSelf if ( GetStage SE07B >= 18 ) if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf SE07ManiaSecretDoorRef.activate mySelf 1 set stage to 2 endif ; if (isAnimPlaying == 0) && stage == 2 && timer <= 2 ; playgroup backward 0 ; set stage to 3 ; endif if (isAnimPlaying == 0) && stage == 2 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
705SE07Scriptscn SE07Script ;Actors ;SESheogorath - The Big Kahuna himself ;SEArctus - The High Priest of Dementia ;SEDervenin - The High Priest of Mania ;SE07 is very short intro to SE07A and SE07B, so no real objects are involved. short DoOnce ;DoOnce variable short DoOnce1 ;DoOnce variable short RitualTalk ;Assists with the journal selection when speaking in no particular order short DementiaTold ;Assists with the journal selection when speaking in no particular order short ManiaTold ;Assists with the journal selection when speaking in no particular order short DementiaPick ;Dementia path chosen to kickstart SE07A short ManiaPick ;Mania path chosen to kickstart SE07B float fQuestDelayTime ; Makes the script run more frequently than every 5 seconds begin gamemode ;This covers no particular order in which you speak to the Priests in the Sacellum if ( RitualTalk == 1 ) && ( DoOnce == 0 ) SetStage SE07 10 Set DoOnce to 1 endif if ( RitualTalk == 2 ) && ( DoOnce1 == 0 ) SetStage SE07 15 Set DoOnce1 to 1 endif end
706SE07SylHeartScriptscn SE07SylHeartScript ;This sets journal when Syl's heart is taken from her corpse... it is a Death Item begin OnAdd Player SetStage SE07A 35 end
707SE07ThadonBloodScriptscn SE07ThadonBloodScript ;This sets journal when Thadon's Blood is taken from her corpse... it is a Death Item begin OnAdd Player SetStage SE07B 45 end
708SE07ThadonsMealScriptscn SE07ThadonsMealScript begin OnActivate if ( Player.GetItemCount SE07Greenmote >= 1 ) if ( GetStage SE07B >= 25 ) if ( IsActionRef Player == 1 ) if ( SE07B.FoodBeenDrugged == 0 ) Player.Removeitem SE07Greenmote 1 Set SE07B.FoodBeenDrugged to 1 elseif ( SE07B.FoodBeenDrugged >= 1 ) Messagebox "The food has already been drugged." endif endif endif else Messagebox "You have no Greenmote in your inventory." endif end
709SE07ThadonsServedMealScriptscn SE07ThadonsServedMealScript begin OnActivate Messagebox "It would be unwise to touch the Duke's meal in a public place." end
710SE07ThadonsServedWineScriptscn SE07ThadonsServedWineScript begin OnActivate Messagebox "It would be unwise to touch the Duke's wine in a public place." end
711SE07ThadonsWineScriptscn SE07ThadonsWineScript begin OnActivate ;When activating the wine during quest, remove a dose of Greenmote and set a flag to 1 to say it was spiked ;Then check for activations after that point and play a messagebox ;If no Greenmote is in inventory (it is not a quest item), play an alternate messagebox if ( Player.GetItemCount SE07Greenmote >= 1 ) if ( GetStage SE07B >= 25 ) if ( IsActionRef Player == 1 ) if ( SE07B.WineBeenDrugged == 0 ) Player.Removeitem SE07Greenmote 1 Set SE07B.WineBeenDrugged to 1 elseif ( SE07B.WineBeenDrugged >= 1 ) Messagebox "The food has already been drugged." endif endif endif else Messagebox "You have no Greenmote in your inventory." endif end
712SE08BarrierTriggerSCRIPTscn SE08BarrierTriggerSCRIPT ;short triggered ref target ref triggeredBy begin onTrigger set triggeredBy to getActionRef Message "triggeredBy == %.0f",triggeredBy if getActionRef == SE08BarrierCrystal ;if triggered == 0 Message "Triggered 2" ;set triggered to 1 set target to getParentRef target.disable disable ;endif endif end
713SE08blessZoneSCRIPTscn SE08blessZoneSCRIPT ; This script was designed as part of a strategy to get an Order priest to cast a custom ; buffing spell on nearby knights of order. ref PriestRef ref ActionRef ref SpellTarget short triggered float timer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set priestRef to getParentRef set SpellTarget to priestRef.getParentRef end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger if triggered == 0 set ActionRef to getActionRef if actionRef.getInFaction SEOrderFaction == 1 set triggered to 1 endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if triggered == 1 if timer <= 0 set timer to 2 priestRef.cast SE08OrderBlessing actionRef; spellTarget set triggered to 0 elseif timer > 0 set timer to (timer - getSecondsPassed) endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
714SE08c1DeadScoutSCRIPTscn SE08c1DeadScoutSCRIPT ; This script enables either a GS or DS corpse in Xeddefen ; depending on player choice in SE07 as to ; becoming duke of mania or dementia begin onLoad if getStageDone SE08 35 == 1 if getStageDone SE07A 200 == 1 SE08c1DeadScoutDS.enable elseif getStageDone SE07B 200 == 1 SE08c1DeadScoutGS.enable endif endif end
715SE08c1PriestSCRIPTscn SE08c1PriestSCRIPT ; This script was part of a strategy to priest behavior to buff knights. begin onDeath set SE08Xed.c1PriestStatus to 1 ; flip flag to indicate I'm dead. end begin GameMode if SE08Xed.c1PriestStatus != 1 ; If I'm dead; don't bother with any of it. if SE08Xed.DoBlessOnce != 1 if getDistance SE08c1Knight01REF < 512 && getDistance SE08c1Knight02REF < 512 && getDistance SE08c1Knight03REF < 512 cast SE08OrderBlessing SE08c1Knight02REF ;cast area blessing on him set SE08Xed.DoBlessOnce to 1 endif endif if SE08Xed.DoBless2Once != 1 if getDistance SE08c1Wave2Knight01 <512 && getDistance SE08c1Wave2Knight02 < 512 && getDistance SE08c1Wave2Knight03 < 512 cast SE08OrderBlessing SE08c1Wave2Knight02 set SE08Xed.DoBless2Once to 1 endif endif if SE08Xed.DoBless3Once != 1 if getDistance SE08c1Wave3Knight01 <512 && getDistance SE08c1Wave3Knight02 < 512 && getDistance SE08c1Wave3Knight03 < 512 cast SE08OrderBlessing SE08c1Wave3Knight02 set SE08Xed.DoBless3Once to 1 endif endif endif end
716SE08c1UnlockSCRIPTscn SE08c1UnlockSCRIPT short doOnce begin onTrigger player if doOnce == 0 if getStage SE08 >= 35 SE08c1LockedDoor01.unlock SE08c1LockedDoor02.unlock set doOnce to 1 endif endif end
717SE08c1Wave2triggerSCRIPTscn SE08c1Wave2triggerSCRIPT ; part of a strategy to send NPCs in waves through SE08's Xeddefen begin onTrigger player SE08c1Wave2Knight01.enable SE08c1Wave2Knight01.moveto SE08Wave2Marker01 SE08c1Wave2Knight01.addScriptPackage SE08c1Knight01RunTo SE08c1Wave2Knight01.evp SE08c1Wave2Knight02.enable SE08c1Wave2Knight02.moveto SE08Wave2Marker02 SE08c1Wave2Knight02.addScriptPackage SE08c1Knight02RunTo SE08c1Wave2Knight02.evp SE08c1Wave2Knight03.enable SE08c1Wave2Knight03.moveto SE08Wave2Marker03 SE08c1Wave2Knight03.addScriptPackage SE08c1Knight03RunTo SE08c1Wave2Knight03.evp SE08c1LockedDoor01.unlock SE08c1LockedDoor02.unlock disable end
718SE08c1Wave3triggerSCRIPTscn SE08c1Wave3triggerSCRIPT ; part of a strategy to send NPCs in waves through SE08's Xeddefen begin onTrigger player SE08c1Wave3Knight01.enable SE08c1Wave3Knight01.moveto SE08Wave3Marker01 SE08c1Wave3Knight01.addScriptPackage SE08c1Knight01RunTo SE08c1Wave3Knight01.evp SE08c1Wave3Knight02.enable SE08c1Wave3Knight02.moveto SE08Wave3Marker02 SE08c1Wave3Knight02.addScriptPackage SE08c1Knight02RunTo SE08c1Wave3Knight02.evp SE08c1Wave3Knight03.enable SE08c1Wave3Knight03.moveto SE08Wave3Marker03 SE08c1Wave3Knight03.addScriptPackage SE08c1Knight03RunTo SE08c1Wave3Knight03.evp disable end
719SE08c2Wave1triggerSCRIPTscn SE08c2Wave1triggerSCRIPT ; part of a strategy to send NPCs in waves through SE08's Xeddefen begin onTrigger player if SE08Xed.eventFlag03 != 1 SE08c2Wave1Knight01REF.enable SE08c2Wave1Knight01REF.moveTo SE08c2Wave01marker01 SE08c2Wave1Knight01REF.addScriptPackage SE08c1Knight01RunTo SE08c2Wave1Knight01REF.evp SE08c2Wave1Knight02.enable SE08c2Wave1Knight02.moveTo SE08c2Wave01marker02 SE08c2Wave1Knight02.addScriptPackage SE08c1Knight02RunTo SE08c2Wave1Knight02.evp set SE08Xed.eventFlag03 to 1 disable endif end
720SE08c2Wave2triggerSCRIPTscn SE08c2Wave2triggerSCRIPT ; part of a strategy to send NPCs in waves through SE08's Xeddefen begin onTrigger player SE08c2Wave2Knight01.enable SE08c2Wave2Knight01.moveTo Se08c2Wave2Marker01 SE08c2Wave2Knight01.addScriptPackage SE08c1Knight01RunTo SE08c2Wave2Knight01.evp SE08c2Wave2Knight02.enable SE08c2Wave2Knight02.moveTo Se08c2Wave2Marker02 SE08c2Wave2Knight02.addScriptPackage SE08c1Knight02RunTo SE08c2Wave2Knight02.evp disable ;turn myself off to prevent re-triggering end
721SE08c4SheldenBarkSCRIPTscn SE08c4SheldenBarkSCRIPT ; Continues the cinematic efforts from SE08c4SheldenCutoffSCRIPT ; actually takes place in cell#5 despite naming short running short doOnce ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad seSheldenREF.moveTo SE08c5SheldenInitMarker ; place me at staging marker set SE08Xed.SheldenCutoff to 2 ; force variable for scene control end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if doOnce == 0 ; flow control for gameMode set running to 1 set doOnce to 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if running == 1 SESheldenRef.sayTo player SE08CutoffTopic 1 ; bark the topic set SE08Xed.SheldenCutoff to 3 ; increment scene control set running to 0 ; halt looping endif end
722SE08c4SheldenCutoffSCRIPTscn SE08c4SheldenCutoffSCRIPT ; Cinematic thing - we cut Shelden's route to the player off ; and he responds with dialogue and behavior. short doOnce short running ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if doOnce == 0 set SE08Xed.SheldenCutoff to 1 ; this should satisfy package conditions SESheldenRef.evp set running to 1 ; flow control for gameMode set doOnce to 1 SE08c4Wimp01.setav health 5 ; make knights wimpy so Shelden can look badass SE08c4Wimp02.setav health 5 SE08c4Wimp03.setav health 5 SE08c4Wimp01.moddisposition player 100 ; this prevents Knights from pursuing player SE08c4Wimp02.moddisposition player 100 SE08c4Wimp03.moddisposition player 100 SE08c4Wimp01.addScriptPackage SE08SheldenBark02 ; Knights will run off-screen if shelden is KO'ed SE08c4Wimp02.addScriptPackage SE08SheldenBark02 SE08c4Wimp03.addScriptPackage SE08SheldenBark02 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if running == 1 if SESheldenRef.getDistance SE08SheldenBarkMarker01 <= 128 ; safety checks for NPC & Player locations if player.getInCell XPXeddefen04 == 1 SESheldenRef.sayTo player SE08CutoffTopic 1 ; shout at player through bars set SE08Xed.SheldenCutoff to 2 ; move Shelden to state two of this thing set running to 0 endif endif endif end
723SE08c5SheldenBark02SCRIPTscn SE08c5SheldenBark02SCRIPT ; Continues the cinematic efforts from SE08c4SheldenBarkSCRIPT ; short running short doOnce ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if doOnce == 0 ; flow control stuff for gameMode set running to 1 set doOnce to 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if running == 1 if player.getLOS SE08c5SheldenGate == 1 ; check line-of-sight so player is spoken to when looking at Shelden NPC SESheldenRef.sayTo player SE08CutoffTopic 1 set SE08Xed.SheldenCutoff to 5 ; flow control ;SESheldenREF.evp ; removing evp so he actually hangs out a second after speaking set running to 0 ; stop loop endif endif end
724SE08c5SheldenRudeSCRIPTscn SE08c5SheldenRudeSCRIPT ; Continues the cinematic efforts from SE08c4SheldenBarkSCRIPT ; This script handles Shelden's ruder dialogue option if the player "ignored" his earlier comments short running short doOnce ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if doOnce == 0 ; ...and flow control stuff for gameMode set running to 1 set doOnce to 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if running == 1 if SE08Xed.SheldenCutoff < 5 ; check flow control SESheldenRef.sayTo player SE08RudeComment 1 set SE08Xed.SheldenCutoff to 4 ; update control SESheldenREF.evp set running to 0 ; stop loop. endif endif end
725SE08CommanderSCRIPTscn SE08CommanderSCRIPT BEGIN OnStartCombat Player SetAv Aggression 5 END
726SE08Event02triggerSCRIPTscn SE08Event02triggerSCRIPT ; this script enables, puts in place, and imprints behavior on NPCs. begin onTrigger player if SE08Xed.EventFlag02 == 0 ; Safety flag SE08c1Knight01REF.enable ; enab.e SE08c1Knight01REF.moveto SE08Wave1Marker01 ; move SE08c1Knight01REF.addScriptPackage SE08c1Knight01RunTo ; behavior SE08c1Knight01REF.evp ; evaluate package. SE08c1Knight02REF.enable SE08c1Knight02REF.moveto SE08Wave1Marker02 SE08c1Knight02REF.addScriptPackage SE08c1Knight02RunTo SE08c1Knight02REF.evp SE08c1Knight03REF.enable SE08c1Knight03REF.moveto SE08Wave1Marker03 SE08c1Knight03REF.addScriptPackage SE08c1Knight03RunTo SE08c1Knight03REF.evp set SE08Xed.EventFlag02 to 1 ; flag on to avoid re-trigger from other trigZone disable ; disable myself for safety's sake. endif end
727SE08HighGateSCRIPTscn SE08HighGateSCRIPT ; Special gates that are triggered by Knights of Order on patrol packages ; Opens on trigger and closes after a set time passes ;Vars short init short open short next short busy float timer ref mySelf ref myParent ;;;;;;;;;;;;;;;;;;;; ;; Activation block begin onActivate if isActionRef player == 1 if open == 0 message "The gate will not open for you" endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 ;Messagebox "Opening Gate" playgroup forward 0 set open to 1 enableLinkedPathPoints ;else ;playgroup backward 0 ;set open to 0 ;disableLinkedPathPoints endif set next to 1 set timer to 6 ; timer control here set busy to 1 endif end ;; End Activation block ;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; GameMode block begin gameMode if init == 0 ; Set the refs set mySelf to getSelf set myParent to getParentRef ; prep linked path points disableLinkedPathPoints ; don't run again set init to 1 endif if timer > 0 set timer to (timer - getSecondsPassed) endif if timer <= 1 && open == 1 ; close this gate! ;Messagebox "closing gate" playgroup backward 0 set open to 0 disableLinkedPathPoints endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end ;; End GameMode block ;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;; ;; Reset block begin onReset reset3Dstate set open to 0 set busy to 0 set next to 0 disableLinkedPathPoints end ;; end Reset block ;;;;;;;;;;;;;;;;;;;;;;;;;
728SE08HighGateTriggerSCRIPTscn SE08HighGateTriggerSCRIPT ; Activates linked Parent Gate if triggering ref is authorized (order knight) ref target ref mySelf ref ActorRef begin onTriggerActor set actorRef to getActionRef if actorRef.getInFaction SEOrderFaction == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 endif end
729SE08KnightOfOrderSCRIPTscn SE08KnightOfOrderSCRIPT begin OnLoad ; remove existing ability removespell SEAbOrderKnight1BoundArmorWeapon removespell SEAbOrderKnight2BoundArmorWeapon removespell SEAbOrderKnight3BoundArmorWeapon removespell SEAbOrderKnight4BoundArmorWeapon removespell SEAbOrderKnight5BoundArmorWeapon removespell SEAbOrderKnight6BoundArmorWeapon ; add "leveled" ability if getLevel >= 20 addspell SEAbOrderKnight6BoundArmorWeapon elseif getLevel >= 15 addspell SEAbOrderKnight5BoundArmorWeapon elseif getLevel >= 10 addspell SEAbOrderKnight4BoundArmorWeapon elseif getLevel >= 6 addspell SEAbOrderKnight3BoundArmorWeapon elseif getLevel >= 3 addspell SEAbOrderKnight2BoundArmorWeapon else addspell SEAbOrderKnight1BoundArmorWeapon endif if ( GetStage SE08 == 80 ) disable endif end
730SE08ObeliskEffectSCRIPTscn SE08ObeliskEffectSCRIPT short DoOnce ;Internal control variable short Collapse ;Set to 1 when the Obelisk is deactivated float Timer BEGIN OnLoad ;Plays active animation if SE08 is currently running if ( GetStage SE08 >= 5 ) && ( GetStage SE08 < 70 ) playgroup FastForward 1 endif END BEGIN GameMode ;plays the animation and sets variables to trigger the stage when the Obelisk is deactivated if ( DoOnce == 0 ) if ( SE08ObeliskMainRef.Deactivated == 1 ) PlayGroup Backward 1 set Timer to 3 set Collapse to 1 set DoOnce to -1 endif endif ;Triggers stage 70 on a timer if ( Collapse == 1 ) set Timer to ( Timer - GetSecondsPassed ) player.playSound AMBStoneShift01 triggerHitShader 1 if (Timer <= 0 ) SetStage SE08 70 Set Collapse to -1 endif endif END
731SE08OrderBlessingSCRIPTscn SE08OrderBlessingSCRIPT begin scriptEffectFinish ;Message "ScriptEffectFinish" ; wtf? where did this come from? ;Kill ; For first wave of guys if getIsReference SE08c1Knight01REF == 1 || getIsReference SE08c1Knight02REF == 1 || getIsReference SE08c1Knight03REF == 1 AddScriptPackage SE08RunToExterior evp endif ; For second wave of guys if getIsReference SE08c1Wave2Knight01 == 1 || getIsReference SE08c1Wave2Knight02 == 1 || getIsReference SE08c1Wave2Knight03 == 1 AddScriptPackage SE08RunToExterior evp endif ; For THIRD wave of guys if getIsReference SE08c1Wave3Knight01 == 1 || getIsReference SE08c1Wave3Knight02 == 1 || getIsReference SE08c1Wave3Knight03 == 1 AddScriptPackage SE08RunToExterior evp endif end
732SE08PlayerTriggerAfterStage70SCRIPTscn SE08PlayerTriggerAfterStage70SCRIPT ; Activates linked Parent object once ; Only if SE08 has hit stage 70 ; and the spire is collapsing short triggered ref target ref mySelf begin onLoad set target to getParentRef set mySelf to getSelf end begin onTrigger player if getStage SE08 >= 70 if triggered == 0 set triggered to 1 target.activate mySelf 1 endif endif end
733SE08SendNPCtoBattleSCRIPTscn SE08SendNPCtoBattleSCRIPT ref knightRef ref markerRef short triggered ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set knightRef to getParentRef set markerRef to knightRef.getParentRef end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if triggered == 0 knightRef.moveTo markerRef set triggered to 1 endif end
734SE08SendNPCtrigSCRIPTscn SE08SendNPCtrigSCRIPT ; Designed to send a parent NPC to seek (attack) ;the player on triggering the object. ; ref myNPC short DoOnce ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set myNPC to getParentRef end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if DoOnce != 1 myNPC.addScriptPackage SE08findPCinSameCell ; run to find PC only if in same cell myNPC.evp ; and make it snappy. set DoOnce to 1 ; and don't do it again. endif end
735SE08TrapNastyLightningSCRIPTscn SE08TrapNastyLightningSCRIPT ; works just as the standard hunger target trap does ; but this is using a powerful shock spell to hopefully ; toss and ragdoll a hapless NPC ref mySelf ref myParent begin onActivate if isActionRef player == 0 set mySelf to getSelf set myParent to getParentRef cast StandardShockDamageTarget5Master myParent endif end
736SE08TrigZoneFringeEnterSCRIPTscn SE08TrigZoneFringeEnterSCRIPT BEGIN OnTrigger Player ;Sets the stage when the player enters the Fringe if ( GetStage SE08 == 5 ) SetStage SE08 10 ;If player is Duke of Dementia, Dark Seducers Enable. If Player is Duke of Mania, Golden Saints enable. if ( GetStageDone SE07A 200 == 1 ) SE08DarkSeducerParentMarker.enable elseif ( GetStageDone SE07B 200 == 1 ) SE08GoldenSaintParentMarker.enable endif endif END
737SE08Xeddefen03DoorSCRIPTscn SE08Xeddefen03DoorSCRIPT BEGIN OnActivate Player if ( GetStage SE08 == 70 ) if ( SE08.SheldenStay == 0 ) && ( SE08.SheldenFlee == 0 ) SESheldenREF.MoveTo SE08SheldenEscapeMarker1 endif endif activate END
738SE08Xeddefen05DoorSCRIPTscn SE08Xeddefen05DoorSCRIPT BEGIN OnActivate Player if ( GetStage SE08 == 70 ) if ( SE08.SheldenStay == 0 ) && ( SE08.SheldenFlee == 0 ) SESheldenREF.MoveTo SE08SheldenEscapeMarker2 endif endif activate END
739SE09AddItemsScriptscn SE09AddItemsScript ;This script is used on all the components activators in XPGardens for SE09 ;I check to see what the current activator is, and then add the appropriate item ;In the case of the Essence of Breath, I also play the appropriate animations short breathToggle ;used to toggle animations of the essence of breath activator Begin GameMode ;used to control the animation sequence if GetIsID SE09EssenceOfBreathActivator if breathToggle == 1 if SE09BreathActBottleRef.isAnimPlaying == 0 SE09BreathActBottleRef.playgroup backward 1 set breathToggle to 2 endif endif endif End Begin OnActivate ;add the quest item and set the stage if GetIsID SE09BloodLiquorActivator if player.GetItemCount SE09BloodLiquor < 1 Player.additem SE09BloodLiquor 1 setStage SE09 30 endif endif ;add the quest item and set the stage if GetIsID SE09DermisMembraneActivator if player.GetItemCount SE09DermisMembrane < 1 Player.additem SE09DermisMembrane 1 setStage SE09 45 endif endif ;add the quest item and set the stage ;and control the animations if GetIsID SE09EssenceOfBreathActivator if player.GetItemCount SE09EssenceOfBreathDrop < 1 if breathToggle == 0 SE09BreathActBottleRef.playgroup Forward 1 set breathToggle to 1 elseif breathToggle == 1 message "Wait until the Essence of Breath is in the bottle." elseif breathToggle == 2 SE09BreathActBottleRef.disable Player.additem SE09EssenceOfBreathDrop 1 setStage SE09 55 set BreathToggle to 3 ;Enable the TriggerZone that will allow the player to exit this part of the dungeon. XPGardensExiterREF.enable XPGardensBreathController.disable endif endif endif ;add the quest item and set the stage if GetIsID SE09OsseousMarrowActivator if player.GetItemCount SE09OsseousMarrow < 1 Player.additem SE09OsseousMarrow 1 setStage SE09 40 endif endif End ;OnActivate
740SE09AltarScriptscn SE09AltarScript ;During the ceremony the player is asked to put things into the cistern of substatiation ;This is done by clicking the pool ;Based on the Quest Stage, we remove items from inventory and play animations during the scene, and eventually enable the gatekeeper short waitForRelmyna ;used to conditionalized stage 85 journal short createGatekeeper ;a multi staged DoOnce set by SE09Ceremony topic result, means "poof" the Gatekeeper in behind the magical cloud now short summonDoOnce ;used to fake a summon flesh antronach spell for use in the SE09 Ceremony scene ref GatekeeperRef ;holds a reference to the gatekeeper you are building, since there are multiple persistent versions of him (this is the one that is actually enabled during the ceremony) short knockDownDoOnce ;a doOnce that handles knocking the player down at the end of the ceremony scene short enableGatekeeperDoOnce ;a doOnce that handles enabling the gatekeeper at the end of the ceremony scene float knockDownTimer ;a timer used in the the knock down of the player at the end of the ceremomhy scene float enableGatekeeperTimer ;a timer used in the the enabling of the gatekeeper at the end of the ceremomhy scene short knockDownDistance ;used to help determine the knock down power of the pushActorAway function that knocks the player down at the end of ceremony scene short knockDownPower ;the knock down power of the pushActorAway function that knocks the player down at the end of ceremony scene, determined by knockDownDistance short spawnKnightsDoOnce ;variable used in the Knights of Order attacking the new Gatekeeper scene Begin GameMode ;set stage to tell player to wait if he arrives before Relmyna does if GetStage SE09 == 80 if player.GetDistance SE09PoolFXMiscAnim < 1024 if SERelmynaVerenimRef.getInSameCell Player == 0 set waitForRelmyna to 1 endif setStage SE09 85 endif ;set stage when the player is instructed to back away from the altar and he does so ;this is so that the knock down is well timed and the scene looks good, but the player can move from this place and things will still work fine elseif GetStage SE09 == 150 if player.GetDistance SERelmynaVerenimRef < 175 setStage SE09 155 endif ;This fakes a summon Flesh Atronach spell that is part of the ceremony in SE09 -- NOTE: he is ghosted in his onload script elseif getStage SE09 == 147 if summonDoOnce == 0 SERelmynaVerenimRef.cast SE09FakeSummonFleshAtronach SERelmynaVerenimRef SE09SummonFleshAtronachRef.Enable SE09SummonFleshAtronachRef.EVP SERelmynaVerenimRef.look SE09SummonFleshAtronachRef set summonDoOnce to 1 endif ;this sets up and puts in motion the scene where Knights of Order (and Felas) attack the Gatekeeper elseif getStage SE09 >= 170 if spawnKnightsDoOnce == 0 ;Get the Knights into the scene in a place where the player won't see them enable if player.GetInCell SETheFringeGatesOfMadnessOrdered SE09KnightOfOrder1Ref.moveto xSE09KnightsMoveToHere2 SE09KnightOfOrder2Ref.moveto xSE09KnightsMoveToHere2 SE09KnightOfOrder3Ref.moveto xSE09KnightsMoveToHere2 SE09KnightOfOrder4Ref.moveto xSE09KnightsMoveToHere2 if SEFelasSarandasRef.getDead == 0 SEFelasSarandasRef.moveto xSE09KnightsMoveToHere2 endif else SE09KnightOfOrder1Ref.moveto xSE09KnightsMoveToHere1 SE09KnightOfOrder2Ref.moveto xSE09KnightsMoveToHere1 SE09KnightOfOrder3Ref.moveto xSE09KnightsMoveToHere1 SE09KnightOfOrder4Ref.moveto xSE09KnightsMoveToHere1 if SEFelasSarandasRef.getDead == 0 SEFelasSarandasRef.moveto xSE09KnightsMoveToHere1 endif endif ;dress up Felas like a priest of order if SEFelasSarandasRef.getDead == 0 SEFelasSarandasRef.setClass SEOrderPriestClass SEFelasSarandasRef.addItem SEOrderPriestRobe 1 SEFelasSarandasRef.equipItem SEOrderPriestRobe 1 endif ;enable the Knights SE09KnightOfOrder1Ref.enable SE09KnightOfOrder2Ref.enable SE09KnightOfOrder3Ref.enable SE09KnightOfOrder4Ref.enable ;StartCombat to get the scene rolling SE09KnightOfOrder1Ref.startCombat GatekeeperRef SE09KnightOfOrder2Ref.startCombat GatekeeperRef SE09KnightOfOrder3Ref.startCombat GatekeeperRef SE09KnightOfOrder4Ref.startCombat GatekeeperRef if SEFelasSarandasRef.getDead == 0 SEFelasSarandasRef.startCombat GatekeeperRef endif set spawnKnightsDoOnce to 1 endif endif ;create the gatekeeper if createGatekeeper == 1 set knockDownTimer to 1.75 set enableGatekeeperTimer to 2 SE09PoolFlamesBlockingAnim.playgroup forward 0 ;put GateKeeper in faction that likes the player Player.setFactionRank SE09GatekeeperPlayerFaction 0 ;which Gatekeeper model to enable, these quest variables are set when player selected the body parts in Xaselm (SE09AddItemsScript) if SE09.whichHead == 1 if SE09.whichRightArm == 1 set GatekeeperRef to SE09GatekeeperHeadSwordRef.getSelf elseif SE09.whichRightArm == 2 set GatekeeperRef to SE09GatekeeperHeadAxeRef.getSelf elseif SE09.whichRightArm == 3 set GatekeeperRef to SE09GatekeeperHeadMaceRef.getSelf endif elseif SE09.whichHead == 2 if SE09.whichRightArm == 1 set GatekeeperRef to SE09GatekeeperHelmSwordRef.getSelf elseif SE09.whichRightArm == 2 set GatekeeperRef to SE09GatekeeperHelmAxeRef.getSelf elseif SE09.whichRightArm == 3 set GatekeeperRef to SE09GatekeeperHelmMaceRef.getSelf endif else ;something bad happened, or you aren't cheating through the questline by setting stages because whichHead variable isn't set ;just enable the sword guy set GatekeeperRef to SE09GatekeeperHeadSwordRef.getSelf endif ;Give him abilities based on the choices of which body parts the player selected in Xaselm (SE09AddItemsScript) if SE09.whichHead == 1 GatekeeperRef.addSpell SE09AbGKHead1 elseif SE09.whichHead == 2 GatekeeperRef.addSpell SE09AbGKHead2 endif if SE09.whichHeart == 1 GatekeeperRef.addSpell SE09AbGKHeart1 elseif SE09.whichHeart == 2 GatekeeperRef.addSpell SE09AbGKHeart2 endif if SE09.whichLeftArm == 1 GatekeeperRef.addSpell SE09AbGKLeftArm1 elseif SE09.whichLeftArm == 2 GatekeeperRef.addSpell SE09AbGKLeftArm2 elseif SE09.whichLeftArm == 3 GatekeeperRef.addSpell SE09AbGKLeftArm3 endif if SE09.whichLegs == 1 GatekeeperRef.addSpell SE09AbGKLegs1 elseif SE09.whichLegs == 2 GatekeeperRef.addSpell SE09AbGKLegs2 endif if SE09.whichTorso == 1 GatekeeperRef.addSpell SE09AbGKTorso1 elseif SE09.whichTorso == 2 GatekeeperRef.addSpell SE09AbGKTorso2 endif GatekeeperRef.enable set SE09.rebuiltGatekeeperRef to GatekeeperRef set createGatekeeper to 2 elseif createGatekeeper == 2 ;now knock down the player and add the quest reward spell to the players spell book... this is timed with the explosion animation if knockDownTimer <= 0 if knockDownDoOnce == 0 set knockDownDistance to player.GetDistance SE09PoolLidAnim if knockDownDistance < 100 set knockDownPower to 25 elseif knockDownDistance < 300 set knockDownPower to 15 elseif knockDownDistance < 500 set knockDownPower to 10 elseif knockDownDistance < 700 set knockDownPower to 5 elseif knockDownDistance < 1000 set knockDownPower to 2 else set knockDownPower to 1 endif SE09SummonFleshAtronachRef.PushActorAway Player knockDownPower Player.addSpell SEPwSummonFleshAtronach player.playMagicShaderVisuals SE09SummonEffect 10 set knockDownDoOnce to 1 endif else set knockDownTimer to knockDownTimer - getSecondsPassed endif ;enable the gatekeeper if enableGatekeeperTimer <= 0 if enableGatekeeperDoOnce == 0 SE09PoolFXMiscAnim.disable ;because it has collision and named for the mouse over, when the pool is "closed" it shouldn't mouse over any more SE09SummonFleshAtronachRef.disable GatekeeperRef.moveTo XSE09CenterOfPool GatekeeperRef.playMagicShaderVisuals SE09SummonEffect 10 set enableGatekeeperDoOnce to 1 endif else set enableGatekeeperTimer to enableGatekeeperTimer - getSecondsPassed endif ;once everything is finished, and the animations are done, set the stage if SE09PoolFlamesBlockingAnim.isAnimPlaying == 0 && knockDownTimer <= 0 && enableGatekeeperTimer <= 0 setStage SE09 160 set createGatekeeper to 3 endif ;now that the scene is done, play the closing up of the pool animation, but only when no one is standing in it. elseif createGatekeeper == 3 if GatekeeperRef.getDistance xSE09CenterOfPool > 400 if player.getDistance xSE09CenterOfPool > 400 SE09PoolLidAnim.playgroup backward 0 SE09PoolFxMiscAnim.playgroup backward 0 SE09GooLight01Ref.disable ;turn off the light that was supposedly coming from the pool set createGatekeeper to 0 endif endif endif End ;GameMode Begin OnActivate if isActionRef Player == 1 if getStage SE09 == 100 ;run the drop the Gatekeeper pieces into the pool animation, and remove the items from the player's inventory SE09PoolBodyPartsDropAnim.playgroup Forward 0 player.removeItem SE09Head1 1 player.removeItem SE09Head2 1 player.removeItem SE09Heart1 1 player.removeItem SE09Heart2 1 player.removeItem SE09LeftArm1 1 player.removeItem SE09LeftArm2 1 player.removeItem SE09LeftArm3 1 player.removeItem SE09Legs1 1 player.removeItem SE09Legs2 1 player.removeItem SE09RightArm1 1 player.removeItem SE09RightArm2 1 player.removeItem SE09RightArm3 1 player.removeItem SE09Torso1 1 player.removeItem SE09Torso2 1 setStage SE09 105 ;there are other "place the widget in the pool" parts of the ceremony, these next elseif's manage that behavior ;it is assumed the player has these quest items in his inventory because that was a condition required to progress the quest earlier ;In Relmyna's script, we trigger her to say things to the player repeatedly until the stage is complete, so here we are subtracting from the timer so se doesn't wait a long time after you drop stuff in elseif getStage SE09 == 110 player.removeItem SE09DermisMembrane 1 SE09PoolFXMiscAnim.playgroup Forward 1 setStage SE09 115 set SERelmynaVerenimRef.RelmynaSayLength to SERelmynaVerenimRef.RelmynaSayLength - 3 elseif getStage SE09 == 120 player.removeItem SE09BloodLiquor 1 SE09PoolFXMiscAnim.playgroup Forward 1 setStage SE09 125 set SERelmynaVerenimRef.RelmynaSayLength to SERelmynaVerenimRef.RelmynaSayLength - 3 elseif getStage SE09 == 130 player.removeItem SE09OsseousMarrow 1 SE09PoolFXMiscAnim.playgroup Forward 1 setStage SE09 135 set SERelmynaVerenimRef.RelmynaSayLength to SERelmynaVerenimRef.RelmynaSayLength - 3 elseif getStage SE09 == 140 player.removeItem SE09EssenceOfBreathDrop 1 SE09PoolFXMiscAnim.playgroup Forward 1 setStage SE09 145 set SERelmynaVerenimRef.RelmynaSayLength to SERelmynaVerenimRef.RelmynaSayLength - 3 endif endif End ;OnActivate
741SE09Battle01ButtonSCRIPTscn SE09Battle01ButtonSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent short doorOpen begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 SE09Battle01HoundREF.startCombat SE09Battle01ShamblesREF ;set SE09Battle01ButtonREF.doorOpen to 2 SE09Battle01ShamblesREF.startCombat SE09Battle01HoundREF ;if doorOpen == 0 ; set doorOpen to 1 ;endif set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
742SE09Battle02ButtonSCRIPTscn SE09Battle02ButtonSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent short doorOpen begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 if doorOpen == 0 set doorOpen to 1 endif set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
743SE09Battle03ButtonSCRIPTscn SE09Battle03ButtonSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent short doorOpen begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 if doorOpen == 0 set doorOpen to 1 endif set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
744SE09Battle04ButtonSCRIPTscn SE09Battle04ButtonSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent short doorOpen begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 SE09Battle04Atronach01REF.startCombat SE09Battle04Atronach02REF SE09Battle04Atronach02REF.startCombat SE09Battle04Atronach01REF ;if doorOpen == 0 ; set doorOpen to 1 ;endif set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
745SE09BodyPartActivatorScriptscn SE09BodyPartActivatorScript ;Description: ; This script is used to add body parts to the player's inventory. : ; We are faking the player picking up and putting down body parts, which are actually activators being enabled/disabled ; and adding/removing the equivelant body part to the players inventory. : ; This way we can have a non-havocable item seem like its getting added and placed back where it was found ; if the player picks up the other body part of the same type. ; ;SE09.whichHead, SE09.whichXXXX are used in other scripts to know which body part the player picked Begin OnActivate ;check to see if it's the proper stage if getStage SE09 >= 70 && getStage SE09 < 105 ;check to see what activator this script is running on and swap the static world art and misc inventory items if getIsID SE09Head1Activator == 1 if player.GetItemCount SE09Head1 < 1 ;if the player doesn't already have this item, swap the art so it looks like he picked it up SE09Head1ActivatorRef.disable SE09Head2ActivatorRef.enable player.removeItem SE09Head2 1 ;remove the other item and add this one player.additem SE09Head1 1 set SE09.whichHead to 1 ;used in other scripts to determine which item was chosen endif elseif getIsID SE09Head2Activator == 1 if player.GetItemCount SE09Head2 < 1 SE09Head2ActivatorRef.disable SE09Head1ActivatorRef.enable player.removeItem SE09Head1 1 player.addItem SE09Head2 1 set SE09.whichHead to 2 endif elseif getIsID SE09Heart1Activator == 1 if player.GetItemCount SE09Heart1 < 1 SE09Heart1ActivatorRef.disable SE09Heart2ActivatorRef.enable player.removeItem SE09Heart2 1 player.additem SE09Heart1 1 set SE09.whichHeart to 1 endif elseif getIsID SE09Heart2Activator == 1 if player.GetItemCount SE09Heart2 < 1 SE09Heart2ActivatorRef.disable SE09Heart1ActivatorRef.enable player.removeItem SE09Heart1 1 player.additem SE09Heart2 1 set SE09.whichHeart to 2 endif elseif getIsID SE09LeftArm1Activator == 1 if player.GetItemCount SE09LeftArm1 < 1 SE09LeftArm1ActivatorRef.disable SE09LeftArm2ActivatorRef.enable SE09LeftArm3ActivatorRef.enable player.removeItem SE09LeftArm2 1 player.removeItem SE09LeftArm3 1 player.additem SE09LeftArm1 1 set SE09.whichLeftArm to 1 endif elseif getIsID SE09LeftArm2Activator == 1 if player.GetItemCount SE09LeftArm2 < 1 SE09LeftArm2ActivatorRef.disable SE09LeftArm1ActivatorRef.enable SE09LeftArm3ActivatorRef.enable player.removeItem SE09LeftArm1 1 player.removeItem SE09LeftArm3 1 player.additem SE09LeftArm2 1 set SE09.whichLeftArm to 2 endif elseif getIsID SE09LeftArm3Activator == 1 if player.GetItemCount SE09LeftArm3 < 1 SE09LeftArm3ActivatorRef.disable SE09LeftArm1ActivatorRef.enable SE09LeftArm2ActivatorRef.enable player.removeItem SE09LeftArm1 1 player.removeItem SE09LeftArm2 1 player.additem SE09LeftArm3 1 set SE09.whichLeftArm to 3 endif elseif getIsID SE09Legs1Activator == 1 if player.GetItemCount SE09Legs1 < 1 SE09Legs1ActivatorRef.disable SE09Legs2ActivatorRef.enable player.removeItem SE09Legs2 1 player.additem SE09Legs1 1 set SE09.whichLegs to 1 endif elseif getIsID SE09Legs2Activator == 1 if player.GetItemCount SE09Legs2 < 1 SE09Legs2ActivatorRef.disable SE09Legs1ActivatorRef.enable player.removeItem SE09Legs1 1 player.additem SE09Legs2 1 set SE09.whichLegs to 2 endif elseif getIsID SE09RightArm1Activator == 1 if player.GetItemCount SE09RightArm1 < 1 SE09RightArm1ActivatorRef.Disable SE09RightArm2ActivatorRef.Enable SE09RightArm3ActivatorRef.Enable player.removeItem SE09RightArm2 1 player.removeItem SE09RightArm3 1 player.additem SE09RightArm1 1 set SE09.whichRightArm to 1 endif elseif getIsID SE09RightArm2Activator == 1 if player.GetItemCount SE09RightArm2 < 1 SE09RightArm2ActivatorRef.disable SE09RightArm1ActivatorRef.enable SE09RightArm3ActivatorRef.enable player.removeItem SE09RightArm1 1 player.removeItem SE09RightArm3 1 player.additem SE09RightArm2 1 set SE09.whichRightArm to 2 endif elseif getIsID SE09RightArm3Activator == 1 if player.GetItemCount SE09RightArm3 < 1 SE09RightArm3ActivatorRef.disable SE09RightArm1ActivatorRef.enable SE09RightArm2ActivatorRef.enable player.removeItem SE09RightArm1 1 player.removeItem SE09RightArm2 1 player.additem SE09RightArm3 1 set SE09.whichRightArm to 3 endif elseif getIsID SE09Torso1Activator == 1 if player.GetItemCount SE09Torso1 < 1 SE09Torso1ActivatorRef.disable SE09Torso2ActivatorRef.enable player.removeItem SE09Torso2 1 player.additem SE09Torso1 1 set SE09.whichTorso to 1 endif elseif getIsID SE09Torso2Activator == 1 if player.GetItemCount SE09Torso2 < 1 SE09Torso2ActivatorRef.disable SE09Torso1ActivatorRef.enable player.removeItem SE09Torso1 1 player.additem SE09Torso2 1 set SE09.whichTorso to 2 endif endif if getStage SE09 < 75 if SE09.whichHead > 0 && SE09.whichHeart > 0 && SE09.whichLeftArm > 0 && SE09.whichRightArm > 0 && SE09.whichLegs > 0 && SE09.whichTorso > 0 setStage SE09 75 endif endif endif End ;OnActivate
746SE09CagedVictimsButtonSCRIPTscn SE09CagedVictimsButtonSCRIPT ; activates parent after a 2 sec delay short open short next short busy float timer ref mySelf ref myParent begin onActivate if busy == 0 && SE09CagedVictims == 3 if open == 0 playgroup forward 1 set open to 1 set next to 1 set timer to 2 set SE09CagedVictims to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode if next == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set next to 0 set open to 0 set busy to 0 end
747SE09CeremonyDummySpellScriptscn SE09CeremonyDummySpellScript ;This spell does nothing and is used for its effect only
748SE09FleshAtronach01SCRIPTscn SE09FleshAtronach01SCRIPT short doorOpen ref mySelf ; this script makes the two refs below start attacking each other once the gate ref is opened begin gameMode if SE09Battle04ButtonREF.doorOpen == 1 set mySelf to getSelf startCombat SE09Battle04Atronach02REF set SE09Battle04ButtonREF.doorOpen to 2 SE09Battle04Atronach02REF.startCombat mySelf endif end
749SE09GatekeeperScriptscn SE09GatekeeperScript float combatCounter short nextPower ;0 = head, 1 = heart, 2 = leftarm, 3 = legs, 4 = right arm, 5 = torso (cycles through the various powers to give the player) Begin GameMode if isInCombat == 1 if getCombatTarget == player if combatCounter < 0 stopCombat ;set his disposition to the player to 100 so that we he never attacks the player because he hates him (he'll only attack the player if provoked) modDisposition Player 100 else set combatCounter to CombatCounter - getSecondsPassed endif endif endif End Begin OnHit Player set combatCounter to 15 End Begin OnActivate ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ANY CHANGES MADE HERE NEED TO BE REFLECTED IN THE SE09TROPHY SCRIPT AS WELL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if getActionRef == player playMagicShaderVisuals effectDrain 5 player.playMagicShaderVisuals effectDrain 5 playSound3D SPLConjurationCast ;remove any of the Gatekeeper powers the player already has (so he can only ever have one of these powers at a time) player.removeSpell SE09PwGKHead1 player.removeSpell SE09PwGKHead2 player.removeSpell SE09PwGKHeart1 player.removeSpell SE09PwGKHeart2 player.removeSpell SE09PwGKLeftArm1 player.removeSpell SE09PwGKLeftArm2 player.removeSpell SE09PwGKLeftArm3 player.removeSpell SE09PwGKLegs1 player.removeSpell SE09PwGKLegs2 player.removeSpell SE09PwGKRightArm1 player.removeSpell SE09PwGKRightArm2 player.removeSpell SE09PwGKRightArm3 player.removeSpell SE09PwGKTorso1 player.removeSpell SE09PwGKTorso2 ;dispel any active gatekeeper gift effects to prevent abuse by getting new power casting, and getting a new power and casting, and so on player.dispel SE09PwGKHead1 player.dispel SE09PwGKHead2 player.dispel SE09PwGKHeart1 player.dispel SE09PwGKHeart2 player.dispel SE09PwGKLeftArm1 player.dispel SE09PwGKLeftArm2 player.dispel SE09PwGKLeftArm3 player.dispel SE09PwGKLegs1 player.dispel SE09PwGKLegs2 player.dispel SE09PwGKRightArm1 player.dispel SE09PwGKRightArm2 player.dispel SE09PwGKRightArm3 player.dispel SE09PwGKTorso1 player.dispel SE09PwGKTorso2 ;add the appropriate power to the player if nextPower == 0 if SE09.whichHead == 1 player.addSpell SE09PwGKHead1 elseif SE09.whichHead == 2 player.addSpell SE09PwGKHead2 endif set nextPower to nextPower + 1 elseif nextPower == 1 if SE09.whichHeart == 1 player.addSpell SE09PwGKHeart1 elseif SE09.whichHeart == 2 player.addSpell SE09PwGKHeart2 endif set nextPower to nextPower + 1 elseif nextPower == 2 if SE09.whichLeftArm == 1 player.addSpell SE09PwGKLeftArm1 elseif SE09.whichLeftArm == 2 player.addSpell SE09PwGKLeftArm2 elseif SE09.whichLeftArm == 3 player.addSpell SE09PwGKLeftArm3 endif set nextPower to nextPower + 1 elseif nextPower == 3 if SE09.whichLegs == 1 player.addSpell SE09PwGKLegs1 elseif SE09.whichLegs == 2 player.addSpell SE09PwGKLegs2 endif set nextPower to nextPower + 1 elseif nextPower == 4 if SE09.whichRightArm == 1 player.addSpell SE09PwGKRightArm1 elseif SE09.whichRightArm == 2 player.addSpell SE09PwGKRightArm2 elseif SE09.whichRightArm == 3 player.addSpell SE09PwGKRightArm3 endif set nextPower to nextPower + 1 elseif nextPower == 5 if SE09.whichTorso == 1 player.addSpell SE09PwGKTorso1 elseif SE09.whichTorso == 2 player.addSpell SE09PwGKTorso2 endif set nextPower to 0 endif endif End
750SE09QuestScriptscn SE09QuestScript ;see also: ;SE09AddItemsScript -- generic activator hands out quest object in Gardens of Flesh and Bone... this is until we get the dungeon built with real activators ;SE09BodyPartActivatorScript -- this handles the swaping in and out of inventory of the Gatekeeper body parts when you select them in Xaselm ;SERelmynaVerenimScript -- runs the Ceremony scene ;SE09AltarScript -- handles deactivating crap on altar, and enableing the rebuilt Gatekeeper in conjuction with a variable set in Relmyna's monologue ;SE09AdorablePuppyScript ;SE09CagedVictimsButtom ;SE09ComponentsScript ;SE09SanctumSecretWall01Script ;SE09SpookActorSCRIPT ;SE09SpookZombieSCRIPT ;SE09VictimScript ;SERelmynaExperimentSpellScript ;SERelmynaRessurectSpellScript ref rebuiltGatekeeperRef ;holds reference to the Gatekeeper that is rebuilt in SE09, set in SE09AltarScript ;variables to help figure out what powers to give the new Gatekeeper, and what model to enable (in SE09AltarScript), variables are set in SE09BodyPartActivatorScript short whichHead ;0 = unset, 1 = helmless head (Fortify Willpower), 2 = Helm head (Fortify Strength) short whichHeart ;0 = unset, 1 = Reflect spell, 2 = Reflect damage short whichLeftArm ;0 = unset, 1 = Fire shield, 2 = Shock Shield, 3 = Frost Shield short whichRightArm ;0 = unset, 1 = Sword Arm (Fortify Blade), 2 = Axe Arm (Fortify Blunt), 3 = Mace Arm (Fortify Blunt) short whichLegs ;0 = unset, 1 = Fortify Agility, 2 = Fortify Endurance short whichTorso ;0 = unset, 1 = Fortify Health, 2 = Fortifty Magicka short weatherDoOnce ;used to control the weather during the rebuilding the Gatekeeper scene Begin GameMode ;This creates the strange weather during the rebuilding the Gatekeeper scene if weatherDoOnce == 0 if getStage SE09 >= 105 && getStage SE09 < 170 SetWeather SE09SummoningWeather 1 set weatherDoOnce to 1 endif elseif weatherDoOnce == 1 if getStage SE09 >= 170 || Player.GetInCell SETheFringeGatesOfMadness == 0 ReleaseWeatherOverride set WeatherDoOnce to 2 endif endif End
751SE09RootGateMania02SCRIPTscn SE09RootGateMania02SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short init short open short next short busy float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 1 if open == 0 message " The roots will not budge." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end ; begin onReset ; reset3DState ; set open to 0 ; set next to 0 ; set busy to 0 ; disableLinkedPathPoints ; end
752SE09SanctumSecretWall01SCRIPTscn SE09SanctumSecretWall01SCRIPT short open begin gameMode if getStageDone SE09 70 == 1 && open == 0 Xaselm04SecretBlack01REF.disable playgroup forward 0 enableLinkedPathPoints set open to 1 endif end
753SE09Scalon01SCRIPTscn SE09Scalon01SCRIPT short doorOpen ref mySelf ;this script makes the three refs below fight each other when the ref gate is opened. begin gameMode if SE09Battle01ButtonREF.doorOpen == 1 set mySelf to getSelf startCombat SE09Baliwog01REF set SE09Battle01ButtonREF.doorOpen to 2 SE09Baliwog01REF.startCombat mySelf SE09Baliwog02REF.startCombat SE09Baliwog01REF endif end
754SE09Shambles02SCRIPTscn SE09Shambles02SCRIPT short doorOpen ref mySelf ; this script makes the four refs below fight each other once the ref door is opened. begin gameMode if SE09Battle03ButtonREF.doorOpen == 1 set mySelf to getSelf startCombat SE09Battle03Shambles02REF set SE09Battle03ButtonREF.doorOpen to 2 SE09Battle03Shambles02REF.startCombat mySelf SE09Battle03Hunger01REF.startCombat SE09Battle03SkeletalHound01REF SE09Battle03SkeletalHound01REF.startCombat SE09Battle03Hunger01REF endif end
755SE09SkelealHound01SCRIPTscn SE09SkelealHound01SCRIPT short doorOpen ref mySelf ; this script makes the two refs fight each other once the ref gate is opened. begin gameMode if SE09Battle01ButtonREF.doorOpen == 1 set mySelf to getSelf startCombat SE09Battle01ShamblesREF set SE09Battle01ButtonREF.doorOpen to 2 SE09Battle01ShamblesREF.startCombat mySelf endif end
756SE09SpookActorSCRIPTscn SE09SpookActorSCRIPT short StopDraining begin onLoad forceav fatigue 0 ; start with negative fatigue modav fatigue -255 end begin gameMode if StopDraining != 1 ; Trigger will make this statement pass and break drain loop if getav fatigue >= 1 set StopDraining to 1 endif endif if StopDraining != 1 ; Don't let fatigue reach positive status if getav fatigue >= -100 modav fatigue -255 endif endif end
757SE09SpookZombieSCRIPTscn SE09SpookZombieSCRIPT ref myParent ; Parent object of the trigger is corpse short BaseFatigue ; We'll store our parent fatigue max short Offset ; Use this Variable to tweak Leveling!!! begin onTrigger player set myParent to getParentRef set BaseFatigue to 200 ;myParent.getBaseAV fatigue myParent.forceAV fatigue BaseFatigue ; Restore Full Fatigue Disable ; Disable this Trigger end
758SE09SummonFleshAtronachScriptscn SE09SummonFleshAtronachScript Begin OnLoad playMagicShaderVisuals effectSummonMythicDawn 2 setGhost 1 End
759SE09TrophyScriptscn SE09TrophyScript short nextPower ;0 = head, 1 = heart, 2 = leftarm, 3 = legs, 4 = right arm, 5 = torso (cycles through the various powers to give the player) Begin OnActivate ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ANY CHANGES MADE HERE NEED TO BE REFLECTED IN THE SE09GATEKEEPERSCRIPT AS WELL !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if getActionRef == player playMagicShaderVisuals effectDrain 5 player.playMagicShaderVisuals effectDrain 5 playSound3D SPLConjurationCast ;remove any of the Gatekeeper powers the player already has (so he can only ever have one of these powers at a time) player.removeSpell SE09PwGKHead1 player.removeSpell SE09PwGKHead2 player.removeSpell SE09PwGKHeart1 player.removeSpell SE09PwGKHeart2 player.removeSpell SE09PwGKLeftArm1 player.removeSpell SE09PwGKLeftArm2 player.removeSpell SE09PwGKLeftArm3 player.removeSpell SE09PwGKLegs1 player.removeSpell SE09PwGKLegs2 player.removeSpell SE09PwGKRightArm1 player.removeSpell SE09PwGKRightArm2 player.removeSpell SE09PwGKRightArm3 player.removeSpell SE09PwGKTorso1 player.removeSpell SE09PwGKTorso2 ;dispel any active gatekeeper gift effects to prevent abuse by getting new power casting, and getting a new power and casting, and so on player.dispel SE09PwGKHead1 player.dispel SE09PwGKHead2 player.dispel SE09PwGKHeart1 player.dispel SE09PwGKHeart2 player.dispel SE09PwGKLeftArm1 player.dispel SE09PwGKLeftArm2 player.dispel SE09PwGKLeftArm3 player.dispel SE09PwGKLegs1 player.dispel SE09PwGKLegs2 player.dispel SE09PwGKRightArm1 player.dispel SE09PwGKRightArm2 player.dispel SE09PwGKRightArm3 player.dispel SE09PwGKTorso1 player.dispel SE09PwGKTorso2 ;add the appropriate power to the player if nextPower == 0 if SE09.whichHead == 1 player.addSpell SE09PwGKHead1 elseif SE09.whichHead == 2 player.addSpell SE09PwGKHead2 endif set nextPower to nextPower + 1 elseif nextPower == 1 if SE09.whichHeart == 1 player.addSpell SE09PwGKHeart1 elseif SE09.whichHeart == 2 player.addSpell SE09PwGKHeart2 endif set nextPower to nextPower + 1 elseif nextPower == 2 if SE09.whichLeftArm == 1 player.addSpell SE09PwGKLeftArm1 elseif SE09.whichLeftArm == 2 player.addSpell SE09PwGKLeftArm2 elseif SE09.whichLeftArm == 3 player.addSpell SE09PwGKLeftArm3 endif set nextPower to nextPower + 1 elseif nextPower == 3 if SE09.whichLegs == 1 player.addSpell SE09PwGKLegs1 elseif SE09.whichLegs == 2 player.addSpell SE09PwGKLegs2 endif set nextPower to nextPower + 1 elseif nextPower == 4 if SE09.whichRightArm == 1 player.addSpell SE09PwGKRightArm1 elseif SE09.whichRightArm == 2 player.addSpell SE09PwGKRightArm2 elseif SE09.whichRightArm == 3 player.addSpell SE09PwGKRightArm3 endif set nextPower to nextPower + 1 elseif nextPower == 5 if SE09.whichTorso == 1 player.addSpell SE09PwGKTorso1 elseif SE09.whichTorso == 2 player.addSpell SE09PwGKTorso2 endif set nextPower to 0 endif endif End
760SE09VictimScriptscn SE09VictimScript short doOnce short spellCount ;used to kill the NPC after Relmyna Casts a spell at him a certain number of times short imDead ;used as a condition on SERelmynaVerenim packages to kill and resurrect the victims short diedCounter ;used as condition on SERelmynaVerenim packages to kill and resurrect the victims (she kills and resurrects them 3 times before moving on) ;diedCounter is incremented on death of THIS actor, and reset by a package ending on Relmyna (see SERelmynaVerenimScript) ref self float sayLength ;used to time say commands Begin OnDeath set imDead to 1 set diedCounter to diedCounter + 1 SERelmynaVerenimRef.evp End Begin GameMode if doOnce == 0 set self to getSelf set doOnce to 1 endif ;If the victim isn't dead make sure the imDead variable is reset and EVP Relmyna to make sure she isn't on the package to resurrect them if self.getDead == 0 if imDead == 1 set imDead to 0 SERelmynaVerenimRef.evp endif endif ;make the victim scream if Relmyna is experimenting on him if isSpellTarget SERelmynaExperimentSpell if sayLength <= 0 set sayLength to Say SE09MiscScreamingInPain ;random infos in SE09Misc quest else Set sayLength to SayLength - GetSecondsPassed endif endif End Begin OnMagicEffectHit ;SEFF if IsSpellTarget SERelmynaExperimentSpell == 1 set SERelmynaVerenimRef.takeNotes to 1 SERelmynaVerenimRef.evp if spellCount < 4 set spellCount to spellCount + 1 else kill set spellCount to 0 endif endif End
761SE09XaselmDoorScriptscn SE09XaselmDoorScript ;If the player accepts the sacrifice to set the victims free, disable them when he leaves ;The variable checked is set on SERelmynaVerenimScript running on SERelmynaVerenimRef Begin OnActivate if SERelmynaVerenimRef.playerSacrifice == 2 SE09Victim01Ref.disable SE09Victim02Ref.disable SE09CagedVictim01REF.disable SE09CagedVictim02REF.disable SE09CagedVictim03REF.disable SE09Victim05Ref.disable SE09Victim06Ref.disable set SERelmynaVerenimRef.playerSacrifice to 3 endif Activate End
762SE10BrellachCrumbleChimeSCRIPTscn SE10BrellachCrumbleChimeSCRIPT ; ref mySelf float timer short stage short triggered short init begin onActivate ;set up vars when activated if triggered == 0 && isActionRef SE10CrumbleTarget02REF == 1 triggerHitShader 3 set triggered to 1 set stage to 1 set timer to 2.5 endif end begin gameMode ;initialize if init == 0 set mySelf to getSelf set init to 1 endif ;activate trap when timer runs out if triggered == 1 && stage == 1 && timer <= 2 SE10CrumbleTrap04REF.activate mySelf 1 set stage to 2 endif ; Disabled this bit for now ; ; if triggered == 1 && stage == 2 && timer <= 2 ; SE10CrumbleTrap05REF.activate mySelf 1 ; set stage to 3 ; endif if timer > 0 set timer to timer - getSecondsPassed endif end
763SE10BrellachHungerButtonSCRIPTscn SE10BrellachHungerButtonSCRIPT ; activates the four hunger statues in XPBrellach04 ; Extended delay in reset timer so that it can't be used like a machine gun short busy short stage float timer ref mySelf begin onActivate if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 10 endif end begin gameMode if stage == 1 && timer <= 9 set mySelf to getSelf BrellachHunger01REF.activate mySelf 1 BrellachHunger02REF.activate mySelf 1 BrellachHunger03REF.activate mySelf 1 BrellachHunger04REF.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
764SE10CrumbleTarget01SCRIPTscn SE10CrumbleTarget01SCRIPT short triggered short init ref mySelf begin onTriggerMob if triggered == 0 && isActionRef player == 0 SE10PRCrumbleChimeREF.activate mySelf 1 set triggered to 1 endif end begin gameMode if init == 0 set mySelf to getSelf set init to 1 endif end
765SE10CrumbleTarget02SCRIPTscn SE10CrumbleTarget02SCRIPT short triggered short init ref mySelf begin onTriggerMob if triggered == 0 && isActionRef player == 0 SE10BrellachCrumbleChimeREF.activate mySelf 1 set triggered to 1 endif end begin gameMode if init == 0 set mySelf to getSelf set init to 1 endif end
766SE10OrderPriestTemplateSCRIPTscn SE10OrderPriestTemplateSCRIPT ; Empty, probably unnecessary script meant only to ensure that the non-Obelisk ; Priests in SE10 do not inherit the resurrection scripts.
767SE10PinnacleHungerButtonSCRIPTscn SE10PinnacleHungerButtonSCRIPT ; activates the four hunger statues in XPPinnacleRock04 ; Extended delay in reset timer so that it can't be used like a machine gun short busy short stage float timer ref mySelf begin onActivate if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 10 endif end begin gameMode if stage == 1 && timer <= 9 set mySelf to getSelf PinnacleHunger01REF.activate mySelf 1 PinnacleHunger02REF.activate mySelf 1 PinnacleHunger03REF.activate mySelf 1 PinnacleHunger04REF.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
768SE10PRCrumbleChimeSCRIPTscn SE10PRCrumbleChimeSCRIPT ref mySelf float timer short stage short triggered short init begin onActivate if triggered == 0 && isActionRef SE10CrumbleTarget01REF == 1 triggerHitShader 3 set triggered to 1 set stage to 1 set timer to 2.5 endif end begin onHitWith activate mySelf 1 end begin onMagicEffectHit activate mySelf 1 end begin gameMode if init == 0 set mySelf to getSelf set init to 1 endif if triggered == 1 && stage == 1 && timer <= 2 SE10CrumbleTrap02REF.activate mySelf 1 set stage to 2 endif ; if triggered == 1 && stage == 2 && timer <= 2 ; SE10CrumbleTrap03REF.activate mySelf 1 ; set stage to 3 ; endif if timer > 0 set timer to timer - getSecondsPassed endif end
769SE10ScalonShooterButton02SCRIPTscn SE10ScalonShooterButton02SCRIPT ; When shot with arrow or spell, this button activates the Scalon statue in front of it. ; The statue then fires a spell at the chime across the room, which plays a sound & causes ; the two columns to crumble. May also cause the ceiling to collapse, depending on how ; busy all this looks in game. short triggered short next short init ref mySelf float timer begin onActivate if triggered == 0 SE10CrumbleTarget02REF.enable playgroup forward 1 set triggered to 1 set next to 1 set timer to 1 endif end begin onHitWith activate mySelf 1 end begin onMagicEffectHit activate mySelf 1 end begin gameMode if next == 1 && timer <= 0 SE10StatueShooter02REF.cast TRAPDamageHealthTarget02 SE10CrumbleTarget02REF set next to 0 endif if init == 0 set mySelf to getSelf set init to 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
770SE10ScalonShooterButtonSCRIPTscn SE10ScalonShooterButtonSCRIPT ; When shot with arrow or spell, this button activates the Scalon statue in front of it. ; The statue then fires a spell at the chime across the room, which plays a sound & causes ; the two columns to crumble. May also cause the ceiling to collapse, depending on how ; busy all this looks in game. short triggered short next short init ref mySelf float timer begin onActivate if triggered == 0 playgroup forward 1 set triggered to 1 set next to 1 set timer to 2 endif end begin onHitWith activate mySelf 1 end begin onMagicEffectHit activate mySelf 1 end begin gameMode if next == 1 && timer <= 0 SE10StatueShooter01REF.cast TRAPDamageHealthTarget02 SE10CrumbleTarget01REF set next to 0 endif if init == 0 set mySelf to getSelf set init to 1 endif if timer > 0 set timer to timer - getSecondsPassed endif end
771SE11brazierTrigger02SCRIPTscn SE11brazierTrigger02SCRIPT float timer begin onTrigger if SE11.c2aFlameDoOnce != 1 if getDisabled == 0 if isActionRef SE11c2aTorchWidgetREF == 1 SE11c2aFlameMarker02.enable ; not happy, but parenting doesn't seem to work set SE11.c2aFlameStatus to (SE11.c2aFlameStatus + 1) ; increment status counter in SE11QuestScript cast SE11c2aTimerSpell02 player ; Just provides player an on-screen timer icon set timer to 10 disable endif endif endif END ;onTrigger block begin gameMode if SE11.c2aFlameDoOnce != 1 ; when in victory state, let PC win if SE11.c2aFlameStatus >= 3 SE11c2aPuzzleChestREF.unlock ; unlock widget chest set SE11.c2aFlameDoOnce to 1 ; this flag handles post-puzzle victory state endif endif if SE11.c2aFlameDoOnce != 1 if timer <= 0 && getDisabled == 1 SE11c2aFlameMarker02.disable ; have to use specifics. Blah. set SE11.c2aFlameStatus to (SE11.c2aFlameStatus - 1) ; decrement status counter enable ; turn trigger back on endif endif if timer >= 0 set timer to (timer - getSecondsPassed) endif END ;gameMode block
772SE11brazierTrigger03SCRIPTscn SE11brazierTrigger03SCRIPT float timer begin onTrigger if SE11.c2aFlameDoOnce != 1 if getDisabled == 0 if isActionRef SE11c2aTorchWidgetREF == 1 SE11c2aFlameMarker03.enable ; not happy, but parenting doesn't seem to work set SE11.c2aFlameStatus to (SE11.c2aFlameStatus + 1) ; increment status counter in SE11QuestScript cast SE11c2aTimerSpell03 player ; Just provides player an on-screen timer icon set timer to 10 disable endif endif endif end begin gameMode if SE11.c2aFlameDoOnce != 1 if SE11.c2aFlameStatus >= 3 SE11c2aPuzzleChestREF.unlock ; unlock widget chest set SE11.c2aFlameDoOnce to 1 endif endif if SE11.c2aFlameDoOnce != 1 if timer <= 0 && getDisabled == 1 SE11c2aFlameMarker03.disable ; have to use specifics. Blah. set SE11.c2aFlameStatus to (SE11.c2aFlameStatus - 1) ; decrement status counter enable ; turn trigger back on endif endif if timer >= 0 set timer to (timer - getSecondsPassed) endif end
773SE11brazierTriggerSCRIPTscn SE11brazierTriggerSCRIPT float timer begin onTrigger if SE11.c2aFlameDoOnce != 1 if getDisabled == 0 if isActionRef SE11c2aTorchWidgetREF == 1 SE11c2aFlameMarker01.enable set SE11.c2aFlameStatus to (SE11.c2aFlameStatus + 1) cast SE11c2aTimerSpell01 player set timer to 10 disable endif endif endif end begin gameMode if SE11.c2aFlameDoOnce != 1 if SE11.c2aFlameStatus >= 3 SE11c2aPuzzleChestREF.unlock ; unlock widget chest set SE11.c2aFlameDoOnce to 1 endif endif if SE11.c2aFlameDoOnce != 1 if timer <= 0 && getDisabled == 1 SE11c2aFlameMarker01.disable ; have to use specifics. Blah. set SE11.c2aFlameStatus to (SE11.c2aFlameStatus - 1) ; decrement status counter enable ; turn trigger back on endif endif if timer >= 0 set timer to (timer - getSecondsPassed) endif end
774SE11bStandingStoneScriptscn SE11bStandingStoneScript short StandingStoneActivate ;Controls standing stone state short DopplegangerRandom ;Set to 1 to begin random doppleganger creation short Dice ;Used for random doppleganger creation short DopplegangerHealth ;Variable for holding the doppleganger's health short DopplegangerSpeed ;Variable for holding the doppleganger's speed short PrefersBlunt ;Set to 1 if blunt skill is higher than blade short PrefersBlade ;Set to 1 if blade skill is higher than blunt short doOnce ;Internal control variable short Tick ;Internal control variable float RandomTimer float timer ;Timer ref SE11DopplegangerRef ;Reference variable for doppleganger BEGIN OnLoad SE11DopplegangerRef.AddSpell SE11DopplegangerSpell END BEGIN GameMode ;this block creates and sets the doppleganger if ( doOnce == 0 ) ;creates doppleganger and applies effects set SE11DopplegangerRef to player.CreateFullActorCopy SE11DopplegangerRef.AddSpell SE11DopplegangerSpell ;Doubles the dopplegangers health for balance set DopplegangerHealth to ( Player.GetBaseAv Health * 2 ) SE11DopplegangerRef.SetAv Health DopplegangerHealth ;Halves the dopplegangers speed for balance set DopplegangerSpeed to ( Player.GetBaseAv Speed / 2 ) SE11DopplegangerRef.SetAv Speed DopplegangerSpeed ;Determines the preferred weapon for the doppleganger if Player.GetAv Blade >= Player.GetAv Blunt set PrefersBlade to 1 else set PrefersBlunt to 1 endif ;moves doppleganger to holding pen SE11DopplegangerRef.moveto SE11bDopplegangerHoldingMarker ;Removes quest items, problem spells, and problem items from doppleganger SE11DopplegangerRef.RemoveItem DASkullCorruption 1 SE11DopplegangerRef.RemoveItem DAClavicusUmbraSword 1 SE11DopplegangerRef.RemoveItem DAWabbajack01 1 SE11DopplegangerRef.RemoveItem FGD03BWCBlade 1 SE11DopplegangerRef.RemoveItem MG03Staff 1 SE11DopplegangerRef.RemoveItem MG08Staff 1 SE11DopplegangerRef.RemoveItem Dark01KnifeBlade 1 SE11DopplegangerRef.RemoveItem OldDAVolendrung 1 SE11DopplegangerRef.RemoveItem MS40Dagger 1 SE11DopplegangerRef.RemoveItem FGC06WeapSteelLongsword 1 SE11DopplegangerRef.RemoveItem FGC06WeapSteelWarhammer 1 SE11DopplegangerRef.RemoveItem FGC06WeapSteelBow 1 SE11DopplegangerRef.RemoveItem SE09BreathNet 1 SE11DopplegangerRef.RemoveItem FGD03BlackwoodShield 1 SE11DopplegangerRef.RemoveItem DAGoldbrand 1 SE11DopplegangerRef.RemoveItem DASanguineRose 1 SE11DopplegangerRef.RemoveItem MGStaffofWorms 1 SE11DopplegangerRef.RemoveItem DAEbonyBlade 1 SE11DopplegangerRef.RemoveItem DAMephalaDalviluDagger 1 SE11DopplegangerRef.RemoveItem DAMolagBalCursedMace 1 SE11DopplegangerRef.RemoveItem DAMolagBalMace 1 SE11DopplegangerRef.RemoveItem Dark05Blade 1 SE11DopplegangerRef.RemoveItem TG01RohssansSword 1 SE11DopplegangerRef.RemoveItem TG05HrormirsIcestaff 1 SE11DopplegangerRef.RemoveItem TG11ElvenLongSword 1 SE11DopplegangerRef.RemoveItem TG11ElvenMace 1 SE11DopplegangerRef.RemoveItem SvenjaBow 1 SE11DopplegangerRef.RemoveItem SilvDagshimmerthorn, 1 SE11DopplegangerRef.RemoveItem SQ10Rockshatter01, 1 SE11DopplegangerRef.RemoveItem SQ10Rockshatter05, 1 SE11DopplegangerRef.RemoveItem SQ10Rockshatter10, 1 SE11DopplegangerRef.RemoveItem SQ10Rockshatter15, 1 SE11DopplegangerRef.RemoveItem SQ10Rockshatter20, 1 SE11DopplegangerRef.RemoveItem SQ10Rockshatter25, 1 SE11DopplegangerRef.RemoveItem Torch02, 99 SE11DopplegangerRef.RemoveSpell SE07SaintSpell SE11DopplegangerRef.RemoveSpell SEPwSummonGoldenSaint SE11DopplegangerRef.RemoveSpell SE07SeducerSpell SE11DopplegangerRef.RemoveSpell SEPwSummonDarkSeducer SE11DopplegangerRef.RemoveSpell StandardSummonAtronachFlameJourneyman SE11DopplegangerRef.RemoveSpell StandardSummonAtronachFrostExpert SE11DopplegangerRef.RemoveSpell StandardSummonAtronachStormMaster SE11DopplegangerRef.RemoveSpell StandardSummonClannfearExpert SE11DopplegangerRef.RemoveSpell StandardSummonDaedrothExpert SE11DopplegangerRef.RemoveSpell StandardSummonDremoraJourneyman SE11DopplegangerRef.RemoveSpell StandardSummonDremoraLordMaster SE11DopplegangerRef.RemoveSpell StandardSummonLichMaster SE11DopplegangerRef.RemoveSpell StandardSummonSkeletonApprentice SE11DopplegangerRef.RemoveSpell StandardSummonSkeletonChampionExpert SE11DopplegangerRef.RemoveSpell StandardSummonSkeletonGuardianJourneyman SE11DopplegangerRef.RemoveSpell StandardSummonSkeletonHeroExpert SE11DopplegangerRef.RemoveSpell StandardSummonSpiderDaedraExpert SE11DopplegangerRef.RemoveSpell StandardSummonWraithFadedExpert SE11DopplegangerRef.RemoveSpell StandardSummonWraithGloomMaster SE11DopplegangerRef.RemoveSpell StandardSummonXivilaiMaster SE11DopplegangerRef.RemoveSpell StandardSummonZombieApprentice SE11DopplegangerRef.RemoveSpell StandardSummonZombieHeadlessJourneyman SE11DopplegangerRef.RemoveSpell SEStdSummonAtronachFlesh2Apprentice SE11DopplegangerRef.RemoveSpell SEStdSummonAtronachFlesh3Journeyman SE11DopplegangerRef.RemoveSpell SEStdSummonAtronachFlesh4Expert SE11DopplegangerRef.RemoveSpell SEStdSummonAtronachFlesh5Master SE11DopplegangerRef.RemoveSpell SEStdSummonHunger2Apprentice SE11DopplegangerRef.RemoveSpell SEStdSummonHunger3Journeyman SE11DopplegangerRef.RemoveSpell SEStdSummonHunger4Expert SE11DopplegangerRef.RemoveSpell SEStdSummonHunger5Master SE11DopplegangerRef.RemoveSpell SEStdSummonShambles3Journeyman SE11DopplegangerRef.RemoveSpell SEStdSummonShambles4Expert SE11DopplegangerRef.RemoveSpell SEStdSummonShambles5Master ;Sets doppleganger combat style SE11DopplegangerRef.SetCombatStyle SE11DopplegangerCombatStyle ;Removes doppleganger from all guilds SE11DopplegangerRef.SetFactionRank MagesGuild, -1 SE11DopplegangerRef.SetFactionRank ThievesGuild, -1 SE11DopplegangerRef.SetFactionRank Beggars, -1 SE11DopplegangerRef.SetFactionRank ICWaterFrontResident, -1 SE11DopplegangerRef.SetFactionRank FightersGuild, -1 SE11DopplegangerRef.SetFactionRank DarkBrotherhood, -1 SE11DopplegangerRef.SetFactionRank DarkPlayer, -1 SE11DopplegangerRef.SetFactionRank EvilSolo, 0 ;blocks the script from running twice set doOnce to 1 endif ;Sets stage when player enters cell if ( player.GetInCell XPMilchar03 == 1 ) && ( getStageDone SE11 150 == 0 ) SetStage SE11 150 endif if ( SE11DopplegangerRef.getDead == 1 ) && ( getStageDone SE11 160 == 0 ) setstage SE11 160 SE11DopplegangerRef.pme strp SE11DopplegangerRef.setdestroyed 1 endif if ( GetStageDone SE11 155 == 0 ) if ( Player.GetDistance SE11bStandingStoneRef < 500 ) ;sets standing stone to active state set StandingStoneActivate to 1 set timer to 12 ;sets quest stage setstage SE11 155 endif endif ;This block is run when the player activates the standing stone if ( StandingStoneActivate == 1 ) if ( timer >= -1 ) set timer to timer - GetSecondsPassed endif if ( timer < 11 ) && ( tick == 0 ) SE11CloneFXREF.PlayGroup forward 1 set Tick to 1 elseif ( timer < 5 ) && ( tick == 1 ) SE11DopplegangerRef.addScriptPackage SE11DopplegangerArrivePackage SE11DopplegangerRef.additem SE11AnimObject 1 SE11DopplegangerRef.evp set Tick to 2 elseif ( timer < 3 ) && ( tick == 2 ) ;Adds and equips the doppleganger's sword if ( PrefersBlade == 1 ) SE11DopplegangerRef.AddItem SE11LLDoppleGangerSword 1 SE11DopplegangerRef.UnequipItem Torch02, 1 if ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade01 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade01 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade05 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade05 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade10 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade10 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade15 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade15 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade20 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade20 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade25 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade25 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowBlade30 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowBlade30 setAlert 1 endif endif if ( PrefersBlunt == 1 ) SE11DopplegangerRef.AddItem SE11LLDoppleGangerAxe 1 SE11DopplegangerRef.UnequipItem Torch02, 1 if ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe01 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe01 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe05 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe05 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe10 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe10 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe15 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe15 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe20 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe20 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe25 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe25 setAlert 1 elseif ( SE11DopplegangerRef.GetItemCount SE11ShadowAxe30 >= 1 ) SE11DopplegangerRef.EquipItem SE11ShadowAxe30 setAlert 1 endif endif ;moves doppleganger to grove area SE11DopplegangerRef.UnequipItem Torch02, 1 SE11DopplegangerRef.moveto SE11bDopplegangerMarker ;SE11DopplegangerRef.evp set Tick to 3 elseif ( timer < 2 ) && ( tick == 3 ) set Tick to 4 elseif ( timer <= 0 ) && ( tick == 4 ) SE11bDopplegangerSpawnEffectRef.disable ;forces doppleganger to attack the player SE11DopplegangerRef.startcombat player SE11DopplegangerRef.moddisposition player -200 ;sets standing stone to inactive state set StandingStoneActivate to 0 setDestroyed 1 set Tick to -1 endif endif END BEGIN OnActivate if ( GetStageDone SE11 155 == 0 ) if ( isactionRef Player == 1 ) ;sets standing stone to active state set StandingStoneActivate to 1 set timer to 12 ;sets quest stage setstage SE11 155 endif endif END
775SE11c2aTorchSCRIPTscn SE11c2aTorchSCRIPT Begin OnLoad pms SE11c2aTorchShader End begin OnActivate messageBox "The ritual torch can be held by any, but owned by none." end
776SE11GroveButtonSCRIPTscn SE11GroveButtonSCRIPT ; activates parent and resets to starting position ; only if player's completed appropriate stage of quest short busy short stage float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if getStageDone SE11 190 == 1 if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif else Messagebox "An unseen force holds it fast." endif end begin gameMode if stage == 1 && timer <= 3 myParent.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
777SE11GroveTrigZoneSCRIPTscn SE11GroveTrigZoneSCRIPT Begin OnTrigger Player SE11bStandingStoneRef.activate player END
778SE11MilcharPuzzleChestSCRIPTscn SE11MilcharPuzzleChestSCRIPT begin onActivate if SE11.c2aFlameDoOnce != 1 ; check quest variable for puzzle completion messageBox "It's frozen shut." pms effectFrostShield ; a little visual flair to sell the idea sms effectFrostShield else ; if puzzle beaten, behave as normal. activate endif end
779SE11TrophyScriptscn SE11TrophyScript ;puts shader on book Begin OnLoad pms SEOrderShader End
780SE12AnimatingDoorSCRIPTscn SE12AnimatingDoorSCRIPT short ordered ; 1 = player can't open ref myActionRef float timer ; used to time door closing again ref tempRef ; used for calling gnarls to open ordered doors ref myParent ; linked animating crystals begin OnLoad set myParent to GetParentRef if ordered == 1 && getstage SE12 < 180 pms SEOrderShader disablelinkedpathpoints ; animate linked crystals if myParent != 0 myParent.Activate SEObeliskTurnOn 1 endif else set ordered to 0 sms SEOrderShader enablelinkedpathpoints ; animate linked crystals if myParent != 0 myParent.Activate SEObeliskTurnOff 1 endif endif end begin OnActivate if isactionRef player == 1 ; player is activating if ordered == 1 && getopenstate >= 3 && player.getitemcount SE12OrderKey == 0 message "The crystals prevent you from opening this door." ; ************************************************** ; call followers to open door, if any alive ; ************************************************** ; clear tempRef -- we'll use this to find a nearby gnarl cultivator set tempRef to 0 ; look at spawners in my cell -- they hold onto a reference to their current spawned gnarl if GetInCell XPGloomstonePassage01 == 1 if SE12GnarlSpawner01A.myspawn != 0 set tempRef to SE12GnarlSpawner01A.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef == 0 && SE12GnarlSpawner01B.myspawn != 0 set tempRef to SE12GnarlSpawner01B.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef == 0 && SE12GnarlSpawner01C.myspawn != 0 set tempRef to SE12GnarlSpawner01C.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef != 0 && tempRef.getDead == 0 tempRef.evp endif elseif GetInCell XPGloomstonePassage02 == 1 if SE12GnarlSpawner02A.myspawn != 0 set tempRef to SE12GnarlSpawner02A.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef == 0 && SE12GnarlSpawner02B.myspawn != 0 set tempRef to SE12GnarlSpawner02B.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef != 0 && tempRef.getDead == 0 tempRef.evp endif elseif GetInCell XPGloomstonePassage03 == 1 if SE12GnarlSpawner03A.myspawn != 0 set tempRef to SE12GnarlSpawner03A.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef == 0 && SE12GnarlSpawner03B.myspawn != 0 set tempRef to SE12GnarlSpawner03B.mySpawn ; if he's dead, don't use him if tempRef.getDead == 1 set tempRef to 0 endif endif if tempRef != 0 && tempRef.getDead == 0 tempRef.evp endif endif else if ordered == 1 && player.getitemcount SE12OrderKey > 0 message "You use a Shard of Order to open the door." player.removeitem SE12OrderKey 1 ; unorder door set ordered to 0 sms SEOrderShader enablelinkedpathpoints ; animate linked crystals if myParent != 0 myParent.Activate SEObeliskTurnOff 1 endif set SE12.OrderedDoorsCount to SE12.OrderedDoorsCount - 1 endif set timer to 30 Activate endif else if SE12.debug == 1 message "DEBUG: Door being activated.", 1 endif ; anything else is activating set myActionRef to getActionRef if myActionRef.getinfaction SE12GnarlFaction == 1 ; Gnarl is activating me: if myActionRef.isOwner SE12OrderedGnarlFaction == 1 ; ordered Gnarl makes the door ordered if ordered == 0 if SE12.debug == 1 message "TEMP: Door ordered." endif set SE12.OrderedDoorsCount to SE12.OrderedDoorsCount + 1 ; close this door SetOpenState 0 pme OPEN ; first time it happens, set stage 40 if getstage SE12 >= 10 setstage SE12 40 endif endif ; failsafe: always set ordered to 1 and add shader set ordered to 1 pms SEOrderShader disablelinkedpathpoints if myParent != 0 myParent.Activate SEObeliskTurnOn 1 endif else ; unordered Gnarl makes the door unordered if ordered == 1 set SE12.OrderedDoorsCount to SE12.OrderedDoorsCount - 1 pme OPEN if SE12.debug == 1 message "TEMP: Door unordered." endif endif ; failsafe: always set ordered to 0 and remove shader set ordered to 0 sms SEOrderShader enablelinkedpathpoints if myParent != 0 myParent.Activate SEObeliskTurnOff 1 endif endif ; gnarls may head back to pool after opening door if getrandompercent <= 33 myActionRef.additem SE12GnarlWidget 1 ; myActionRef.evp endif endif if ordered == 0 set timer to 30 if SE12.debug == 1 message "TEMP: Door ACTIVATE called", 1 endif Activate endif endif end begin gamemode if timer > 0 set timer to timer - getsecondsPassed ; first door, set stage 30 if getStageDone SE12 30 == 0 if timer < 27 && getIsReference XPGloomstone01DoorA == 1 setstage SE12 30 endif endif elseif getopenstate == 1 ; door is open, so close it setopenstate 0 endif end
781SE12ContainerSCRIPTscn SE12ContainerSCRIPT short ordered ; 1 = player can't open ref myActionRef ref myParent ; linked animating crystals short button ; for message box begin OnLoad set myParent to GetParentRef ; after quest is done, all containers become unordered onLoad if ordered == 1 && getstage SE12 < 180 pms SEOrderShader if myParent != 0 myParent.Activate SEObeliskTurnOn 1 endif else set ordered to 0 sms SEOrderShader if myParent != 0 myParent.Activate SEObeliskTurnOff 1 endif endif end begin OnActivate if isactionRef player == 1 ; player is activating if ordered == 1 if player.getitemcount SE12OrderKey == 0 message "The crystals prevent you from opening this container." else messagebox "Do you want to use a Shard of Order to open the container?", "Yes", "No" endif else Activate endif else ; anything else is activating set myActionRef to getActionRef if myActionRef.getinfaction SE12GnarlFaction == 1 ; Gnarl is activating me: if myActionRef.isOwner SE12OrderedGnarlFaction == 1 ; ordered Gnarl makes the pod ordered if ordered == 0 if SE12.debug == 1 message "DEBUG: Container ordered." endif set ordered to 1 set SE12.OrderedPodsCount to SE12.OrderedPodsCount + 1 pme OPEN pms SEOrderShader if myParent != 0 myParent.Activate SEObeliskTurnOn 1 endif endif else ; unordered Gnarl if ordered == 1 if SE12.debug == 1 message "DEBUG: Container unordered." endif set ordered to 0 set SE12.OrderedPodsCount to SE12.OrderedPodsCount - 1 pme OPEN sms SEOrderShader if myParent != 0 myParent.Activate SEObeliskTurnOff 1 endif endif endif ; gnarls may head back to pool after opening door if getrandompercent <= 33 myActionRef.additem SE12GnarlWidget 1 endif endif Activate endif end begin gamemode set button to getButtonPressed if button > -1 if button == 0 player.removeitem SE12OrderKey 1 set ordered to 0 set SE12.OrderedPodsCount to SE12.OrderedPodsCount - 1 pme OPEN sms SEOrderShader if myParent != 0 myParent.Activate SEObeliskTurnOff 1 endif Activate endif endif end
782SE12DoorTriggerZoneSCRIPTscn SE12DoorTriggerZoneSCRIPT ; used to open doors because of many problems with gnarls and pathgrids and doors short triggered ref myParentRef ; parent is the door itself ref myActionRef ; who is activating me? float timer begin onTriggerActor if triggered == 0 set myActionRef to getActionRef set triggered to 1 set timer to 2 ; is this a gnarl trying to open the door? if myActionRef.GetInFaction SE12GnarlFaction == 1 set myParentRef to getParentRef ; if linked door is closed, open it if myParentRef.getOpenState == 3 myParentRef.Activate myActionRef 1 myActionRef.evp endif set timer to 5 endif endif end begin onReset set triggered to 0 end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
783SE12FountainheadDoorSCRIPTscn SE12FountainheadDoorSCRIPT begin OnActivate if getstage SE12 < 20 if IsActionRef player == 1 MessageBox "The door is sealed and will not open." endif else Activate endif end
784SE12GnarlOrderedScriptscn SE12GnarlOrderedScript ; makes gnarls unaggressive by default (aggression unfortunately doesn't carry over from template) ; this script initializes ordered gnarls short init ; set to 1 when creature is first initialized ref mySelf begin OnLoad if init == 0 set init to 1 ; initialize all gnarls to aggression 0 forceav aggression 0 ; I start ordered if getstage SE12 < 180 setownership SE12OrderedGnarlFaction endif endif ; on load, make sure I'm ordered or unordered based on "ownership" if isOwner SE12OrderedGnarlFaction == 1 && getstage SE12 < 180 pms SEOrderShader forceav aggression 70 else clearOwnership ; clear ownership, if any sms SEOrderShader forceav aggression 0 endif end begin OnDeath sms SEOrderShader clearOwnership ; clear ownership, if any end ; ***************************************************************************** ; "Activate" pools section ; ***************************************************************************** ; when travel package to pool completes, activate pool ; (this triggers pool script to order/unorder the gnarl if appropriate) begin OnPackageDone SE12Gnarl01FindPoolA set mySelf to GetSelf XPGloomstone01PoolA.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FindPoolB set mySelf to GetSelf XPGloomstone01PoolB.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FindPoolC set mySelf to GetSelf XPGloomstone01PoolC.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FindPoolD set mySelf to GetSelf XPGloomstone01PoolD.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolA set mySelf to GetSelf XPGloomstone01PoolA.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolB set mySelf to GetSelf XPGloomstone01PoolB.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolC set mySelf to GetSelf XPGloomstone01PoolC.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolD set mySelf to GetSelf XPGloomstone01PoolD.activate mySelf 1 end ; XPGloomstonePassage02 packages begin OnPackageDone SE12Gnarl02FindPoolA set mySelf to GetSelf SE12PoolManiaRef.activate mySelf 1 end begin OnPackageDone SE12Gnarl02FollowerFindPoolA set mySelf to GetSelf SE12PoolManiaRef.activate mySelf 1 end ; XPGloomstonePassage03 packages begin OnPackageDone SE12Gnarl03FindPoolB set mySelf to GetSelf SE12PoolDementiaRef.activate mySelf 1 end begin OnPackageDone SE12Gnarl03FollowerFindPoolB set mySelf to GetSelf SE12PoolDementiaRef.activate mySelf 1 end ; ***************************************************************************** ; end Find Pools section ; ***************************************************************************** ;ScriptName SEGnarlGrow Short Effect Short ShowShader Float GrowTimer Float NewScale Begin OnLoad ; Precaution to clear leftover data because AddSpell affects base object, not reference RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock End Begin OnMagicEffectHit FIDG ; Fire damage effect if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowFire AddSpell SEAbGnarlGrowFire EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowFire EndIf EndIf End Begin OnMagicEffectHit FRDG ; Frost damage effect if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowFrost AddSpell SEAbGnarlGrowFrost EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowFrost EndIf EndIf End Begin OnMagicEffectHit SHDG ; Shock damage effect if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowShock EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowShock EndIf EndIf End Begin GameMode ; Grow for 3 seconds ; Stay for 10 seconds ; Shrink for 3 seconds If Effect == 1 && GrowTimer <= 0 Set GrowTimer to 16 PMS effectSpellAbsorption Set ShowShader to 0 EndIf If GrowTimer > 13 ; grow Set GrowTimer to GrowTimer - GetSecondsPassed Set NewScale to 1.5 - ( ( GrowTimer - 13) / 6) SetScale NewScale ElseIf GrowTimer > 3 ; stay at that height Set GrowTimer to GrowTimer - GetSecondsPassed Set ShowShader to 0 ElseIf GrowTimer > 0 ; shrink Set GrowTimer to GrowTimer - GetSecondsPassed Set NewScale to ( GrowTimer / 6 ) + 1 If NewScale <= 1 Set NewScale to 1 Set Effect to 0 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock EndIf SetScale NewScale If ShowShader == 0 PME DSPL Set ShowShader to 1 EndIf EndIf End Begin OnDeath If GrowTimer > 3 Set GrowTimer to 3 EndIf RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock End
785SE12GnarlScriptscn SE12GnarlScript ; makes gnarls unaggressive by default (aggression unfortunately doesn't carry over from template) short init ; set to 1 when creature is first initialized ref mySelf begin OnLoad if init == 0 set init to 1 ; initialize all gnarls to aggression 0 forceav aggression 0 endif ; on load, make sure I'm ordered or unordered based on "ownership" if isOwner SE12OrderedGnarlFaction == 1 && getStage SE12 < 180 pms SEOrderShader forceav aggression 70 else clearOwnership ; clear ownership, if any sms SEOrderShader forceav aggression 0 endif end begin OnDeath clearOwnership ; clear ownership sms SEOrderShader ; if I'm the first follower, clear the timer on the spawner if GetIsReference SE12GnarlFollowerRef == 1 if SE12GnarlSpawner01A.timer > 1 set SE12GnarlSpawner01A.timer to 1 endif endif end ; "Activate" pools begin OnPackageDone SE12Gnarl01FindPoolA set mySelf to GetSelf XPGloomstone01PoolA.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FindPoolB set mySelf to GetSelf XPGloomstone01PoolB.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FindPoolC set mySelf to GetSelf XPGloomstone01PoolC.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FindPoolD set mySelf to GetSelf XPGloomstone01PoolD.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolA set mySelf to GetSelf XPGloomstone01PoolA.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolB set mySelf to GetSelf XPGloomstone01PoolB.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolC set mySelf to GetSelf XPGloomstone01PoolC.activate mySelf 1 end begin OnPackageDone SE12Gnarl01FollowerFindPoolD set mySelf to GetSelf XPGloomstone01PoolD.activate mySelf 1 end ; XPGloomstonePassage02 packages begin OnPackageDone SE12Gnarl02FindPoolA set mySelf to GetSelf SE12PoolManiaRef.activate mySelf 1 end begin OnPackageDone SE12Gnarl02FollowerFindPoolA set mySelf to GetSelf SE12PoolManiaRef.activate mySelf 1 end ; XPGloomstonePassage03 packages begin OnPackageDone SE12Gnarl03FindPoolB set mySelf to GetSelf SE12PoolDementiaRef.activate mySelf 1 end begin OnPackageDone SE12Gnarl03FollowerFindPoolB set mySelf to GetSelf SE12PoolDementiaRef.activate mySelf 1 end ;ScriptName SEGnarlGrow Short Effect Short ShowShader Float GrowTimer Float NewScale Begin OnLoad ; Precaution to clear leftover data because AddSpell affects base object, not reference RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock End Begin OnMagicEffectHit FIDG ; Fire damage effect if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowFire AddSpell SEAbGnarlGrowFire EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowFire EndIf EndIf End Begin OnMagicEffectHit FRDG ; Frost damage effect if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowFrost AddSpell SEAbGnarlGrowFrost EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowFrost EndIf EndIf End Begin OnMagicEffectHit SHDG ; Shock damage effect if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowShock EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowShock EndIf EndIf End Begin GameMode ; Grow for 3 seconds ; Stay for 10 seconds ; Shrink for 3 seconds If Effect == 1 && GrowTimer <= 0 Set GrowTimer to 16 PMS effectSpellAbsorption Set ShowShader to 0 EndIf If GrowTimer > 13 ; grow Set GrowTimer to GrowTimer - GetSecondsPassed Set NewScale to 1.5 - ( ( GrowTimer - 13) / 6) SetScale NewScale ElseIf GrowTimer > 3 ; stay at that height Set GrowTimer to GrowTimer - GetSecondsPassed Set ShowShader to 0 ElseIf GrowTimer > 0 ; shrink Set GrowTimer to GrowTimer - GetSecondsPassed Set NewScale to ( GrowTimer / 6 ) + 1 If NewScale <= 1 Set NewScale to 1 Set Effect to 0 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock EndIf SetScale NewScale If ShowShader == 0 PME DSPL Set ShowShader to 1 EndIf EndIf End Begin OnDeath If GrowTimer > 3 Set GrowTimer to 3 EndIf RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock End
786SE12GnarlSpawnerNewSCRIPTscn SE12GnarlSpawnerNewSCRIPT ref myParent ; marker where I spawn a new gnarl ref mySpawn ; my current spawn ref mySelf ; the spawner itself (how original) float timer ; timer to prevent repeated spawning short triggered ; set to 1 while spawner is animating or not ready to spawn short GnarlGo ; added variable to set next stage & move spawning to GameMode block begin OnLoad if triggered == 1 playgroup Idle 1 else playgroup Backward 1 endif end begin OnActivate set myParent to GetParentRef set mySelf to getSelf if isActionRef player == 1 ; when player activates, check if spawn is dead or far away if triggered == 1 if mySpawn == 0 set triggered to 0 else if mySpawn.getDead == 1 || mySpawn.isOwner SE12OrderedGnarlFaction == 1 set mySpawn to 0 set triggered to 0 elseif getDistance mySpawn > 2000 mySpawn.kill set mySpawn to 0 set triggered to 0 endif endif endif if timer <= 0 && triggered == 0 set timer to 60 set triggered to 1 set GnarlGo to 1 else message "The chrysalis appears to be empty." endif endif end begin gamemode if triggered == 1 && GnarlGo == 1 && timer <= 60 playgroup forward 1 set GnarlGo to 2 endif ; spawn correct gnarl depending on what cell I'm in if triggered == 1 && GnarlGo == 2 && timer <= 59.25 if getincell XPGloomstonePassage01 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl01Follower elseif getincell XPGloomstonePassage02 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl02Follower elseif getincell XPGloomstonePassage03 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl03Follower elseif getincell XPGloomstonePassage04 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl04Follower else set mySpawn to mySelf.placeAtMe SE12LL1Gnarl01 endif set GnarlGo to 3 endif ; give journal first time player activates the spawner if GnarlGo == 3 && timer <= 55 set GnarlGo to 4 setstage SE12 60 endif if GnarlGo == 4 && timer <= 0 set GnarlGo to 0 endif if triggered == 1 && timer <=0 ; am I ready to spawn? if mySpawn == 0 set triggered to 0 elseif mySpawn.isOwner SE12OrderedGnarlFaction == 1 || mySpawn.getDead == 1 set triggered to 0 set mySpawn to 0 ; clear mySpawn when dead or ordered so doors don't try to call them endif if triggered == 0 ; animate back to "ready to spawn" state playgroup Backward 1 else ; wait a while before checking if I'm ready to spawn again set timer to 30 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end
787SE12HealingPool01SCRIPTscn SE12HealingPool01SCRIPT ; Self-activated, no trigger required short heal ; set to 1 for pool to be able to heal player short SpellRank ; what level of heal to cast on player short triggered float timer ref mySelf ref myParent begin OnLoad ; post quest, all pools are cleansed if getstage SE12 >= 180 set heal to 1 endif end begin OnActivate ; enable healing when activated (meaning associated pool is cleansed) set heal to 1 ; notify parent (crystal) that I've been cleansed set myParent to GetParentRef set mySelf to GetSelf myParent.activate mySelf 1 end begin onTriggerActor player if triggered == 0 && heal == 1 if player.getav health < player.getbaseav health ; cast heal spell on player ;This section will choose the trap spell based on the PC's level if player.GetLevel <= 5 set SpellRank to 1 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set SpellRank to 2 elseif ( player.GetLevel >= 11 ) && ( player.GetLevel <= 15 ) set SpellRank to 3 elseif ( player.GetLevel >= 16 ) set SpellRank to 4 endif ; move marker to player and cast SE12HealingPoolCastingMarker.moveto player 0 0 150 if SpellRank == 1 SE12HealingPoolCastingMarker.cast TRAPBloodFountainHeal01 player elseif SpellRank == 2 SE12HealingPoolCastingMarker.cast TRAPBloodFountainHeal02 player elseif SpellRank == 3 SE12HealingPoolCastingMarker.cast TRAPBloodFountainHeal03 player elseif SpellRank == 4 SE12HealingPoolCastingMarker.cast TRAPBloodFountainHeal04 player endif endif set triggered to 1 set timer to 5 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
788SE12LockTrigSCRIPTscn SE12LockTrigSCRIPT ;Locks parent and resets after 2 seconds short triggered ref target float timer begin onTrigger player if triggered == 0 set target to getParentRef target.lock 100 set triggered to 1 set timer to 2 endif end begin onReset set triggered to 0 end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
789SE12ObeliskCrystalSCRIPTscn SE12ObeliskCrystalSCRIPT ; when activated will animate forward ; can daisy-chain to another activator (just parent-link the statue to any activator OTHER THAN whatever ; triggered it ref mySelf ref myParent short next short triggered short init begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 && triggered == 0 set next to 1 set triggered to 1 playgroup backward 1 enablelinkedpathpoints endif endif end begin gameMode if next == 1 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif end begin onLoad if init == 0 playgroup forward 1 disablelinkedpathpoints set init to 1 endif ; post quest, turn crystals off (all pools are cleansed) if init == 1 && getstage SE12 >= 180 playgroup backward 1 enablelinkedpathpoints set init to 2 endif end
790SE12OrderPriestDementiaSCRIPTscn SE12OrderPriestDementiaSCRIPT ; counts dead priests around Dementia pool ref mySelf ref traitorRef Begin OnAlarm 3 Player ; traitor begins talking if this is the second pool if SE12.TraitorTalk == 0 && SE12.ManiaPoolOrdered == 0 set SE12.TraitorTalk to 1 endif end begin OnStartCombat player ; traitor begins talking if this is the second pool if SE12.TraitorTalk == 0 && SE12.ManiaPoolOrdered == 0 set SE12.TraitorTalk to 1 endif end begin OnDeath set SE12.DementiaPriestsDead to SE12.DementiaPriestsDead + 1 if SE12.DementiaPriestsDead >= SE12.DementiaPriestsCount ;is this the second pool we're attacking? if SE12.ManiaPoolOrdered == 0 ; yes, so check if traitor is dead if SE12.TraitorDead == 1 ; all dead -- unorder the pool set mySelf to GetSelf SE12PoolDementiaRef.activate mySelf 1 setstage SE12 160 else set traitorRef to SE12.TraitorRef traitorRef.setav aggression 50 endif else ; none of the pools have been cleansed yet (so traitor is not involved) ; all dead -- unorder the pool set mySelf to GetSelf SE12PoolDementiaRef.activate mySelf 1 setstage SE12 160 endif endif end
791SE12OrderPriestGenericSCRIPTscn SE12OrderPriestGenericSCRIPT ; when priest dies, parent pool becomes unordered ref myParent ref mySelf begin OnDeath ; notify parent (pool) that I've died ; if getstage SE12 < 180 set myParent to GetParentRef set mySelf to GetSelf myParent.activate mySelf 1 ; endif end
792SE12OrderPriestManiaSCRIPTscn SE12OrderPriestManiaSCRIPT ; counts dead priests around Mania pool ref mySelf ref traitorRef Begin OnAlarm 3 Player ; traitor begins talking if this is the second pool if SE12.TraitorTalk == 0 && SE12.DementiaPoolOrdered == 0 set SE12.TraitorTalk to 1 endif end begin OnStartCombat player if SE12.TraitorTalk == 0 && SE12.DementiaPoolOrdered == 0 set SE12.TraitorTalk to 1 endif end begin OnDeath set SE12.ManiaPriestsDead to SE12.ManiaPriestsDead + 1 if SE12.ManiaPriestsDead >= SE12.ManiaPriestsCount ;is this the second pool we're attacking? if SE12.DementiaPoolOrdered == 0 ; yes, so check if traitor is dead if SE12.TraitorDead == 1 ; all dead -- unorder the pool set mySelf to GetSelf SE12PoolManiaRef.activate mySelf 1 setstage SE12 150 else set traitorRef to SE12.TraitorRef traitorRef.setav aggression 50 endif else ; none of the pools have been cleansed yet (so traitor is not involved) ; all dead -- unorder the pool set mySelf to GetSelf SE12PoolManiaRef.activate mySelf 1 setstage SE12 150 endif endif end
793SE12PoolSCRIPTscn SE12PoolSCRIPT ref myActionRef ref myParent short ordered ; set to 1 to "order" this pool (meaning it orders all Gnarls who activate it) begin OnLoad if ordered == 1 && getstage SE12 < 180 ; TODO: trigger animating crystals else ; unorder pools post-quest set ordered to 0 ; TODO: trigger animating crystals? but maybe they handle this on their own (i.e. ordered by default) endif end begin OnActivate set myActionRef to GetActionRef if myActionRef.getInFaction SE12GnarlFaction == 1 if ordered == 1 if SE12.debug == 1 message "TEMP: Gnarl ordered." endif ; "order" the Gnarl myActionRef.setownership SE12OrderedGnarlFaction myActionRef.pms SEOrderShader myActionRef.forceav aggression 70 else ; "unorder" the Gnarl if SE12.debug == 1 message "TEMP: Gnarl UNordered." endif myActionRef.setownership SEGnarlFaction ; clear ownership myActionRef.sms SEOrderShader myActionRef.forceav aggression 0 endif ; remove "back to pool" widget from gnarls myActionRef.removeItem SE12GnarlWidget 10 elseif myActionRef.getInFaction SE12OrderFaction == 1 ; priest is notifying me that he's dead set ordered to 0 ; if a minor pool, set quest stage if GetIsID SE12PoolMinor == 1 setstage SE12 50 endif ; notify healing pool (my parent) that I'm unordered set myParent to getParentRef myParent.Activate myActionRef 1 endif end
794SE12Scriptscn SE12Script short OrderedGnarlCount ; number of Gnarls which have been ordered short OrderedPodsCount ; number of containers which have been ordered short OrderedDoorsCount ; number of doors which have been ordered short ManiaPoolOrdered ; 1 = ordered short DementiaPoolOrdered ; 1 = ordered short ManiaPriestsCount ; number of total priests to kill around Mania pool (set by stage 5) short DementiaPriestsCount ; number of total priests to kill around Dementia pool (set by stage 5) short ManiaPriestsDead ; tracks number of Mania Pool priests that have died short DementiaPriestsDead ; tracks number of Dementia Pool priests that have died short TraitorDead ; 1 = traitor (Syl or Thadon depending on SE07) is dead ref TraitorRef ; ref variable to hold traitor (Syl or Thadon) for convenience short EnableTraitorFlag ; 1 = move traitor to Mania pool, 2 = move traitor to Dementia pool, 3 = done short TraitorTalk ; 1 to get Syl/Thadon to taunt player prior to entering combat short IdleFlag ; 1 = gnarl open door idle short debug ; 1 = show debug messages begin gamemode if TraitorRef.getdisabled == 1 if EnableTraitorFlag == 1 set EnableTraitorFlag to 3 ; move to Mania pool TraitorRef.enable TraitorRef.setav aggression 0 TraitorRef.moveto SE12ManiaTraitorMarker elseif EnableTraitorFlag == 2 set EnableTraitorFlag to 3 ; move to Dementia pool TraitorRef.enable TraitorRef.setav aggression 0 TraitorRef.moveto SE12DementiaTraitorMarker endif endif end
795SE12UnlockTrigSCRIPTscn SE12UnlockTrigSCRIPT ;Unlocks parent and resets after 2 seconds short triggered ref target float timer begin onTrigger player if triggered == 0 set target to getParentRef target.unlock set triggered to 1 set timer to 2 endif end begin onReset set triggered to 0 end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
796SE13AllySCRIPTscn SE13AllySCRIPT ; script for allies to track their deaths and generate new GS/DS short dying float timer ref tempRef ; used for death blow ref mySelf short looking ; set just before death... begin OnDeath set SE13.deadAllies to SE13.deadAllies + 1 end begin OnLoad set mySelf to getSelf ; disable me if battle is over and player isn't around if getstage SE13 >= 100 disable else ; battle allies always ignore friendly hits setignorefriendlyhits 1 endif end Begin GameMode ; don't run this script if I'm disabled or dead if GetDisabled == 1 || getDead == 1 return endif if getStageDone SE13 35 == 1 && looking == 0 set looking to 1 stopcombat setalert 1 modav aggression -100 evp look SE13JygaFXCloudSwirlREF endif if getStageDone SE13 38 == 1 && dying == 0 ; run a timer (randomized) to blow myself up set dying to 1 ; unfreeze me in case I was hit by Staff setactorsai 1 ; use distance from boss marker to determine timer set timer to GetDistance SE13BossMarker ; 3300 is about the max set timer to timer/3300 endif if dying == 1 || dying == 2 if timer > 0 set timer to timer - getSecondsPassed elseif dying == 1 set dying to 2 set timer to 1 set tempRef to SE13.bossRef tempRef.PushActorAway mySelf 30 elseif dying == 2 set dying to 3 kill endif endif End ; shouts about reinforcements arriving begin OnHitWith SEOrderKnight0SwordSteel if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end begin OnHitWith SEOrderKnight1SwordSilver if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end begin OnHitWith SEOrderKnight2SwordDwarven if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end begin OnHitWith SEOrderKnight3SwordElven if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end begin OnHitWith SEOrderKnight4SwordGlass if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end begin OnHitWith SEOrderKnight5SwordEbony if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end begin OnHitWith SEOrderKnight6SwordDaedric if getRandomPercent <= 33 if getdistance player < 800 Say SE13AllyShoutReinforcements 1 endif endif end
797SE13JyggalagKnockDownSpellSCRIPTscn SE13JyggalagKnockDownSpellSCRIPT ref bossRef ref selfRef begin ScriptEffectStart set bossRef to SE13.bossRef set selfRef to GetSelf bossRef.pushActorAway selfRef 5 end
798SE13JyggalagSpeechScriptscn SE13JyggalagSpeechScript short JygSpeech short speechOn ; 1 = start animating ; 2 = talking ; 3 = fading out ; 4 = done float timer Begin GameMode ; when ready to speak, wait till first animation is done if speechOn == 1 && IsAnimPlaying == 0 set speechOn to 2 playgroup forward 1 elseif speechOn == 2 set timer to ( timer - GetSecondsPassed ) if ( timer <= 0 ) if ( JygSpeech == 0 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 1 elseif ( JygSpeech == 1 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 2 elseif ( JygSpeech == 2 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 3 elseif ( JygSpeech == 3 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 4 elseif ( JygSpeech == 4 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 5 elseif ( JygSpeech == 5 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 6 elseif ( JygSpeech == 6 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 7 elseif ( JygSpeech == 7 ) set timer to SE13SpeechREF.say SE13JyggalagSpeech 1 SEJyggalagVoice 1 set JygSpeech to 8 elseif ( JygSpeech == 8 ) set JygSpeech to 0 playgroup backward 1 set speechOn to 3 SetStage SE13 195 endif endif elseif speechOn == 3 && IsAnimPlaying == 0 sms SE13JygDeadEffect set speechOn to 4 endif End
799SE13JyggylagSCRIPTscn SE13JyggylagSCRIPT float fadeTimer ; used to fade him out when he dies float alpha ; used to fade him out short fadeStage ; ditto float timer ; used for voice begin OnDeath ; trigger quest stage when J dies setstage SE13 100 set fadeStage to 1 end begin OnHit if getRandomPercent <= 33 && getav health > 15 && timer <= 0 set timer to SE13BossMarker.Say SE13JyggalagVoice 1 SEJyggalagVoice 1 endif end begin OnStartCombat player set timer to SE13BossMarker.Say SE13JyggalagVoice 1 SEJyggalagVoice 1 end begin gamemode if timer > 0 set timer to timer - GetSecondsPassed endif ;this chunk fades him out after summon if ( fadeStage == 1 ) Set alpha to 0.9 Set fadeTimer to 4 SetActorAlpha alpha set fadeStage to 2 endif if ( fadeStage == 2 ) if ( fadeTimer > 0 ) Set fadeTimer to ( fadeTimer - GetSecondsPassed ) Set alpha to ( alpha - .01 ) SetActorAlpha alpha elseif ( fadeTimer <= 0 ) Set alpha to 0 Set fadeStage to 3 Set fadeTimer to 0 disable endif endif end
800SE13KnightOfOrderSCRIPTscn SE13KnightOfOrderSCRIPT ref myParent ; my parent ref, if any. Set OnLoad ref mySelf ; myself, used to "activate" parent (which is actually to "register" myself as one of the parent's spawns) ref actionRef ; who is activating me? float timer ; respawn timer begin OnLoad set mySelf to getSelf if myParent == 0 set myParent to GetParentRef endif end ; knights are "activated" when created so they can get their "parent" obelisk (so they can tell it when they are respawning) begin OnActivate set actionRef to GetActionRef ; if activated by obelisk, this is my "parent" if actionRef.getisID SEObeliskNEW == 1 set myParent to actionRef ; play summon effect on Knight pme ZCLA else Activate endif end begin OnDeath ; clear ownership clearOwnership ; "activate" parent to let it know I died (add to count) myParent.activate mySelf 1 end ; ********************************************************************************************************************************** ; Everything above here is identical to the SEKnightOfOrderTemplateSCRIPT ; ********************************************************************************************************************************** ; SE13 specific code short dying ; 1 = killing myself (after J dies), 2 = I'm dead begin OnLoad ; disable me if battle is over and player isn't around if getstage SE13 >= 100 disable endif end begin gamemode if GetDisabled == 1 return endif if getStageDone SE13 35 == 1 && dying == 0 ; run a timer (randomized) to blow myself up set dying to 1 ; unfreeze me in case I was hit by Staff setactorsai 1 ; use distance from boss marker to determine timer set timer to GetDistance SE13BossMarker ; 3300 is about the max set timer to timer/3300 ; try adding effect pms SE13FlyingKnightEffect ; if I'm one of the original knights, just kill me if GetIsReference SE13KnightMaster == 1 || myParent.GetIsReference SE13KnightMaster == 1 ; message "TEMP: Killing master knight" set dying to 4 kill endif endif if dying == 1 || dying == 2 || dying == 3 if timer > 0 set timer to timer - getSecondsPassed elseif dying == 1 set dying to 2 set timer to 3 SE13BlackHole.PushActorAway mySelf -1000 if GetIsReference SE13KnightMaster == 1 ; messageBox "TEMP: pulling master knight - this should not happen" endif elseif dying == 2 set dying to 3 kill disable elseif dying == 3 kill set dying to 4 endif endif end
801SE13PalaceDoorToBattleSCRIPTscn SE13PalaceDoorToBattleSCRIPT ; Prevents anyone from using the doors into the palace worldspace during the battle (keep random NPCs and guards out) begin OnActivate if getstage SE13 >= 10 && getstage SE13 < 195 if IsActionRef player == 1 messageBox "I need to help defend the Palace from Order's attack." endif else Activate endif end
802SE13PalaceExitDoorCrucibleSCRIPTscn SE13PalaceExitDoorCrucibleSCRIPT ; For now, this prevents anyone from using the doors during the battle ; later, might be better to swap out the doors to prevent actors from even trying to use the doors begin OnActivate if getstage SE13 >= 5 && getstage SE13 < 195 if IsActionRef player == 1 messageBox "I need to help defend the Palace from Order's attack." endif else Activate If IsActionRef Player == 1 If GetRandomPercent <33 ForceWeather SEFog ; Force weather to be of the right type. Otherwise you may get Mania weather in Dementia and vice versa. Else ForceWeather SEOvercast ; Force weather to be of the right type EndIf EndIf endif end
803SE13PalaceExitDoorSCRIPTscn SE13PalaceExitDoorSCRIPT ; For now, this prevents anyone from using the doors during the battle ; later, might be better to swap out the doors to prevent actors from even trying to use the doors begin OnActivate if getstage SE13 >= 5 && getstage SE13 < 195 if IsActionRef player == 1 messageBox "I need to help defend the Palace from Order's attack." endif else Activate endif end
804SE13PlayerFollowerSCRIPTscn SE13PlayerFollowerSCRIPT ; this script is on the DS/GS "bodyguard" short dying float timer ref tempRef ; used for death blow ref mySelf short looking ; do once variable for look begin OnLoad set mySelf to getSelf set SE13.bodyguardRef to getSelf ; disable me if battle is over and player isn't around if getstage SE13 >= 100 disable else setignorefriendlyhits 1 endif end begin OnDeath set SE13.deadAllies to SE13.deadAllies + 1 ; increment dead count (for reinforcement tracking) ; when I die, spawn a new me at the palace door if getstage SE13 < 35 ; messagebox "TEMP: Spawning new player bodyguard" if getIsID SE13DarkSeducerPlayer == 1 ; messagebox "TEMP: Spawning new player bodyguard" set SE13.bodyguardRef to SE13BodyguardRespawnMarkerNEW.placeatme SE13DarkSeducerPlayer else set SE13.bodyguardRef to SE13BodyguardRespawnMarkerNEW.placeatme SE13GoldenSaintPlayer endif endif end Begin GameMode ; don't run this script if I'm disabled or dead if GetDisabled == 1 || getDead == 1 return endif if getStageDone SE13 35 == 1 && looking == 0 set looking to 1 stopcombat setalert 1 modav aggression -100 evp look SE13JygaFXCloudSwirlREF endif if getStageDone SE13 38 == 1 && dying == 0 ; run a timer (randomized) to blow myself up set dying to 1 ; unfreeze me in case I was hit by Staff setactorsai 1 ; use distance from boss marker to determine timer set timer to GetDistance SE13BossMarker ; 3300 is about the max set timer to timer/3300 endif if dying == 1 || dying == 2 if timer > 0 set timer to timer - getSecondsPassed elseif dying == 1 set dying to 2 set timer to 1 set tempRef to SE13.bossRef tempRef.PushActorAway mySelf 30 elseif dying == 2 set dying to 3 kill endif endif End
805SE13Scriptscn SE13Script ; Objects: ; SEObeliskSCRIPT -- generic obelisk script has some SE13 hooks in it (easier than duplicating script for SE13) ; Actors: ; SECreatureJyggalag -- runs timer for his own appearance ; SE13PlayerFollowerSCRIPT -- GS/DS player follower, used for audible "barks" float obeliskTimer ; timer to control progress of obelisk activation short obeliskActivating ; set to 1 when in the process of opening short stage ; temp variable to prevent calling GetStage a million times ref bodyguardRef ; tracks the player's bodyguard; set by SE13PlayerFollowerSCRIPT short deadAllies ; how many of the player's allies have died? Used to generate new ones short reinforcementCount ; how many squads have been sent to reinforce battle? float allyTimer ; timer to space out reinforcements arriving short runAllyTimer ; set to 1 while waiting for reinforcements short bossNumber ; set to which version of Jyggalag we're using (1-8) float bossTimer ; timer to Jyggalag to appear ref bossRef ; reference to Jyggalag float fQuestDelayTime ; Makes the script run more frequently than every 5 seconds short fringeResetDoOnce ;set up the fringe ref gatekeeperRef ;same as in SE09.rebuiltGatekeeperRef so that I can move him to the unordered fringe at the end of the quest begin gamemode ; get stage at beginning for simplicity set stage to GetStage SE13 if stage >= 100 && player.GetInWorldspace SENSPalace == 0 ; clean up battle and turn guards back on SetStage SE13 200 endif if stage == 200 && player.GetInCell SENSCastleSheogorath == 0 setStage SE13 255 endif if getStage SE13 >= 100 ;return the Fringe to Unordered worldspace (clean up dead bodies, move the rebuilt gatekeeper there) -- JPD if fringeResetDoOnce == 0 SEFringeIsOrderedToggle.disable if SESheldenRef.GetDead == 0 SESheldenRef.MoveTo SEPasswallWanderRef endif SE02Gatekeeper1Ref.disable SE02Gatekeeper2Ref.disable SE02Gatekeeper3Ref.disable SE02Gatekeeper4Ref.disable SE02Gatekeeper5Ref.disable SE02Gatekeeper6Ref.disable SE02Gatekeeper7Ref.disable SE02Gatekeeper8Ref.disable SE02OrcAdventurer1Ref.disable SE02OrcAdventurer2Ref.disable SE02OrcAdventurer3Ref.disable SE02OrcAdventurer4Ref.disable SE02OrcCaptainRef.disable SEFelasSarandasRef.disable ;he defects to order, and if for some reason he doesn't die at the end of SE09, lets not worry about him at all. if SE09.rebuiltGatekeeperRef != 0 ;it should never be zero, but this prevents the script from breaking in playtesting situations where SE09 isn't played through set gatekeeperRef to SE09.rebuiltGatekeeperRef gatekeeperRef.moveto XSEGatekeeperProtectGates endif set fringeResetDoOnce to 1 endif endif ; none of this should run after quest is complete if stage >= 100 return endif ; check for dead allies if deadAllies >= 4 if runAllyTimer == 0 set runAllyTimer to 1 if reinforcementCount < 2 set allyTimer to 15 ; 15 seconds wait for first reinforcements elseif reinforcementCount < 4 set allyTimer to 20 ; longer for later reinforcements else set allyTimer to 25 endif else if allyTimer > 0 set allyTimer to allyTimer - getSecondsPassed else ; time for allies to arrive set runAllyTimer to 0 ; turn off timer set deadAllies to 0 set reinforcementCount to reinforcementCount + 1 if reinforcementCount == 1 SE13DSGenericOfficer1.enable elseif reinforcementCount == 2 SE13GSGenericOfficer1.enable elseif reinforcementCount == 3 SE13DSGenericOfficer2.enable elseif reinforcementCount == 4 SE13GSGenericOfficer2.enable else set deadAllies to 2 ; only bringing in 2 at a time now if getRandomPercent <= 50 ; golden saints SE13GSAllyMarker.placeatme SE13GoldenSaintGeneric2 2 else ; dark seducers SE13DSAllyMarker.placeatme SE13DarkSeducerGeneric2 2 endif ; etc. endif endif endif endif ; bring in Jyggalag if bossTimer > 0 ; decrement timer set bossTimer to bossTimer - getSecondsPassed else if getstagedone SE13 25 == 1 && getstagedone SE13 35 == 0 setstage SE13 35 elseif getstagedone SE13 35 == 1 && getstagedone SE13 38 == 0 if SE13JygaFXTimerREF.IsAnimPlaying == 0 setstage SE13 38 endif elseif getstagedone SE13 38 == 1 && getStageDone SE13 40 == 0 setstage SE13 40 endif endif ; activate obelisks if obeliskTimer > 0 ; decrement timer set obeliskTimer to obeliskTimer - getSecondsPassed else if stage < 10 ; wait for player to enter courtyard, then start timer if SE13Obelisk1Marker.getdistance player < 2800 setstage SE13 10 endif elseif getStageDone SE13 20 == 0 if obeliskActivating == 0 set obeliskActivating to 1 ; animate "activation" of obelisk SE13Obelisk2Ref.playgroup equip 1 set obeliskTimer to 5 elseif obeliskActivating == 1 set obeliskActivating to 0 ; open second obelisk setstage SE13 20 endif endif endif end
806SE14AttackCountScriptscn SE14AttackCountScript ;this script will go on the leveled list template creatures to count how many have been killed during the random SE14 attack Begin OnDeath set SE14.deadcount to ( SE14.deadcount + 1 ) End ; ScriptName SEGnarlGrow ; Copied from this script, which is on all generic Gnarls Short Effect Short ShowShader Float GrowTimer Float NewScale Begin OnLoad ; Precaution to clear leftover data because AddSpell affects base object, not reference If GetItemCount SEGnarlBark >= 1 && GetLevel > 3 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock EndIf End Begin OnMagicEffectHit FIDG ; Fire damage effect If GetItemCount SEGnarlBark >= 1 && GetLevel > 3 if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowFire AddSpell SEAbGnarlGrowFire EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowFire Endif EndIf EndIf End Begin OnMagicEffectHit FRDG ; Frost damage effect If GetItemCount SEGnarlBark >= 1 && GetLevel > 3 if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowFrost AddSpell SEAbGnarlGrowFrost EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowFrost EndIf EndIf EndIf End Begin OnMagicEffectHit SHDG ; Shock damage effect If GetItemCount SEGnarlBark >= 1 && GetLevel > 3 if GetLevel >= 6 && GetDead == 0 ; only works for higher level gnarls If Effect == 0 Set Effect to 1 RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowShock EndIf If Effect == 1 && GrowTimer <=13 && GrowTimer > 3 Set GrowTimer to 13 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock AddSpell SEAbGnarlGrowShock EndIf EndIf EndIf End Begin GameMode If GetItemCount SEGnarlBark >= 1 && GetLevel > 3 ; Grow for 3 seconds ; Stay for 10 seconds ; Shrink for 3 seconds If Effect == 1 && GrowTimer <= 0 Set GrowTimer to 16 PMS effectSpellAbsorption Set ShowShader to 0 EndIf If GrowTimer > 13 ; grow Set GrowTimer to GrowTimer - GetSecondsPassed Set NewScale to 1.5 - ( ( GrowTimer - 13) / 6) SetScale NewScale ElseIf GrowTimer > 3 ; stay at that height Set GrowTimer to GrowTimer - GetSecondsPassed Set ShowShader to 0 ElseIf GrowTimer > 0 ; shrink Set GrowTimer to GrowTimer - GetSecondsPassed Set NewScale to ( GrowTimer / 6 ) + 1 If NewScale <= 1 Set NewScale to 1 Set Effect to 0 RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock EndIf SetScale NewScale If ShowShader == 0 PME DSPL Set ShowShader to 1 EndIf EndIf EndIf End Begin OnDeath If GetItemCount SEGnarlBark >= 1 && GetLevel > 3 If GrowTimer > 3 Set GrowTimer to 3 EndIf RemoveSpell SEAbGnarlGrowFire RemoveSpell SEAbGnarlGrowFrost RemoveSpell SEAbGnarlGrowShock EndIf End
807SE14DancerScriptscn SE14DancerScript ;this script will handle the movement and actions of the summonable dancers short moveVAR ;a variable to track the position and state of the dancer float timer short idleVAR ;a variable to track idles Begin GameMode if ( SE14.getdancers == 1 ) && ( moveVAR == 0 ) ;tells dancer to start process set moveVAR to 1 evp endif if ( moveVAR == 2 ) && ( SE14.bownow == 1 ) ;makes dancer bow before dancing pickidle set timer to ( timer + GetSecondsPassed ) if ( timer >= 4 ) set SE14.bownow to 0 set moveVAR to 3 set timer to 0 endif endif if ( moveVAR == 3 ) ;makes dancer dance after bowing set SE14.dancenow to 1 set moveVAR to 4 endif if ( moveVAR == 4 ) ;makes dancer dance for 30 seconds set timer to ( timer + GetSecondsPassed ) if ( timer >= 2 ) && ( idleVAR == 0 ) evp pickidle set idleVAR to 1 elseif ( timer >= 34 ) set timer to 0 set moveVAR to 5 set idleVAR to 0 endif endif if ( moveVAR == 5 ) ;gets dancer ready to bow before leaving set SE14.dancenow to 0 set SE14.bownow to 1 set moveVAR to 6 endif if ( moveVAR == 6 ) ;makes dancer bow before leaving Look SESheogorathThroneREF pickidle set timer to ( timer + GetSecondsPassed ) if ( timer >= 4 ) set moveVAR to 7 set SE14.bownow to 0 set timer to 0 endif endif if ( moveVAR == 7 ) ;sends dancer back to original spot set SE14.GetDancers to -1 evp set moveVAR to 8 StopLook endif End Begin OnPackageDone SE14DancerMove ;checks when dancer is at marker, gets them ready to bow if ( moveVar == 1 ) Look Player set SE14.bownow to 1 set moveVar to 2 endif End Begin OnPackageDone SE14DancerMoveAway ;resets variables when dancer is back at original spot set moveVAR to 0 set SE14.GetDancers to 0 StopLook End
808SE14DSEscortScriptscn SE14DSEscortScript Begin OnDeath set SE14.DSEscortOn to 0 End
809SE14GSEscortScriptscn SE14GSEscortScript Begin OnDeath set SE14.GSEscortOn to 0 End
810SE14GuardScriptscn SE14GuardScript ;this script handles the GS or DS the player can send to deal with threats to the settlements Begin GameMode if ( SE14.deadcount >= 5 ) if ( GetDisabled == 0 ) && ( GetInSameCell Player == 0 ) Disable endif elseif ( SE14.attacking == -1 ) if ( GetDisabled == 0 ) && ( GetInSameCell Player == 0 ) Disable endif endif End
811SE14HealerScriptscn SE14HealerScript short HealMe Begin GameMode if ( HealMe == 1 ) Cast SE14HealSpell Player set HealMe to 2 endif End
812SE14LoaderDeepwallowScriptscn SE14LoaderDeepwallowScript Begin OnLoad if ( SE14.deepwallowattack == 1 ) set SE14.loadinVAR to 1 endif End
813SE14LoaderFellmoorScriptscn SE14LoaderFellmoorScript Begin OnLoad if ( SE14.fellmoorattack == 1 ) set SE14.loadinVAR to 1 endif End
814SE14LoaderHaleScriptscn SE14LoaderHaleScript Begin OnLoad if ( SE14.haleattack == 1 ) set SE14.loadinVAR to 1 endif End
815SE14LoaderHighcrossScriptscn SE14LoaderHighcrossScript Begin OnLoad if ( SE14.highcrossattack == 1 ) set SE14.loadinVAR to 1 endif End
816SE14LoaderSplitScriptscn SE14LoaderSplitScript Begin OnLoad if ( SE14.splitattack == 1 ) set SE14.loadinVAR to 1 endif End
817SE14ProtectionScriptscn SE14ProtectionScript float playerhealth float currenthealth float higherhealth short CheckHealth short doOnce float timer float fquestdelaytime short spellrunning short getout short moveback short castonce Begin GameMode if ( doOnce == 0 ) set fquestdelaytime to 0.5 set doOnce to 1 endif ;this section sets the player's baseline health whenever he enters the throne room to be used to measure the percentage of the player's heal that has been lost if ( CheckHealth == 0 ) if ( player.GetInCell SENSCastleSheogorath == 1 ) set playerhealth to player.GetAV health set CheckHealth to 1 endif endif if ( CheckHealth == 1 ) if ( player.GetAV Health > playerhealth ) set playerhealth to player.GetAV Health endif if ( player.GetInCell SENSCastleSheogorath == 0 ) set CheckHealth to 0 endif endif ;this section checks the player's currenthealth versus the most recent baseline health and it resurrects if the player manages to get health to zero if ( spellrunning == 1 ) && ( GetPlayerInSEWorld == 1 ) set currenthealth to Player.GetAV health if ( player.getav health < 0 ) player.resurrect endif if ( currenthealth <= ( playerhealth * 0.20 ) ) set getout to 1 endif endif ;this section moves the marker to the player's original position and moves the player to the castle if ( getout == 1 ) SE14RezMarker.MoveTo Player set getout to 2 DisablePlayerControls SE14HealerREF1.MoveTo SE14EntertainerMarker1 SEHaskillREF.MoveTo SE07AThadonMarker endif if ( getout == 2 ) set getout to 3 player.MoveTo SE14RezMarker2 endif ;this section has the healer heal the player with a spell. a heal spell. on the player. if ( getout == 3 ) && ( player.GetDistance SE14HealerREF1 <= 1000 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 2 ) SE14HealerREF1.Cast SE14HealSpell Player set getout to 4 set timer to 0 endif endif ;this has Haskill give the player the choice to return to the spot of near death or to stay in castle if ( getout == 4 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 6 ) SEHaskillREF.StartConversation Player set getout to 5 set timer to 0 endif endif ;this moves the player back to spot where he almost died, if the player has chosen to go back if ( moveback == 1 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 2 ) && ( castonce == 0 ) SEHaskillREF.Cast StandardRestoreHealth1Novice SEHaskillREF set castonce to 1 elseif ( timer >= 4 ) set moveback to 0 player.MoveTo SE14RezMarker set castonce to 0 set timer to 0 endif endif End
818SE14RezSpellScriptscn SE14RezSpellScript Begin ScriptEffectStart set SE14Rez.spellrunning to 0 if ( player.GetinCell SEVitharnBailey == 1 ) || ( player.GetinCell XPVitharn == 1 ) Message "Your power will not work in this location." elseif ( GetPlayerinSEWorld == 0 ) Message "That spell may only be used in the Shivering Isles." else set SE14Rez.spellrunning to 1 endif End Begin ScriptEffectUpdate if ( GetPlayerinSEWorld == 0 ) || SE14Rez.spellrunning == 0 dispel SE14RezSpell endif End Begin ScriptEffectFinish set SE14Rez.spellrunning to 0 End
819SE14Scriptscn SE14Script ;this script will handle the post-quest activities ;related object with scripts include SE14Dancer and any creatures and guards that are added during the attacks ;creatures will be given SE14AttackCountScript from their template creatures ;guards are given the SE14Guard script from template ;SE14RezSpell handles the Sheogorath's Protection spell float fquestdelaytime short doOnce ;these variables are for the entertainers short getdancers short bownow short dancenow ;these variables are for the settlement attacks short attacking short deepwallowattack short fellmoorattack short haleattack short highcrossattack short splitattack short gatesattack short deadcount short sendguards short attackstart short loadinVAR ;these variables are used for the DS/GS escort -- 0==no escort, 1==follow, 2==wait short DSescortOn short GSescortOn Begin GameMode if ( doOnce == 0 ) set fQuestDelayTime to 0.5 set doOnce to 1 endif if ( attacking == 1 ) ;this checks that the player has killed all of the creatures attacking the settlement if ( deadcount >= 5 ) Message "The attacks on this settlement have been quelled." set attacking to -1 endif endif if ( attacking == 1 ) && ( deadcount < 5 ) && ( player.GetInCell SENSCastleSheogorath == 1 ) if ( GameDaysPassed >= ( attackstart + 3 ) ) set attacking to 0 set deadcount to 0 set deepwallowattack to 0 set fellmoorattack to 0 set haleattack to 0 set highcrossattack to 0 set splitattack to 0 set gatesattack to 0 set deadcount to 0 set loadinVAR to 0 endif endif ;this resets the variable to allow the quest to be done repeatedly if ( attacking == -1 ) set deepwallowattack to 0 set fellmoorattack to 0 set haleattack to 0 set highcrossattack to 0 set splitattack to 0 set gatesattack to 0 set deadcount to 0 set loadinVAR to 0 endif ;all of the following blocks move creature and guards to the appropriate settlement if ( deepwallowattack == 1 ) && ( loadinVAR == 1 ) set attackstart to GameDaysPassed SE14DeepwallowMarker.PlaceAtMe SE14CreatureAttackList 5 set deepwallowattack to -1 set attacking to 1 ShowMap SEDeepwallowMapMarker if ( sendguards == 1 ) SE14DeepwallowMarker.PlaceAtMe SE14DSFemaleMelee 4 set sendguards to 2 endif endif if ( fellmoorattack == 1 ) && ( loadinVAR == 1 ) set attackstart to GameDaysPassed SE14FellmoorMarker.PlaceAtMe SE14CreatureAttackList 5 set fellmoorattack to -1 set attacking to 1 ShowMap SEFellmoorMapMarker if ( sendguards == 1 ) SE14FellmoorMarker.PlaceAtMe SE14DSFemaleMelee 4 set sendguards to 2 endif endif if ( haleattack == 1 ) && ( loadinVAR == 1 ) set attackstart to GameDaysPassed SE14HaleMarker.PlaceAtMe SE14CreatureAttackList 5 set haleattack to -1 set attacking to 1 ShowMap SEHaleMapMarker if ( sendguards == 1 ) SE14HaleMarker.PlaceAtMe SE14GSFemaleMelee 4 set sendguards to 2 endif endif if ( highcrossattack == 1 ) && ( loadinVAR == 1 ) set attackstart to GameDaysPassed SE14HighcrossMarker.PlaceAtMe SE14CreatureAttackList 5 set highcrossattack to -1 set attacking to 1 ShowMap SEHighCrossTownCenter if ( sendguards == 1 ) SE14HighcrossMarker.PlaceAtMe SE14GSFemaleMelee 4 set sendguards to 2 endif endif if ( splitattack == 1 ) && ( loadinVAR == 1 ) set attackstart to GameDaysPassed SE14SplitMarker.PlaceAtMe SE14CreatureAttackList 5 set splitattack to -1 set attacking to 1 ShowMap SESplitMapMarker if ( sendguards == 1 ) SE14SplitMarker.PlaceAtMe SE14GSFemaleMelee 4 set sendguards to 2 endif endif if ( gatesattack == 1 ) set attackstart to GameDaysPassed if ( player.GetInWorldSpace SETheFringe == 1 ) ;added to handle odd worldspace issues SE14PasswallAttackMarkerREF.PlaceAtMe SE14AdventurerAttackList 5 set gatesattack to -1 endif set attacking to 1 endif End
820SE14VoiceofSheogorathSpellscn SE14VoiceofSheogorathSpell ;spell attached to staff of sheogorath, freezes NPCs in combat in place without damage, doesn't allow them to be hit ref self short invalidTarget ; set to 1 in ScriptEffectStart to signal ScriptEffectFinish block not to do anything ; do "invalidTarget" because local script effect variables are lost when changing process levels... Begin ScriptEffectStart ;finds out who target is, makes sure they aren't a target that we don't want frozen, freezes target with setactorsai, paralyzes them briefly ;also sets ghost and unconscious to disallow them being hit ;plays a voice file when spell is cast set self to GetSelf if self.GetInFaction SEJyggalagFaction == 1 ; strip Jyggalag of his regen power removeSpell SE13AbJyggalag1 removeSpell SE13AbJyggalag2 removeSpell SE13AbJyggalag3 removeSpell SE13AbJyggalag4 removeSpell SE13AbJyggalag5 pms SE13JyggalagStaffEffect ; player.pushActorAway self 30 elseif ( self != player && self.GetDead != 1 && self.GetInFaction NoWabbaFaction == 0 && ( self.getshouldattack player > 0 || self.IsInCombat == 1 )) if ( GetDead == 0 ) self.setactorsai 0 self.setghost 1 self.setunconscious 1 DAClavicusDogStatueREF.say SE14SpellVoice 1 SE14VoiceofSheogorath 1 endif else set invalidTarget to 1 endif End Begin ScriptEffectFinish ;removes the various effects to bring them back to normal, plays a voice file to show spell ending if self.GetInFaction SEJyggalagFaction == 1 ; give Jyggalag back his regen power if self.GetIsID SECreatureJyggalag1 == 1 || self.GetIsID SECreatureJyggalag2 == 1 addSpell SE13AbJyggalag1 elseif self.GetIsID SECreatureJyggalag3 == 1 || self.GetIsID SECreatureJyggalag4 == 1 addSpell SE13AbJyggalag2 elseif self.GetIsID SECreatureJyggalag5 == 1 || self.GetIsID SECreatureJyggalag6 == 1 addSpell SE13AbJyggalag3 elseif self.GetIsID SECreatureJyggalag7 == 1 addSpell SE13AbJyggalag4 elseif self.GetIsID SECreatureJyggalag8 == 1 addSpell SE13AbJyggalag5 endif sms SE13JyggalagStaffEffect elseif invalidTarget == 0 setactorsai 1 setghost 0 setunconscious 0 DAClavicusDogStatueREF.say SE14SpellVoice2 1 SE14VoiceofSheogorath 1 endif End
821SE14WeatherSpellScriptscn SE14WeatherSpellScript ;spell handles the player ability to change the weather post-se13 short doOnce short randweather short raindogs short isoutside Begin ScriptEffectStart ;disallows player casting the spell indoors if ( player.isininterior == 1 ) && ( GetPlayerInSEWorld == 1 ) Message "This spell can only be cast outside." endif if ( GetPlayerInSEWorld == 0 ) Message "This spell may only be used in the Shivering Isles." endif ;chooses a random number to choose a random weather type, isoutside ensures the player is outside if ( player.isininterior == 0 ) && ( GetPlayerInSEWorld == 1 ) set randweather to GetRandomPercent set isoutside to 1 endif End Begin ScriptEffectUpdate ;checks the random number and forces one of the weather types, also adds a buff based on which weather type is chosen if ( isoutside == 1 ) if ( doOnce == 0 ) && ( player.isininterior == 0 ) if ( randweather <= 25 ) if ( GetIsCurrentWeather SEFog == 0 ) fw SEFog set doOnce to 1 player.addspell SE14WeatherBuff1 else set randweather to GetRandomPercent endif elseif ( randweather > 25 ) && ( randweather <= 50 ) if ( GetIsCurrentWeather SERain == 0 ) fw SERain set doOnce to 1 player.addspell SE14WeatherBuff2 else set randweather to GetRandomPercent endif elseif ( randweather > 50 ) && ( randweather <= 75 ) if ( GetIsCurrentWeather SEThunderstorm == 0 ) fw SEThunderstorm set doOnce to 1 player.addspell SE14WeatherBuff3 else set randweather to GetRandomPercent endif elseif ( randweather > 75 ) && ( randweather <= 95 ) if ( GetIsCurrentWeather Snow == 0 ) fw Snow set doOnce to 1 player.addspell SE14WeatherBuff4 else set randweather to GetRandomPercent endif else fw SERain set doOnce to 1 set raindogs to 1 player.addspell SE14WeatherBuff5 endif endif endif End Begin ScriptEffectUpdate if ( GetPlayerinSEWorld == 0 ) set isoutside to 0 player.removespell SE14WeatherBuff1 player.removespell SE14WeatherBuff2 player.removespell SE14WeatherBuff3 player.removespell SE14WeatherBuff4 player.removespell SE14WeatherBuff5 ReleaseWeatherOverride dispel SE14WeatherSpell endif End Begin ScriptEffectFinish ;removes the buffs and releases the weather override at the end of the spell's duration set isoutside to 0 player.removespell SE14WeatherBuff1 player.removespell SE14WeatherBuff2 player.removespell SE14WeatherBuff3 player.removespell SE14WeatherBuff4 player.removespell SE14WeatherBuff5 ReleaseWeatherOverride End
822SE30MatrixScriptscn SE30MatrixScript ;The first time you pick up a matrix of each type, set a quest stage Begin OnAdd if getStageDone SE30 15 == 0 if player.getItemCount SE30AmberArrowsMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberBootsMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberBowMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberCuirassMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberGauntletsMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberGreavesMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberHammerMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberHelmetMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberMaceMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberShieldMatrix > 0 setStage SE30 15 elseif player.getItemCount SE30AmberSwordMatrix > 0 setStage SE30 15 endif endif if getStageDone SE30 115 == 0 if player.getItemCount SE30MadnessArrowsMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessBootsMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessBowMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessCuirassMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessGauntletsMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessGreavesMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessClaymoreMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessHelmetMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessAxeMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessShieldMatrix > 0 setStage SE30 115 elseif player.getItemCount SE30MadnessSwordMatrix > 0 setStage SE30 115 endif endif End
823SE30QuestScriptscn SE30QuestScript ;related scripts: ;SE30MatrixScript -- sets stages when you pick up matrices for the first time short LastVisited ;0 = not set, 1 = Cutter's store; 2 = Dumag gra-Bonk's store -- This is condition in dialog to say things like "Why are you visiting my competition?"
824SE32ghostChainsSCRIPTscn SE32ghostChainsSCRIPT begin onLoad pms GhostEffect SetDestroyed 1 end
825SE32GhostStagingSCRIPTscn SE32GhostStagingSCRIPT ; ; Link w/standard Trigger zone - Does not daisy chain ; For simplicity in scripting, setup, and anaylsis - one ghost per trigger ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ref myParent ; this is my parent trigger ref shaderFX ; store shader based on faction ref stockFX ; store stock faction shader short State1flag ; State #1 - Dead, Invisible, waiting for player to trigger short State2flag ; State #2 - Alive, Aggressive short State3flag ; State #3 - Dead for real this time short DoProxOnce ; disallows mulitple triggerings from parent (aka - proximity check) float fader ; stores alpha value float targetAlpha ; keep this in one place for tweaking ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad If GetStage SE32 >= 200 ;Disable moveTo JoelTestCellMarker ; using this as a dummy cell to dispose of the bodies Else set myParent to getParentRef kill saa 0 ; force invisibilitY set fader to 0 set targetAlpha to 0.01 if getInFaction SE32FanaticFaction == 1 ; set up team colors based on faction set shaderFX to SE32ZealotEffectNoAlpha set stockFX to SE32ZealotEffect elseif getInFaction SE32Defenders == 1 set shaderFX to SE32DefenderEffectNoAlpha set stockFX to GhostEffect endif ;pms shaderFX pms stockFX ; debug - possibly abandoning idea of swapping to no-alpha shaders for transition EndIf end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate if getActionRef == player If IsInCombat == 0 Message "The ghost does not respond." ; never allow activation/looting ; note: attempting to conditionalize for NPC w/dialogue topics or friendlies to allow yielding EndIf elseIf DoProxOnce != 1 ; fires when trigger is activated set DoProxOnce to 1 set state2flag to 1 ; Enter State #2 resurrect 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if state2Flag == 1 ; player has hit trigger and resurrected - fade up if fader < targetAlpha ; compare current alpha to goal set fader to (fader + 0.00025) ; increment alpha value saa fader elseIf fader >= targetAlpha ; compare current alpha to goal ;sms shaderFX ; turn off this shader for the constant one ;pms stockFX ; this is to avoid some visual glitches I found set state2flag to 2 ; set this to stop looping endif endif if state3Flag == 1 ; Killed and ready to fade back out if fader > 0 ; compare current alpha to goal set fader to (fader - 0.00055) ; decrement alpha value - kinda quickly saa fader elseIf fader <= 0 set state3flag to 2 ; set this to stop looping ;disable ; and poof me moveTo JoelTestCellMarker ; dispose of the body endif endif end ;Begin OnHit ; If GetInFaction SE32Defenders == 1 ; sms SE32GhostEffect ; pms SE32GhostEffect ; Else ; sms SE32ZealotEffect ; pms SE32ZealotEffect ; EndIf ;End begin onDeath if State1Flag == 0 set State1Flag to 1 ; enter state #1 endif if state2Flag >= 1 set State3Flag to 1 ; enter state #3 sms shaderFX ; turn off FX right quick endif end
826SE32TombEpitaph01SCRIPTscn SE32TombEpitaph01SCRIPT ;All Tomb Markers in XPVitharn04 use this script for ease of editing ; This script attaches to multiple objects (SE32TombCoffin, SE32TombEpitaph01Marker) ; and allows conditionalized reactions based on REF name short button ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate Player if getIsReference VitraenTombREF == 1 MessageBox "Herein Interred Lies Count Vitraen, Primogenitor of the Keep and Nobility of Vitharn." elseif getIsReference MaweanTombREF == 1 MessageBox "Herein Interred Lies Countess Mawean, Mother of Vitharn." elseif getIsReference SheenInGladeTombREF == 1 MessageBox "Here lies Countess Sheen-In-Glade, Matron Scholar of Vitharn, and Ambassador of Black Marsh.","Pry Coffin Open","Leave it Alone" elseif getIsReference CsaranTombREF == 1 messageBox "Here lies Count Csaran Vitharn, to whom the Love of family meant so much.","Pry Coffin Open","Leave it Alone" elseif getIsReference CesrienTombREF == 1 messageBox "Here lies Count Cesrien Vitharn, Noble conqueror and just leader of our people.","Pry Coffin Open","Leave it Alone" elseif getIsReference JideenTombREF == 1 messageBox "Here lies Countess Jideen, Lady of color from whom we all had so much to learn.","Pry Coffin Open","Leave it Alone" elseif isActionRef player activate endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode set button to getButtonPressed if button >-1 if button == 0 activate elseif button == 1 ; do nothing endif endif end
827SE34MedallionScriptscn SE34MedallionScript begin OnAdd Player ;This script checks when the player finds the Medallion for SE34 ;First, a variable is increased by 1 ;Then it checks the current stage you're in. If its pre-quest, it sets stage 5. If its during, it sets stage 30. ;This way the quest can start two different ways (find Medallion first, or find it after getting quest) if ( SE34.Medallion < 1 ) set SE34.Medallion to ( SE34.Medallion + 1 ) endif if ( GetStage SE34 < 10 ) && ( SE34.Medallion == 1 ) setstage SE34 5 endif if ( GetStage SE34 >= 10 ) && ( GetStage SE34 < 30 ) && ( SE34.Medallion == 1 ) setstage SE34 30 endif end
828SE34Scriptscn SE34Script ;Actors ;SEPyke - The quest giver, a "Knight of the Thorn" ;Objects ;SE34KnightsThornMed - The Medallion itself, the goal of the quest (leveled) short DoOnce ;A DoOnce variable short Medallion ;Used in SE34MedallionScript to determine which journal to pop float fQuestDelayTime begin GameMode ;This block checks if the player has entered Fetid Grove and is near an X Marker. If so, set the stage to 20 if ( DoOnce == 0 ) if ( GetStage SE34 >= 10 ) && ( GetStage SE34 < 20 ) if ( Player.GetDistance SE34Marker1 < 300 ) SetStage SE34 20 Set DoOnce to 1 endif endif endif end
829SE36EnchRingHappinessScriptscn SE36EnchRingHappinessScript Begin OnAdd Player setStage SE36 200 End
830SE36QuestScriptscn SE36QuestScript ;see releated scripts: ;SEHirrusClutumnusScript ;SEHirrusClutumnusHouseKeyScript ;SE36TrigZoneScript
831SE36TrigZoneScriptscn SE36TrigZoneScript ;used to kill Hirrus Clutumnus if you havoc him off the ledge instead of pushing him in dialog ref actionRef begin onTriggerActor set actionRef to getActionRef if actionRef == SEHirrusClutumnusRef && getStage SE36 == 20 set SEHirrusClutumnusRef.killedByFalling to 1 actionRef.kill endif end
832SE38Item11SCRIPTscn SE38Item11SCRIPT begin OnEquip player set SE38.equipRing to 1 set SE38.fQuestDelayTime to .1 ; set to run quickly end begin OnUnequip player set SE38.equipRing to 0 set SE38.fQuestDelayTime to 0 ; reset back to default end begin OnAdd player ; check if this item matches the reference on the quest script (i.e. the player is stealing it from the museum) if getstagedone SE38 60 == 0 && getstage SE38 > 0 && SE38.item11 == 0 setstage SE38 60 endif end begin OnAdd SEUnaArminaREF set SE38.contributions to SE38.contributions + 1 end
833SE38MuseumItemSCRIPTscn SE38MuseumItemSCRIPT begin OnActivate if IsActionRef player == 1 ; player can't pick me up, just add item to player and then disable myself if getIsID SE38MuseumItem1 == 1 player.additem SE38Item1 1 set SE38.item1 to 1 disable elseif getIsID SE38MuseumItem2 == 1 player.additem SE38Item2 1 set SE38.item2 to 1 disable elseif getIsID SE38MuseumItem3 == 1 player.additem SE38Item3 1 set SE38.item3 to 1 disable elseif getIsID SE38MuseumItem4 == 1 player.additem SE38Item4 1 set SE38.item4 to 1 disable elseif getIsID SE38MuseumItem5 == 1 player.additem SE38Item5 1 set SE38.item5 to 1 disable elseif getIsID SE38MuseumItem6 == 1 player.additem SE38Item6 1 set SE38.item6 to 1 disable elseif getIsID SE38MuseumItem7 == 1 player.additem SE38Item7 1 set SE38.item7 to 1 disable elseif getIsID SE38MuseumItem8 == 1 player.additem SE38Item8 1 set SE38.item8 to 1 disable elseif getIsID SE38MuseumItem9 == 1 player.additem SE38Item9 1 set SE38.item9 to 1 disable elseif getIsID SE38MuseumItem10 == 1 player.additem SE38Item10 1 set SE38.item10 to 1 disable elseif getIsID SE38MuseumItem11 == 1 player.additem SE38Item11 1 set SE38.item11 to 1 disable elseif getIsID SE38MuseumItem12 == 1 player.additem SE38Item12 1 set SE38.item12 to 1 disable elseif getIsID SE38MuseumItemA == 1 player.additem SE38ItemA 1 set SE38.itemA to 1 disable elseif getIsID SE38MuseumItemB == 1 player.additem SE38ItemB 1 set SE38.itemB to 1 disable elseif getIsID SE38MuseumItemC == 1 player.additem SE44WaterRing 1 set SE38.itemC to 1 disable endif endif end
834SE38OdditySCRIPTscn SE38OdditySCRIPT ; script on oddities in world ; used to set stage (if quest is started) when player picks them up begin OnAdd player if getIsID SE38Item1 == 1 if getstagedone SE38 50 == 0 && getstage SE38 > 0 && SE38.item1 == 0 setstage SE38 50 endif elseif getIsID SE38Item2 == 1 if getstagedone SE38 51 == 0 && getstage SE38 > 0 && SE38.item2 == 0 setstage SE38 51 endif elseif getIsID SE38Item3 == 1 if getstagedone SE38 52 == 0 && getstage SE38 > 0 && SE38.item3 == 0 setstage SE38 52 endif elseif getIsID SE38Item4 == 1 if getstagedone SE38 53 == 0 && getstage SE38 > 0 && SE38.item4 == 0 setstage SE38 53 endif elseif getIsID SE38Item5 == 1 if getstagedone SE38 54 == 0 && getstage SE38 > 0 && SE38.item5 == 0 setstage SE38 54 endif elseif getIsID SE38Item6 == 1 if getstagedone SE38 55 == 0 && getstage SE38 > 0 && SE38.item6 == 0 setstage SE38 55 endif elseif getIsID SE38Item7 == 1 if getstagedone SE38 56 == 0 && getstage SE38 > 0 && SE38.item7 == 0 setstage SE38 56 endif elseif getIsID SE38Item8 == 1 if getstagedone SE38 57 == 0 && getstage SE38 > 0 && SE38.item8 == 0 setstage SE38 57 endif elseif getIsID SE38Item9 == 1 if getstagedone SE38 58 == 0 && getstage SE38 > 0 && SE38.item9 == 0 setstage SE38 58 endif elseif getIsID SE38Item10 == 1 if getstagedone SE38 59 == 0 && getstage SE38 > 0 && SE38.item10 == 0 setstage SE38 59 endif elseif getIsID SE38Item11 == 1 if getstagedone SE38 60 == 0 && getstage SE38 > 0 && SE38.item11 == 0 setstage SE38 60 endif elseif getIsID SE38Item12 == 1 if getstagedone SE38 61 == 0 && getstage SE38 > 0 && SE38.item12 == 0 setstage SE38 61 endif endif end ; count how many oddities the player has given Una Armina begin OnAdd SEUnaArminaREF set SE38.contributions to SE38.contributions + 1 end
835SE38SCRIPTscn SE38SCRIPT ; This is the list of Oddities that Una Armina will accept for the Museum ; 0 = she doesn't have one ; 1 = she had one but doesn't have it anymore ; 2 = she has one and hasn't placed it ; 3 = she has placed this item short item1 ; SE38MWatchersEye short item2 ; SE38DSwampTentacleIngred short item3 ; SE38AmberHunk01 short item4; SE38PelagiusPelvis short item5; SE38Item5 -- Din's ashes short item6; SE38Item6 -- Two-headed coin short item7; SE38Item7 -- Soul tomato short item8; SE38Item8 -- Mixing bowl short item9; SE38Item9 -- Hound's Tooth Key short item10; SE38Item10 -- Friendly Dagger short item11; SE38Item11 -- Naked Ring short item12; SE38Item12 -- Mute Maw ; these are exhibits that start in the museum ; giveTour starting at 30 (A = 30, B = 31, etc.) short itemA; SE38ItemA -- pygmy skull short itemB; SE38ItemB -- gatekeeper arm short itemC; SE44WaterRing (SE38MuseumItemC) -- ring of dessication ; how many items has the player contributed to the museum? short contributions ; turns on quest target when the player is looking for Una Armina short enableQuestTarget ; used to conditionalize donation dialogue short donateItem ; 1 = item 1, 2 = item 2, etc. ; used to conditionalize museum tour short giveTour ; 1 = give tour ; used for Ring of Nudity short equipRing ; 1 = ring is equipped, make player nude Float fQuestDelayTime Begin GameMode if ( item1 == 3 ) && ( item2 == 3 ) && ( item3 == 3 ) && ( item4 == 3 ) && item5 == 3 && item6 == 3 && item7 == 3 && item8 == 3 && item9 == 3 && item10 == 3 && item11 == 3 && item12 == 3 if ( GetStageDone SE38 200 == 0 ) SetStage SE38 200 endif endif ; ring of nudity: if equipRing == 1 && player.getItemCount SE38Item11 > 0 set equipRing to 0 player.removeAllItems SE38HoldingChestREF 1 SE38HoldingChestREF.removeAllItems player 1 player.equipItem SE38Item11 set fQuestDelayTime to 0 ; reset back to normal quest script processing endif End
836SE39CindanweNotebookScriptscn SE39CindanweNotebookScript Begin OnAdd Player if getStage SE39 < 200 setStage SE39 70 endif End
837SE39SpoonScriptscn SE39SpoonScript Begin OnAdd player setStage SE39 40 End
838SE40QuestScriptscn SE40QuestScript ;These variables track if you talked with the NPC ;I was setting quest targets on the beggars you didn't talk to yet, but I have decided not to do that ;these are being set in dialog, in SE40SleepOutside topic, but for the moment are obsolete. I'm leaving them in case I need them to improve the quest later short talkedToBhisha short talkedToBolwing short talkedToFimmion short talkedToGloorolros ;This is used as a condition for SE40GreetingChoiceGrapes which allows you to skip raising Uungor's disposition to progress the quest ;Is set in SE40SleepOutsideChoiceSweetroll short gaveGrapes
839SE40ScrollSpellEffectScriptscn SE40ScrollSpellEffectScript ; purely a visual effect.
840SE41PoolTriggerScriptscn SE41PoolTriggerScript ; Activates linked Parent object once short triggered ref target ref mySelf ;This is an activator trigger zone script. When the trigger zone is broken by the player, Set Stage 30 ;Also, Remove the SE41AquanostrumEmpty object and add the SE41AquanostrumFull object to the player's inventory begin onTrigger Player if ( GetStage SE41 >= 20 ) && ( GetStage SE41 < 30 ) if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 SetStage SE41 30 Player.RemoveItem SE41AquanostrumEmpty 1 Player.AddItem SE41AquanostrumFull 1 set triggered to 1 endif endif if ( GetStage SE41 >= 100 ) if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 Player.RemoveItem SE41AquanostrumEmpty 1 Player.AddItem SE41AquanostrumFull 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
841SE44CalmingPantsScriptscn SE44CalmingPantsScript short doOnce ;adds spell when pants are equipped Begin OnEquip Player Player.AddSpell SE44CalmSpell End ;removes spell when pants are unequipped Begin OnUnEquip Player Player.RemoveSpell SE44CalmSpell End ;adds spell when pants are equipped Begin OnEquip SEAhjazdaREF SEAhjazdaREF.AddSpell SE44CalmSpell End ;removes spell when pants are unequipped Begin OnUnEquip SEAhjazdaREF SEAhjazdaREF.RemoveSpell SE44CalmSpell End
842SE44CalmingPantsSpellScriptscn SE44CalmingPantsSpellScript Begin ScriptEffectStart pme calm End
843SE44Scriptscn SE44Script ;SE44CalmingPants have SE44CalmingPantsScript to add spell when equipped/unequipped short foundring short foundamulet short foundpants short gaveitem ;sets stages and variable to track which of the three items the player has found, sets stage when all three items are found Begin GameMode if ( player.GetItemCount SE44CalmingPants01 > 0 ) && ( GetStageDone SE44 20 == 0 ) && (GetStageDone SE44 10 == 1 ) SetStage SE44 20 set foundpants to 1 endif if ( player.GetItemCount SE44DisintegrateAmulet > 0 ) && ( GetStageDone SE44 30 == 0 ) && (GetStageDone SE44 10 == 1 ) SetStage SE44 30 set foundamulet to 1 endif if ( player.GetItemCount SE44WaterRing > 0 ) && ( GetStageDone SE44 40 == 0 ) && (GetStageDone SE44 10 == 1 ) SetStage SE44 40 set foundring to 1 endif if ( foundring == 1 ) && ( foundamulet == 1 ) && ( foundpants == 1 ) if ( GetStageDone SE44 50 == 0 ) || ( GetStageDone SE44 60 == 0 ) || ( GetStageDone SE44 70 == 0 ) setstage SE44 80 endif endif End
844SE45ForkSpellscn SE45ForkSpell ;adds and removes fork drain spell when equipped/unequipped Begin OnEquip Player player.addspell SE45ForkDrain End Begin OnUnEquip Player player.removespell SE45ForkDrain End
845SE45Scriptscn SE45Script ;SE45ForkHorripilation has script to add/remove spell when used, cleverly named SE45ForkScript short DoOnce short postQuest short BolwingDead short forkStatus ; 0 = none control ; 1 = Dementia controls ; 2 = Mania controls Begin GameMode if postQuest == 0 if ( player.GetItemCount SE45ForkHorripilation > 0 ) && ( GetStage SE45 >= 10 ) if ( GetStageDone SE45 50 == 0 ) SetStage SE45 50 set postQuest to 1 endif endif if SE45mChestREF.GetItemCount SE45ForkHorripilation < 1 ; mania hasn't got if SE45zChestREF.GetItemCount SE45ForkHorripilation < 1 ; and dementia hasn't got set forkStatus to 0 elseif SE45zChestREF.GetItemCount SE45ForkHorripilation >= 1 ; dementia has it set forkStatus to 1 endif elseif SE45mChestREF.GetItemCount SE45ForkHorripilation >= 1 ; mania has it set forkStatus to 2 endif endif End
846SE46AtrabhiDementiaScriptscn SE46AtrabhiDementiaScript ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 Begin OnDeath if ( SE46.AtrabhiVAR == 0 ) set SE46.AtrabhiVAR to 2 endif if ( SE46.sidechosen == 1 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
847SE46AtrabhiManiaScriptscn SE46AtrabhiManiaScript float readIdleTimer ;she a special reading idle that she will pick pretty much whenever she is doing something (that isn't eating, combat, pursue, etc.) Begin GameMode if readIdleTimer <= 0 if isIdlePlaying == 0 pickidle set readIdleTimer to 10 endif else set readIdleTimer to readIdleTimer - getSecondsPassed endif End Begin OnDeath if ( SE46.AtrabhiVAR == 0 ) set SE46.AtrabhiVAR to 1 endif if ( SE46.sidechosen == 2 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
848SE46HorkvirDementiaScriptscn SE46HorkvirDementiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.HorkvirVAR == 0 ) set SE46.HorkvirVAR to 2 endif if ( SE46.sidechosen == 1 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
849SE46HorkvirManiaScriptscn SE46HorkvirManiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.HorkvirVAR == 0 ) set SE46.HorkvirVAR to 1 endif if ( SE46.sidechosen == 2 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
850SE46JastiraDementiaScriptscn SE46JastiraDementiaScript short forceGreetStage ;used to increment which greeting she gives when running her SEJastiraNanusForceGreetPlayer package Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.JastiraVAR == 0 ) set SE46.JastiraVAR to 2 endif if ( SE46.sidechosen == 1 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
851SE46JastiraManiaScriptscn SE46JastiraManiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.JastiraVAR == 0 ) set SE46.JastiraVAR to 1 endif if ( SE46.sidechosen == 2 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
852SE46JzidzoDementiaScriptscn SE46JzidzoDementiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.JzidzoVAR == 0 ) set SE46.JzidzoVAR to 2 endif if ( SE46.sidechosen == 1 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
853SE46JzidzoManiaScriptscn SE46JzidzoManiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.JzidzoVAR == 0 ) set SE46.JzidzoVAR to 1 endif if ( SE46.sidechosen == 2 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
854SE46Scriptscn SE46Script ;SEAtrabhiMania, SEAtrabhiDementia, SEHorkvirBearArmMania, SEHorkvirBearArmDementia, SEJzidzoMania, SEJzidzoDementia ;SEJastiraNanusMania, SEJastiraNanusDementia, SEUrulGroAgamphMania, SEUrulGroAgamphDementia all have ;scripts on them to track when they die for this quest ;used to track which double is dead 0-Neither dead, 1-Mania dead, 2-Dementia dead short HorkvirVAR short JastiraVAR short JzidzoVAR short AtrabhiVAR short UrulVAR short alldead short rewardVAR ;used to track which side the player has chosen short sidechosen ;1 is Dementia, 2 is Mania Begin GameMode ;creates a leveled amount of gold for the player as reward for killing mania/dementia npc in split if ( player.GetLevel >=26 ) && ( rewardVAR < 600 ) set rewardVAR to 1200 elseif ( player.GetLevel >= 20 ) && ( player.GetLevel <= 25 ) && ( rewardVAR < 500 ) set rewardVAR to 1000 elseif ( player.GetLevel >= 15 ) && ( player.GetLevel <= 19 ) && ( rewardVAR < 400 ) set rewardVAR to 800 elseif ( player.GetLevel >= 10 ) && ( player.GetLevel <= 14 ) && ( rewardVAR < 300 ) set rewardVAR to 600 elseif ( player.GetLevel >= 5 ) && ( player.GetLevel <= 9 ) && ( rewardVAR < 200 ) set rewardVAR to 400 elseif ( player.GetLevel >= 1 ) && ( player.GetLevel <= 4 ) && ( rewardVAR < 100 ) set rewardVAR to 200 endif ;following blocks set a stage when either mania/dementia version of npc is killed, increments a variable to track when all of them are killed if ( GetStage SE46 < 70 ) if ( GetStageDone SE46 20 == 0 ) && ( sidechosen > 0 ) if ( HorkvirVar > 0 ) SetStage SE46 20 set alldead to ( alldead + 1 ) endif endif if ( GetStageDone SE46 30 == 0 ) && ( sidechosen > 0 ) if ( JastiraVAR > 0 ) SetStage SE46 30 set alldead to ( alldead + 1 ) endif endif if ( GetStageDone SE46 40 == 0 ) && ( sidechosen > 0 ) if ( JzidzoVAR > 0 ) SetStage SE46 40 set alldead to ( alldead + 1 ) endif endif if ( GetStageDone SE46 50 == 0 ) && ( sidechosen > 0 ) if ( AtrabhiVAR > 0 ) SetStage SE46 50 set alldead to ( alldead + 1 ) endif endif if ( GetStageDone SE46 60 == 0 ) && ( sidechosen > 0 ) if ( UrulVAR > 0 ) SetStage SE46 60 set alldead to ( alldead + 1 ) endif endif endif ;these cover if the player kills one of the NPCs after stage 10 but before stage 15 if ( sidechosen == 0 ) && ( GetStage SE46 > 0 ) && ( GetStage SE46 < 15 ) if ( GetDeadCount SEHorkvirBearArmDementia == 1 ) || ( GetDeadCount SEJastiraNanusDementia == 1 ) || ( GetDeadCount SEJzidzoDementia == 1 ) || ( GetDeadCount SEAtrabhiDementia == 1 ) || ( GetDeadCount SEUrulgoAgamphDementia == 1 ) SetStage SE46 210 endif endif if ( sidechosen == 0 ) && ( GetStage SE46 > 0 ) && ( GetStage SE46 < 15 ) if ( GetDeadCount SEHorkvirBearArmMania == 1 ) || ( GetDeadCount SEJastiraNanusMania == 1 ) || ( GetDeadCount SEJzidzoMania == 1 ) || ( GetDeadCount SEAtrabhiMania == 1 ) || ( GetDeadCount SEUrulgoAgamphMania == 1 ) SetStage SE46 210 endif endif ;sets stage when all are killed if ( GetStageDone SE46 70 == 0 ) if ( alldead == 5 ) SetStage SE46 70 endif endif End
855SE46UrulDementiaScriptscn SE46UrulDementiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.UrulVAR == 0 ) set SE46.UrulVAR to 2 endif if ( SE46.sidechosen == 1 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
856SE46UrulManiaScriptscn SE46UrulManiaScript Begin OnDeath ;sets variable to check whether Mania or Dementia version of NPC is killed for SE46 if ( SE46.UrulVAR == 0 ) set SE46.UrulVAR to 1 endif if ( SE46.sidechosen == 2 ) && ( GetStage SE46 < 200 ) SetStage SE46 210 endif if ( SE46.sidechosen == 0 ) if ( GetStage SE46 < 10 ) StopQuest SE46 else ;SetStage SE46 210 endif endif End
857SEAbKnightHeartSCRIPTscn SEAbKnightHeartSCRIPT float alchemySkill short healOnce float timer begin ScriptEffectStart ; initialize vars (needed in case of multiple items consumed at once) set healOnce to 0 set timer to 0 ; add heal ability addspell SEAbKnightHeartHeal end begin ScriptEffectUpdate if healOnce == 0 && timer >= 1 set healOnce to 1 removespell SEAbKnightHeartHeal endif ; run timer for duration set timer to timer + ScriptEffectElapsedSeconds if timer > 15 removespell SEAbKnightHeartHeal removespell SEAbKnightHeart endif end begin ScriptEffectFinish removespell SEAbKnightHeartHeal end
858SEAhjazdaSCRIPTscn SEAhjazdaSCRIPT begin OnDeath SETombstoneAhjazdaRef.Enable if ( GetStage SE44 > 0 ) && (GetStage SE44 < 200 ) SetStage SE44 201 endif end Begin OnActivate if SEHerdirRef.TargetRef == SEAhjazdaRef if IsActionRef Player == 1 return endif else Activate endif End
859SEAichan01Boss01SCRIPTscn SEAichan01Boss01SCRIPT ref mySelf ref gate01 begin onLoad set mySelf to getSelf end begin onDeath ;Aichan01BossGate01REF.activate mySelf 1 ;AichanPraisersEnablerREF.enable end
860SEAichan01TrigZonePLAYER01SCRIPTscn SEAichan01TrigZonePLAYER01SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf01 ref mySelf02 float timer begin onTrigger player set triggered to 1 if triggered == 1 && (timer >= 0 && timer <=0.25) set mySelf01 to Aichan01StatueTrap01REF.getSelf set mySelf02 to Aichan01StatueTrap02REF.getSelf Aichan01StatueTrap01REF.activate mySelf01 1 Aichan01StatueTrap02REF.activate mySelf02 1 endif if triggered == 1 && (timer >= 1 && timer <=1.25) set mySelf01 to Aichan01StatueTrap03REF.getSelf set mySelf02 to Aichan01StatueTrap04REF.getSelf Aichan01StatueTrap03REF.activate mySelf01 1 Aichan01StatueTrap04REF.activate mySelf02 1 endif if triggered == 1 && (timer >= 2 && timer <=2.25) set mySelf01 to Aichan01StatueTrap05REF.getSelf set mySelf02 to Aichan01StatueTrap06REF.getSelf Aichan01StatueTrap05REF.activate mySelf01 1 Aichan01StatueTrap06REF.activate mySelf02 1 endif end begin gameMode if triggered == 1 && timer >= 5 set triggered to 0 set timer to 0 endif if timer >= 0 && triggered == 1 set timer to timer + getSecondsPassed endif end begin onReset set triggered to 0 end
861SEAichan01TrigZonePLAYER02SCRIPTscn SEAichan01TrigZonePLAYER02SCRIPT ; Activates linked Parent object once short triggered ref mySelf01 ref mySelf02 ref mySelf03 float timer begin onTrigger player set triggered to 1 if triggered == 1 if (timer >= 0 && timer <=0.5) set mySelf01 to Aichan01DartTrapFloor01aREF.getSelf set mySelf02 to Aichan01DartTrapFloor01bREF.getSelf set mySelf03 to Aichan01DartTrapFloor01cREF.getSelf Aichan01DartTrapFloor01aREF.activate mySelf01 1 Aichan01DartTrapFloor01bREF.activate mySelf02 1 Aichan01DartTrapFloor01cREF.activate mySelf03 1 elseif (timer >= 3 && timer <=3.5) set mySelf01 to Aichan01DartTrapFloor02aREF.getSelf set mySelf02 to Aichan01DartTrapFloor02bREF.getSelf set mySelf03 to Aichan01DartTrapFloor02cREF.getSelf Aichan01DartTrapFloor02aREF.activate mySelf01 1 Aichan01DartTrapFloor02bREF.activate mySelf02 1 Aichan01DartTrapFloor02cREF.activate mySelf03 1 endif endif end begin gameMode if triggered == 1 && timer >= 4 set triggered to 0 set timer to 0 endif if timer >= 0 && triggered == 1 set timer to timer + getSecondsPassed endif end begin onReset set triggered to 0 end
862SEAichan01TrigZonePlayerDoonce01SCRIPTscn SEAichan01TrigZonePlayerDoonce01SCRIPT ; Activates linked Parent short triggered ref gate01 ref gate02 ref mySelf begin onTrigger Player if triggered == 0 set gate01 to Aichan01Gate01REF set gate02 to Aichan01Gate02REF set mySelf to getSelf gate01.activate mySelf 1 gate02.activate mySelf 1 set triggered to 1 endif end
863SEAichanButtonReset01SCRIPTscn SEAichanButtonReset01SCRIPT ; activates two gates in Aichan prison and resets button to starting position short busy short stage short firstPush float timer ref mySelf ref gate01 ref gate02 ref gate01Trig ref gate02Trig begin onActivate set mySelf to getSelf set gate01 to Aichan01Gate01REF set gate02 to Aichan01Gate02REF set gate01Trig to Aichan01CloseGate01TrigREF set gate02Trig to Aichan01CloseGate02TrigREF if busy == 0 && stage == 0 && firstPush == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 elseif firstPush == 1 message "This button is locked in place." endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set gate01 to Aichan01Gate01REF set gate02 to Aichan01Gate02REF set gate01Trig to Aichan01CloseGate01TrigREF set gate02Trig to Aichan01CloseGate02TrigREF gate01.activate mySelf 1 gate02.activate mySelf 1 set stage to 2 gate01Trig.enable gate02Trig.enable set firstPush to 1 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 set firstPush to 0 end
864SEAichanTRAPFloor01SCRIPTscn SEAichanTRAPFloor01SCRIPT float timer ref mySelf ref myParent short init short triggered short busy short next begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 if busy == 0 playgroup forward 0 set triggered to 1 set busy to 1 set timer to 1 set next to 1 endif elseif triggered == 1 && isActionRef player == 0 if busy == 0 playgroup backward 0 set triggered to 0 set timer to 1 set busy to 1 endif endif end begin gameMode if timer > 0 set timer to timer - getSecondsPassed endif if next == 1 && triggered == 1 && timer <= 1 myParent.activate mySelf 1 set next to 0 endif if busy == 1 && isAnimPlaying == 0 && timer <= 0 set busy to 0 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif end
865SEAimableFanrieneSCRIPTscn SEAimableFanrieneSCRIPT float pickPackageCounter ;used to make him pick his cower package or change out of it short cower ;used to make him pick his cower package or change out of it begin GameMode ;init cower to 1 if cower == 0 set cower to 1 endif if pickPackageCounter <= 0 evp set pickPackageCounter to 5 set cower to -cower ;flip between 1 and -1 used as a condition on package else set pickPackageCounter to pickPackageCounter - getSecondsPassed endif end GameMode begin OnDeath SETombstoneAimableFanrieneRef.Enable end
866SEArctusScriptscn SEArctusScript ;This script is to control the random sermon that Arctus will give occassionally after the Flame is lit ;The player needs to be in the Sacellum to trigger it, otherwise it is once per day short SpeechGo ;This is the flag that is set upon entry to the Sacellum that kicks off the speech short SpeechCheck ;A DoOnce to make sure the flag is done only a single time short SpeechDone ;This allows the priest to reset their package when speech is done float SpeechLengthTimer ;This float helps match the Say length to the actual time it takes to speak it float DelayTimer ;This float gives a few seconds delay so player can get up steps before speech starts begin gamemode ;This block stipulates when to trigger the speech ;It depends on the player being in the Sacellum, SE07A or B to be done, and to make sure the appropriate flame is ignited if ( SESacellum.SpeechCheck == 0 ) if ( GetStage SE08 >= 10 ) if ( SE06FlameDementiaSacellumREF.GetDisabled == 0 ) if ( Player.GetinCell SENSSacellumArdenSul == 1 ) Set SpeechLengthTimer to 0 Set SpeechGo to 0 Set SpeechGo to 1 Set SpeechDone to 1 Set DelayTimer to 8 Set SESacellum.SpeechCheck to 1 endif endif endif endif ;This block kicks off the Speech by Evp'ing Arctus. When he gets to the end of the position, the Speech itself will begin ;So SpeechGo == 1 will Evp him if ( SpeechGo == 1 ) Evp Set SpeechGo to 2 endif ;This is the actual speech itself. It is triggered at the end of the OnPackageEnd block below if ( SpeechGo == 3 ) && ( SpeechLengthTimer == 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech01 SEArctusRef.Say SEArctusSpeech01 Set SpeechGo to 4 elseif ( SpeechGo == 4 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech02 SEArctusRef.Say SEArctusSpeech02 Set SpeechGo to 5 elseif ( SpeechGo == 5 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech03 SEArctusRef.Say SEArctusSpeech03 Set SpeechGo to 6 elseif ( SpeechGo == 6 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech04 SEArctusRef.Say SEArctusSpeech04 Set SpeechGo to 7 elseif ( SpeechGo == 7 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech05 SEArctusRef.Say SEArctusSpeech05 Set SpeechGo to 8 elseif ( SpeechGo == 8 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech06 SEArctusRef.Say SEArctusSpeech06 Set SpeechGo to 9 elseif ( SpeechGo == 9 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech07 SEArctusRef.Say SEArctusSpeech07 Set SpeechGo to 10 elseif ( SpeechGo == 10 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech08 SEArctusRef.Say SEArctusSpeech08 Set SpeechGo to 11 elseif ( SpeechGo == 11 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEArctusRef.Say SEArctusSpeech09 SEArctusRef.Say SEArctusSpeech09 Set SpeechGo to 12 elseif ( SpeechGo == 12 ) && ( SpeechLengthTimer <= 0 ) Set SpeechDone to 0 Set SESacellum.DoOnce to 0 SEArctusRef.Evp Set SpeechGo to 13 endif if ( SpeechGo >= 3 ) && ( SpeechGo < 13 ) Set SpeechLengthTimer to SpeechLengthTimer - GetSecondsPassed endif end ;This is the actual speech block. It is triggered when Arctus reaches the end of his package. The flag variable is increased to 3, and sets off the gamemode block above begin OnPackageEnd SEArctusSermon if ( DelayTimer > 0 ) Set DelayTimer to ( DelayTimer - GetSecondsPassed ) else if ( SpeechGo == 2 ) Set SpeechGo to 3 endif endif end
867SEBigHeadSCRIPTscn SEBigHeadSCRIPT begin OnDeath SETombstoneBigHeadRef.Enable SetStage SE45 205 end
868SEBlackrootLairGate01SCRIPTscn SEBlackrootLairGate01SCRIPT ;When the gate is unlocked, an actor trigger is enabled ref triggerTarget short unlocked short doonce begin gameMode if doonce == 0 && GetLocked == 0 set unlocked to 1 set triggerTarget to SEBlackrootLair02Trig01REF.getSelf triggerTarget.enable set doonce to 1 endif end begin onReset set doonce to 0 end
869SEBlackrootLairGate02SCRIPTscn SEBlackrootLairGate02SCRIPT ;When the gate is unlocked, an actor trigger is enabled ref triggerTarget short unlocked short doonce begin gameMode if doonce == 0 && GetLocked == 0 set unlocked to 1 set triggerTarget to SEBlackrootLair03Trig01REF.getSelf triggerTarget.enable set doonce to 1 endif end begin onReset set doonce to 0 end
870SEBlackrootLairGate03SCRIPTscn SEBlackrootLairGate03SCRIPT ;When the gate is unlocked, an actor trigger is enabled ref triggerTarget short unlocked short doonce begin gameMode if doonce == 0 && GetLocked == 0 set unlocked to 1 set triggerTarget to SEBlackrootLair03Trig02REF.getSelf triggerTarget.enable set doonce to 1 endif end begin onReset set doonce to 0 end
871SEBlackrootLairGate04SCRIPTscn SEBlackrootLairGate04SCRIPT ;When the gate is unlocked, an actor trigger is enabled ref triggerTarget short unlocked short doonce begin gameMode if doonce == 0 && GetLocked == 0 set unlocked to 1 set triggerTarget to SEBlackrootLair04Trig01REF.getSelf triggerTarget.enable set doonce to 1 endif end begin onReset set doonce to 0 end
872SEBlackrootLairGate05SCRIPTscn SEBlackrootLairGate05SCRIPT ;When the gate is unlocked, an actor trigger is enabled ref triggerTarget short unlocked short doonce begin gameMode if doonce == 0 && GetLocked == 0 set unlocked to 1 set triggerTarget to SEBlackrootLair05Trig01REF.getSelf triggerTarget.enable set doonce to 1 endif end begin onReset set doonce to 0 end
873SEBlackrootLairGate06SCRIPTscn SEBlackrootLairGate06SCRIPT ;When the gate is unlocked, an actor trigger is enabled ref triggerTarget short unlocked short doonce begin gameMode if doonce == 0 && GetLocked == 0 set unlocked to 1 set triggerTarget to SEBlackrootLair05Trig02REF.getSelf triggerTarget.enable set doonce to 1 endif end begin onReset set doonce to 0 end
874SEBlackrootLairPrisonerTrig01SCRIPTscn SEBlackrootLairPrisonerTrig01SCRIPT ; EVPs actor inside it one time short triggered ref actor ref mySelf begin onTriggerActor if triggered == 0 set actor to getActionRef actor.evp set triggered to 1 endif end begin onReset set triggered to 0 end
875SEBrithaurSCRIPTscn SEBrithaurSCRIPT begin OnDeath SETombstoneBrithaurREF.enable end
876SEBruscusDannusItemSCRIPTscn SEBruscusDannusItemSCRIPT short moved ; set to 2 to disable script permanently (when item is moved out of his house) float fx float fy float fz begin OnLoad ; if in his house, move everything back to original position when player enters if getincell SEHighcrossBruscusDannusHouse == 1 if getpos x != getstartingpos x || getpos y != getstartingpos y || getpos z != getstartingpos z set fx to getstartingpos x set fy to getstartingpos y set fz to getstartingpos z setpos x fx setpos y fy setpos z fz set fx to getstartingangle x set fy to getstartingangle y set fz to getstartingangle z setangle x fx setangle y fy setangle z fz set moved to 0 endif endif set SEBruscusDannusRef.goCrazy to 0 end begin gamemode if moved == 2 return endif if moved == 0 && getincell SEHighcrossBruscusDannusHouse == 0 set moved to 2 return endif if moved == 0 if getpos x != getstartingpos x || getpos y != getstartingpos y || getpos z != getstartingpos z set moved to 1 ; I've been moved! tell Bruscus Dannus to go crazy set SEBruscusDannusRef.goCrazy to 1 if SEBruscusDannusRef.getincell SEHighcrossBruscusDannusHouse == 1 if SEBruscusDannusRef.getiscurrentpackage SEBruscusDannusGoCrazy == 0 SEBruscusDannusRef.evp endif endif endif endif end
877SEBruscusDannusSCRIPTscn SEBruscusDannusSCRIPT ; test script to try to control his find packages a bit float timer short goCrazy ; set to 1 when stuff in his house is moved begin gamemode if timer > 0 set timer to timer - getSecondsPassed else ; check packages if getCurrentAIPackage == 0 && getCurrentAIProcedure == 7 ; find package, but in wander state => can't find anything evp endif ; reset timer set timer to 20 ; if I'm going crazy, say hello if getiscurrentpackage SEBruscusDannusGoCrazy == 1 && getinsamecell player == 1 say hello endif endif end
878SECindanweScriptscn SECindanweScript Begin OnDeath if getStage SE39 < 200 setStage SE39 65 endif if getItemCount SE39CindanweNotebook < 1 && player.getItemCount SE39CindanweNotebook < 1 SECindanweRef.addItem SE39CindanweNotebook 1 endif End
879SEComplexSceneObjectSCRIPTscn SEComplexSceneObjectSCRIPT ; this object sets SetSceneIsComplex when enabled begin gamemode if getdisabled == 0 SetSceneIsComplex 1 endif end
880SEConversationsQuestScriptscn SEConversationsQuestScript ;creature vars short scalonVAR short gnarlVAR short shamblesVAR short fleshatronachVAR short elytraVAR short hungerVAR short grummiteVAR short baliwogVAR short houndVAR short hereticVAR short zealotVAR ;obelisk/knight vars short obeliskVAR short knightVAR ;ingredient vars ;service provider vars short ravenbiterVAR short tilseVAR short dumagVAR short sontaireVAR short cutterVAR short unaVAR short earilVAR short ahjazdaVAR short berniceVAR ;misc quest vars short SE30VAR short SE32VAR short SE33VAR short SE34VAR short SE35VAR short SE36VAR short SE37VAR short SE38VAR short SE39VAR short SE40VAR short SE41VAR short SE42VAR short SE43VAR short SE44VAR short SE45VAR short SE46VAR
881SECorpserotArenaGuardTriggerSCRIPTscn SECorpserotArenaGuardTriggerSCRIPT ; Spawns the two arena guards in Corpserot Prison short triggered begin onTrigger player if triggered == 0 && SECorpserotFightStarterREF.triggered == 0 set triggered to 1 XPCorpserotARGuardSpotREF.placeatme SELLCorpserotArenaGuard01 2 endif end begin onReset set triggered to 0 end
882SECorpserotArenaMonsterSCRIPTscn SECorpserotArenaMonsterSCRIPT ref mySelf short DanceOver short doOnce begin onDeath set mySelf to getSelf if doOnce == 0 set doOnce to 1 set DanceOver to 1 SECorpserotArenaWinnerREF.activate mySelf 1 endif end
883SECorpserotArenaPath01SCRIPTscn SECorpserotArenaPath01SCRIPT ref mySelf short triggered short init short howMany short pathActive begin onActivate set mySelf to getSelf if isActionRef mySelf == 0 if pathActive == 0 && triggered == 0 set pathActive to 1 set triggered to 1 enableLinkedPathPoints elseif pathActive == 1 && triggered == 0 set pathActive to 0 set triggered to 1 disableLinkedPathPoints endif endif set triggered to 0 end begin gameMode if init == 0 disableLinkedPathPoints set init to 1 endif end begin onReset set pathActive to 0 set howMany to 0 set triggered to 0 set init to 0 end
884SECorpserotArenaTrigger01SCRIPTscn SECorpserotArenaTrigger01SCRIPT ; Spawns in the arena monster & also calls in 2 Grummites who "dance" ; on the ledge above the arena. They get mad and jump to fight the player ; when the monster dies. short triggered ; Do-once begin onTrigger player ; Spawns one Arena monster & two Grummites to dance on ledge if triggered == 0 && SECorpserotTopTriggerREF.triggered == 0 set triggered to 1 XPCorpserotDancerSpawn01REF.placeatme SELLCorpserotDancer01 1 XPCorpserotDancerSpawn02REF.placeatme SELLCorpserotDancer01 1 XPCorpserotArenaMonsterSpawnREF.placeatme SELLCorpserotArenaMonster100 1 endif end begin onReset set triggered to 0 end
885SECorpserotArenaWinnerSCRIPTscn SECorpserotArenaWinnerSCRIPT ref mySelf short triggered short grummitesSmash begin onActivate set mySelf to getSelf if triggered == 0 set triggered to 1 SECorpserotOpenTheDamnPathREF.activate mySelf 1 set grummitesSmash to 1 ; Variable flipped to kickoff AI packages endif end begin onReset set triggered to 0 set grummitesSmash to 0 end
886SECorpserotFloorTriggerSCRIPTscn SECorpserotFloorTriggerSCRIPT ; Activates trap door in Corpserot Prison, but only after the player ; has gone into the nearby area with the loot containers. short Active ref mySelf begin onTrigger player if ( Active == 0 ) && ( XPCorpserotLootTriggerREF.triggered == 1 ) set Active to 1 set mySelf to getSelf CorpserotFloor01REF.activate mySelf 1 endif end begin onReset set Active to 0 end
887SECorpserotGrummiteDancer01SCRIPTscn SECorpserotGrummiteDancer01SCRIPT short doOnceA short doOnceB begin onLoad if doOnceA == 0 set doOnceA to 1 setav aggression 0 endif end begin gameMode if ( doOnceB == 0 ) && ( SECorpserotArenaWinnerREF.grummitesSmash == 1 ) set doOnceB to 1 setav aggression 80 evp endif end
888SECutterSCRIPTscn SECutterSCRIPT ;!!!NOTE: ANY CHANGES TO THE SMITH HAMMER IDLE ANIMATION SCRIPTING PROBABLY SHOULD BE MADE FOR SEDumagGraBonkScript AS WELL !!! ;This script handles giving her a non-offers services pick idle package so that she is hammering when the player enters the cell ;If the player approaches her or after a timer runs out, she evps to an offer services package so she can conduct business as normal float idleTimer ;used to make sure that after a little while she stops hammering and follows the player around per normal (switch to a OfferServices flagged package) short idleDone ;a flag used for the same purpose Float Timer ; When to say a rooftop cheer Begin GameMode if getInCell SENSCuttersWeapons if getInSameCell Player if getDistance Player < 200 if idleTimer > 0 set idleTimer to -1 endif endif if idleTimer >= 0 set idleTimer to idleTimer - getSecondsPassed else if idleDone == 0 if getIsCurrentPackage SE30CutterHammer8x12 == 1 set idleDone to 1 evp endif endif endif endif endif End Begin OnActivate if SEHerdirRef.TargetRef == SECutterRef if IsActionRef Player == 1 return endif else Activate endif End Begin OnPackageStart SE30CutterHammer8x12 set idleTimer to 20 set idleDone to 0 End Begin OnPackageDone SE30CutterServices8x12LockAtEnd512 set idleTimer to 20 set idleDone to 0 End Begin OnPackageChange SE30CutterServices8x12LockAtEnd512 set idleTimer to 20 set idleDone to 0 End begin OnDeath SETombstoneCutterREF.enable end ; Cutter is a member of the Duelists society which stages mock fights on the rooftop ; When her fight starts, add a weapon to make sure she has one. Remove it when she it done. ; Set the variable which is used for packages and idles. Begin OnPackageStart SECutterFightMon20x2 AddItem WeapIronDagger 1 Set SECrime.RooftopFighting to 1 If SEMazaddhaRef.GetIsCurrentPackage SEMazaddaFightMon20x2 == 0 SEMazaddhaRef.AddScriptPackage SEMazaddaFightMon20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SECutterFightMon20x2 RemoveItem WeapIronDagger 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SECutterFightAfterSE05Mon20x2 AddItem WeapIronDagger 1 Set SECrime.RooftopFighting to 1 If SEUshnarGroShadborgobRef.GetIsCurrentPackage SEUshnarFightAfterSE05Mon20x2 == 0 SEUshnarGroShadborgobRef.AddScriptPackage SEUshnarFightAfterSE05Mon20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SECutterFightAfterSE05Mon20x2 RemoveItem WeapIronDagger 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SECutterFightAfterSE05Wed20x2 AddItem WeapIronDagger 1 Set SECrime.RooftopFighting to 1 If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightAfterSE05Wed20x2 == 0 SECaldanaMonriusRef.AddScriptPackage SECaldanaFightAfterSE05Wed20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SECutterFightAfterSE05Wed20x2 RemoveItem WeapIronDagger 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SECutterFightThu20x2 AddItem WeapIronDagger 1 Set SECrime.RooftopFighting to 1 If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightThu20x2 == 0 SECaldanaMonriusRef.AddScriptPackage SECaldanaFightThu20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SECutterFightThu20x2 RemoveItem WeapIronDagger 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SECutterFightFri20x2 AddItem WeapIronDagger 1 Set SECrime.RooftopFighting to 1 If SEMuurineRef.GetIsCurrentPackage SEMuurineFightFri20x2 == 0 SEMuurineRef.AddScriptPackage SEMuurineFightFri20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SECutterFightFri20x2 RemoveItem WeapIronDagger 1 Set SECrime.RooftopFighting to 0 End Begin GameMode If GetIsCurrentPackage SECutterCheer20x2 == 1 If Timer <=0 Say SERooftopCheer ; if she is cheering, have her say somthing every now and then. Set Timer to 11.1 If GetDistance SECheerCutterMarker <= 64 PickIdle ; run and idle if she is close enough. EndIf EndIf Endif If GetIsCurrentPackage SECutterFightMon20x2 == 1 || GetIsCurrentPackage SECutterFightThu20x2 == 1 || GetIsCurrentPackage SECutterFightFri20x2 == 1 If Timer <= 0 Say Hit ; when she is fighting, have her grunt every now and then. Set Timer to 9.1 EndIf EndIf If Timer > 0 Set Timer to Timer - GetSecondsPassed EndIf End
889SEDawnfangSpellEffectScriptscn SEDawnfangSpellEffectScript ref Target ref self short KillingBlow begin ScriptEffectStart set KillingBlow to 0 set target to GetSelf set self to GetSelf end begin ScriptEffectUpdate if ( KillingBlow == 0 ) if ( Target.GetDead == 1 ) if ( SESwordDawnfangKills < 1 ) Set SESwordDawnfangKills to ( SESwordDawnfangKills + 1 ) Message "Dawnfang has extinguished %.0f life.", SESwordDawnfangKills Set KillingBlow to 1 elseif ( SESwordDawnfangKills >= 1 ) && ( SESwordDawnfangKills < 11 ) Set SESwordDawnfangKills to ( SESwordDawnfangKills + 1 ) Message "Dawnfang has extinguished %.0f lives.", SESwordDawnfangKills Set KillingBlow to 1 elseif ( SESwordDawnfangKills == 11 ) Set SESwordDawnfangKills to ( SESwordDawnfangKills + 1 ) Message "Dawnfang's bloodthirst has been quenched." Set KillingBlow to 1 elseif ( SESwordDawnfangKills >= 12 ) Set KillingBlow to 1 endif endif endif end
890SEDerveninScriptscn SEDerveninScript ;This script is to control the random sermon that Dervenin will give occassionally after the Flame is lit ;The player needs to be in the Sacellum to trigger it, otherwise it is once per day short SpeechGo ;This is the flag that is set upon entry to the Sacellum that kicks off the speech short SpeechCheck ;A DoOnce to make sure the flag is done only a single time short SpeechDone ;This allows the priest to reset their package when speech is done float SpeechLengthTimer ;This float helps match the Say length to the actual time it takes to speak it float DelayTimer ;This float gives a few seconds delay so player can get up steps before speech starts begin gamemode ;This block stipulates when to trigger the speech ;It depends on the player being in the Sacellum, SE07A or B to be done, and to make sure the appropriate flame is ignited if ( SESacellum.SpeechCheck == 0 ) if ( GetStage SE08 >= 10 ) if ( SE06FlameManiaSacellumREF.GetDisabled == 0 ) if ( Player.GetinCell SENSSacellumArdenSul == 1 ) Set SpeechLengthTimer to 0 Set SpeechGo to 0 Set SpeechGo to 1 Set SpeechDone to 1 Set DelayTimer to 8 Set SESacellum.SpeechCheck to 1 endif endif endif endif ;This block kicks off the Speech by Evp'ing Dervenin. When he gets to the end of the position, the Speech itself will begin ;So SpeechGo == 1 will Evp him if ( SpeechGo == 1 ) Evp Set SpeechGo to 2 endif ;This is the actual speech itself. It is triggered at the end of the OnPackageEnd block below if ( SpeechGo == 3 ) && ( SpeechLengthTimer == 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech01 SEDerveninRef.Say SEDerveninSpeech01 Set SpeechGo to 4 elseif ( SpeechGo == 4 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech02 SEDerveninRef.Say SEDerveninSpeech02 Set SpeechGo to 5 elseif ( SpeechGo == 5 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech03 SEDerveninRef.Say SEDerveninSpeech03 Set SpeechGo to 6 elseif ( SpeechGo == 6 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech04 SEDerveninRef.Say SEDerveninSpeech04 Set SpeechGo to 7 elseif ( SpeechGo == 7 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech05 SEDerveninRef.Say SEDerveninSpeech05 Set SpeechGo to 8 elseif ( SpeechGo == 8 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech06 SEDerveninRef.Say SEDerveninSpeech06 Set SpeechGo to 9 elseif ( SpeechGo == 9 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech07 SEDerveninRef.Say SEDerveninSpeech07 Set SpeechGo to 10 elseif ( SpeechGo == 10 ) && ( SpeechLengthTimer <= 0 ) Set SpeechLengthTimer to SEDerveninRef.Say SEDerveninSpeech08 SEDerveninRef.Say SEDerveninSpeech08 Set SpeechGo to 11 elseif ( SpeechGo == 11 ) && ( SpeechLengthTimer <= 0 ) Set SpeechDone to 0 Set SESacellum.DoOnce to 0 SEDerveninRef.Evp Set SpeechGo to 12 endif if ( SpeechGo >= 3 ) && ( SpeechGo < 12 ) Set SpeechLengthTimer to SpeechLengthTimer - GetSecondsPassed endif end ;This is the actual speech block. It is triggered when Dervenin reaches the end of his package. The flag variable is increased to 3, and sets off the gamemode block above begin OnPackageEnd SEDerveninSermon if ( DelayTimer > 0 ) Set DelayTimer to ( DelayTimer - GetSecondsPassed ) else if ( SpeechGo == 2 ) Set SpeechGo to 3 endif endif end
891SEDoorLightBeamScriptscn SEDoorLightBeamScript ;based on time of day, this script will enable/disable lightbeam objects. Begin OnActivate if IsActionRef Player == 1 if GameHour >= 10 && GameHour < 20 SELightBeam01Ref.enable SEBlissSmittyLightDay01Ref.enable SEBlissSmittyLightDay02Ref.enable SEBlissSmittyLightNight01Ref.disable SEBlissSmittyLightNight02Ref.disable else SELightBeam01Ref.disable SEBlissSmittyLightDay01Ref.disable SEBlissSmittyLightDay02Ref.disable SEBlissSmittyLightNight01Ref.enable SEBlissSmittyLightNight02Ref.enable endif endif Activate End
892SEDoorToShiveringIslesScriptscn SEDoorToShiveringIslesScript ;This script is attached to the door in Cyrodiil that leads to the Shivering Isles short journalVAR Begin OnActivate if IsActionRef player == 1 && ( Player.IsRidingHorse == 0 ) if ( GetStage SE14 >= 6 ) ;Player.AddSpell SE14RezSpell ;Player.AddSpell SE14WeatherSpell ;Player.AddSpell SELpSummonHaskill endif if ( SE01Door.GatespeechVAR != 4 ) Message "This door will not yet open to you." return endif ; player is entering Shivering Isles: Player.SCAOnActor setPlayerInSEWorld 1 SEJailMarkerParentTamriel.Disable ; turns OFF jail markers in Tamriel and turns ON jail markers in SE SEJailMarkerCrucible.Enable SEJailMarkerBliss.Enable SEPrisonMarkerAichan.Enable SEPrisonMarkerCorpserot.Enable ;SE02 Gatekeeper leveling: ;If the player hasn't killed the Gatekeeper at the end of SE02, then this enables the correct ;Gatekeeper for the player's level and disables the other ones. if getStage SE02 < 150 SE02Gatekeeper1Ref.disable SE02Gatekeeper2Ref.disable SE02Gatekeeper3Ref.disable SE02Gatekeeper4Ref.disable SE02Gatekeeper5Ref.disable SE02Gatekeeper6Ref.disable SE02Gatekeeper7Ref.disable SE02Gatekeeper8Ref.disable set SE02.whichGatekeeper to 0 if player.getLevel < 3 SE02Gatekeeper1Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper1Ref set SE02.whichGatekeeper to 1 elseif player.getLevel < 5 SE02Gatekeeper2Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper2Ref set SE02.whichGatekeeper to 2 elseif player.getLevel < 8 SE02Gatekeeper3Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper3Ref set SE02.whichGatekeeper to 3 elseif player.getLevel < 12 SE02Gatekeeper4Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper4Ref set SE02.whichGatekeeper to 4 elseif player.getLevel < 16 SE02Gatekeeper5Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper5Ref set SE02.whichGatekeeper to 5 elseif player.getLevel < 20 SE02Gatekeeper6Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper6Ref set SE02.whichGatekeeper to 6 elseif player.getLevel < 24 SE02Gatekeeper7Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper7Ref set SE02.whichGatekeeper to 7 elseif player.getLevel >= 24 SE02Gatekeeper8Ref.enable set SE02.GatekeeperRef to SE02Gatekeeper8Ref set SE02.whichGatekeeper to 8 endif endif If Player.GetEquipped TGGrayFoxCowl == 1 Set SECrime.EnteredSECowlOn to 1 EndIf activate endif End ;OnActivate Player Begin GameMode if ( GetDistance Player <= 512 ) && ( GetStage SE01Door == 0 ) set journalVAR to 1 endif if ( journalVAR == 1 ) && ( GetStage SE01Door == 0 ) SetStage SE01Door 10 endif End
893SEDoorToTamrielSCRIPTscn SEDoorToTamrielSCRIPT Begin OnActivate if IsActionRef player == 1 ; player is leaving Shivering Isles: setPlayerInSEWorld 0 endif Activate end
894SEDredhwenScriptscn SEDredhwenScript short doOnce ;used to set her up to look at something and make her blind short pickIdleDoOnce ;used to pickIdle when she loads because she isn't always in the proper hunched over anim Begin OnLoad set pickIdleDoOnce to 0 End Begin GameMode if doOnce == 0 ;her body tracks you if you approach from the side (which looks funny with her head hanging down anim) so having her look at an invisible object seems to do the trick look SEDredhwenLookHereRef ;she blind because she is supposedly sleeping on her feet, so I'd like you to be able to steal things without her noticing setav Blindness 100 set doOnce to 1 endif if pickIdleDoOnce == 0 pickIdle set pickIdleDoOnce to 1 endif End
895SEDroppingGrummitesTriggerSCRIPTscn SEDroppingGrummitesTriggerSCRIPT ; This trigger counts the actors falling through it & activates a spell target ; called SECorpserotOpenTheDamnPathREF when both dancing Grummites ; pass through the trigger box. The activator then disables the path they used ; to reach the lower level of the room. short triggered ; Do once short dancerCount ; Number of Grummites who trigger the box ref mySelf ; Self-ref, needed for Activate line ref whoUsedMe ; Ref for who set off the trigger begin OnTriggerActor if ( isActionRef player == 0) && ( dancerCount < 2 ) set mySelf to getSelf set whoUsedMe to getActionRef if ( whoUsedMe.getInFaction SECorpserotDancingGrummites == 1 ) set dancerCount to dancerCount + 1 whoUsedMe.setav Aggression 100 endif endif end begin gameMode if ( dancerCount >= 2 ) && ( triggered == 0 ) SECorpserotOpenTheDamnPathREF.activate mySelf 1 set triggered to 1 endif end begin onReset set triggered to 0 set dancerCount to 0 end
896SEDumagGraBonkSCRIPTscn SEDumagGraBonkSCRIPT ;This character was female and now is male, so the editorID and ref name are DumagGrABonk but name is Dumag grO-Bonk (gra/gro) ;!!!NOTE: ANY CHANGES TO THE SMITH HAMMER IDLE ANIMATION SCRIPTING PROBABLY SHOULD BE MADE FOR SECutterScript AS WELL !!! ;This script handles giving her a non-offers services pick idle package so that she is hammering when the player enters the cell ;If the player approaches her or after a timer runs out, she evps to an offer services package so she can conduct business as normal float idleTimer ;used to make sure that after a little while she stops hammering and follows the player around per normal (switch to a OfferServices flagged package) short idleDone ;a flag used for the same purpose Begin GameMode if getInCell SENSTheMissingPauldron if getInSameCell Player if getDistance Player < 200 if idleTimer > 0 set idleTimer to -1 endif endif if idleTimer >= 0 set idleTimer to idleTimer - getSecondsPassed else if idleDone == 0 if getIsCurrentPackage SE30DumagGraBonkHammer8x12 == 1 set idleDone to 1 evp endif endif endif endif endif End Begin OnPackageStart SE30DumagGraBonkHammer8x12 set idleTimer to 30 set idleDone to 0 End Begin OnPackageDone SE30DumagGraBonkServices8x12LockAtEnd512 set idleTimer to 30 set idleDone to 0 End Begin OnPackageChange SE30DumagGraBonkServices8x12LockAtEnd512 set idleTimer to 30 set idleDone to 0 End begin OnDeath SETombstoneDumagGraBonkREF.enable end
897SEDuskfangSpellEffectScriptscn SEDuskfangSpellEffectScript ref Target ref self short KillingBlow begin ScriptEffectStart set KillingBlow to 0 set target to GetSelf set self to GetSelf end begin ScriptEffectUpdate if ( KillingBlow == 0 ) if ( Target.GetDead == 1 ) if ( SESwordDuskfangKills < 1 ) Set SESwordDuskfangKills to ( SESwordDuskfangKills + 1 ) Message "Duskfang has extinguished %.0f life.", SESwordDuskfangKills Set KillingBlow to 1 elseif ( SESwordDuskfangKills >= 1 ) && ( SESwordDuskfangKills < 11 ) Set SESwordDuskfangKills to ( SESwordDuskfangKills + 1 ) Message "Duskfang has extinguished %.0f lives.", SESwordDuskfangKills Set KillingBlow to 1 elseif ( SESwordDuskfangKills == 11 ) Set SESwordDuskfangKills to ( SESwordDuskfangKills + 1 ) Message "Duskfang's bloodthirst has been quenched." Set KillingBlow to 1 elseif ( SESwordDuskfangKills >= 12 ) Set KillingBlow to 1 endif endif endif end
898SEEarilSCRIPTscn SEEarilSCRIPT begin OnDeath SETombstoneEarilREF.enable if ( GetStage SE35 >= 20 ) SetStage SE35 60 endif end Begin OnActivate if SEHerdirRef.TargetRef == SEEarilRef if IsActionRef Player == 1 return endif else Activate endif End
899SEFelasSarandasScriptscn SEFelasSarandasScript Begin OnHit if SE02.orcSpectate == 0 set SE02.orcSpectate to 1 endif End Begin OnActivate ;SE02: if the player interupts the scripted conversation about the adventures and the gatekeeper, have them finish it if IsActionRef player == 1 if SESheldenRef.orcConversationFinished == 0 set SESheldenRef.orcConversationFinished to 1 set SE02.orcSpectate to 1 endif endif activate End
900SEGatesOfMadnessDoorScriptscn SEGatesOfMadnessDoorScript ;SE02.HaskillGreet means Haskill has appeared and talked to the player Begin OnActivate If IsActionRef Player == 1 if getStage SE02 < 7 setStage SE02 7 ;Tells the player he needs to get the keys from the Gatekeeper activate endif if getStage SE02 >= 160 && SE02.HaskillGreet < 2 ;the player needs to talk to Haskill before going in message "You must speak with Haskill first." endif If GetStage SE02 >= 160 && SE02.HaskillGreet >= 2 if SE02.pickedDoor == 0 if getIsID SEGatesOfMadnessDementiaGate01 == 1 player.addSpell SE02BlessingDementia SEFringeToManiaREF.unlock endif if getIsID SEGatesOfMadnessManiaGate01 == 1 player.addSpell SE02BlessingMania SEFringeToDementiaREF.unlock endif set SE02.pickedDoor to 1 endif autosave activate endIf Else ;anyone else using the door should be normal activate Endif End
901SEGnarlSpawnerTestSCRIPTscn SEGnarlSpawnerTestSCRIPT ref myParent ; marker where I spawn a new gnarl ref mySpawn ; my current spawn ref mySelf ; the spawner itself (how original) float timer ; timer to prevent repeated spawning short triggered ; set to 1 while spawner is animating or not ready to spawn short GnarlGo ; added variable to set next stage & move spawning to GameMode block begin OnLoad if triggered == 1 playgroup Backward 1 else playgroup Idle 1 endif end begin OnActivate set myParent to GetParentRef set mySelf to getSelf if isActionRef player == 1 ; when player activates, check if spawn is dead or far away if triggered == 1 if mySpawn == 0 set triggered to 0 else if mySpawn.getDead == 1 || mySpawn.isOwner SE12OrderedGnarlFaction == 1 set mySpawn to 0 set triggered to 0 elseif getDistance mySpawn > 2000 mySpawn.kill set mySpawn to 0 set triggered to 0 endif endif endif if timer <= 0 && triggered == 0 set timer to 60 set triggered to 1 set GnarlGo to 1 else message "The chrysalis appears to be empty." endif endif end begin gamemode if triggered == 1 && GnarlGo == 1 && timer <= 60 playgroup forward 1 set GnarlGo to 2 endif if triggered == 1 && GnarlGo == 2 && timer <= 59.25 if getincell XPGloomstonePassage01 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl01Follower elseif getincell XPGloomstonePassage02 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl02Follower elseif getincell XPGloomstonePassage03 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl03Follower elseif getincell XPGloomstonePassage04 == 1 set mySpawn to mySelf.placeAtMe SE12LL1Gnarl04Follower else set mySpawn to mySelf.placeAtMe SE12LL1Gnarl01 endif ; rename spawned gnarl set GnarlGo to 3 endif if triggered == 1 && timer <=0 ; am I ready to spawn? if mySpawn == 0 set triggered to 0 elseif mySpawn.isOwner SE12OrderedGnarlFaction == 1 || mySpawn.getDead == 1 set triggered to 0 set mySpawn to 0 ; clear mySpawn when dead or ordered so doors don't try to call them endif if triggered == 0 ; animate back to "ready to spawn" state playgroup Idle 1 else ; wait a while before checking if I'm ready to spawn again set timer to 30 endif endif if GnarlGo == 3 && timer <= 0 set GnarlGo to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
902SEGraveyardScriptMarkerSCRIPTscn SEGraveyardScriptMarkerSCRIPT short Adeo short Ahjazda short AmiableFanriene short BigHead short Brithaur short Cutter short DumagGraBonk short Earil short HirrusClutumnus short Mazaddha short Muurine short Orinthal short RavenBiter short RendilDrarara short SheerMeedish short SicklyBernice short Sontaire short Thaedil short TilseAreleth short ToveTheUnrestful short UnaArmina short UshnarGraShadborgob short WideEye ref ghostRef begin OnActivate if IsActionRef player == 1 ; move bodies in here if Adeo == 0 && SEAdeoRef.getdead == 1 SEAdeoRef.moveto SECryptMarkerAdeo set Adeo to 1 endif if Ahjazda == 0 && SEAhjazdaRef.getdead == 1 SEAhjazdaRef.moveto SECryptMarkerAhjazda set Ahjazda to 1 endif if AmiableFanriene == 0 && SEAmiableFanrieneRef.getdead == 1 SEAmiableFanrieneRef.moveto SECryptMarkerAmiableFanriene set AmiableFanriene to 1 endif if BigHead == 0 && SEBigHeadRef.getdead == 1 SEBigHeadRef.moveto SECryptMarkerBigHead set BigHead to 1 endif if Brithaur == 0 && SEBrithaurRef.getdead == 1 SEBrithaurRef.moveto SECryptMarkerBrithaur set Brithaur to 1 endif if Cutter == 0 && SECutterRef.getdead == 1 SECutterRef.moveto SECryptMarkerCutter set Cutter to 1 endif if DumagGraBonk == 0 && SEDumagGraBonkRef.getdead == 1 SEDumagGraBonkRef.moveto SECryptMarkerDumagGraBonk set DumagGraBonk to 1 endif if Earil == 0 && SEEarilRef.getdead == 1 SEEarilRef.moveto SECryptMarkerEaril set Earil to 1 endif if HirrusClutumnus == 0 && SEHirrusClutumnusRef.getdead == 1 SEHirrusClutumnusRef.moveto SECryptMarkerHirrusClutumnus set HirrusClutumnus to 1 endif if Mazaddha == 0 && SEMazaddhaRef.getdead == 1 SEMazaddhaRef.moveto SECryptMarkerMazaddha set Mazaddha to 1 endif if Muurine == 0 && SEMuurineRef.getdead == 1 SEMuurineRef.moveto SECryptMarkerMuurine set Muurine to 1 endif if Orinthal == 0 && SEOrinthalRef.getdead == 1 SEOrinthalRef.moveto SECryptMarkerOrinthal set Orinthal to 1 endif if RavenBiter == 0 && SERavenBiterRef.getdead == 1 SERavenBiterRef.disable SERavenBiterRef.moveto SECryptMarkerRavenBiter SERavenBiterRef.enable set RavenBiter to 1 endif if RendilDrarara == 0 && SERendilDrararaRef.getdead == 1 SERendilDrararaRef.moveto SECryptMarkerRendilDrarara set RendilDrarara to 1 endif if SheerMeedish == 0 && SESheerMeedishRef.getdead == 1 SESheerMeedishRef.moveto SECryptMarkerSheerMeedish set SheerMeedish to 1 endif if SicklyBernice == 0 && SESicklyBerniceRef.getdead == 1 SESicklyBerniceRef.moveto SECryptMarkerSicklyBernice set SicklyBernice to 1 endif if Sontaire == 0 && SESontaireRef.getdead == 1 SESontaireRef.moveto SECryptMarkerSontaire set Sontaire to 1 endif if Thaedil == 0 && SEThaedilRef.getdead == 1 SEThaedilRef.moveto SECryptMarkerThaedil set Thaedil to 1 endif if TilseAreleth == 0 && SETilseArelethRef.getdead == 1 SETilseArelethRef.moveto SECryptMarkerTilseAreleth set TilseAreleth to 1 endif if ToveTheUnrestful == 0 && SEToveTheUnrestfulRef.getdead == 1 SEToveTheUnrestfulRef.moveto SECryptMarkerToveTheUnrestful set ToveTheUnrestful to 1 endif if UnaArmina == 0 && SEUnaArminaRef.getdead == 1 SEUnaArminaRef.moveto SECryptMarkerUnaArmina set UnaArmina to 1 endif if UshnarGraShadborgob == 0 && SEUshnarGroShadborgobRef.getdead == 1 SEUshnarGroShadborgobRef.moveto SECryptMarkerUshnarGraShadborgob set UshnarGraShadborgob to 1 endif if WideEye == 0 && SEWideEyeRef.getdead == 1 SEWideEyeRef.moveto SECryptMarkerWideEye set WideEye to 1 endif endif Activate end
903SEGundlarScriptscn SEGundlarScript short MealDone ;Basically a DoOnce begin OnPackageChange SE07GundlarTraveltoKitchen if ( GetStage SE07B < 40 ) if ( SE07B.MealSetUp == 0 ) if ( MealDone == 0 ) Evp Set MealDone to 1 Set SE07B.Serves to 0 endif endif SE07ThadonMealRef.Enable endif end begin OnPackageEnd SE07BGundlarServesDinner if ( GetStage SE07B < 40 ) if ( SE07B.MealServed == 0 ) if ( SE07B.Serves == 0 ) set MealDone to 0 set SE07B.Serves to 1 Evp endif endif SE07ThadonMealRef.Disable endif end begin OnPackageEnd SE07BGundlarServesDinner02 if ( SE07B.Serves == 1 ) Set MealDone to 0 set SE07B.Serves to 2 Set SE07B.DayServed to GameDaysPassed SEWideEyeRef.Evp Evp endif SE07ThadonMealServedRef.Enable end
904SEHaskillScriptscn SEHaskillScript short introWho short introWhat short introDoor short introWant short introPeople short greetVAR short leaveVAR float timer short doOnce float fadetimer float HaskillAlpha short fadeOnce short resetAlpha short summoned float summontimer short summonblocker short tutorialVAR begin OnLoad ; Haskill is immune from combat -- he is one weird dude. setghost 1 end ;this prevents player from interrupting forcegreet after summon Begin OnActivate if ( greetVAR == 0 ) Activate endif End Begin GameMode ;this handles him sitting and getting up in SE01 if ( leaveVAR == 1 ) && ( doOnce == 0 ) set doOnce to 1 EVP endif ;this section makes it appear as if Haskill has activated a door and faded out if ( leaveVAR == 2 ) && ( fadeOnce == 0 ) ;Disable ;EnablePlayerControls Set HaskillAlpha to .9 Set FadeTimer to 4 SetActorAlpha HaskillAlpha set fadeOnce to 1 endif if ( FadeOnce == 1 ) if ( FadeTimer > 0 ) Set FadeTimer to ( FadeTimer - GetSecondsPassed ) Set HaskillAlpha to ( HaskillAlpha - .01 ) SetActorAlpha HaskillAlpha elseif ( FadeTimer <= 0 ) ;sw SEClearTrans Set HaskillAlpha to 0 Set FadeOnce to 2 Set FadeTimer to 0 MoveTo SE07AThadonMarker endif endif ;this handles him telling the player to sit in SE01 if ( GetStage SE01Door <= 20 ) && ( player.GetSitting != 3 ) set timer to ( timer - GetSecondsPassed ) if ( timer <= -10 ) set timer to SayTo Player SE01HaskillTalk endif endif ;this chunk fades him out after summon if ( fadeOnce == 4 ) ;Disable ;EnablePlayerControls Set HaskillAlpha to 0.9 Set FadeTimer to 4 SetActorAlpha HaskillAlpha set fadeOnce to 5 endif if ( FadeOnce == 5 ) if ( FadeTimer > 0 ) Set FadeTimer to ( FadeTimer - GetSecondsPassed ) Set HaskillAlpha to ( HaskillAlpha - .01 ) SetActorAlpha HaskillAlpha elseif ( FadeTimer <= 0 ) Set HaskillAlpha to 0 Set FadeOnce to 2 Set FadeTimer to 0 MoveTo SEHaskillSummonReturnMarker set resetAlpha to 1 set summoned to 0 set summontimer to 0 set summonblocker to 0 endif endif if ( resetAlpha == 1 ) setActorAlpha 1 set resetAlpha to 0 endif if ( summoned == 1 ) set summontimer to ( summontimer + GetSecondsPassed ) if ( summontimer >= 5 ) if ( summonblocker == 0 ) ;set summoned to 0 ;set summontimer to 0 ; send Haskill back where he came from SEHaskillRef.pme STRP SEHaskillRef.removescriptpackage SEHaskillRef.stoplook ;SEHaskillRef.moveto SEHaskillSummonReturnMarker set SEHaskillREF.FadeOnce to 4 set SEHaskillRef.greetVAR to 0 set summonblocker to 1 endif endif endif End Begin OnPackageDone SE01HaskillLeavePackage ;MessageBox "ONPACKAGEDONE" set leaveVAR to 2 End
905SEHaskillSummonQuestScriptscn SEHaskillSummonQuestScript ;this script keeps the player from breaking the Haskill summon by summoning and quickly fast travelling. With this, resetVAR is set ;in the SESummonHaskillSpellScript on ScriptEffectFinish if the player isn't in the same cell. This script then resets all of Haskill's variable ;as they would be if the player remained in the cell with him and Haskills script were still updating every frame short resetVAR Begin GameMode if ( resetVAR == 1 ) Set SEHaskillREF.HaskillAlpha to 0 Set SEHaskillREF.FadeOnce to 2 Set SEHaskillREF.FadeTimer to 0 SEHaskillREF.MoveTo SEHaskillSummonReturnMarker set SEHaskillREF.resetAlpha to 1 set SEHaskillREF.summoned to 0 set SEHaskillREF.summontimer to 0 set SEHaskillREF.summonblocker to 0 set resetVAR to 0 endif End
906SEHillOfSuicidesGhostScriptscn SEHillOfSuicidesGhostScript BEGIN OnActivate END
907SEHillofSuicidesQuestScriptscn SEHillofSuicidesQuestScript short GadeneriVAR ;tracks Gadeneri's state for dialogue purposes short SHillCount ;tracks how many of the five souls have been saved Begin GameMode ;used to track when Gadeneri is disabled for dialogue for Erver if ( SEGadeneriRalvelREF.GetDestroyed == 1 ) && ( GadeneriVAR == 0 ) set GadeneriVAR to 1 endif End
908SEHillofSuicidesSCRIPTscn SEHillofSuicidesSCRIPT ref mySelf ref mySkull short keyCard short fadeFlag short hackFlag float fader ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set mySelf to getSelf ; set my proper ref set fader to 2 setFactionRank CreatureFaction 0 ; add to critter faction to avoid disputes setGhost 1 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player ; big laborious if-check for skull if mySelf == SELimarkREF && player.getItemCount SEskullLimark >= 1 set keyCard to 1 elseif mySelf == SESaloniaViriaREF && player.getItemCount SEskullSaloniaViria >= 1 set keyCard to 1 elseif mySelf == SEMdesiREF && player.getItemCount SEskullMdesi >= 1 set keyCard to 1 elseif mySelf == SEGadeneriRalvelREF && player.getItemCount SEskullGadeneriRalvel >= 1 set keyCard to 1 elseif mySelf == SELorenzBogTrotterREF && player.getItemCount SEskullLorenzBogTrotter >= 1 set keyCard to 1 else set keyCard to 0 endif if keyCard == 1 if mySelf == SELimarkREF player.removeItem SEskullLimark 1 elseif mySelf == SESaloniaViriaREF player.removeItem SEskullSaloniaViria 1 elseif mySelf == SEMdesiREF player.removeItem SEskullMdesi 1 elseif mySelf == SEGadeneriRalvelREF player.removeItem SEskullGadeneriRalvel 1 elseif mySelf == SELorenzBogTrotterREF player.removeItem SEskullLorenzBogTrotter 1 endif cast SESuicideBlessing player myself.setDestroyed 1 mySelf.pme CUPA ;sms ghostEffect set fadeFlag to 1 set SEHillSuicides.SHillCount to (SEHillSuicides.SHillCount + 1) elseif keyCard <= 0 Message "You cannot speak with this restless soul." endif if SEHillSuicides.SHillCount >= 5 ; check to see if all the skulls have been turned in player.addspell SESuicidePower endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if fadeFlag == 1 ; this block is meant to fade the character out and disable if fader >= 0 ;set fader to (fader - 0.0001) set fader to (fader - getSecondsPassed) ;myself.saa fader ;message "fader is at %0.f", fader endif if fader < 0 disable set fadeFlag to 0 endif endif end
909SEHirrusClutumnusHouseKeyScriptscn SEHirrusClutumnusHouseKeyScript Begin OnAdd Player if getStage SE36 == 30 setStage SE36 40 endif End
910SEHirrusClutumnusSCRIPTscn SEHirrusClutumnusSCRIPT float sayLength ;used to control sayTo timing short pushed ;used to push Hirrus of the ledge float deathTimer ;used to make sure he falls all the way down after pushing him off the ledge before the quest updates short killedByFalling ;used as a condition on his combat dialog so he doesn't say things like "No, not like this!" when he dies from falling. ;set in this script or in SE36TriggerZoneScript ;The variables below are used to track if the player has been detected... the main reason i have to do this is because OnHit block actually processes after the hit, after which there is a spike in detection which almost guarantees the player being spotted float detectTimer short hirrusDetected short hirrusDetectedRecently short someoneDetected short someoneDetectedRecently short cowerDistance ;how close the player needs to be before Hirrus will play his Cowering Animation short cower ;flag on package, set in GameMode block short cowerSay ;this is set when he starts his cower package, it is used to condition his assault dialog so he says "No, not like this", but not anything about the pain (since they player isn't hurting him) Begin GameMode ;init variable if cowerDistance == 0 set cowerDistance to 300 endif if pushed == 1 player.PushActorAway SEHirrusClutumnusRef 5 set deathTimer to 8 set pushed to 2 set killedByFalling to 1 endif if getDead == 1 if deathTimer <= 0 if getStage SE36 == 20 setStage SE36 30 if getItemCount SEHirrusClutumnusHouseKey < 1 additem SEHirrusClutumnusHouseKey 1 endif elseif getStage SE36 < 20 ;he was killed before the player got the quest setStage SE36 210 endif ;have the guard stationed nearby the ledge comment on the scene if pushed == 2 SEDarkSeducerGuardPostRef.sayTo Player SE36GuardResponse set pushed to 3 endif else set deathTimer to deathTimer - getSecondsPassed endif endif if getStage SE36 < 10 && getDead == 0 if getDistance Player < 512 && GetInCell SENSHirrusClitumnusHouseUpstairs == 0 if getIsCurrentPackage SE36GetPlayersAttention == 0 evp ;so he picks his get the players attention package endif if sayLength <= 0 set sayLength to sayTo player SE36HeyYou else set sayLength to sayLength - getSecondsPassed endif endif elseif getStage SE36 == 20 && getDistance SE36PushOffHere > 100 if detectTimer <=0 ;reset timer set detectTimer to 1 ;store recent values set hirrusDetectedRecently to hirrusDetected set someoneDetectedRecently to someoneDetected ;set hirussDetected if getDetectionLevel Player >= 3 set hirrusDetected to 1 else ;getDetectionLevel player < 3 set hirrusDetected to 0 endif ;set someoneDetected if player.IsActorDetected == 1 set someoneDetected to 1 else ;player.IsActorDetected == 0 set someoneDetected to 0 endif ;make hirrus pick his cower package if he is or has recently detected the player if (hirrusDetected == 1 || hirrusDetectedRecently == 1) && getDistance Player <= cowerDistance if getIsCurrentPackage SE36Cower == 0 if cower == 0 set cower to 1 ;used as condition on SE36CowerPackage if getCurrentAIProcedure != 4 || getCurrentAIProcedure != 15 evp ;so he picks SE36CowerPackage endif endif endif else ;hirussDetected == 0 && hirussDetectedRecently == 0 || getDistance Player > cowerDistance if getIsCurrentPackage SE36Cower == 1 if cower == 1 set cower to 0 ;used as condition on SE36CowerPackage if getCurrentAIProcedure != 4 || getCurrentAIProcedure != 15 evp ;so he unpicks SE36CowerPackage endif endif endif endif ;hirrusDetected || hirussDetectedRecently else ;detectTimer > 0 set detectTimer to detectTimer - getSecondsPassed endif ;detectTimer endif ;getStage SE36 End ;---------------------------------------------------------OBSOLETE------------------------------------------------------------------------ ;Begin OnHit Player ;OK NOW THAT I'M IMPLEMENTING THE PUSH HIM OFF THE LEDGE STAGE, I'M NOT LETTING YOU KILL HIM THIS WAY ANYMORE ;I'M JUST COMMENTING IT OUT THOUGH IN CASE I WANT TO RESTORE THIS FUNCTIONALITY LATER ;if getStage SE36 == 20 ; ;if he hasn't detected the player then kill him, but if someone else detected him recently pretend they sent out a murder alarm ; ;yes i know this doesn't take faction into consideration, but lets just assume that EVERYONE loved this pitiful soul and likes him enough to report the crime ; if hirrusDetected == 0 && hirrusDetectedRecently == 0 ; ;Hirrus doesn't know what's coming, so just kill him outright ; kill ; ; ;check to see if anyone sees the player do it ; if someoneDetected == 1 || someoneDetectedRecently == 1 ; player.modCrimeGold 1000 ; sendTrespassAlarm player ; endif ; else ;hirrusDetected == 1 || hirrusDetectedRecently == 1 ; ;make him cower for longer than normal because he is being attacked ; set detectTimer to 5 ; ; endif ;endif ;End ;--------------------------------------------------------------------------------------------------------------------------------------------------------- begin OnPackageStart SE36Cower set cowerSay to 1 sayTo player Assault set cowerSay to 0 End begin OnDeath say SE36OnDeath SETombstoneHirrusClutumnusREF.enable end Begin OnActivate if SEHerdirRef.TargetRef == SEHirrusClutumnusRef if IsActionRef Player == 1 return endif else Activate endif End
911SeigeEngineEffectsSCRIPTscn SeigeEngineEffectsSCRIPT short initialized float frate float fy float fstarty short Go float enddistance float magicTimer ;float stepTimer short activated short Ready short IntroBlast float IntroBlastTimer float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin OnLoad if initialized == 1 && go == 0 pms effectSiegeCrawler endif end begin onTrigger player ;Round per frame for 1 second. if magicTimer <= 0.5 cast TRAPSiegeMachineFireDamage player endif if magicTimer <= 0 set magicTimer to 4 endif ;3 Round Bursts of fire ;if Ready == 1 ;cast TRAPSiegeMachineFireDamage player ;elseif Ready == 2 ;cast TRAPSiegeMachineFireDamage player ;elseif Ready == 3 ;cast TRAPSiegeMachineFireDamage player ;else ;set magicTimer to 6 ;set Ready to 0 ;endif End Begin gameMode if initialized == 0 set IntroBlastTimer to 5.25 set frate to -15 set initialized to 1 set go to 1 set enddistance to GetPos Y - 10000 ;set stepTimer to 1.6 endif if IntroBlastTimer <= 5 && IntroBlast <= 9 If IntroBlast == 0 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget01 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget01b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 1 && IntroBlastTimer <= 4.5 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget02 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget02b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 2 && IntroBlastTimer <= 4 ;cast TRAPSiegeMachineFireDamage OblivionSiegeTarget03 ;cast TRAPSiegeMachineFireDamage OblivionSiegeTarget03b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 3 && IntroBlastTimer <= 3.5 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget04 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget04b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 4 && IntroBlastTimer <= 3 ;cast TRAPSiegeMachineFireDamage OblivionSiegeTarget05 ;cast TRAPSiegeMachineFireDamage OblivionSiegeTarget05b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 5 && IntroBlastTimer <= 2.5 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget06 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget06b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 6 && IntroBlastTimer <= 2 ;cast TRAPSiegeMachineFireDamage OblivionSiegeTarget07 ;cast TRAPSiegeMachineFireDamage OblivionSiegeTarget07b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 7 && IntroBlastTimer <= 1.5 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget08 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget08b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 8 && IntroBlastTimer <= 1 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget09 cast TRAPSiegeMachineFireDamage OblivionSiegeTarget09b set IntroBlast to IntroBlast + 1 elseif IntroBlast == 9 && IntroBlastTimer <= 0.5 ;cast TRAPSiegeMachineFireDamage player set IntroBlast to IntroBlast + 1 endif endif ;Camera Shake on initial foot step of animation ;if player <= 1200 && stepTimer <=0 ;ths ;set stepTimer to 6.63 ;endif if activated == 0 ; set up the damage values set fTrapDamage to 15 set fTrapPushBack to 1000 set fTrapMinVelocity to 0 set bTrapContinuous to 0 set activated to 1 else trapUpdate endif if Go == 1 set fstarty to GetPos Y set fy to frate * GetSecondsPassed set fy to fstarty + fy SetPos Y fy if fy <= enddistance message "The Siege Crawler has reached the Great Gate." set Go to 0 playgroup Forward 1 pms effectSiegeCrawler endif endif if IntroBlastTimer > 0 set IntroBlastTimer to IntroBlastTimer - getSecondsPassed endif if magicTimer > 0 set magicTimer to magicTimer - getSecondsPassed endif ;if stepTimer > 0 ;set stepTimer to stepTimer - getSecondsPassed ;endif end
912SEJayredIceVeinsScriptscn SEJayredIceVeinsScript ;most of this script is for use with SE02 short idleFlag ;used in idle manager conditions float sayLength ;used to store duration of say command and checked in if loop so that they don't overlap short consultSam ;0 = not set; 1 = consult, 2 = consulted --- Sam is his imaginary friend, this flag is set in dialog topic which has a goodbye, and then he "consults" with his imaginary friend ;Condition variables for SE02 packages short LeadToGardens short EscortedPlayerToGardens short FindBones short congratulatePlayer short ArrowMakingStartDay short ArrowMakingFinishHour short FollowWaitToggle ;0 = unset, 1 = follow, 2 = wait Begin GameMode ;if he is following the player, make him assume sneak mode with the player if GetIsCurrentPackage SE02JayredFollowPlayer == 1 || GetIsCurrentPackage SE02JayredFightGatekeeper == 1 if IsInCombat == 0 if Player.IsSneaking == 1 setForceSneak 1 else setForceSneak 0 endif else setForceSneak 0 endif elseif getForceSneak == 1 setForceSneak 0 endif if leadToGardens == 1 if EscortedPlayerToGardens == 0 if GetInCell XPGardens == 1 set EscortedPlayerToGardens to 1 set LeadToGardens to 0 set FindBones to 1 EVP endif endif endif ;Jayred says something about the the gate to the Garden courtyard being locked if getStage SE02 == 60 if SE02GardenCourtyardGateRef.getLocked == 1 if getDistance SE02GardenCourtyardGateRef < 512 if sayLength <= 0 set sayLength to sayTo player SE02JayredSayUnlockGate 1 set sayLength to sayLength + 5 ;pad some pause between repeated says else set sayLength to sayLength - getSecondsPassed endif endif endif endif End ;GameMode Begin OnPackageDone SE02JayredFindBones say SE02JayredSayFoundBones setstage SE02 70 set FindBones to 0 End ;OnPackageDone Begin OnPackageStart SE02JayredFollowPlayer SetFactionRank SE02LikeThePlayerFaction 0 ;put him in a faction that likes the player so he will fight the Gatekeeper with the Player End ;OnPackageStart SE02JayredFollowPlayer Begin OnPackageChange SE02JayredFollowPlayer SetFactionRank SE02LikeThePlayerFaction -1 ;take him out of the like the player faction End ;OnPackageChange SE02JayredFollowPlayer Begin OnPackageStart SE02JayredFightGatekeeper SetFactionRank SE02LikeThePlayerFaction 0 ;put him in a faction that likes the player so he will fight the Gatekeeper with the Player End ;OnPackageStart SE02JayredFollowPlayer Begin OnPackageChange SE02JayredFightGatekeeper SetFactionRank SE02LikeThePlayerFaction -1 ;take him out of the like the player faction End
913SEKanehSCRIPTscn SEKanehSCRIPT short hatePlayer ; set to 1 when Kaneh realizes she's been betrayed float deathTimer ; used to time suicide begin OnDeath set SE06.DeadSaints to SE06.DeadSaints + 1 setstage SE06 120 if SE06.DeadSaints >= SE06.TotalSaints && getstage SE06 < 150 setstage SE06 130 elseif getstage SE06 >= 150 ;commented out to allow time for Kaneh to die before journal pop. moved to flame script ;setstage SE06 170 endif end ; trigger suicide animation begin OnPackageEnd SE06CommanderToSuicide if getStage SE06 < 160 setstage SE06 160 set deathTimer to 2.8 evp endif end begin OnStartCombat if getstage SE06 >= 105 && hatePlayer == 0 if SE06.GSDeployment == 1 && SE06.DSDeployment == 1 ; make her hate player set hatePlayer to 1 moddisposition player -100 player.setfactionrank SE06DarkSeducerFaction 0 if getdetectionlevel player >= 3 sayTo player SE06ShoutBetrayal startcombat player endif endif endif end begin OnStartCombat player if hatePlayer == 1 sayTo player SE06ShoutBetrayal set hatePlayer to 2 endif end begin gamemode if getdead == 1 return endif if deathTimer > 0 set deathTimer to deathTimer - getSecondsPassed else if getStage SE06 == 160 setstage SE06 162 set deathTimer to 1 elseif getStage SE06 == 162 kill endif endif end
914SEKishashiScriptscn SEKishashiScript Begin OnDeath if getStage SE39 < 40 SetStage SE39 220 endif End
915SEKnightHeartEffectSCRIPTscn SEKnightHeartEffectSCRIPT ; An attempt was made to have eating a seond heart just extend the duration of the first (quick remove and add). ; I tried adding a tracking variable to confirm the status (and delay addspell by a frame), but that didn't work. ; At this point, it is intentional that eating a second heart removes the effects of the first. begin ScriptEffectStart ; remove abilities (in case eating multiple) removespell SEAbKnightHeart end begin ScriptEffectUpdate if getSelf == player ; add ability addspell SEAbKnightHeart endif end
916SEKnightOfOrderAbilitySCRIPTscn SEKnightOfOrderAbilitySCRIPT begin ScriptEffectStart ; add "leveled" ability if getLevel >= 20 addspell SEAbOrderKnight6BoundArmorWeapon elseif getLevel >= 15 addspell SEAbOrderKnight5BoundArmorWeapon elseif getLevel >= 10 addspell SEAbOrderKnight4BoundArmorWeapon elseif getLevel >= 6 addspell SEAbOrderKnight3BoundArmorWeapon elseif getLevel >= 3 addspell SEAbOrderKnight2BoundArmorWeapon else addspell SEAbOrderKnight1BoundArmorWeapon endif end
917SEKnightOfOrderTemplateSCRIPTscn SEKnightOfOrderTemplateSCRIPT ref myParent ; my parent ref, if any. Set OnLoad ref mySelf ; myself, used to "activate" parent (which is actually to "register" myself as one of the parent's spawns) ref actionRef ; who is activating me? float timer ; respawn timer begin OnLoad if getStageDone SE13 200 == 1 disable else set mySelf to getSelf if myParent == 0 set myParent to GetParentRef endif endif end ; knights are "activated" when created so they can get their "parent" obelisk (so they can tell it when they are respawning) begin OnActivate set actionRef to GetActionRef ; if activated by obelisk, this is my "parent" if actionRef.getisID SEObeliskNEW == 1 set myParent to actionRef ; play summon effect on Knight pme ZCLA else Activate endif end begin OnDeath ; clear ownership clearOwnership ; "activate" parent to let it know I died (add to count) myParent.activate mySelf 1 end
918SEKnottyBram03TrigZonePLAYER01SCRIPTscn SEKnottyBram03TrigZonePLAYER01SCRIPT ; Activates linked Parent object once short triggered begin onTrigger player if triggered == 0 set triggered to 1 SEKnotBramEggSpot01REF.placeatme SEKnottyBramGrummiteEggDefLvl100 1 SEKnotBramEggSpot02REF.placeatme SEKnottyBramGrummiteEggDefLvl100 1 endif end begin onReset set triggered to 0 end
919SEKnottyBramPreservedZealotSCRIPTscn SEKnottyBramPreservedZealotSCRIPT begin OnLoad SetDestroyed 1 SetGhost 1 end begin onActivate if isActionRef player == 1 return endif end
920SEMarkTestScriptscn SEMarkTestScript short doOnce Begin OnActivate if ( doOnce == 0 ) set doOnce to 1 player.setav speed 255 player.setav athletics 255 player.setav blade 255 player.setav strength 255 player.additem gold001 10000 player.additem dagoldbrand 1 player.addspell semarktest1 ;player.addspell se14voicespell player.addspell se14RezSpell player.addspell SELpSummonHaskill player.addspell SE14WeatherSpell setplayerinseworld 1 endif End
921SEMarkTestSpellscn SEMarkTestSpell short doOnce Begin ScriptEffectStart MarkSpellTestMarker.MoveTo Player 0 0 200 MarkSpellTestMarker2.MoveTo Player 0 100 0 MarkSpellTestMarker3.MoveTo Player 0 -100 0 MarkSpellTestMarker4.MoveTo Player 100 0 0 MarkSpellTestMarker5.MoveTo Player -100 0 0 ;MarkTestCollision1.MoveTo Player 0 0 200 ;Player.AddSpell SEMarkTest3 End Begin ScriptEffectUpdate if doOnce == 0 ;MarkSpellTestMarker.Cast SEMarkTest2 Player set doOnce to 1 endif if ( doOnce == 1 ) MarkSpellTestMarker.Cast SEMarkTest2 Player ;MarkSpellTestMarker.Cast SEMarkTest2 MarkSpellTestMarker2 ;MarkSpellTestMarker.Cast SEMarkTest2 MarkSpellTestMarker3 ;MarkSpellTestMarker.Cast SEMarkTest2 MarkSpellTestMarker4 ;MarkSpellTestMarker.Cast SEMarkTest2 MarkSpellTestMarker5 set doOnce to 2 endif End Begin ScriptEffectFinish ;Message "HITTING BLOCK" ;Player.Cast SEMarkTest2 ChorrolFGPorterREF End
922SEMazaddhaSCRIPTscn SEMazaddhaSCRIPT short AtMarker ;flag set when Ma'zaddha arrives at conversation location short Detected ;flag set when Ma'zaddha can detect player while at conversation; used to alter dialogue short ConvoCheck ;flag set when Ma'zaddha starts conversation. Used to make sure conversation only happens once per day short DayCheck short TalkOnce Float Timer float ConvTimer begin OnDeath SETombstoneMazaddhaREF.enable end Begin OnPackageStart SEMazaddaFightMon20x2 AddItem WeapClub 1 Set SECrime.RooftopFighting to 1 If SECutterRef.GetIsCurrentPackage SECutterFightMon20x2 == 0 SECutterRef.AddScriptPackage SECutterFightMon20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SEMazaddaFightMon20x2 RemoveItem WeapClub 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SEMazaddaFightWed20x2 AddItem WeapClub 1 Set SECrime.RooftopFighting to 1 If SEMuurineRef.GetIsCurrentPackage SEMuurineFightWed20x2 == 0 SEMuurineRef.AddScriptPackage SEMuurineFightWed20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SEMazaddaFightWed20x2 RemoveItem WeapClub 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SEMazaddaFightSat20x2 AddItem WeapClub 1 Set SECrime.RooftopFighting to 1 If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightSat20x2 == 0 SECaldanaMonriusRef.AddScriptPackage SECaldanaFightSat20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SEMazaddaFightSat20x2 RemoveItem WeapClub 1 Set SECrime.RooftopFighting to 0 End Begin GameMode ;Check whether Mazaddha can detect the player (used for dialogue to abort conversation) if ( AtMarker == 1 ) if ( GetDetectionLevel Player >= 3 ) if ( Detected == 0 ) set Detected to 1 endif elseif ( GetDetectionLevel Player >= 3 ) if ( Detected == 1 ) set Detected to 0 endif endif endif ;Update Quest Stage when player has overheard the conversation ; if ( GetCurrentAIPackage != 6 ) ; if ( SENelreneRef.SE05conv == -1 ) ; if ( GetDistance Player < 1000 ) ; SetStage SE05 70 ; else ; set SENelreneRef.SE05Conv to 0 ; endif ; endif ; endif if ( GetDistance Player < 1000 ) if ( GetStage SE05 >= 60 ) && ( GetStage SE05 < 70 ) if ( AtMarker == 1 ) if ( SENelreneRef.GetDistance SE05NelreneMarker < 100 ) set ConvTimer to ( ConvTimer + GetSecondsPassed ) if ( ConvTimer >= 5 ) set ConvTimer to 0 if ( SENelreneRef.SE05Conv == 1 ) SENelreneRef.StartConversation SEMazaddhaRef SE05Eavesdrop elseif ( SENelreneRef.SE05Conv == 3 ) SENelreneRef.StartConversation SEMazaddhaRef SE05Eavesdrop elseif ( SENelreneRef.SE05Conv == 5 ) if ( TalkOnce == 0 ) SENelreneRef.StartConversation SEMazaddhaRef SE05EavesDrop set TalkOnce to 1 endif endif endif endif endif endif endif ;After agreeing to help, disable Mazaddha as soon as the player's out of range if ( GetStageDone SE05 80 == 1 ) if ( IsInInterior == 1 ) if ( GetInSameCell Player == 0 ) set SE05.MazaddhaClear to 1 set SE05.DayCheck to GameDaysPassed disable endif endif endif If GetIsCurrentPackage SEMazaddhaCheer20x2 == 1 If Timer <=0 Say SERooftopCheer Set Timer to 9.1 If GetDistance SECheerMazaddhaMarker <= 64 PickIdle EndIf EndIf Endif If GetIsCurrentPackage SEMazaddaFightMon20x2 == 1 || GetIsCurrentPackage SEMazaddaFightWed20x2 == 1 || GetIsCurrentPackage SEMazaddaFightSat20x2 == 1 If Timer <= 0 Say Hit Set Timer to 4.9 EndIf EndIf If Timer > 0 Set Timer to Timer - GetSecondsPassed EndIf End Begin OnActivate if SEHerdirRef.TargetRef == SEMazaddhaRef if IsActionRef Player == 1 return endif else Activate endif End
923SEMiriliUlvenSCRIPTscn SEMiriliUlvenSCRIPT short schedule ; tracks progress through her schedule -- if interrupted, has to start over Short BaliwogCaught Short ElytraCaught Short GnarlCaught Short ScalonCaught Short CountItems Short NewItems Ref CaughtRef Begin OnLoad Set SE37.ItemValue to 10 If GetStage SE37 >= 200 RemoveSpell SEMiriliHealthBoost ; If quest is over, remove artificial health boost that helps her survive creature attacks EndIf End Begin MenuMode ; SE37, test for items acquired If CountItems == 1 ; Message "Counting the items" Set NewItems to 0 If SE37.AlocasiaFruit == 0 && Player.GetItemCount SEMAlocasiaFruit >=1 Set NewItems to 1 ElseIf SE37.AsterBloom == 0 && Player.GetItemCount SEMAsterBloomCore >=1 Set NewItems to 1 ElseIf SE37.BlackTar == 0 && Player.GetItemCount SEDBlackTar >=1 Set NewItems to 1 ElseIf SE37.BlisterPod == 0 && Player.GetItemCount SEDBlisterPodCap >=1 Set NewItems to 1 ElseIf SE37.CongealedPutrescence == 0 && Player.GetItemCount SEDCongealedPutrescence >=1 Set NewItems to 1 ElseIf SE37.DigestiveSlime == 0 && Player.GetItemCount SEDDigestiveSlime >=1 Set NewItems to 1 ElseIf SE37.ElytraIchor == 0 && Player.GetItemCount SEElytraIchor >=1 Set NewItems to 1 ElseIf SE37.FlameStalk == 0 && Player.GetItemCount SEMFlameStalk >=1 Set NewItems to 1 ElseIf SE37.FungusStalk == 0 && Player.GetItemCount SEDFungusStalk >=1 Set NewItems to 1 ElseIf SE37.GasBladder == 0 && Player.GetItemCount SEMKelpGasBladder >=1 Set NewItems to 1 ElseIf SE37.GnarlBark == 0 && Player.GetItemCount SEGnarlBark >=1 Set NewItems to 1 ElseIf SE37.GrummiteEggs == 0 && Player.GetItemCount SEDGrummiteEggs >=1 Set NewItems to 1 ElseIf SE37.HoundTooth == 0 && Player.GetItemCount SESkeletalHoundTooth >=1 Set NewItems to 1 ElseIf SE37.HungerTongue == 0 && Player.GetItemCount SEHungerTongue >=1 Set NewItems to 1 ElseIf SE37.HydnumAzureGiantSpore == 0 && Player.GetItemCount SEMHydnumAzureGiantSpore >=1 Set NewItems to 1 ElseIf SE37.PodPit == 0 && Player.GetItemCount SEDPodPit >=1 Set NewItems to 1 ElseIf SE37.RotScale == 0 && Player.GetItemCount SEDRotScale >=1 Set NewItems to 1 ElseIf SE37.ScalonFin == 0 && Player.GetItemCount SEScalonFin >=1 Set NewItems to 1 ElseIf SE37.ScreamingMaw == 0 && Player.GetItemCount SEMScreamingMaw >=1 Set NewItems to 1 ElseIf SE37.ShamblesMarrow == 0 && Player.GetItemCount SEShamblesMarrow >=1 Set NewItems to 1 ElseIf SE37.SwampTentacle == 0 && Player.GetItemCount SEDSwampTentacleIngred >=1 Set NewItems to 1 ElseIf SE37.ThornHook == 0 && Player.GetItemCount SEDThornHook >=1 Set NewItems to 1 ElseIf SE37.VoidEssence == 0 && Player.GetItemCount SEVoidEssence >=1 Set NewItems to 1 ElseIf SE37.WatchersEye == 0 && Player.GetItemCount SEMWatchersEye >=1 Set NewItems to 1 ElseIf SE37.WitheringMoon == 0 && Player.GetItemCount SEDWitheringMoon >=1 Set NewItems to 1 ElseIf SE37.WormsHead == 0 && Player.GetItemCount SEMWormsHeadCap >=1 Set NewItems to 1 EndIf Set CountItems to 0 EndIf If SE37.TakeItems == 1 If SE37.AlocasiaFruit == 0 && Player.GetItemCount SEMAlocasiaFruit >=1 Player.RemoveItem SEMAlocasiaFruit 1 Set SE37.AlocasiaFruit to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.AsterBloom == 0 && Player.GetItemCount SEMAsterBloomCore >=1 Player.RemoveItem SEMAsterBloomCore 1 Set SE37.AsterBloom to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.BlackTar == 0 && Player.GetItemCount SEDBlackTar >=1 Player.RemoveItem SEDBlackTar 1 Set SE37.BlackTar to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.BlisterPod == 0 && Player.GetItemCount SEDBlisterPodCap >=1 Player.RemoveItem SEDBlisterPodCap 1 Set SE37.BlisterPod to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.CongealedPutrescence == 0 && Player.GetItemCount SEDCongealedPutrescence >=1 Player.RemoveItem SEDCongealedPutrescence 1 Set SE37.CongealedPutrescence to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.DigestiveSlime == 0 && Player.GetItemCount SEDDigestiveSlime >=1 Player.RemoveItem SEDDigestiveSlime 1 Set SE37.DigestiveSlime to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.ElytraIchor == 0 && Player.GetItemCount SEElytraIchor >=1 Player.RemoveItem SEElytraIchor 1 Set SE37.ElytraIchor to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.FlameStalk == 0 && Player.GetItemCount SEMFlameStalk >=1 Player.RemoveItem SEMFlameStalk 1 Set SE37.FlameStalk to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.FungusStalk == 0 && Player.GetItemCount SEDFungusStalk >=1 Player.RemoveItem SEDFungusStalk 1 Set SE37.FungusStalk to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.GasBladder == 0 && Player.GetItemCount SEMKelpGasBladder >=1 Player.RemoveItem SEMKelpGasBladder 1 Set SE37.GasBladder to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.GnarlBark == 0 && Player.GetItemCount SEGnarlBark >=1 Player.RemoveItem SEGnarlBark 1 Set SE37.GnarlBark to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.GrummiteEggs == 0 && Player.GetItemCount SEDGrummiteEggs >=1 Player.RemoveItem SEDGrummiteEggs 1 Set SE37.GrummiteEggs to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.HoundTooth == 0 && Player.GetItemCount SESkeletalHoundTooth >=1 Player.RemoveItem SESkeletalHoundTooth 1 Set SE37.HoundTooth to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.HungerTongue == 0 && Player.GetItemCount SEHungerTongue >=1 Player.RemoveItem SEHungerTongue 1 Set SE37.HungerTongue to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.HydnumAzureGiantSpore == 0 && Player.GetItemCount SEMHydnumAzureGiantSpore >=1 Player.RemoveItem SEMHydnumAzureGiantSpore 1 Set SE37.HydnumAzureGiantSpore to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.PodPit == 0 && Player.GetItemCount SEDPodPit >=1 Player.RemoveItem SEDPodPit 1 Set SE37.PodPit to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.RotScale == 0 && Player.GetItemCount SEDRotScale >=1 Player.RemoveItem SEDRotScale 1 Set SE37.RotScale to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.ScalonFin == 0 && Player.GetItemCount SEScalonFin >=1 Player.RemoveItem SEScalonFin 1 Set SE37.ScalonFin to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.ScreamingMaw == 0 && Player.GetItemCount SEMScreamingMaw >=1 Player.RemoveItem SEMScreamingMaw 1 Set SE37.ScreamingMaw to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.ShamblesMarrow == 0 && Player.GetItemCount SEShamblesMarrow >=1 Player.RemoveItem SEShamblesMarrow 1 Set SE37.ShamblesMarrow to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.SwampTentacle == 0 && Player.GetItemCount SEDSwampTentacleIngred >=1 Player.RemoveItem SEDSwampTentacleIngred 1 Set SE37.SwampTentacle to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.ThornHook == 0 && Player.GetItemCount SEDThornHook >=1 Player.RemoveItem SEDThornHook 1 Set SE37.ThornHook to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.VoidEssence == 0 && Player.GetItemCount SEVoidEssence >=1 Player.RemoveItem SEVoidEssence 1 Set SE37.VoidEssence to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.WatchersEye == 0 && Player.GetItemCount SEMWatchersEye >=1 Player.RemoveItem SEMWatchersEye 1 Set SE37.WatchersEye to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.WitheringMoon == 0 && Player.GetItemCount SEDWitheringMoon >=1 Player.RemoveItem SEDWitheringMoon 1 Set SE37.WitheringMoon to 1 Player.AddItem Gold001 SE37.ItemValue EndIf If SE37.WormsHead == 0 && Player.GetItemCount SEMWormsHeadCap >=1 Player.RemoveItem SEMWormsHeadCap 1 Set SE37.WormsHead to 1 Player.AddItem Gold001 SE37.ItemValue EndIf Set SE37.TakeItems to 0 Set SE37.AllItems to SE37.AlocasiaFruit + SE37.AsterBloom + SE37.BlackTar + SE37.BlisterPod + SE37.CongealedPutrescence + SE37.DigestiveSlime Set SE37.AllItems to SE37.AllItems + SE37.ElytraIchor + SE37.FlameStalk + SE37.FungusStalk + SE37.GasBladder + SE37.GnarlBark + SE37.GrummiteEggs Set SE37.AllItems to SE37.AllItems + SE37.HoundTooth + SE37.HungerTongue + SE37.HydnumAzureGiantSpore + SE37.PodPit + SE37.RotScale Set SE37.AllItems to SE37.AllItems + SE37.ScalonFin + SE37.ScreamingMaw + SE37.ShamblesMarrow + SE37.SwampTentacle + SE37.ThornHook Set SE37.AllItems to SE37.AllItems + SE37.VoidEssence + SE37.WatchersEye + SE37.WitheringMoon + SE37.WormsHead EndIf End Begin GameMode If BaliwogCaught == 1 Set CaughtRef to GetCombatTarget StopCombat SERunsInCirclesRef.StopCombat SEBruscusDannusRef.StopCombat CaughtRef.StopCombat Set BaliwogCaught to 2 EvaluatePackage ElseIf BaliwogCaught == 3 If GetIsCurrentPackage SE37MiriliToHouse == 0 && Player.GetDistance SEHighCrossTownCenter <= 8000 SEMiriliUlvenRef.AddScriptPackage SE37MiriliToHouse EndIf If Player.GetInCell SEHighCrossMiriliUlvensHouse == 1 SEMiriliUlvenRef.AddScriptPackage SE37FindPC SEMiriliBaliwogRef.Enable CaughtRef.Disable EndIf EndIf If ElytraCaught == 1 Set CaughtRef to GetCombatTarget StopCombat SERunsInCirclesRef.StopCombat SEBruscusDannusRef.StopCombat CaughtRef.StopCombat Set ElytraCaught to 2 EvaluatePackage ElseIf ElytraCaught == 3 If GetIsCurrentPackage SE37MiriliToHouse == 0 && Player.GetDistance SEHighCrossTownCenter <= 8000 SEMiriliUlvenRef.AddScriptPackage SE37MiriliToHouse EndIf If Player.GetInCell SEHighCrossMiriliUlvensHouse == 1 SEMiriliUlvenRef.AddScriptPackage SE37FindPC SEMiriliElytraRef.Enable CaughtRef.Disable EndIf EndIf If ScalonCaught == 1 Set CaughtRef to GetCombatTarget StopCombat SERunsInCirclesRef.StopCombat SEBruscusDannusRef.StopCombat CaughtRef.StopCombat Set ScalonCaught to 2 EvaluatePackage ElseIf ScalonCaught == 3 If GetIsCurrentPackage SE37MiriliToHouse == 0 && Player.GetDistance SEHighCrossTownCenter <= 8000 SEMiriliUlvenRef.AddScriptPackage SE37MiriliToHouse EndIf If Player.GetInCell SEHighCrossMiriliUlvensHouse == 1 SEMiriliUlvenRef.AddScriptPackage SE37FindPC SEMiriliScalonRef.Enable CaughtRef.Disable EndIf EndIf If GnarlCaught == 1 Set CaughtRef to GetCombatTarget StopCombat SERunsInCirclesRef.StopCombat SEBruscusDannusRef.StopCombat CaughtRef.StopCombat Set GnarlCaught to 2 EvaluatePackage ElseIf GnarlCaught == 3 If GetIsCurrentPackage SE37MiriliToHouse == 0 && Player.GetDistance SEHighCrossTownCenter <= 8000 SEMiriliUlvenRef.AddScriptPackage SE37MiriliToHouse EndIf If Player.GetInCell SEHighCrossMiriliUlvensHouse == 1 SEMiriliUlvenRef.AddScriptPackage SE37FindPC SEMiriliGnarlRef.Enable CaughtRef.Disable EndIf EndIf End begin OnPackageStart SEMiriliUlvenSleep1x4 ; reset schedule when time to sleep set schedule to 0 end begin OnPackageDone SEMiriliUlven0Start set schedule to 1 evp end begin OnPackageDone SEMiriliUlven1Measure set schedule to 2 evp end begin OnPackageDone SEMiriliUlven2Measure set schedule to 3 evp end begin OnPackageDone SEMiriliUlven3Measure set schedule to 4 evp end begin OnPackageDone SEMiriliUlven4Measure set schedule to 5 evp end begin OnPackageDone SEMiriliUlven5TreeGrowth set schedule to 6 evp end begin OnPackageDone SEMiriliUlven6TreeGrowth set schedule to 7 evp end begin OnPackageDone SEMiriliUlven7TreeGrowth set schedule to 8 evp end begin OnPackageDone SEMiriliUlven8TreeGrowth set schedule to 9 evp end begin OnPackageDone SEMiriliUlven9Collect set schedule to 10 evp end begin OnPackageDone SEMiriliUlven10Collect set schedule to 11 evp end begin OnPackageDone SEMiriliUlven11Collect set schedule to 12 evp end begin OnPackageDone SEMiriliUlven12Collect set schedule to 13 evp end begin OnPackageDone SEMiriliUlven13Measure set schedule to 14 evp end begin OnPackageDone SEMiriliUlven14Measure set schedule to 15 evp end begin OnPackageDone SEMiriliUlven15Measure set schedule to 16 evp end begin OnPackageChange SEMiriliUlven16Finish set schedule to 0 evp end Begin OnDeath SetStage SE37 210 End
924SENanetteDonScriptscn SENanetteDonScript Begin GameMode if getStage SE02 >= 200 if SE02.NanetteSecretTears > 0 if getDisposition Player > 25 modDisposition player -25 endif endif endif End
925SENQDDementiaScriptscn SENQDDementiaScript short SE01VAR short SE02VAR short SE03VAR short SE04VAR short SE05VAR short SE06VAR short SE07aVAR short SE07bVAR short SE08VAR short SE09VAR short SE10VAR short SE11VAR short SE12VAR short SE13VAR short SE30VAR short SE32VAR
926SENQDManiaScriptscn SENQDManiaScript short SE01VAR short SE02VAR short SE03VAR short SE04VAR short SE05VAR short SE06VAR short SE07aVAR short SE07bVAR short SE08VAR short SE09VAR short SE10VAR short SE11VAR short SE12VAR short SE13VAR short SE30VAR short SE32VAR
927SENQDWildernessScriptscn SENQDWildernessScript short SE01VAR short SE02VAR short SE03VAR short SE04VAR short SE05VAR short SE06VAR short SE07aVAR short SE07bVAR short SE08VAR short SE09VAR short SE10VAR short SE11VAR short SE12VAR short SE13VAR short SE30VAR short SE32VAR
928SEObelisk13Activatorscn SEObelisk13Activator ; my job is to turn on Obelisk 13 at the right time short done ; set to 1 when Ob 13 turned on, set to 2 when finished float timer ; used to delay turn on slightly begin gamemode if done == 0 if getstagedone SEObelisks 35 == 1 set done to 1 set timer to 3 endif elseif done == 1 if timer > 0 set timer to timer - getSecondsPassed else SEObelisk13.setdestroyed 0 SEObelisk13.activate SEObeliskTurnOn 1 set done to 2 endif endif end
929SEObeliskAnimTrigActorSCRIPTscn SEObeliskAnimTrigActorSCRIPT ; ; Parent this trig to an Obelisk (ie ObeliskCrystal02A) does not daisy-chain ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short doOnce ref myObelisk ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set myObelisk to getParentRef end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTriggerActor if DoOnce == 0 myObelisk.playgroup forward 1 disablelinkedpathpoints set DoOnce to 1 endif end
930SEObeliskAnimTrigSCRIPTscn SEObeliskAnimTrigSCRIPT ; ; Parent this trig to an Obelisk (ie ObeliskCrystal02A) does not daisy-chain ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short doOnce ref myObelisk ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set myObelisk to getParentRef end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if DoOnce == 0 myObelisk.playgroup forward 1 disablelinkedpathpoints set DoOnce to 1 endif end
931SEObeliskDoorCrystals01SCRIPTscn SEObeliskDoorCrystals01SCRIPT ; animating order crystals for SE12 dungeon ; animates up or down when activated by correct reference ref myActionRef ; who is activating me? short visible ; set to 1 when playgroup forward -- make crystals visible begin OnActivate set myActionRef to GetActionRef if myActionRef.getIsReference SEObeliskTurnOff == 1 ; animate down if not already down if visible == 1 playgroup backward 1 set visible to 0 endif elseif myActionRef.getIsReference SEObeliskTurnOn == 1 ; animate up if not already up if visible == 0 playgroup forward 1 set visible to 1 endif endif end
932SEObeliskEnergyBoxSCRIPTscn SEObeliskEnergyBoxSCRIPT ; controls the "energy box" -- energy animation when powering up and shutting down obelisks ; this script has the spawn animation box as its parent ; its job is to animate as ordered, and to pass activations along to its parent ref mySelf ; me, used for activation ref myActivator ; who is activating me? ref myParent ; energy box (linked through parents to the spawn marker) short state ; 0 = off ; 1 = active ; 2 = 1 heart added ; 3 = 2 hearts added ; 4 = 3 hearts added begin OnLoad set myParent to GetParentRef set mySelf to GetSelf ; initialize animation state if state == 1 playgroup forward 1 elseif state == 2 playgroup fastforward 1 elseif state == 3 playgroup backward 1 elseif state == 4 playgroup fastbackward 1 else ; off playgroup Right 1 endif end begin OnActivate ; message "Activated" set myActivator to GetActionRef ; what is activating me? ; (meaning: what am I supposed to do?) if myActivator.GetIsReference SEObeliskTurnOn == 1 ; message "SEObeliskTurnOn " set state to 1 playgroup forward 1 elseif myActivator.GetIsReference SEObeliskTurnOff == 1 ; message "SEObeliskTurnOff " set state to 0 playgroup equip 1 elseif myActivator.GetIsReference SEObeliskHeart1 == 1 ; message "SEObeliskHeart1" set state to 2 playgroup fastforward 1 elseif myActivator.GetIsReference SEObeliskHeart2 == 1 ; message "SEObeliskHeart2" set state to 3 playgroup backward 1 elseif myActivator.GetIsReference SEObeliskHeart3 == 1 ; message "SEObeliskHeart3" set state to 4 playgroup fastbackward 1 endif ; always pass along my activator to my parent if myParent != 0 myParent.activate myActivator 1 endif end begin gamemode ; make sure always animating correctly if IsAnimPlaying == 0 if state == 1 playgroup forward 1 elseif state == 2 playgroup fastforward 1 elseif state == 3 playgroup backward 1 elseif state == 4 playgroup fastbackward 1 else ; off playgroup Right 1 endif endif end
933SEObeliskNewSCRIPTscn SEObeliskNewSCRIPT float timer short respawn ; 0 = ready to respawn ; 1 = running timer before respawning ; 2 = respawning (can't activate me) ; 3 = finishing animation (can't activate me) short heartCount ; counts the number of hearts the player has added to the obelisk short button short active ; set to 1 when the obelisk becomes active (responds to player, spawns, etc.) short deactivated ; set to 1 when player deactivates float temp ref mySelf ; me, used for activation ref myActivator ; who is activating me? ref myParent ; energy box (linked through parents to the spawn marker) ref mySpawn ; used to modify spawned knights short respawnCount ; increment when one of my spawned knights dies (replaces global variable) ref tempRef ; used for various temp purposes ; GLOBALS USED: ; SEObeliskMaxHearts -- how many hearts needed to deactivate obelisk? ; SEKnightRespawnDelay -- how long between respawning knights? begin OnLoad set myParent to GetParentRef set mySelf to GetSelf ; activate parent to set up variables down the line if myParent != 0 myParent.activate mySelf 1 endif ; destroy myself by default (so don't look like an activator) if active == 0 setdestroyed 1 else setdestroyed 0 if deactivated == 0 ; I'm active -- play active animation playgroup fastforward 1 endif endif end begin OnActivate set myActivator to GetActionRef if isActionRef player == 1 if heartCount >= SEObeliskMaxHearts ; obelisk is already deactivated message "The obelisk has been deactivated." ; tell parent that player wants to open the container if myParent != 0 myParent.activate SEObeliskOpenChest 1 endif else if player.getitemcount SEKnightHeart > 0 if respawn < 2 messageBox "Do you want to place a Heart of Order into the obelisk?", "Yes", "No" else message "The obelisk does not respond." endif else message "You don't have any Hearts of Order to place in the obelisk." endif endif else if myActivator.GetInFaction SEOrderPriestFaction == 1 ; priest is activating me if deactivated == 1 ; message "TEMP: Obelisk script -- priest activating me" myActivator.removeitem SEOrderPriestWidget 10 myActivator.modav aggression 100 ; set aggression back to normal myActivator.evp ; I've been deactivated, so activate me set heartCount to 0 set deactivated to 0 clearownership ; play my active animation playgroup forward 1 ; tell linked objects to turn on if myParent != 0 myParent.activate SEObeliskTurnOn 1 endif ; spawn a new knight if respawnCount == 0 set respawnCount to 1 endif ; SPECIAL CASES: ; SE13 -- player bodyguard gives an audible warning if getinworldspace SENSPalace == 1 set tempRef to SE13.bodyguardRef if tempRef.getdead == 0 if myActivator.GetInFaction SEOrderPriestFactionA == 1 tempRef.sayto player SE13ObeliskAShout elseif myActivator.GetInFaction SEOrderPriestFactionB == 1 tempRef.sayto player SE13ObeliskBShout elseif myActivator.GetInFaction SEOrderPriestFactionC == 1 tempRef.sayto player SE13ObeliskCShout endif endif endif endif elseif myActivator.GetInFaction SEOrderKnightRespawnFaction == 1 ; knight is activating me to let me know he died set respawnCount to respawnCount + 1 elseif myActivator.GetIsReference SEObeliskTurnOn == 1 ; I'm being activated by script set active to 1 set deactivated to 0 clearownership ; if I have no respawn count set, use default if respawnCount == 0 set respawnCount to SEKnightRespawn endif ; tell linked objects to turn on if myParent != 0 ; play my active animation -- put in here so it won't happen if not loaded playgroup forward 1 myParent.activate SEObeliskTurnOn 1 endif endif endif end begin gameMode If Active == 1 && GetDestroyed == 1 ; safety net for destroyed status SetDestroyed 0 ElseIf Active == 0 && GetDestroyed == 0 SetDestroyed 1 EndIf ; if active == 0 || getstagedone SE13 200 == 1 ; if getstagedone SE13 200 == 1 ; return ; endif set button to getbuttonpressed if button == 0 set heartCount to heartCount + 1 if heartCount == 1 message "You place a Heart of Order into the obelisk." ; tell linked objects if myParent != 0 myParent.activate SEObeliskHeart1 1 endif elseif heartCount == 2 message "You place a second Heart of Order into the obelisk." ; tell linked objects if myParent != 0 myParent.activate SEObeliskHeart2 1 endif elseif heartCount == 3 message "You place a third Heart of Order into the obelisk." ; tell linked objects if myParent != 0 myParent.activate SEObeliskHeart3 1 endif elseif heartCount == 4 message "You place a fourth Heart of Order into the obelisk." endif if heartCount >= SEObeliskMaxHearts ; message "[TEMP: The obelisk is now deactivated. This will eventually be obvious from the animation.]" endif player.removeitem SEKnightHeart 1 ; spawn a new knight if respawnCount > 0 && respawn != 1 ; grab one from the respawn queue if not already in process of respawning set respawnCount to respawnCount - 1 endif ; in any case, no delay -- spawn next knight immediately set respawn to 1 set timer to 0 ; if I've put in the right number of hearts, shut the obelisk down if heartCount >= SEObeliskMaxHearts set deactivated to 1 ; use ownership to trigger priest package (Giant Kluge) setownership SEOrderPriestFaction ; tell obelisk to deactivate when done idling set deactivated to 2 ; clear respawning count as a reward set respawnCount to 0 if getstage SE13 > 5 ; triggers next phase of SE13 if getIsReference SE13Obelisk1Ref == 1 setstage SE13 23 ; obelisk1 shut down elseif getIsReference SE13Obelisk2Ref == 1 setstage SE13 24 ; obelisk2 shut down endif endif endif endif ; check global variable to see if time to respawn a knight if respawnCount > 0 && timer <= 0 && respawn == 0 && deactivated == 0 set respawnCount to respawnCount - 1 set respawn to 1 set timer to SEKnightRespawnDelay endif ; finished waiting to respawn? If so, pop out a new knight if timer <= 0 && respawn == 1 set respawn to 2 ; tell my parent that it's time to spawn myParent.activate SEObeliskSpawn 1 ; put "spawning" shader on obelisk pms SEOrderShader ; run timer (obelisk can't be activating during spawn) set timer to SEKnightSpawnTime endif if timer <= 2 && respawn == 2 ; spawn new Knight ; special cases: set respawn to 3 ; still animating, so can't activate till done endif if timer <= 0 && respawn == 3 ; done spawning sms SEOrderShader set respawn to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 if deactivated == 0 && active == 1 ; play idle when active playgroup fastforward 1 elseif deactivated == 2 playgroup backward 1 set deactivated to 1 ; tell linked objects if myParent != 0 myParent.activate SEObeliskTurnOff 1 endif endif endif end
934SEObeliskSpawnBoxSCRIPTscn SEObeliskSpawnBoxSCRIPT ; controls the "wave box" -- spawning animation ; this script has the spawn marker as its parent ; its only job is to spawn a knight when it is activated by the correct default object short spawning ; set to 1 while spawning a knight float timer ; times the spawning of a knight ref mySelf ; me, used for activation ref myActivator ; who is activating me? ref myParent ; energy box (linked through parents to the spawn marker) ref mySpawn ; used to modify spawned knights ref myObelisk ; report back wh short effectCount ; used to track how often to play the "spawn effect" short playEffect ; set to 1 when you want the "spawn effect" to play at spawn marker begin OnLoad set myParent to GetParentRef set mySelf to GetSelf end begin OnActivate set myActivator to GetActionRef ; what is activating me? ; (meaning: what am I supposed to do?) if myActivator.GetIsReference SEObeliskSpawn == 1 ; spawn a knight set spawning to 1 set timer to SEKnightSpawnTime elseif myActivator.GetIsID SEObeliskNEW == 1 set myObelisk to myActivator endif end begin gamemode if timer <= 2 && spawning == 1 ; spawn new Knight playgroup forward 1 ; special cases: if getinworldspace SENSPalace == 1 set mySpawn to myParent.placeatme SE13LL1KnightOfOrderRespawn100 else ; Message "Spawning a knight" set mySpawn to myParent.placeatme SELL1KnightOfOrderRespawn100 endif ; start spawn effect set playEffect to 1 set spawning to 2 ; still animating, so can't activate till done endif if timer <= 0 && spawning == 2 ; "activate" knight to let him know his parent obelisk if myObelisk != 0 && mySpawn != 0 if mySpawn.getDead == 0 && mySpawn.getDisabled == 0 mySpawn.activate myObelisk 1 endif endif ; done animating, so now can activate again set spawning to 0 set playEffect to 0 endif if timer > 0 set timer to timer - getSecondsPassed if playEffect == 1 && spawning > 0 set effectCount to effectCount + 1 if effectCount > 3 mySpawn.pme LISH set effectCount to 0 endif endif endif end
935SEOrderPriest1ResurrectSCRIPTscn SEOrderPriest1ResurrectSCRIPT float resurrectTimer ; used to time resurrection short resurrecting ; set to 1 when when dead and resurrecting ; set to 2 when really dead (obelisk is shut down) short SpellRemove ; flag for if spell is removed because spell removal is not immediate ref myParent ; parent obelisk ref mySelf ; myself begin OnLoad set myParent to GetParentRef set mySelf to GetSelf if resurrecting == 1 ; I'm not really dead pms SEPriestResurrectShader endif ; make sure he doesn't drop his staff when he dies equipItem SEObeliskPriestStaff01 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff02 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff03 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff04 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff05 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff06 1 ; so he doesn't drop it when he dies end begin OnDeath end begin OnActivate if isActionRef player == 1 ; I'm not really dead if resurrecting == 1 ; don't touch me, I'm ELECTRIFIED! ; move marker to player and cast from it -- hack because dead actors can't cast spells SEOrderPriestCastingMarker.moveto player SEOrderPriestCastingMarker.cast StandardShockDamageTarget1Novice player else Activate endif else Activate endif end begin gamemode ; don't run script if disabled or really dead if getdisabled == 1 || resurrecting == 2 return endif if resurrecting == 0 if getDead == 1 ; NOTE: priest faction used to indicate that obelisk is deactivated if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 0 ; I'm not really dead pms SEPriestResurrectShader set resurrecting to 1 set resurrectTimer to SEOrderPriestResurrectTimer else ; I'm really dead setownership set resurrecting to 2 endif endif endif if resurrecting == 1 if resurrectTimer > 0 set resurrectTimer to resurrectTimer - getsecondsPassed else sms SEPriestResurrectShader ; NOTE: priest faction used to indicate that obelisk is deactivated if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 0 set resurrecting to 0 ; start resurrection pme REAN ; myParent.cast StandardShockDamageTarget1Novice mySelf resurrect 1 ; reequip staff equipItem SEObeliskPriestStaff01 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff02 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff03 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff04 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff05 1 ; so he doesn't drop it when he dies equipItem SEObeliskPriestStaff06 1 ; so he doesn't drop it when he dies else set resurrecting to 2 endif endif endif ; add power if obelisk is active, remove it if inactive if myParent != 0 ; if I have the spell, and obelisk is deactivated, remove it if SpellRemove == 0 && myParent.isOwner SEOrderPriestFaction == 1 pme RFLC Set SpellRemove to 1 ; TODO: modify model? ; while we're at it, check package to see if I should be going to Find obelisk if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0 if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1 if getitemcount SEOrderPriestWidget == 0 additem SEOrderPriestWidget 1 modav aggression -100 evp else stopcombat endif endif endif ; if I don't have the spell, and obelisk is activated, add it elseif SpellRemove == 1 && myParent.isOwner SEOrderPriestFaction == 0 && getdead == 0 pme RFLC Set SpellRemove to 0 ; TODO: modify model? ; while we're at it, check package to see if I'm still on the Find obelisk if getiscurrentpackage SEOrderPriestActivateObelisk1 == 1 evp endif endif endif end begin OnHit if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1 if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0 evp else ; 20% chance to drop out of combat and go for the obelisk with each hit if getrandompercent <= 20 stopcombat endif endif endif end begin OnStartCombat if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1 if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0 evp endif endif end
936SEOrinthalSCRIPTscn SEOrinthalSCRIPT begin OnDeath SETombstoneOrinthalREF.enable end
937SEPalaceFontSCRIPTscn SEPalaceFontSCRIPT ; used for SE12 short equipStaff ; used to decide whether to reequip staff begin OnActivate if isActionRef player == 1 if getstage SE12 >= 5 && getstage SE12 < 180 setstage SE12 7 message "The Font is covered with Order crystals and is inaccessible." elseif getstage SE12 == 180 ; player wins! gets Super Duper Sheogorath powers! setstage SE12 200 elseif getstage SE12 == 200 && Player.GetItemCount SE12StaffofSheogorath >=1 ; player has staff -- recharge it if player.getEquipped SE12StaffofSheogorath == 1 set equipStaff to 1 else set equipStaff to 0 endif player.removeitem SE12StaffofSheogorath 10 player.additem SE12StaffofSheogorath 1 if equipStaff == 1 player.equipItem SE12StaffofSheogorath endif endif endif end
938SEPrisonKickstartTrigger01SCRIPTscn SEPrisonKickstartTrigger01SCRIPT ; Flips a variable when triggered by player (variable used to initiate a ; Grummite travel package for first encounter of Corpserot Prison). Also ; spawns the Dark Seducer Turnkey boss, who defends the StolenGoods chest. ; ; Not sure what will happen if the player leaves the cell without killing the boss, then ; comes BACK to prison... Might have two bosses to fight then? short triggered begin onTrigger player if triggered == 0 set triggered to 1 CorpserotBossPatrol01REF.placeatme SEPrisonBossDementia100 1 endif end begin onReset set triggered to 0 end
939SEPrisonKickstartTrigger02SCRIPTscn SEPrisonKickstartTrigger02SCRIPT ; Spawns the Golden Saint Turnkey boss, who defends the StolenGoods chest. ; ; Not sure what will happen if the player leaves the cell without killing the boss, then ; comes BACK to prison... Might have two bosses to fight then? short triggered begin onTrigger player if triggered == 0 set triggered to 1 Aichan01BossMarker01REF.placeatme SEPrisonBossMania100 1 endif end begin onReset set triggered to 0 end
940SEPykeScriptscn SEPykeScript short Hometalk ;For use with SEConversations linkage short Lovetalk ;For use with SEConversations linkage
941SERanarrJoScriptscn SERanarrJoScript Begin OnDeath if getStage SE39 < 200 setStage SE39 210 endif End
942SERelmynaExperimentSpellScriptscn SERelmynaExperimentSpellScript ;used for the spell SERelmynaExperimentSpell ;this spell is used by one of SERelmynaVerenim's packages... its to simulate magical torturing ref self short doOnce begin ScriptEffectStart set self to getSelf if self != player if getRandomPercent < 34 playMagicShaderVisuals effectAtronachFlame 10 elseif getRandomPercent < 66 playMagicShaderVisuals effectAtronachFrost 10 elseif getRandomPercent < 100 playMagicShaderVisuals effectAtronachStorm 10 endif endif if self == player self.dispel SERelmynaExperimentSpell endif endif end begin ScriptEffectUpdate if self != player if doOnce == 0 self.pickidle set doOnce to 1 endif endif if self == player self.dispel SERelmynaExperimentSpell endif end begin ScriptEffectFinish StopMagicShaderVisuals effectAtronachFlame StopMagicShaderVisuals effectAtronachFrost StopMagicShaderVisuals effectAtronachStorm ;THE NPC IS KILLED BY A "Begin OnMagicEffectHit SEFF" BLOCK (see SE09VictimScript) end
943SERelmynaResurrectSpellScriptscn SERelmynaResurrectSpellScript ;handled by SERelmynaVerenimScript because you can't run a scripted spell on a dead actor.
944SERelmynaVerenimScriptscn SERelmynaVerenimScript ;This script creates the visiting scene in SE02 and ceremony scene in SE09 float RelmynaSayLength ;this holds the length of the info response to wait until its done being spoken before short RelmynaVisitStage ;controls the flow of the visit with the Gatekeeper scene in SE02 short RelmynaVisitDone ;Once the player sees the scene that night, this variable is true. This is a condition on her visit package. She stands around for awhile to give the player a chance to see it, but leaves as soon as the player sees the scene short RelmynaVisitDistance ;Determines the distance which the visit scene requires the player to be in to start and finish short GatekeeperReached ;used as a condition in the idle manager so that the Gatekeeper only reaches towards Relmyna once during the visit scene short runDropTimer float dropTimer ;timer that runs to allow the visit scene to finish before popping up the quest journal ref GatekeeperRef ;will be set to the same reference as in SE02.GatekeeperRef short RelmynaSayToCorpse ;used to time conditions for packages, so Relmyna will go up to the corpse and say something if she see's a dead Gatekeeper, and then leave short RelmynaSaidToCorpse short playerSeenExperiment ;used to as condition on packages to make sure the player sees her experiment on victims short prayed ;used as a condition on a praying package short experimentStage ;used as a condition on scripted dialog (SE09Misc) during pakages when Relmyna is experimenting on her victims short takeNotes ;used as a condition on taking notes package during experimenting scenes short ceremonyCastStage ;used in SE09 ceremony scene to get Relmyna to cast spells once per certain quest stage short ceremonyAnimStage ;used in SE09 ceremony scene to conditionalize the running of animations short pickIdleFlag ;holds a variable that is used by unique idle anim in idle manager, might be set in this script or in dialog results of scripted scenes short playerSacrifice ;0 = unset, 1 = player accdepted sacrifice, 2 = spell has been cast at player, 3 = NPCs have been disabled ;set in SE09VictimChoice topics if the player sacrifices himself to relmyna in place of the victims she is torturing, she stops torturing them and lets them go, victims are disabled in SE09XaselmDoorScript Begin MenuMode 1012 ;sleep/wait if getStage SE02 < 150 ;reset the flag that allows her visit package to take effect if RelmynaVisitDone == 1 if getCurrentTime > 2 if getCurrentTime < 21 set RelmynaVisitDone to 0 endif endif endif endif End Begin GameMode ;Spying on the Sorceress and gatekeeper scene (after stage 10 this happens every night before the Gatekeeper dies, but only advances the quest at the appropriate stage): ;initialize variables if RelmynaVisitDistance == 0 ; set RelmynaVisitDistance to 4000 endif if getStage SE02 < 150 ;reset the flag that allows her visit package to take effect if RelmynaVisitDone == 1 if getCurrentTime > 2 if getCurrentTime < 21 set RelmynaVisitDone to 0 endif endif endif endif if (GetIsCurrentPackage SE02RelmynaVisitGatekeeper && RelmynaVisitDone == 0) || RelmynaVisitStage > 0 if RelmynaSayLength < 0 && SERelmynaVerenimRef.getDistance XSE02RelmynaStandHere < 256 && getKnockedState != 1 if RelmynaVisitStage == 0 if getDistance player < RelmynaVisitDistance ;start the scene only if the player is near enough to eavesdrop set RelmynaVisitStage to 1 set GatekeeperRef to SE02.GatekeeperRef SERelmynaVerenimRef.look GatekeeperRef endif elseif RelmynaVisitStage == 1 set RelmynaSayLength to say SE02RelmynaVisit set RelmynaVisitStage to RelmynaVisitStage + 1 elseif RelmynaVisitStage == 2 set RelmynaSayLength to say SE02RelmynaVisit set RelmynaVisitStage to RelmynaVisitStage + 1 elseif RelmynaVisitStage == 3 set RelmynaSayLength to say SE02RelmynaVisit set RelmynaVisitStage to RelmynaVisitStage + 1 elseif RelmynaVisitStage == 4 set RelmynaSayLength to say SE02RelmynaVisit set RelmynaVisitStage to RelmynaVisitStage + 1 pickidle elseif RelmynaVisitStage == 5 set RelmynaSayLength to say SE02RelmynaVisit set RelmynaVisitStage to RelmynaVisitStage + 1 ;GatekeeperRef.evp ---- if i do this the idle anims are picked correctly but I evp out of the package if its near the end of the duration, it will swtich packages before the scene is done GatekeeperRef.pickidle set GatekeeperReached to 1 ;evp ---- if i do this the idle anims are picked correctly but I evp out of the package if its near the end of the duration, it will swtich packages before the scene is done pickidle elseif RelmynaVisitStage == 6 ;She always cries in this scene, but the relevent story things happen only during the proper quest stage" if getStageDone SE02 30 == 1 if getDistance Player < RelmynaVisitDistance set dropTimer to 4 set runDropTimer to 1 endif endif set RelmynaVisitDone to 1 set RelmynaVisitStage to 0 set GatekeeperReached to 0 stopLook evp ;GatekeeperRef.evp endif else set RelmynaSayLength to RelmynaSayLength - GetSecondsPassed endif endif if runDropTimer == 1 if dropTimer > 0 set dropTimer to dropTimer - getSecondsPassed else set runDropTimer to 0 SE02TearfilledHankerchiefRef.enable SetStage SE02 130 endif endif ;If Relmyna chances by after the Gatekeeper is dead, evp her so she picks her inspect the corpse package if getStageDone SE02 150 == 1 set GatekeeperRef to SE02.GatekeeperRef if SERelmynaVerenimRef.getDistance GatekeeperRef < 1000 ;THESE ARE SEPERATE ELSEIF's BECAUSE ONE OR'd TOGETHER LINE EXCEEDS THE MAX LINE LENGTH if getIsCurrentPackage SE02RelmynaCheckGatekeeper1Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper2Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper3Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper4Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper5Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper6Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper7Corpse == 1 elseif getIsCurrentPackage SE02RelmynaCheckGatekeeper8Corpse == 1 else ;if she isn't doing one of the above tested for packages, evp her so she picks one of them if RelmynaSaidToCorpse != 2 EVP endif endif endif if RelmynaSayToCorpse <= 0 if RelmynaSaidToCorpse == 0 if getDistance GatekeeperRef < 256 set RelmynaSayToCorpse to SERelmynaVerenimRef.say SE02RelmynaSayToCorpse set RelmynaSaidToCorpse to 1 endif elseif RelmynaSaidToCorpse == 1 ;she's said her corpse line, have her pick a new package EVP set RelmynaSaidToCorpse to 2 endif else set RelmynaSayToCorpse to RelmynaSayToCorpse - getSecondsPassed endif endif ;Handles the noble sacrifice scene in SE09 if playerSacrifice == 1 SERelmynaVerenimRef.pushActorAway player 1 cast SE09SacrificeSpell player player.playMagicShaderVisuals effectAtronachStorm 10 AddTopic SE09ExaltedPain set playerSacrifice to 2 endif ;This performs the ceremony monologue in SE09 if getStage SE09 >= 100 && getStage SE09 < 170 if getStage SE09 == 100 if ceremonyAnimStage == 0 ;Start the opening of the lid of pool SE09PoolLidAnim.Playgroup Equip 0 ;Start pool mist SE09PoolFXMiscAnim.enable ;because it has collision and named for the mouse over SE09PoolFXMiscAnim.Playgroup Equip 0 ;turn on light SE09GooLight01Ref.enable set ceremonyAnimStage to 1 endif endif ;continue opening the lid of the pool if ceremonyAnimStage == 1 if SE09PoolLidAnim.isAnimPlaying == 0 SE09PoolLidAnim.Playgroup Forward 0 set ceremonyAnimStage to 2 endif endif ;THIS MIGHT NEED DOONCE CONDITIONALIZATION if getStage SE09 == 160 set GatekeeperRef to SE09.rebuiltGatekeeperRef look GatekeeperRef endif if RelmynaSayLength <= 0 && getKnockedState != 1 ;DO THESE THINGS BEFORE SAYING LINE: if getStage SE09 == 115 if ceremonyCastStage == 0 cast SE09CeremonySpell SERelmynaVerenimRef set ceremonyCastStage to ceremonyCastStage + 1 endif endif if getStage SE09 == 125 if ceremonyCastStage == 1 cast SE09CeremonySpell SERelmynaVerenimRef set ceremonyCastStage to ceremonyCastStage + 1 endif endif if getStage SE09 == 135 if ceremonyCastStage == 2 cast SE09CeremonySpell SERelmynaVerenimRef set ceremonyCastStage to ceremonyCastStage + 1 endif endif if getStage SE09 == 145 if ceremonyCastStage == 3 cast SE09CeremonySpell SERelmynaVerenimRef set ceremonyCastStage to ceremonyCastStage + 1 endif endif if getStage SE09 == 155 if ceremonyCastStage == 4 cast SE09CeremonySpell SERelmynaVerenimRef set ceremonyCastStage to ceremonyCastStage + 1 endif endif ;SAY LINE set RelmynaSayLength to Say SE09Ceremony ;The topics are conditioned and say once'd so that repeated says of the same topic drop through the stack ;when she is repeating instructions to the player "Place the X into the cistern" add a delay so she doesn't repeat it immediately if getStage SE09 == 100 || getStage SE09 == 110 || getStage SE09 == 120 || getStage SE09 == 130 || getStage SE09 == 140 || getStage SE09 == 150 set RelmynaSayLength to RelmynaSayLength + 4 endif else Set RelmynaSayLength to RelmynaSayLength - GetSecondsPassed endif endif ;This makes Relmyna say things to her victims when she experiments on them if ( getIsCurrentPackage SERelmynaExperimentVictim1 == 1 && getDistance XSE09ExperimentHere1 < 100) || ( getIsCurrentPackage SERelmynaExperimentVictim2 == 1 && getDistance XSE09ExperimentHere2 < 100 ) || (getIsCurrentPackage SERelmynaExperimentVictim3 == 1 && getDistance XSE09ExperimentHere3 < 100) || getIsCurrentPackage SERelmynaExperimentTakeNotes == 1 if RelmynaSayLength <= 0 && getKnockedState != 1 set takeNotes to 0 ;this was set to 1 in SE09VictimsScript when they get hit with her spell evp set RelmynaSayLength to Say SE09MiscRelmynaExperiment ;infos in SE09Misc quest set RelmynaSayLength to RelmynaSayLength + 4 ;pad it so see takes a moment before continuing else Set RelmynaSayLength to RelmynaSayLength - GetSecondsPassed endif endif End ;GameMode Begin OnHit Player ;End the visit with Gatekeeper Scene early if GetIsCurrentPackage SE02RelmynaVisitGatekeeper == 1 set RelmynaVisitDone to 1 set RelmynaVisitStage to 0 stopLook EVP gatekeeperRef.evp endif End Begin OnActivate ;here i am faking a greeting so i can reuse the SE09Ceremony infos, and not let the player interrupt Relymna Verenim at other times during SE09 Ceremony scene if getStage SE09 == 100 startConversation Player SE09CeremonyStart Elseif getStage SE09 == 110 || getStage SE09 == 120 || getStage SE09 == 130 || getStage SE09 == 140 startConversation Player SE09Ceremony Elseif getStage SE09 >= 105 && getStage SE09 < 170 Message "Relmyna Verenim is busy and can't talk to you at the moment." Elseif RelmynaVisitStage > 0 ;don't let the player interup the discussion she has with the Gatekeeper in SE02 Message "Relmyna Verenim can't talk to you at the moment." Else Activate endif End ;OnActivate Begin OnPackageChange SE02RelmynaVisitGatekeeper ;if for some reason she changes packages before she is done with the crying scene, reset the variables associated with that scene (could happen if the player kills the Gatekeeper while she is talking to him) set RelmynaVisitDone to 1 set RelmynaVisitStage to 0 End Begin OnPackageChange SE09RelmynaPerfomCeremony stopLook End Begin OnPackageStart SERelmynaResurrectVictim1 ResurrectSpellTargetRef.moveto SE09CagedVictim01REF ;can't aim properly at a dead NPC so move one of these invisible objects you can shoot at to the location of the dead NPC -- its in the X Target Data of the XHeadingMaker used by the package as the location End Begin OnPackageStart SERelmynaResurrectVictim2 ResurrectSpellTargetRef.moveto SE09CagedVictim02REF ;can't aim properly at a dead NPC so move one of these invisible objects you can shoot at to the location of the dead NPC -- its in the X Target Data of the XHeadingMaker used by the package as the location End Begin OnPackageStart SERelmynaResurrectVictim3 ResurrectSpellTargetRef.moveto SE09CagedVictim03REF ;can't aim properly at a dead NPC so move one of these invisible objects you can shoot at to the location of the dead NPC -- its in the X Target Data of the XHeadingMaker used by the package as the location End Begin OnPackageStart SERelmynaExperimentVictim1 if playerSeenExperiment == 0 if getDistance Player < 512 set playerSeenExperiment to 1 addTopic SE09Victims endif endif End Begin OnPackageEnd SERelmynaResurrectVictim1 set SE09CagedVictim01REF.imDead to 0 evp SE09CagedVictim01REF.playMagicShaderVisuals effectReanimate 5 SE09CagedVictim01REF.resurrect 1 if playerSeenExperiment == 0 if getDistance Player < 512 set playerSeenExperiment to 1 addTopic SE09Victims endif endif End Begin OnPackageEnd SERelmynaResurrectVictim2 set SE09CagedVictim02REF.imDead to 0 evp SE09CagedVictim02REF.playMagicShaderVisuals effectReanimate 5 SE09CagedVictim02REF.resurrect 1 End Begin OnPackageEnd SERelmynaVerenimWorship set prayed to 1 evp end Begin OnPackageEnd SERelmynaResurrectVictim3 set SE09CagedVictim03REF.imDead to 0 evp SE09CagedVictim03REF.playMagicShaderVisuals effectReanimate 5 SE09CagedVictim03REF.resurrect 1 ;Clear out the diedCount variable on the victims so she will pick their Experiment/Resurrect packages again set SE09CagedVictim01REF.diedCounter to 0 set SE09CagedVictim02REF.diedCounter to 0 set SE09CagedVictim03REF.diedCounter to 0 set Prayed to 0 End Begin OnPackageStart SE09RelmynaPerfomCeremony SetGhost 1 End Begin OnPackageChange SE09RelmynaPerfomCeremony SetGhost 0 End
945SERendilDrararaSCRIPTscn SERendilDrararaSCRIPT begin OnDeath SETombstoneRendilDrararaREF.enable end
946SERuinGasCloudTrapSCRIPTscn SERuinGasCloudTrapSCRIPT short triggered float timer begin onActivate if isActionRef player == 0 && triggered == 0 playgroup forward 1 set triggered to 1 set timer to 10 endif end begin gameMode if timer > 0 set timer to timer - getSecondsPassed endif if triggered == 1 && timer <= 0 set triggered to 0 message "[TEMP] Trap reset" endif end
947SERunsInCirclesSCRIPTscn SERunsInCirclesSCRIPT short timeToRun ; set to 1 when time to run ; set to 2 when time to force-greet player again short lapCount ; counts number of laps she's run short temp float timer ; times spoken dialogue Begin OnLoad SetForceRun 1 End begin OnPackageStart SERunsInCirclesStartRun set lapCount to lapCount + 1 if lapCount > 1 ; time to stop? set temp to lapCount * 30 if getrandompercent <= temp set lapCount to 0 set timetoRun to 2 evp endif endif end begin OnPackageDone SERunsInCirclesRun4 if getrandompercent <= 50 set timeToRun to 2 set lapCount to 0 evp endif end begin gamemode if timeToRun == 1 if timer > 0 set timer to timer - getSecondsPassed else set timer to Say SERunsInCirclesYell endif endif end
948SESacellumGate01SCRIPTscn SESacellumGate01SCRIPT short open ; set to 1 when open begin OnLoad if open == 0 if getStage SE13 >= 200 playgroup forward 1 set open to 1 endif endif end
949SESacellumSpeechScriptscn SESacellumSpeechScript short SpeechCheck ;This is the only variable that needs resetting when player exits Sacellum short DoOnce ;DoOnce variable reset in each Speech script begin gamemode ;These blocks reset everything when the player leaves the Sacellum cell ;Arctus if ( SE06FlameDementiaSacellumREF.GetDisabled == 0 ) if ( DoOnce == 0 ) if ( Player.GetInCell SENSSacellumArdenSul == 0 ) Set SpeechCheck to 0 Set DoOnce to 1 endif endif endif ;Dervenin if ( SE06FlameManiaSacellumREF.GetDisabled == 0 ) if ( DoOnce == 0 ) if ( Player.GetInCell SENSSacellumArdenSul == 0 ) Set SpeechCheck to 0 Set DoOnce to 1 endif endif endif end
950SESheerMeedishSCRIPTscn SESheerMeedishSCRIPT begin OnDeath SETombstoneSheerMeedishREF.enable end
951SESheogorathHitSpellScriptscn SESheogorathHitSpellScript short doOnce Ref WhoAmI Begin ScriptEffectStart Set WhoAmI to GetSelf If WhoAmI == Player ; prevents multiple actors from disabling player controls ;DisablePlayerControls EnableFastTravel 0 EndIf End Begin ScriptEffectFinish If WhoAmI == Player ; prevents multiple actors from moving the player player.moveto SEOopsMarker EndIf End
952SESheogorathPlatformScriptscn SESheogorathPlatformScript ;this script enables/disables the platform the player appears on when hitting Sheogorath float timer Begin GameMode if ( GetDistance Player <= 512 ) set timer to ( timer + GetSecondsPassed ) if ( timer >= 1.5 ) if ( GetDisabled == 0 ) ;EnablePlayerControls Disable ;set SESheogorath.HitOnce to 0 endif endif endif If ( GetDisabled == 1 ) if ( GetDistance Player >= 2000 ) set timer to 0 Enable endif endif End
953SESheogorathPrisonResetSCRIPTscn SESheogorathPrisonResetSCRIPT begin gamemode ; if player comes here when the master jail marker is disabled, enable it ; (means player was sent "exiled" here as Sheogorath) if SEJailMarkerBliss.getdisabled == 1 SEJailMarkerCrucible.Enable SEJailMarkerBliss.Enable SEPrisonMarkerAichan.Enable SEPrisonMarkerCorpserot.Enable SESheogorathExileMarkerDementia.Disable SESheogorathExileMarkerMania.Disable SEPrisonMarkerSheogorathMania.Disable SEPrisonMarkerSheogorathDementia.Disable ; reset player's crime gold if SECrimeGold > 0 player.modCrimeGold SECrimeGold set SECrimeGold to 0 endif endif end ; SEJailMarkerParentTamriel
954SESheoKillboxScriptscn SESheoKillboxScript short doOnce Begin OnTrigger Player ;script makes sure that the extra buff or cheated player dies when he hits the ground if ( SESheogorathREF.HitOnce > 0 ) if ( doOnce == 0 ) player.kill set doOnce to 1 endif endif End
955SESicklyBerniceSCRIPTscn SESicklyBerniceSCRIPT short rent short cleanup short setup short hourspassed short curereset ;resets the cure post quest SE41 short oncure ;checks if player is on post quest SE41 short curecount ;counts the number of days until the cure resets (in this case, 4) short currentday ;stores the current day for use with the post quest SE41 reset float renthour float hourcheck begin OnDeath SETombstoneSicklyBerniceREF.enable end Begin OnActivate if SEHerdirRef.TargetRef == SESicklyBerniceRef if IsActionRef Player == 1 return endif else Activate endif End ;BED RENTAL SCRIPTING ;CellName: SENSSicklyBernicesTaphouse ;Publican: SESicklyBernice ;Room: First room upstairs on the left ;Door Ref: SESicklyBerniceRentDoor begin gamemode if ( rent == 1 ) if ( setup == 0 ) set renthour to GameHour set setup to 1 set hourspassed to 0 set hourcheck to GameHour SESicklyBerniceRentDoor.unlock SESicklyBerniceRentBed.setownership else if ( HoursPassed >= 24 ) set cleanup to 1 else set hourcheck to GameHour if ( renthour >= 23 ) if ( GameHour < 1 ) set HoursPassed to ( HoursPassed + 1 ) set renthour to GameHour endif else if ( ( renthour + 1 ) < GameHour ) set HoursPassed to ( HoursPassed + 1 ) set renthour to GameHour endif endif endif endif if ( Player.GetInCell SENSSicklyBernicesTaphouse == 0 ) if ( Cleanup == 1 ) set Cleanup to 2 endif endif if ( Cleanup == 2 ) set rent to 0 set renthour to 0 set hourspassed to 0 set setup to 0 set cleanup to 0 SESicklyBerniceRentDoor.SetOpenState 0 SESicklyBerniceRentDoor.lock 75 SESicklyBerniceRentBed.SetOwnership SESicklyBernice endif endif ;This is the reset for Sickly Bernice to need the cure after SE41 is completed ( around every 4 days ) if ( GetStage SE41 >= 100 ) if ( CureReset == 0 ) if ( currentday == 0 ) set currentday to GameDaysPassed else if currentday != GameDaysPassed set curecount to ( curecount + 1 ) set currentday to GameDaysPassed endif endif endif endif if ( CureCount == 4 ) Set CureReset to 1 endif End Begin MenuMode if ( rent == 1 ) if ( setup == 1 ) if ( HoursPassed >= 24 ) set cleanup to 1 else if ( renthour >= 23 ) if ( Gamehour < 1 ) set HoursPassed to ( HoursPassed + 1 ) set renthour to GameHour endif else if ( ( renthour + 1 ) < GameHour ) set HoursPassed to ( HoursPassed + 1 ) set renthour to GameHour endif endif endif endif endif End
956SESontaireSCRIPTscn SESontaireSCRIPT begin OnDeath SETombstoneSontaireREF.enable end
957SEStartUpScriptscn SEStartUpScript Begin GameMode StopQuest SEStartUp End
958SESummonHaskillSpellSCRIPTscn SESummonHaskillSpellSCRIPT float timer short returnEffect ; set to 1 when played float x float y float angle begin ScriptEffectStart if ( sehaskillref.summoned == 0 ) && ( GetPlayerinSEWorld == 1 ) set sehaskillref.summoned to 1 ; move marker to Haskill's current spot SEHaskillSummonReturnMarker.moveto SEHaskillRef ; move Haskill to player SEHaskillSummonMarker.moveto player ; get orientation of player ; when we have math functions, we can do this: set angle to player.getangle z ; set x to 100 * ( cos angle ) ; set y to 100 * ( sin angle ) ; SEHaskillRef.moveto SEHaskillSummonMarker x y 0 ; TEMP: for now, just move on axis based on angle if angle <= 45 && angle >= -45 set y to 150 elseif angle >= 45 && angle <= 135 set x to 150 elseif angle >= 135 && angle <= 225 set y to -150 else set x to -150 endif ; messagebox "TEMP: angle = %.1f, x=%.0f, y=%.0f" angle x y SEHaskillRef.moveto player x y 0 SEHaskillRef.look player SEHaskillRef.pme STRP ; Haskill force-greet player SEHaskillRef.addscriptpackage SEHaskillSummonForcegreet ;set variable on Haskill to prevent player from talking to him before he forcegreets set SEHaskillRef.greetVAR to 1 set SEHaskillREF.FadeOnce to 3 elseif ( GetPlayerinSEWorld == 1 ) Message "Haskill has been summoned too recently." elseif ( GetPlayerinSEWorld == 0 ) Message "This spell may only be used in the Shivering Isles." dispel SELpSummonHaskill endif end begin ScriptEffectUpdate set timer to timer + ScriptEffectElapsedSeconds if returnEffect == 0 && timer > 4.5 SEHaskillRef.pme STRP set returnEffect to 1 endif end begin ScriptEffectFinish if ( SEHaskillREF.GetInSameCell Player == 0 ) && ( SEHaskillREF.summoned == 1 ) set SEHaskillSummonQuest.resetVAR to 1 endif ; send Haskill back where he came from ;SEHaskillRef.pme STRP ;SEHaskillRef.removescriptpackage ;SEHaskillRef.stoplook ;SEHaskillRef.moveto SEHaskillSummonReturnMarker ;set SEHaskillREF.FadeOnce to 4 ;set SEHaskillRef.greetVAR to 0 end
959SESylScriptscn SESylScript short Refuse ;flag set in dialogue if player refuses to help her in SE05 short Speech short EndGreetTrigger short SylMad ;For use with Syl's Timer for Anger Talk in SE07B float ConvTimer float SE05Timer float SylMadTalkLength ;Syl's timer for the delay of lines and events in her Anger Talk in SE07B float SylTimer ;A float for the artifical delay in Syl's appearance before her Anger Talk in SE07B float SylTimer2 ;A float for the artifical delay in Syl's appearance before her Anger Talk in SE07B ; This is for killing her if SE07A is running begin OnDeath if ( GetStage SE07A >= 22 ) SetStage SE07A 30 endif ; this sets the SE12 variables if she is the traitor if GetQuestRunning SE12 == 1 set SE12.TraitorDead to 1 ; which pool is still ordered? if SE12.ManiaPoolOrdered == 1 ; means we're at Mania side if SE12.ManiaPriestsDead >= SE12.ManiaPriestsCount SE12PoolManiaRef.activate SESylRef 1 setstage SE12 150 endif else ; means we're at Dementia side if SE12.DementiaPriestsDead >= SE12.DementiaPriestsCount SE12PoolDementiaRef.activate SESylRef 1 setstage SE12 160 endif endif endif end ; taunt at the beginning of combat in SE12 begin OnStartCombat player if getincell XPGloomstonePassage == 1 sayto player SE12TraitorTaunts set SE12.TraitorTalk to 2 endif end Begin OnAlarm 3 Player if SE12.TraitorTalk == 0 set SE12.TraitorTalk to 1 endif end ;This ensures she goes into combat with player on sight begin gamemode if ( GetStage SE07A >= 22 && GetStage SE07A < 200 ) if ( GetDistance Player < 1000 ) StartCombat Player endif endif ;Set SE05 Stage 20 after player has talked to Syl at the beginning ;Necessary so that player gets pop-up and can select this as Active Quest instead of SE04Shell if ( GetStageDone SE05 20 == 0 ) if ( SE05.Stage20Update == 1 ) SetStage SE05 20 endif endif ;For use with SE07B This kicks off the end speech if ( GetStage SE07B >= 50 ) && ( SE07B.SylMove == 1 ) DisablePlayerControls SESylRef.Enable SE07EndSeducer01Ref.Enable SE07EndSeducer02Ref.Enable Set SylTimer to 1 SEDerveninRef.Evp SEArctusRef.Evp Set SE07B.SylMove to 2 endif if ( SE07B.SylMove == 2 ) if ( SylTimer > 0 ) Set SylTimer to ( SylTimer - GetSecondsPassed ) else SE07ThadonSpeaks.Say SE07BSylShout 1 SESyl 1 Set SylTimer2 to 6 Set SE07B.SylMove to 3 endif endif if ( SE07B.SylMove == 3 ) if ( SylTimer2 > 0 ) Set SylTimer2 to ( SylTimer2 - GetSecondsPassed ) else Set SE07B.SylMove to 4 endif endif if ( GetStage SE07B >= 50 ) && ( SE07B.SylMove == 4 ) if ( SylMad == 0 ) && ( SylMadTalkLength <= 0 ) Set SylMadTalkLength to SESheogorathRef.Say SE07BSheoShout SESheogorathRef.Sayto SESylRef SE07BSheoShout 1 Set SylMad to 1 elseif ( SylMad == 1 ) && ( SylMadTalkLength <= 0 ) Set SylMadTalkLength to SESheogorathRef.Say SE07BSheoShout02 SESheogorathRef.Sayto SESylRef SE07BSheoShout02 1 Set SylMad to 2 elseif ( SylMad == 2 ) && ( SylMadTalkLength <= 0 ) Set SylMadTalkLength to SESheogorathRef.Say SE07BSheoShout03 SESheogorathRef.Sayto SESylRef SE07BSheoShout03 1 Set SylMad to 3 elseif (SylMad == 3 ) && ( SylMadTalkLength <= -6.5 ) Set SE07B.SylMove to 5 Set SylMad to 4 endif endif if ( SylMad > 0 ) && ( SylMad < 4 ) Set SylMadTalkLength to SylMadTalkLength - GetSecondsPassed endif if ( GetStage SE07B >= 50 ) && ( SE07B.Convo != 12 ) && ( SE07B.SylMove == 5 ) startconversation SESheogorathRef SE07BSylLeaves Set SE07B.SylMove to 6 endif ;SE05 Speech if ( Speech == 0 ) if ( GetStage SE05 == 130 ) if ( GetDistance SE05SylChamberMarker < 300 ) set Speech to 1 endif endif elseif ( Speech == 1 ) Set ConvTimer to SeSylRef.SayTo SEMuurineRef SE05SylEndSpeech set Speech to 2 elseif ( Speech == 2 ) if ( ConvTimer <= 0 ) set Speech to 3 SeSylRef.EvaluatePackage else set ConvTimer to ( ConvTimer - GetSecondsPassed ) endif endif if ( EndGreetTrigger == 0 ) if ( SEMuurineRef.GetDead == 1 ) set EndGreetTrigger to 1 set SE05Timer to 3 endif elseif ( EndGreetTrigger == 1 ) if ( SE05Timer <= 0 ) set EndGreetTrigger to -1 StartConversation Player else set SE05Timer to ( SE05Timer - GetSecondsPassed ) endif endif if SE12.TraitorTalk == 1 if getincell XPGloomstonePassage == 1 && GetDead == 0 if ConvTimer > 0 set ConvTimer to ConvTimer - getSecondsPassed else ; taunt player if IsInCombat == 1 ; turn off taunts when he enters combat set SE12.TraitorTalk to 2 setav aggression 50 endif ; taunt player set ConvTimer to sayto player SE12TraitorTaunts 1 set ConvTimer to ConvTimer + 1 endif endif endif end begin OnPackageEnd SE07BSylExitsSacellum if ( GetStage SE07B >= 50 ) SESylRef.Disable SE07EndSeducer01Ref.Disable SE07EndSeducer02Ref.Disable EnablePlayerControls SetStage SE07B 55 endif end
960SETestAreaEffectSpellSCRIPTscn SETestAreaEffectSpellSCRIPT ; this is what is cast on everyone around the player short myAggression short myDisposition short mySneak short temp begin ScriptEffectStart if getself == player return endif look player ; store aggression and disp set myAggression to getbaseav aggression set myDisposition to getdisposition player ; store sneak (increase it to make player easy to see) set mySneak to getbaseav sneak setav sneak 100 message "Disposition start=%.0f", myDisposition ; set new aggression if myAggression < 10 setav aggression 10 endif ; mod disposition to player set temp to -1 * myDisposition moddisposition player temp ; add crime gold to player for assault if getdead == 0 set temp to getgs iCrimeGoldAttack player.modcrimegold temp endif end begin ScriptEffectUpdate end begin ScriptEffectFinish message "FINISH" if getself == player return endif stoplook ; set aggression, disposition back to normal (hopefully will already be in combat with player because of this) if myAggression < 10 setav aggression myAggression endif ; reset sneak setav sneak mySneak ; reset disposition moddisposition player myDisposition set myDisposition to getdisposition player message "Disposition finish=%.0f", myDisposition end
961SETestGodSpellSCRIPTscn SETestGodSpellSCRIPT ; this is what is cast on the player short doOnce begin ScriptEffectStart ; player is invulnerable to shock for the moment player.addspell SETestAbShockShield100 ; get guards to react to player's attack sendTrespassAlarm player end begin ScriptEffectUpdate if doOnce == 0 set doOnce to 1 ; move marker above player, add lightning shield to player, cast lightning from marker SEHaskillSummonMarker.moveto player 0, 0, 150 SEHaskillSummonMarker.cast SETestShockDamageArea player endif end begin ScriptEffectFinish player.removespell SETestAbShockShield100 end
962SEThadonScriptscn SEThadonScript short CleanUp ;A Doonce variable for cleaning up Thadon's Meal short Speech ;Fires off Thadon's Death Speech short ThadonTalk ;For use with Thadon's Timer for Death Speech short ThadonMad ;For use with Thadon's Timer for Anger Talk in SE07A float ThadonDeathTimer ;Thadon's Timer to delay stage set on death float ThadonTalkTimer ;Thadon's Timer for Death Speech float ThadonFinalDeathTimer ;" float ThadonMadTalkLength ;Thadon's timer for the delay of lines and events in his Anger Talk in SE07A float ThadonTimer ;A float for the artifical delay in Thadon's appearance before his Anger Talk in SE07A float ThadonTimer2 ;A float for the artifical delay in Thadon's appearance before his Anger Talk in SE07A Begin OnActivate If GetDead == 1 && IsActionRef Player == 1 && GetStage SE07B <= 40 && GetStageDone SE07B 5 == 1 Player.AddItem SE07ThadonBlood 1 Else Activate EndIf End ; The following 4 OnPackage Blocks handle the resetting of Thadon's Meal every day at the appropriate times. begin OnPackageEnd SE07BThadonDies if ( Speech == 0 ) if ( GetStage SE07B >= 35 ) SetEssential SEThadon 0 Set Speech to 1 endif endif end begin OnDeath ; this sets the SE12 variables if he is the traitor if GetQuestRunning SE12 == 1 set SE12.TraitorDead to 1 ; which pool is still ordered? if SE12.ManiaPoolOrdered == 1 ; means we're at Mania side if SE12.ManiaPriestsDead >= SE12.ManiaPriestsCount SE12PoolManiaRef.activate SEThadonRef 1 setstage SE12 150 endif else ; means we're at Dementia side if SE12.DementiaPriestsDead >= SE12.DementiaPriestsCount SE12PoolDementiaRef.activate SEThadonRef 1 setstage SE12 160 endif endif endif If GetStage SE07B <= 45 SEWideEyeRef.PickIdle SEGundlarRef.PickIdle EndIf end ; taunt at the beginning of combat in SE12 begin OnStartCombat player if getincell XPGloomstonePassage == 1 sayto player SE12TraitorTaunts set SE12.TraitorTalk to 2 endif end Begin OnAlarm 3 Player if SE12.TraitorTalk == 0 set SE12.TraitorTalk to 1 endif end begin gamemode ;Set SE04 Stage 10 after player has talked to Thadon at the beginning ;Necessary so that player gets pop-up and can select this as Active Quest instead of SE04Shell if ( GetStageDone SE04 10 == 0 ) if ( SE04.Stage10Update == 1 ) SetStage SE04 10 endif endif ;For use with SE07A This kicks off the end speech if ( GetStage SE07A >= 40 ) && ( SE07A.ThadonMove == 1 ) DisablePlayerControls SEThadonRef.Enable SE07SaintEnd01Ref.Enable SE07SaintEnd02Ref.Enable ; SEThadonRef.Evp ; SE07SaintEnd01Ref.Evp ; SE07SaintEnd02Ref.Evp Set ThadonTimer to 1 SEDerveninRef.Evp SEArctusRef.Evp Set SE07A.ThadonMove to 2 endif if ( SE07A.ThadonMove == 2 ) if ( ThadonTimer > 0 ) Set ThadonTimer to ( ThadonTimer - GetSecondsPassed ) else SE07ThadonSpeaks.Say SE07AThadonShout 1 SEThadon 1 Set ThadonTimer2 to 6 Set SE07A.ThadonMove to 3 endif endif if ( SE07A.ThadonMove == 3 ) if ( ThadonTimer2 > 0 ) Set ThadonTimer2 to ( ThadonTimer2 - GetSecondsPassed ) else Set SE07A.ThadonMove to 4 endif endif if ( GetStage SE07A >= 40 ) && ( SE07A.ThadonMove == 4 ) if ( ThadonMad == 0 ) && ( ThadonMadTalkLength <= 0 ) Set ThadonMadTalkLength to SESheogorathRef.Say SE07ASheoShout SESheogorathRef.Sayto SEThadonRef SE07ASheoShout 1 Set ThadonMad to 1 elseif ( ThadonMad == 1 ) && ( ThadonMadTalkLength <= 0 ) Set ThadonMadTalkLength to SESheogorathRef.Say SE07ASheoShout02 SESheogorathRef.Sayto SEThadonRef SE07ASheoShout02 1 Set ThadonMad to 2 elseif ( ThadonMad == 2 ) && ( ThadonMadTalkLength <= 0 ) Set ThadonMadTalkLength to SESheogorathRef.Say SE07ASheoShout03 SESheogorathRef.Sayto SEThadonRef SE07ASheoShout03 1 Set ThadonMad to 3 elseif ( ThadonMad == 3 ) && ( ThadonMadTalkLength <= -6.5 ) Set SE07A.ThadonMove to 5 Set ThadonMad to 4 endif endif if ( ThadonMad > 0 ) && ( ThadonMad < 4 ) Set ThadonMadTalkLength to ThadonMadTalkLength - GetSecondsPassed endif if ( GetStage SE07A >= 40 ) && ( SE07A.Convo != 12 ) && ( SE07A.ThadonMove == 5 ) startconversation SESheogorathRef SE07AThadonLeaves Set SE07A.ThadonMove to 6 endif ;This kicks off end part of SE07B if ( Player.GetDistance SEThadonRef < 500 ) if ( SE07B.OffScreenKill == 0 ) if ( GetStage SE07B >= 30 ) if ( SE07B.Serves == 2 ) Set CleanUp to 0 SetStage SE07B 35 endif endif endif endif ;Thadon's Death Speech if ( Speech == 1 ) if ( ThadonTalk == 0 ) && ( ThadonTalkTimer == 0 ) Set ThadonTalkTimer to SEThadonRef.Say SE07BThadonDeathSpeech01 SEGundlarRef.Look SEThadonRef SEWideEyeRef.Look SEThadonRef SEThadonRef.Say SE07BThadonDeathSpeech01 1 Set ThadonTalk to 2 elseif ( ThadonTalk == 2 ) && ( ThadonTalkTimer <= 0 ) Set ThadonTalkTimer to SEThadonRef.Say SE07BThadonDeathSpeech02 Pickidle SEThadonRef.Say SE07BThadonDeathSpeech02 1 Set ThadonTalk to 3 elseif ( ThadonTalk == 3 ) && ( ThadonTalkTimer <= 0 ) Set ThadonTalkTimer to SEThadonRef.Say SE07BThadonDeathSpeech03 SEThadonRef.Say SE07BThadonDeathSpeech03 1 Set ThadonTalk to 4 elseif ( ThadonTalk == 4 ) && ( ThadonTalkTimer <= 0 ) Set ThadonTalkTimer to SEThadonRef.Say SE07BThadonDeathSpeech04 Pickidle SEThadonRef.Say SE07BThadonDeathSpeech04 1 Set ThadonTalk to 5 elseif ( ThadonTalk == 5 ) && ( ThadonTalkTimer <= 0 ) Set ThadonTalkTimer to SEThadonRef.Say SE07BThadonDeathSpeech05 Pickidle SEThadonRef.Say SE07BThadonDeathSpeech05 1 Set ThadonTalk to 6 elseif ( ThadonTalk == 6 ) && ( ThadonTalkTimer <= 0 ) Pickidle SEGundlarRef.Evp SEWideEyeRef.Evp Set ThadonDeathTimer to 5 Set ThadonTalk to 7 endif endif if ( ThadonTalk > 0 ) && ( ThadonTalk < 7 ) Set ThadonTalkTimer to ThadonTalkTimer - GetSecondsPassed endif if ( ThadonTalk == 7 ) if ( ThadonDeathTimer > 0 ) Set ThadonDeathTimer to ThadonDeathTimer - GetSecondsPassed else Kill Set ThadonFinalDeathTimer to 3 Set ThadonTalk to 8 endif endif if ( ThadonTalk == 8 ) if ( ThadonFinalDeathTimer > 0 ) Set ThadonFinalDeathTimer to ThadonFinalDeathTimer - GetSecondsPassed else SetStage SE07B 40 Set ThadonTalk to 9 endif endif if SE12.TraitorTalk == 1 if getincell XPGloomstonePassage == 1 && GetDead == 0 if ThadonTalkTimer > 0 set ThadonTalkTimer to ThadonTalkTimer - getSecondsPassed else ; taunt player if IsInCombat == 1 ; turn off taunts when he enters combat set SE12.TraitorTalk to 2 setav aggression 50 endif ; taunt player set ThadonTalkTimer to sayto player SE12TraitorTaunts 1 set ThadonTalkTimer to ThadonTalkTimer + 1 endif endif endif end begin OnPackageEnd SE07AExitsSacellum if ( GetStage SE07A >= 40 ) SEThadonRef.Disable SE07SaintEnd01Ref.Disable SE07SaintEnd02Ref.Disable EnablePlayerControls SetStage SE07A 45 endif end
963SEThroneScriptscn SEThroneScript Begin OnActivate If ( IsActionRef Player == 1 ) && ( GetStageDone SE12 200 == 0 ) MessageBox "Only Sheogorath may sit on His throne." else Activate endif End
964SETilseArelethSCRIPTscn SETilseArelethSCRIPT begin OnDeath SETombstoneTilseArelethREF.enable end
965SEToveTheUnrestfulSCRIPTscn SEToveTheUnrestfulSCRIPT begin OnDeath SETombstoneToveTheUnrestfulREF.enable If GetStage SE42 == 10 SetStage SE42 210 Else StopQuest SE42 EndIf end
966SEUlfriSCRIPTscn SEUlfriSCRIPT short hatePlayer float deathTimer ; used to time suicide begin OnDeath set SE06.DeadSeducers to SE06.DeadSeducers + 1 setstage SE06 120 if SE06.DeadSeducers >= SE06.TotalSeducers && getstage SE06 < 150 setstage SE06 140 elseif getstage SE06 >= 150 ;commented out to allow time for Ulfri to die before journal pop. moved to flame script ;setstage SE06 175 endif end ; trigger suicide animation begin OnPackageEnd SE06CommanderToSuicide if getStage SE06 < 160 setstage SE06 160 set deathTimer to 2.8 evp endif end begin OnStartCombat if getstage SE06 >= 105 && hatePlayer == 0 if SE06.GSDeployment == 0 && SE06.DSDeployment == 1 ; make her hate player set hatePlayer to 1 moddisposition player -100 if getdetectionlevel player >= 3 sayTo player SE06ShoutBetrayal setfactionreaction SE06DarkSeducerFaction playerFaction -100 startcombat player endif endif endif end begin OnStartCombat player if hatePlayer == 1 sayTo player SE06ShoutBetrayal setfactionreaction SE06DarkSeducerFaction playerFaction -100 set hatePlayer to 2 endif end begin gamemode if getdead == 1 return endif if deathTimer > 0 set deathTimer to deathTimer - getSecondsPassed else if getStage SE06 == 160 setstage SE06 162 set deathTimer to 1 elseif getStage SE06 == 162 kill endif endif end
967SEUnaArminaSCRIPTscn SEUnaArminaSCRIPT short runTimer ; used for museum tour float timer ; ditto begin OnDeath SETombstoneUnaArminaREF.enable ; SE38 -- end quest if she dies setstage SE38 190 end begin OnPackageDone SE38PlaceItem1 SE38MuseumItem1REF.enable removeitem SE38Item1 1 set SE38.item1 to 3 end begin OnPackageDone SE38PlaceItem2 SE38MuseumItem2REF.enable removeitem SE38Item2 1 set SE38.item2 to 3 end begin OnPackageDone SE38PlaceItem3 SE38MuseumItem3REF.enable removeitem SE38Item3 1 set SE38.item3 to 3 end begin OnPackageDone SE38PlaceItem4 SE38MuseumItem4REF.enable removeitem SE38Item4 1 set SE38.item4 to 3 end begin OnPackageDone SE38PlaceItem5 SE38MuseumItem5REF.enable removeitem SE38Item5 1 set SE38.item5 to 3 end begin OnPackageDone SE38PlaceItem6 SE38MuseumItem6REF.enable removeitem SE38Item6 1 set SE38.item6 to 3 end begin OnPackageDone SE38PlaceItem7 SE38MuseumItem7REF.enable removeitem SE38Item7 1 set SE38.item7 to 3 end begin OnPackageDone SE38PlaceItem8 SE38MuseumItem8REF.enable removeitem SE38Item8 1 set SE38.item8 to 3 end begin OnPackageDone SE38PlaceItem9 SE38MuseumItem9REF.enable removeitem SE38Item9 1 set SE38.item9 to 3 end begin OnPackageDone SE38PlaceItem10 SE38MuseumItem10REF.enable removeitem SE38Item10 1 set SE38.item10 to 3 end begin OnPackageDone SE38PlaceItem11 SE38MuseumItem11REF.enable removeitem SE38Item11 1 set SE38.item11 to 3 end begin OnPackageDone SE38PlaceItem12 SE38MuseumItem12REF.enable removeitem SE38Item12 1 set SE38.item12 to 3 end begin OnPackageDone SE38PlaceItemA SE38MuseumItemAREF.enable removeitem SE38ItemA 1 set SE38.itemA to 3 end begin OnPackageDone SE38PlaceItemB SE38MuseumItemBREF.enable removeitem SE38ItemB 1 set SE38.itemB to 3 end begin OnPackageDone SE38PlaceItemC SE44WaterRingREF.enable removeitem SE44WaterRing 1 set SE38.itemC to 3 end ; ************************ ; tour packages ; ************************ begin OnPackageDone SE38TourItem1 if runTimer == 0 set timer to sayTo player SE38TalkItem1 set runTimer to 1 endif end begin OnPackageDone SE38TourItem2 if runTimer == 0 set timer to sayTo player SE38TalkItem2 set runTimer to 1 endif end begin OnPackageDone SE38TourItem3 if runTimer == 0 set timer to sayTo player SE38TalkItem3 set runTimer to 1 endif end begin OnPackageDone SE38TourItem4 if runTimer == 0 set timer to sayTo player SE38TalkItem4 set runTimer to 1 endif end begin OnPackageDone SE38TourItem5 if runTimer == 0 set timer to sayTo player SE38TalkItem5 set runTimer to 1 endif end begin OnPackageDone SE38TourItem6 if runTimer == 0 set timer to sayTo player SE38TalkItem6 set runTimer to 1 endif end begin OnPackageDone SE38TourItem7 if runTimer == 0 set timer to sayTo player SE38TalkItem7 set runTimer to 1 endif end begin OnPackageDone SE38TourItem8 if runTimer == 0 set timer to sayTo player SE38TalkItem8 set runTimer to 1 endif end begin OnPackageDone SE38TourItem9 if runTimer == 0 set timer to sayTo player SE38TalkItem9 set runTimer to 1 endif end begin OnPackageDone SE38TourItem10 if runTimer == 0 set timer to sayTo player SE38TalkItem10 set runTimer to 1 endif end begin OnPackageDone SE38TourItem11 if runTimer == 0 set timer to sayTo player SE38TalkItem11 set runTimer to 1 endif end begin OnPackageDone SE38TourItem12 if runTimer == 0 set timer to sayTo player SE38TalkItem12 set runTimer to 1 endif end begin OnPackageDone SE38TourItemA if runTimer == 0 set timer to sayTo player SE38TalkItemA set runTimer to 1 endif end begin OnPackageDone SE38TourItemB if runTimer == 0 set timer to sayTo player SE38TalkItemB set runTimer to 1 endif end begin OnPackageDone SE38TourItemC if runTimer == 0 set timer to sayTo player SE38TalkItemC set runTimer to 1 endif end begin OnPackageDone SE38TourDone if runTimer == 0 set timer to sayTo player SE38TalkItemDone set runTimer to 1 endif end ; ***************** ; Give tour to Ushnar ; **************** begin OnPackageDone SEUnaArminaOfferTourToUshnar set SE38.giveTour to 1 set runTimer to 0 SEUshnarGroShadborgobREF.evp end begin gamemode if runTimer > 0 if timer > 0 set timer to timer - GetSecondsPassed elseif SE38.giveTour > 0 if getInSameCell player == 0 set SE38.giveTour to 0 else set SE38.giveTour to SE38.giveTour + 1 if SE38.giveTour == 4 if getstage SE38 >= 20 set SE38.giveTour to 11 else set SE38.giveTour to 23 endif endif endif set runTimer to 0 endif endif end Begin OnActivate if SEHerdirRef.TargetRef == SEUnaArminaRef if IsActionRef Player == 1 return endif else Activate endif End
968SEUshnarGraShadborgobSCRIPTscn SEUshnarGraShadborgobSCRIPT begin OnDeath SETombstoneUshnarGraShadborgobREF.enable StopQuest SE43 end Begin OnActivate if SEHerdirRef.TargetRef == SEUshnarGroShadborgobRef if IsActionRef Player == 1 return endif else Activate endif End Begin OnPackageStart SEUshnarFightAfterSE05Mon20x2 AddItem WeapClub 1 Set SECrime.RooftopFighting to 1 If SECutterRef.GetIsCurrentPackage SECutterFightAfterSE05Mon20x2 == 0 SECutterRef.AddScriptPackage SECutterFightAfterSE05Mon20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SEUshnarFightAfterSE05Mon20x2 RemoveItem WeapClub 1 Set SECrime.RooftopFighting to 0 End Begin OnPackageStart SEUshnarFightAfterSE05Fri20x2 AddItem WeapClub 1 Set SECrime.RooftopFighting to 1 If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightAfterSE05Fri20x2 == 0 SECaldanaMonriusRef.AddScriptPackage SECaldanaFightAfterSE05Fri20x2 ; make sure partner gets up at same time EndIf End Begin OnPackageChange SEUshnarFightAfterSE05Fri20x2 RemoveItem WeapClub 1 Set SECrime.RooftopFighting to 0 End
969SewerSloughGate01SCRIPTscn SewerSloughGate01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short activated short open short next short busy float timer ref mySelf ref myParent begin onActivate if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message " This gate is opened remotely." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 else playgroup backward 0 set open to 0 endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
970SewerVerticalGate01SCRIPTscn SewerVerticalGate01SCRIPT ; activated by linked child ; activates optionally linked parent after 1 sec delay short open short next short busy float timer ref mySelf ref myParent begin onLoad ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints end begin onActivate if isActionRef player == 1 if open == 0 message " This gate is opened remotely." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 0 set open to 0 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
971SewerVerticalGateSEALED01SCRIPTscn SewerVerticalGateSEALED01SCRIPT begin onActivate if isActionRef player == 1 message " This gate is sealed." endif end
972SewerWheel01SCRIPTscn SewerWheel01SCRIPT ; activates parent after a 2 sec delay short busy ref mySelf ref myParent short open short activated float timer begin onActivate if busy == 0 if open == 0 playgroup forward 1 set open to 1 set activated to 1 set timer to 2 set busy to 1 else playgroup backward 1 set open to 0 set activated to 1 set timer to 2 set busy to 1 endif endif end begin gameMode if activated == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
973SEWideEyeScriptscn SEWideEyeScript short AlarmOn short DoOnce short Door short UseDoor float StageTimer float DoorTimer begin OnDeath SETombstoneWideEyeRef.Enable end begin gamemode ;This block deals with a delay, then activation of the secret door if ( Door == 0 ) if ( GetStage SE07B == 18 ) Set DoorTimer to 3 Set Door to 1 endif endif if ( Door == 1 ) if ( UseDoor == 0 ) if ( DoorTimer > 0 ) Set DoorTimer to ( DoorTimer - GetSecondsPassed ) else Set UseDoor to 1 Set Door to 2 endif endif endif if ( DoOnce == 0 ) if ( UseDoor == 1 ) SE07ManiaSecretDoorRef.Activate SENSPalaceNorthMarker 1 Set StageTimer to 5 Set DoOnce to 1 endif endif if ( DoOnce == 1 ) if ( StageTimer > 0 ) Set StageTimer to ( StageTimer - GetSecondsPassed ) else SetStage SE07B 20 Evp Set DoOnce to 2 endif endif end begin OnPackageEnd SE07BWEGreenmoteSiloTravel if ( SE07B.WEPatrol == 0 ) Set SE07B.WEPatrol to 1 endif end
974SEXiditteArbiterButtonSCRIPTscn SEXiditteArbiterButtonSCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif if getActionRef == SEXiditteArbiterREF SEXiditteArbiterREF.setav aggression 100 SEXiditteArbiterREF.removeScriptPackage SEXiditteArbiterTrapPKG set timer to 3 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
975SEXiditteArbiterTrapSCRIPTscn SEXiditteArbiterTrapSCRIPT short doOnce begin onTrigger player if doOnce == 0 SEXiditteArbiterREF.stopcombat player SEXiditteArbiterREF.setav aggression 0 SEXiditteArbiterREF.addScriptPackage SEXiditteArbiterTrapPKG SEXiditteArbiterREF.evp set doOnce to 1 endif end
976SEXiditteArbiterTrapSCRIPT02scn SEXiditteArbiterTrapSCRIPT02 short doOnce begin onTrigger player if doOnce == 0 SEXiditteArbiterREF.stopcombat player SEXiditteArbiterREF.setav aggression 100 SEXiditteArbiterREF.removeScriptPackage SEXiditteArbiterTrapPKG SEXiditteArbiterREF.evp set doOnce to 1 endif end
977SEXidPuzButton1scn SEXidPuzButton1 ; rotates corresponding Statue ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short busy short state ; state 0 = base rotation == 135 ; state 1 = goal rotation == 90 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player if busy == 0 if state == 0 set busy to 1 playgroup forward 1 ; depress button SEXedPuzDust1.activate player 1 SEXidPuzGrum1.playsound3d DRSStoneOpen elseif state == 1 set busy to 1 playgroup backward 0 ; withdraw button SEXedPuzDust1.activate SEXidPuzGrum1.playsound3d DRSStoneOpen endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if busy == 1 if state == 0 if (SEXedPuzStatue1.getAngle z) > 90 SEXedPuzStatue1.rotate z, -15 elseif (SEXedPuzStatue1.getAngle z) <= 90 set busy to 0 set state to 1 endif elseif state == 1 if (SEXedPuzStatue1.getAngle z) < 135 SEXedPuzStatue1.rotate z, 15 elseif (SEXedPuzStatue1.getAngle z) >= 135 set busy to 0 set state to 0 endif endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onReset reset3DState set state to 0 set busy to 0 end
978SEXidPuzButton2scn SEXidPuzButton2 ; rotates corresponding Statue ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short busy short state ; state 0 = base rotation == 180 ; state 1 = goal rotation == 270 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player if busy == 0 if state == 0 set busy to 1 playgroup forward 1 ; depress button SEXedPuzDust2.activate player 1 SEXidPuzGrum2b.playsound3d DRSStoneOpen elseif state == 1 set busy to 1 playgroup backward 0 ; withdraw button SEXedPuzDust2.activate player 1 SEXidPuzGrum2b.playsound3d DRSStoneOpen endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if busy == 1 if state == 0 if (SEXedPuzStatue2.getAngle z) < 270 SEXedPuzStatue2.rotate z, 30 elseif (SEXedPuzStatue2.getAngle z) >= 270 set busy to 0 set state to 1 endif elseif state == 1 if (SEXedPuzStatue2.getAngle z) > 180 SEXedPuzStatue2.rotate z, -30 elseif (SEXedPuzStatue2.getAngle z) <= 180 set busy to 0 set state to 0 endif endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onReset reset3DState set state to 0 set busy to 0 end
979SEXidPuzButton3scn SEXidPuzButton3 ; rotates corresponding Statue ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short busy short state ; state 0 = base rotation == 135 ; state 1 = goal rotation == 180 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player if busy == 0 if state == 0 set busy to 1 playgroup forward 1 ; depress button SEXedPuzDust3.activate player 1 SEXidPuzGrum3.playsound3d DRSStoneOpen elseif state == 1 set busy to 1 playgroup backward 0 ; withdraw button SEXedPuzDust3.activate player 1 SEXidPuzGrum3.playsound3d DRSStoneOpen endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if busy == 1 if state == 0 if (SEXedPuzStatue3.getAngle z) < 180 SEXedPuzStatue3.rotate z, 15 elseif (SEXedPuzStatue3.getAngle z) >= 180 set busy to 0 set state to 1 endif elseif state == 1 if (SEXedPuzStatue3.getAngle z) > 135 SEXedPuzStatue3.rotate z, -15 elseif (SEXedPuzStatue3.getAngle z) <= 135 set busy to 0 set state to 0 endif endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onReset reset3DState set state to 0 set busy to 0 end
980SEXidPuzButton4scn SEXidPuzButton4 ; rotates corresponding Statue ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short busy short state ; state 0 = base rotation == 135 ; state 1 = goal rotation == 180 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player if busy == 0 if state == 0 set busy to 1 playgroup forward 1 ; depress button SEXedPuzDust4.activate player 1 SEXidPuzGrum4.playsound3d DRSStoneOpen elseif state == 1 set busy to 1 playgroup backward 0 ; withdraw button SEXedPuzDust4.activate player 1 SEXidPuzGrum4.playsound3d DRSStoneOpen endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if busy == 1 if state == 0 if (SEXedPuzStatue4.getAngle z) < 180 SEXedPuzStatue4.rotate z, 15 elseif (SEXedPuzStatue4.getAngle z) >= 180 set busy to 0 set state to 1 endif elseif state == 1 if (SEXedPuzStatue4.getAngle z) > 135 SEXedPuzStatue4.rotate z, -15 elseif (SEXedPuzStatue4.getAngle z) <= 135 set busy to 0 set state to 0 endif endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onReset reset3DState set state to 0 set busy to 0 end
981SEXidPuzButtonSCRIPTscn SEXidPuzButtonSCRIPT ; attempting a generic script to handle all buttons ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; short busy short init float degCurr float degGoal ref myParent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set myParent to getParentRef end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player if busy == 0 set busy to 1 playgroup forward 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if busy == 1 if init == 0 set degCurr to (myParent.getAngle z) set degGoal to (degCurr + 45) if degGoal > 360 set degGoal to (360 - (360 + degGoal)) endif set init to 1 endif if (myParent.getAngle z) >= (degGoal - 5) && (myParent.getAngle z) <= (degGoal + 5) set init to 0 set busy to 0 playgroup backward 0 myParent.setAngle z degGoal else myParent.rotate z 15 endif endif end
982SEXidPuzHungerSCRIPTscn SEXidPuzHungerSCRIPT short busy short active short PuzStatus short Cast0Pass short Cast1Pass short Cast2Pass short Cast3Pass short Cast4Pass short Cast5Pass short XidPuzFlow1 short XidPuzFlow2 short XidPuzFlow3 short XidPuzFlow4 float timer ref LvlSpell ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad if player.GetLevel <= 5 ;Standard Leveled spell casting, tops out at lvl 21+ set LvlSpell to TRAPFireballArea01 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set LvlSpell to TRAPFireballArea02 elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) set LvlSpell to TRAPFireballArea03 elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) set LvlSpell to TRAPFireballArea04 elseif player.GetLevel >= 21 set LvlSpell to TRAPFireballArea05 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate player if busy == 0 set active to 1 set timer to 6 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode If active == 1 if Cast1Pass != 1 ; this block checks the statue orientations to establish the flow of the circuit if (SEXedPuzStatue1.getAngle z) >= 130 && (SEXedPuzStatue1.getAngle z) <= 140 set XidPuzFlow1 to 1 else set XidPuzFlow1 to 0 endif endif if Cast2Pass != 1 if (SEXedPuzStatue2.getAngle z) >=265 && (SEXedPuzStatue2.getAngle z) <= 275 set XidPuzFlow2 to 1 else set XidPuzFlow2 to 0 endif endif if Cast3Pass != 1 if (SEXedPuzStatue3.getAngle z) >= 130 && (SEXedPuzStatue3.getAngle z) <= 140 set XidPuzFlow3 to 1 else set XidPuzFlow3 to 0 endif endif if Cast4Pass != 1 if (SEXedPuzStatue4.getAngle z) >= 175 && (SEXedPuzStatue4.getAngle z) <= 185 set XidPuzFlow4 to 1 else set XidPuzFlow4 to 0 endif endif if Cast0Pass != 1 ; this block handles the actual casting cast LvlSpell SEXidHungerOrigin set Cast0Pass to 1 endif if XidPuzFlow1 == 1 && timer <= 5 && Cast1Pass != 1 && Cast0Pass == 1 SEXidPuzGrum1.cast LvlSpell SEXidPuzGrum2b SEXedPuzStatue1.pms effectShockDamage set Cast1Pass to 1 endif if XidPuzFlow2 == 1 && timer <= 4 && Cast2Pass != 1 && Cast1Pass == 1 SEXidPuzGrum2b.cast LvlSpell SEXidPuzGrum3 SEXedPuzStatue1.sms effectShockDamage SEXedPuzStatue2.pms effectShockDamage set Cast2Pass to 1 endif if XidPuzFlow3 == 1 && timer <= 3 && Cast3Pass != 1 && Cast2Pass == 1 SEXidPuzGrum3.cast LvlSpell SEXidPuzGrum4 SEXedPuzStatue2.sms effectShockDamage SEXedPuzStatue3.pms effectShockDamage set Cast3Pass to 1 endif if XidPuzFlow4 == 1 && timer <= 2 && Cast4Pass != 1 && Cast3Pass == 1 SEXidPuzGrum4.cast LvlSpell SEXidPuzGrum5 SEXedPuzStatue3.sms effectShockDamage SEXedPuzStatue4.pms effectShockDamage set Cast4Pass to 1 endif if timer <= 0.5 && Cast5Pass != 1 && Cast4Pass == 1 && Cast4Pass == 1 SEXidPuzGrum5.cast LvlSpell SEXidPuzWall SEXedPuzStatue4.sms effectShockDamage SEXedPuzStatue5.pms effectShockDamage set Cast5Pass to 1 if PuzStatus != 1 SEXidPuzWall.playgroup forward 1 endif endif if timer > 0 set timer to (timer - getSecondsPassed) endif if timer <= 0 SEXedPuzStatue5.sms effectShockDamage set active to 0 set busy to 0 set Cast0Pass to 0 set Cast1Pass to 0 set Cast2Pass to 0 set Cast3Pass to 0 set Cast4Pass to 0 set Cast5Pass to 0 endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
983SEXirethard01DoorShort01SCRIPTscn SEXirethard01DoorShort01SCRIPT ; Sets alert status on Dark Seducers when activated short activated ref seducer01 ref seducer02 ref seducer03 float timer begin onActivate if isActionRef player == 1 activate endif if activated == 0 set seducer01 to Xirethard01Melee01REF set seducer02 to Xirethard01Archer01REF set seducer03 to Xirethard01Archer02REF ;seducer01.SetAlert 1 ;seducer02.SetAlert 1 ;seducer03.SetAlert 1 set timer to 4 set activated to 1 endif end begin gameMode if activated == 1 if timer > 0 set timer to timer - getSecondsPassed endif if timer <=2 seducer02.SetAlert 1 endif if timer <= 1 seducer01.SetAlert 1 endif if timer <=0 seducer03.SetAlert 1 set activated to 2 endif endif end
984SEZoeMaleneScriptscn SEZoeMaleneScript short Sadtalk ;For use with SEConversations linkage short Happytalk ;For use with SEConversations linkage
985SidewaysCave01Scriptscn SidewaysCave01Script begin onActivate if isActionRef player == 1 messagebox "[A hasty translation is scrawled here...] Meridia-child, Earth root power, sea wave like (earth like a flood?). People-out (escape? present tense? imperative?)." endif End
986SidewaysCave02Scriptscn SidewaysCave02Script begin onActivate if isActionRef player == 1 messagebox "[A hasty translation is scrawled here...] Fourth Star Hour (time?) Terror-of-the-Most-Terror of Meridia come (came?)." endif End
987SidewaysCave03Scriptscn SidewaysCave03Script begin onActivate if isActionRef player == 1 messagebox "[A hasty translation is scrawled here...] Stone-Settlers (builders?) not rest (wake?) Meridia. Terror of the Most Terror. Haste to safehome." endif End
988SidewaysCaveTablet01scn SidewaysCaveTablet01 begin onActivate if isActionRef player == 1 messagebox "[A hasty translation is scrawled here...] Stone-Settlers (builders?) not rest (wake?) Meridia. Terror of the Most Terror. Haste to safehome." endif End
989SidewaysCaveTablet03scn SidewaysCaveTablet03 begin onActivate if isActionRef player == 1 messagebox "[A hasty translation is scrawled here...] Meridia-child, Earth root power, sea wave like (earth like a flood?). People-out (escape? present tense? imperative?)." endif End
990SiegeCrawlerDeathSCRIPTscn SiegeCrawlerDeathSCRIPT begin OnActivate if IsActionRef player == 1 player.additem LL2SigilStones100 1 disable endif end
991SigilFireBallSCRIPTscn SigilFireBallSCRIPT ref mySelf ref myParent short init float chainTimer short next begin onActivate if next == 0 playgroup forward 0 mySelf.pms effectFireDamage set next to 1 set chainTimer to .2 endif end begin gameMode if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end
992SigilFireBoomSCRIPTscn SigilFireBoomSCRIPT short modestate ;short stage ref mySelf ref myParent short next float chainTimer short init begin onActivate if ( modestate == 0 ) playgroup forward 0 set modestate to 1 set next to 1 set chainTimer to 1 ;elseif [modestate == 1 ] ;playgroup specialIdle 0 ;set modestate to 0 ;set next to 0 ;set chainTimer to 0 endif end begin gameMode if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif ;Timer for linked parent - Commented out for testing if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end begin onReset reset3DState set next to 0 set modestate to 0 set init to 0 set chainTimer to 0 end
993SigilRingBoomNoResetSCRIPTscn SigilRingBoomNoResetSCRIPT ;Plays Grants Sigil Fireworks effects ;Closes the Gate based on a Timer -- NO RESET ;Sets trap damage if we want to push the player around near the Sigil ;Activates linked parent ;Last but not least, causes the player to glow with the fire shield shader briefly short modestate short stage ref mySelf ref myParent short init short next float gateTimer float chainTimer float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous short setup short onFire begin onActivate if isActionRef player == 0 if ( modestate == 0 ) playgroup forward 0 set modestate to 1 set next to 1 set chainTimer to 3 set gateTimer to 8.666 ;Timer for when to close this damn gate! endif endif end begin gameMode if setup == 0 && modestate == 1 set fTrapDamage to 0 set fTrapPushBack to 200 set fTrapMinVelocity to 0 set bTrapContinuous to 1 set setup to 1 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif if gateTimer > 0 set gateTimer to gateTimer - getSecondsPassed endif ;Close the gate now if gateTimer <= 0 && modestate == 1 ;message "Close GATE now!" CloseCurrentOblivionGate 1 endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end begin onReset reset3DState set next to 0 set modestate to 0 set stage to 0 set init to 0 set chainTimer to 0 end
994SigilRingBoomSCRIPTscn SigilRingBoomSCRIPT ;Plays Grants Sigil Fireworks effects ;Closes the Gate based on a Timer ;Sets trap damage if we want to push the player around near the Sigil ;Activates linked parent ;Last but not least, causes the player to glow with the fire shield shader briefly short modestate short stage ref mySelf ref myParent short init short next float gateTimer float chainTimer float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous short setup short onFire begin onActivate if isActionRef player == 0 if ( modestate == 0 ) playgroup forward 0 set modestate to 1 set next to 1 set chainTimer to 3 set gateTimer to 8.666 ;Timer for when to close this damn gate! ;elseif [ modestate == 1 ] ;playgroup Idle 0 ;set modestate to 0 ;set next to 0 ;set chainTimer to 0 endif endif end begin gameMode if setup == 0 && modestate == 1 set fTrapDamage to 0 set fTrapPushBack to 200 set fTrapMinVelocity to 0 set bTrapContinuous to 1 set setup to 1 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif if gateTimer > 0 set gateTimer to gateTimer - getSecondsPassed endif ;Close the gate now if gateTimer <= 0 && modestate == 1 CloseCurrentOblivionGate endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end begin onReset reset3DState set next to 0 set modestate to 0 set stage to 0 set init to 0 set chainTimer to 0 end
995SigilStoneCoreEffectSCRIPTscn SigilStoneCoreEffectSCRIPT ref mySelf short activated float timer begin gameMode if activated == 0 set mySelf to getSelf mySelf.pms effectDestruction set activated to 1 set timer to 3 endif if timer >=0 set timer to timer - getSecondspassed endif ;if timer <= 0 ;set activated to 0 ;endif end
996SigilStoneRandomSCRIPTscn SigilStoneRandomSCRIPT short onfire ref myParent ref mySelf short gotSigil begin onActivate if isActionRef player == 1 if onfire == 0 playgroup unequip 0 set onfire to 1 endif endif end begin gameMode if onfire == 1 set myParent to getParentRef set mySelf to getSelf if isAnimPlaying == 0 player.additem LL2SigilStones100 1 modpcfame 1 set gotSigil to 1 player.pms effectFireShield myParent.activate mySelf 1 set onfire to 0 setdestroyed 1 endif endif end begin onReset set onFire to 0 set gotSigil to 0 end
997SigilStoneScriptscn SigilStoneScript begin OnActivate if IsActionRef player == 1 player.additem LL2SigilStones100 1 modpcfame 1 CloseCurrentOblivionGate endif end
998SigilTESTFireBoomSCRIPTscn SigilTESTFireBoomSCRIPT short modestate ref mySelf ref myParent begin onActivate if ( modestate == 0 ) playgroup forward 0 set modestate to 1 else playgroup specialIdle 0 set modestate to 0 endif end
999SigilTopRoomOnFireSCRIPTscn SigilTopRoomOnFireSCRIPT ref mySelf ref myParent short next float chainTimer short init short onFire begin onActivate if isActionRef player == 0 if onFire == 0 mySelf.pms effectFireDragon ;Catching Walls on Fire - not Sure if I like this or not fw SigilWhiteOut ;Sets Weather to white out screan with fog set onFire to 1 endif endif end begin gameMode if init == 1 set mySelf to getSelf set myParent to getParentRef set init to 1 endif ;Timer for linked parent if chainTimer > 0 set chainTimer to chainTimer - getSecondsPassed endif ; daisy-chain activation if next == 1 && chainTimer <=0 set next to 0 myParent.activate mySelf 1 endif end begin onReset set mySelf to getSelf mySelf.sms effectFireDragon set next to 0 set chainTimer to 0 set init to 0 end
1000SkingradNQDScriptscn SkingradNQDScript short UgakVAR short MogVAR short ErinaVAR short GraklakVAR short ElseVAR short GunderVAR short FalanuVAR short AgneteVAR short TumindilVAR short MarieVAR short ValandrusVAR short JanusVAR short HalVAR short DionneVAR short ShumVAR short DanusVAR short AhmalzVAR short FadusVAR short ParwenVAR short AdrienneVAR short SulinusVAR short DrujaVAR short ViggeVAR short ErthorVAR short LucVAR short LazareVAR short ToutiusVAR short VandorallenVAR short SalmoVar short AmbroiseVAR short RemanVAR short UndenaVAR short UurasVAR short BernadetteVAR short ShameerVAR short DavideVAR short GastonVAR short GlarthirVAR short TamikaVAR
1001SKsecretCandle01SCRIPTscn SKsecretCandle01SCRIPT short busy short init ref target ref mySelf begin onActivate if init == 0 set target to getParentRef set mySelf to getSelf set init to 1 endif if busy == 0 && target.isAnimPlaying == 0 target.activate mySelf 1 playgroup forward 0 set busy to 1 endif If Player.GetInCell SkingradCastleDungeon == 1 AnvilPrisonDoorRef.Lock BravilPrisonDoorRef.Lock BrumaPrisonDoorRef.Lock CheydinhalPrisonDoorRef.Lock ChorrolPrisonDoorRef.Lock ICPrisonDoorRef.Lock LeyawiinPrisonDoorRef.Lock SkingradPrisonDoorRef.Lock EndIf end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
1002SpiddalCloudPlantSCRIPTscn SpiddalCloudPlantSCRIPT float Timer short activated short poisoned ref imPoisoned begin onTriggerActor if activated == 0 set imPoisoned to GetActionRef playgroup forward 1 set Timer to 30 set activated to 1 set poisoned to 1 endif if Timer <= 29 && poisoned == 1 cast TRAPSpiddalStick imPoisoned set poisoned to 2 endif end begin gameMode if activated == 1 if Timer > 0 set Timer to Timer - getSecondsPassed endif if Timer <= 0 set activated to 0 set poisoned to 0 endif endif end
1003sprigscriptscn sprigscript short rezvar float timer short getup Begin OnDeath if ( rezVar == 0 ) set rezVAR to 1 set getup to 1 elseif ( rezVar == 2 ) set rezVAR to 3 set getup to 1 endif End Begin GameMode if ( getup >= 1 ) set timer to ( timer + GetSecondsPassed ) endif if ( timer >= 4 ) if ( rezVar == 1 ) ;setAV health 140 ;setAV fatigue 220 PlayMagicEffectVisuals PARA SetScale 1.1 Resurrect 1 set rezVAR to 2 set getup to 0 set timer to 0 elseif ( rezVAR == 3 ) ;setAV health 140 ;setAV fatigue 220 PlayMagicEffectVisuals PARA SetScale 1.2 Resurrect 1 set rezVAR to 4 set getup to 0 set timer to 0 endif endif End
1004StatueDagonCrumble01SCRIPTscn StatueDagonCrumble01SCRIPT short activated float timer ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onLoad set mySelf to getSelf set myParent to getParentRef set fTrapDamage to 0 set fTrapPushBack to 500 set fTrapMinVelocity to 20 set bTrapContinuous to 0 end begin onActivate if isActionRef player == 0 && isActionRef mySelf == 0 && activated == 0 playgroup unequip 0 myParent.activate mySelf 1 set activated to 1 set timer to 7 set fTrapDamage to 20 endif end begin gameMode if activated == 1 && timer <= 0 set activated to 2 set fTrapDamage to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1005STTombOfRemanIIISCRIPTscn STTombOfRemanIIISCRIPT begin OnActivate if isactionref player == 1 messageBox "Here lies Reman III, last Emperor of the Cyrodiils, the scourge of the Dark Elves, who was cruelly slain by treachery, in the year 2920. He reigned forty-three years." endif end
1006STTombOfRemanIISCRIPTscn STTombOfRemanIISCRIPT begin OnActivate if isactionref player == 1 messageBox "Here lies Reman II of Cyrodiil, crowned Emperor of Tamriel in the year 2812. He fell in battle against the Dark Elves, in the fifty-seventh year of his age, after a reign of thirty-nine years and eight months wanting a day." endif end
1007STTombOfRemanISCRIPTscn STTombOfRemanISCRIPT begin OnActivate if isactionref player == 1 messageBox "Here lies Reman of Cyrodiil. He defeated the Akaviri Horde and brought peace to Tamriel. 2762." endif end
1008STTombUnreadableSCRIPTscn STTombUnreadableSCRIPT begin OnActivate if isactionref player == 1 messageBox "The inscription on this tomb is illegible." endif end
1009TestChappyFloorSmasher01SCRIPTscn TestChappyFloorSmasher01SCRIPT ; Self-activated, no trigger required short activated float timer float fTrapDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin GameMode if activated == 0 ; set up the damage values set fTrapDamage to 100 set fTrapPushBack to 1000 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set activated to 1 else trapUpdate endif if getDistance player < 200 && timer <= 0 playgroup forward 1 set timer to 10 endif if ( GetDistance FithragaerRef < 200 ) && ( timer <= 0 ) playgroup forward 1 set timer to 10 endif if timer > 0 set timer to timer - getSecondsPassed endif end
1010TestErikMagicSpawnOneCreaturescn TestErikMagicSpawnOneCreature begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe LL1MythicEnemy100, 1 endIf end
1011TestErikMagicSpawnOneDremorascn TestErikMagicSpawnOneDremora begin OnActivate TestErikMagicMarker.PlaceAtMe LL1Dremora100, 1 end
1012TestErikMagicSpawnOneMauraderscn TestErikMagicSpawnOneMaurader begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe MarauderBossMale1, 1 endIf end
1013TestErikMagicSpawnOneNecromancerscn TestErikMagicSpawnOneNecromancer begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe LL1Necromancer100, 1 endIf end
1014TestErikMagicSpawnOneUndeadscn TestErikMagicSpawnOneUndead begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe LL1UndeadLvl100, 1 endif end
1015TestErikMagicSpawnThreeCreaturesscn TestErikMagicSpawnThreeCreatures begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe LL1MythicEnemy100, 1 TestErikMagicMarker.PlaceAtMe LL1MythicEnemy100, 1, 105, 2 TestErikMagicMarker.PlaceAtMe LL1MythicEnemy100, 1, 105, 3 endIf end
1016TestErikMagicSpawnThreeMaraudersscn TestErikMagicSpawnThreeMarauders begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe MarauderMeleeMale2, 1 TestErikMagicMarker.PlaceAtMe MarauderMeleeMale2, 1, 105, 2 TestErikMagicMarker.PlaceAtMe MarauderMeleeMale2, 1, 105, 3 endif end
1017TestErikMagicSpawnThreeNecromancersscn TestErikMagicSpawnThreeNecromancers begin OnActivate if isActionRef player == 1 TestErikMagicMarker.PlaceAtMe LL1Necromancer100, 1 TestErikMagicMarker.PlaceAtMe LL1Necromancer100, 1, 105, 2 TestErikMagicMarker.PlaceAtMe LL1Necromancer100, 1, 105, 3 endIf end
1018TESTFlamesOfAgnonscn TESTFlamesOfAgnon short FlameOn ref mySelf ref myParent begin onActivate if FlameOn == 0 playgroup equip 0 set FlameOn to 1 elseif Flameon == 2 playgroup specialIdle 0 set FlameOn to 0 endif end begin gameMode if FlameOn == 1 && IsAnimPlaying == 0 playgroup forward 0 set FlameOn to 2 endif end
1019testtestscn testtest begin gamemode Message "Dummy" end
1020TestTomb2Scriptscn TestTomb2Script ref target begin OnActivate if target > 0 target.disable endif end
1021TG11ARTrapWallCorner01SCRIPTscn TG11ARTrapWallCorner01SCRIPT short activated short open short next ref mySelf ref myParent begin onActivate ; prevents self re-activation if there's no parent linked if activated == 0 set mySelf to getSelf set myParent to getParentRef set activated to 1 endif ; if player clicks on me give him a clue if isActionRef player == 1 if open == 1 message "This wall is lowered remotely." endif elseif isActionRef mySelf == 0 if open == 0 playgroup forward 0 triggerHitShader 2 set open to 1 else playgroup backward 1 set open to 0 endif set next to 1 endif end begin gameMode ; daisy-chain activation if next == 1 myParent.activate mySelf 1 if open == 1 set next to 2 else set next to 0 endif endif If GetStage TG11Heist == 70 If GetDistance Player <= 512 SetStage TG11Heist 71 EndIf EndIf end
1022TG11cTrigPressurePlate01SCRIPTscn TG11cTrigPressurePlate01SCRIPT ; Activates trap linked as Parent Short Activated Begin GameMode If Activated == 0 If GetDistance Player < 64 PlayGroup Forward 1 TG11ColController.disable TG11cHiddenStairsREF.Playgroup Forward 1 Set Activated to 1 Endif Endif If Activated == 1 If GetStage TG11Heist <73 If GetDistance Player > 256 PlayGroup Forward 1 TG11cHiddenStairsREF.Playgroup Unequip 1 Set Activated to 0 EndIf Endif Endif If GetStage TG11Heist < 72 If GetDistance Player < 64 SetStage TG11Heist 72 EndIF EndIF End
1023TG11LibraryDoorSwitchSCRIPTscn TG11LibraryDoorSwitchSCRIPT short next short busy short opened short MothTalk float timer ref myParent ref mySelf begin onActivate if busy == 0 set next to 1 if ( opened == 0 ) playgroup forward 0 set opened to 1 setstage TG11Heist 80 if MothTalk == 0 set MothTalk to 1 endif else playgroup backward 0 set opened to 0 endif set timer to 0.5 set busy to 1 endif end begin gameMode if ( timer <= 0 ) && next == 1 set myParent to getParentRef set mySelf to getSelf myParent.activate mySelf 1 set next to 0 endif if busy == 1 && isAnimPlaying == 0 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
1024TG11LibraryNewDoorSCRIPTscn TG11LibraryNewDoorSCRIPT short init short open short next short busy float timer ref mySelf ref myParent begin onActivate if isActionRef player == 1 if open == 0 message " This door is opened elsewhere." endif elseif isActionRef mySelf == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 set TG11Heist.LibraryDoorClosed to 0 enableLinkedPathPoints else playgroup backward 0 set open to 0 set TG11Heist.LibraryDoorClosed to 1 disableLinkedPathPoints endif set next to 1 set timer to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 endif if timer > 0 set timer to timer - getSecondsPassed endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
1025TG11LibraryTrigZoneSCRIPTscn TG11LibraryTrigZoneSCRIPT ; Closes the door behind you and resets lever in hallway short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && TG11Heist.LibraryDoorClosed == 0 set triggered to 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 Set TG11Heist.LibraryDoorClosed to 1 SetCellPublicFlag ICPalaceLibrary 1 endif end
1026TrapHungerStatue05SCRIPTscn TrapHungerStatue05SCRIPT ; when activated will shoot custom Damage Health spell at player ; can daisy-chain to another activator ref mySelf ref myParent short next begin onActivate if isActionRef player == 0 && timer <= 0 set next to 1 if player.GetLevel <= 5 cast TRAPDamageHealthTarget01 player elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) cast TRAPDamageHealthTarget02 player elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) cast TRAPDamageHealthTarget03 player elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget04 player elseif player.GetLevel >= 21 cast TRAPDamageHealthTarget05 player endif endif end begin gameMode if next == 1 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif end
1027TrapRottenPlank01SCRIPTscn TrapRottenPlank01SCRIPT short doonce float timer begin gameMode if doonce == 0 if ( GetDistance Player < 120) playgroup Forward, 1 set doonce to 1 set timer to 1.5 endif endif if doonce == 1 && timer <= 0 if ( GetDistance Player < 60) playgroup Unequip, 1 set doonce to 2 endif endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set doonce to 0 set timer to 0 end
1028TRAPSpellTargetActivateOnceSCRIPTscn TRAPSpellTargetActivateOnceSCRIPT float timer short triggered short init ref mySelf ref myParent begin onTriggerMob if triggered == 0 && isActionRef player == 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set triggered to 1 endif end
1029TrapTriggerHunger03SCRIPTscn TrapTriggerHunger03SCRIPT ; Casts spell from a parent-linked X marker to the player when triggered ; Resets after 5 seconds short triggered ref target float timer begin onTrigger player if triggered == 0 set target to getParentRef target.cast StandardDamageHealthTarget2Apprentice player set triggered to 1 set timer to 5 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end begin onReset set triggered to 0 end
1030TrigZoneACTOR01SCRIPTscn TrigZoneACTOR01SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end begin onReset set triggered to 0 end
1031TrigZoneACTORRESET01SCRIPTscn TrigZoneACTORRESET01SCRIPT ; Activates linked Parent ; Can be triggered again after a 10 second delay short triggered ref target ref mySelf float timer begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 10 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1032TrigZoneACTORRESET02SCRIPTscn TrigZoneACTORRESET02SCRIPT ; Activates linked Parent ; Can be triggered again after a 5 second delay short triggered ref target ref mySelf float timer begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 5 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1033TrigZoneACTORRESET03SCRIPTscn TrigZoneACTORRESET03SCRIPT ; Activates linked Parent ; Can be triggered again after a 2 second delay short triggered ref target ref mySelf float timer begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 2 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1034TrigZoneACTORTimer25SCRIPTscn TrigZoneACTORTimer25SCRIPT ; Activates linked Parent ; Can be triggered again after a 25 second delay short triggered ref target ref mySelf float timer begin onTriggerActor if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 25 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1035TrigZoneANY01reset2SCRIPTscn TrigZoneANY01reset2SCRIPT ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) ; 2 second reset timer short triggered ref target ref mySelf float timer begin onTrigger if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 2 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1036TrigZoneANY01SCRIPTscn TrigZoneANY01SCRIPT ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end begin onReset set triggered to 0 end
1037TrigZoneANYreset02SCRIPTscn TrigZoneANYreset02SCRIPT ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) ; 5 second reset timer short triggered ref target ref mySelf float timer begin onTrigger if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 5 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1038TrigZoneANYresetSwitchFASTSCRIPTscn TrigZoneANYresetSwitchFASTSCRIPT ; Activates linked Parent object, resets after 1 second ; and can be triggered by ANYTHING ; Originally scripted for machine-gun Scalon statues in XPCylarne02 ; Can be turned off by linked switch & is ON by default short triggered short turnedOff ref target ref mySelf float timer begin onActivate if turnedOff == 0 set turnedOff to 1 else set turnedOff to 0 endif end begin onTrigger if triggered == 0 && turnedOff == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 1 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1039TrigZoneAutoSaveSCRIPTscn TrigZoneAutoSaveSCRIPT begin onLoad autosave end
1040TrigZoneCloseCurrentOblivionKvatchNoResetSCRIPTscn TrigZoneCloseCurrentOblivionKvatchNoResetSCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneMS48.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate 1 set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1041TrigZoneCloseCurrentOblivionMQ10SCRIPTscn TrigZoneCloseCurrentOblivionMQ10SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if MQ10Sigil.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1042TrigZoneCloseCurrentOblivionMQ14SCRIPTscn TrigZoneCloseCurrentOblivionMQ14SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if MQ14SigilStone.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1043TrigZoneCloseCurrentOblivionMS13NoResetSCRIPTscn TrigZoneCloseCurrentOblivionMS13NoResetSCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if MS13SigilStone01Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate 1 set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1044TrigZoneCloseCurrentOblivionRD002SCRIPTscn TrigZoneCloseCurrentOblivionRD002SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRD002.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1045TrigZoneCloseCurrentOblivionRD004SCRIPTscn TrigZoneCloseCurrentOblivionRD004SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRD004Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1046TrigZoneCloseCurrentOblivionRdCitadel01SCRIPTscn TrigZoneCloseCurrentOblivionRdCitadel01SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRDCitadel01Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1047TrigZoneCloseCurrentOblivionRdCitadel02SCRIPTscn TrigZoneCloseCurrentOblivionRdCitadel02SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRDCitadel02Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1048TrigZoneCloseCurrentOblivionRdCitadel03SCRIPTscn TrigZoneCloseCurrentOblivionRdCitadel03SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRDCitadel03Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1049TrigZoneCloseCurrentOblivionRdCitadel04SCRIPTscn TrigZoneCloseCurrentOblivionRdCitadel04SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRDCitadel04Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1050TrigZoneCloseCurrentOblivionRdCitadel05SCRIPTscn TrigZoneCloseCurrentOblivionRdCitadel05SCRIPT ; Activates linked Parent object, resets after 2 seconds ref myParent ref mySelf short init short next begin onActivate if isActionRef player == 0 myParent.activate mySelf 1 endif end begin onTrigger player if SigilStoneRDCitadel05Ref.gotSigil == 1 fw SigilWhiteOut ;Sets White Out Fog CloseCurrentOblivionGate set next to 1 endif end begin gameMode if init == 0 set myParent to getParentRef set mySelf to getSelf set init to 1 endif if next == 1 myParent.activate mySelf 1 endif end begin onReset set init to 0 set next to 0 end
1051TrigZoneDisPLAYER02SCRIPTscn TrigZoneDisPLAYER02SCRIPT ; Disables linked Parent object once (for getting rid of crap when the player reaches a specific point) short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef target.disable set triggered to 1 endif end begin onReset set triggered to 0 end
1052TrigZoneEvalParentPack01SCRIPTscn TrigZoneEvalParentPack01SCRIPT ; forces parent to evaluatepackage short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef target.evaluatePackage set triggered to 1 endif end begin onReset set triggered to 0 end
1053TrigZoneNotPLAYER01SCRIPTscn TrigZoneNotPLAYER01SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTriggerActor if triggered == 0 && getActionRef != player set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end begin onReset set triggered to 0 end
1054TrigZoneOblivionMQ03Gatesscn TrigZoneOblivionMQ03Gates ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionSwitchMq03Gates.GatesOpen == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
1055TrigZoneOblivionMQ14GateLeftscn TrigZoneOblivionMQ14GateLeft ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf short Aopen short Bopen begin onTrigger if triggered == 0 if OblivionSwithMQ14Right.GatesOpen == 1 && Aopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Aopen to 1 endif if OblivionSwithMQ14Left.GatesOpen == 1 && Bopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Bopen to 1 endif endif if Aopen == 1 && Bopen == 1 set triggered to 1 endif end begin onReset set triggered to 0 set Aopen to 0 set Bopen to 0 end
1056TrigZoneOblivionMQ14GateRightscn TrigZoneOblivionMQ14GateRight ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf short Aopen short Bopen begin onTrigger if triggered == 0 if OblivionSwithMQ14Right.GatesOpen == 1 && Aopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Aopen to 1 endif if OblivionSwithMQ14Left.GatesOpen == 1 && Bopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Bopen to 1 endif endif if Aopen == 1 && Bopen == 1 set triggered to 1 endif end begin onReset set triggered to 0 set Aopen to 0 set Bopen to 0 end
1057TrigZoneOblivionRD001Gatescn TrigZoneOblivionRD001Gate ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf short Aopen short Bopen begin onTrigger if triggered == 0 if OblivionSwithMQ14Right.GatesOpen == 1 && Aopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Aopen to 1 endif if OblivionSwithMQ14Left.GatesOpen == 1 && Bopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Bopen to 1 endif endif if Aopen == 1 && Bopen == 1 set triggered to 1 endif end begin onReset set triggered to 0 set Aopen to 0 set Bopen to 0 end
1058TrigZoneOblivionRD001Gatesscn TrigZoneOblivionRD001Gates ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf short Aopen short Bopen begin onTrigger if triggered == 0 if RD001Tower02Switch01.GatesOpen == 1 && Aopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Aopen to 1 endif if RD001Tower01Switch01.GatesOpen == 1 && Bopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set BOpen to 1 endif if Aopen ==1 && Bopen == 1 set triggered to 1 endif endif end begin onReset set Aopen to 0 set Bopen to 0 set triggered to 0 end
1059TrigZoneOblivionRD002Eruptionscn TrigZoneOblivionRD002Eruption ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionRD002Eruption.GatesOpen == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
1060TrigZoneOblivionRD002Landslidescn TrigZoneOblivionRD002Landslide ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionRD002Landslide.GatesOpen == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
1061TrigZoneOblivionRD002Tornadoscn TrigZoneOblivionRD002Tornado ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionRD002Tornado.GatesOpen == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
1062TrigZoneOblivionRD002Tsunamiscn TrigZoneOblivionRD002Tsunami ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionRD002Tsunami.GatesOpen == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
1063TrigZoneOblivionRD003Gatescn TrigZoneOblivionRD003Gate ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf short Aopen short Bopen begin onTrigger if triggered == 0 if OBRD003GateRightSwitch.GatesOpen == 1 && Aopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Aopen to 1 endif if OBRD003GateLeftSwitchB.GatesOpen == 1 && Bopen == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set Bopen to 1 endif endif if Aopen == 1 && Bopen == 1 set triggered to 1 endif end begin onReset set triggered to 0 set Aopen to 0 set Bopen to 0 end
1064TrigZoneOblivionRD00401SCRIPTscn TrigZoneOblivionRD00401SCRIPT ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionRD004TowerRightSwitch.bridgeExtend == 1 && OblivionRD004TowerLeftSwitch.bridgeExtend == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end
1065TrigZoneOblivionRD006Gatesscn TrigZoneOblivionRD006Gates ; Activates linked Parent object once ; Any object will activate this (arrows, havok objects) short triggered ref target ref mySelf begin onTrigger if triggered == 0 if OblivionGateSwitchRD006B.GatesOpen == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif endif end begin onReset set triggered to 0 end
1066TrigZonePLAYER01SCRIPTscn TrigZonePLAYER01SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 set triggered to 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 endif end begin onReset set triggered to 0 end
1067TrigZonePLAYER02SCRIPTscn TrigZonePLAYER02SCRIPT ; Enables linked Parent object once (for loading creatures & NPCs when the player reaches a specific point) short triggered ref target begin onTrigger player if triggered == 0 set triggered to 1 set target to getParentRef target.enable endif end begin onReset set triggered to 0 end
1068TrigZonePlayerDoonce01SCRIPTscn TrigZonePlayerDoonce01SCRIPT ; Activates linked Parent short triggered ref target ref mySelf begin onTrigger Player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end
1069TrigZonePlayerDoonce01BrumaSCRIPTscn TrigZonePlayerDoonce01_BrumaSCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end
1070TrigZonePlayerDoonce01DABoethiaSCRIPTscn TrigZonePlayerDoonce01_DABoethiaSCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end
1071TrigZonePlayerDoonce01DABoethiaSCRIPT01scn TrigZonePlayerDoonce01_DABoethiaSCRIPT01 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 1 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1072TrigZonePlayerDoonce01DABoethiaSCRIPT02scn TrigZonePlayerDoonce01_DABoethiaSCRIPT02 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 2 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 10 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1073TrigZonePlayerDoonce01DABoethiaSCRIPT03scn TrigZonePlayerDoonce01_DABoethiaSCRIPT03 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 3 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 9 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1074TrigZonePlayerDoonce01DABoethiaSCRIPT04scn TrigZonePlayerDoonce01_DABoethiaSCRIPT04 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 4 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 8 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1075TrigZonePlayerDoonce01DABoethiaSCRIPT05scn TrigZonePlayerDoonce01_DABoethiaSCRIPT05 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 5 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 7 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1076TrigZonePlayerDoonce01DABoethiaSCRIPT06scn TrigZonePlayerDoonce01_DABoethiaSCRIPT06 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 6 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 6 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1077TrigZonePlayerDoonce01DABoethiaSCRIPT07scn TrigZonePlayerDoonce01_DABoethiaSCRIPT07 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 7 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 5 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1078TrigZonePlayerDoonce01DABoethiaSCRIPT08scn TrigZonePlayerDoonce01_DABoethiaSCRIPT08 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 8 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 4 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 3 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1079TrigZonePlayerDoonce01DABoethiaSCRIPT09scn TrigZonePlayerDoonce01_DABoethiaSCRIPT09 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 9 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 if ( DABoethia.RaceVAR == 3 ) DABoethiaChosen02Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Breton..." DABoethiaEntranceMarker.say ChallengeBreton 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 4 ) DABoethiaChosen03Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Dark Elf..." DABoethiaEntranceMarker.say ChallengeDarkElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 5 ) DABoethiaChosen04Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the High Elf..." DABoethiaEntranceMarker.say ChallengeHighElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 6 ) DABoethiaChosen05Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Imperial..." DABoethiaEntranceMarker.say ChallengeImperial 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 7 ) DABoethiaChosen06Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Khajiit..." DABoethiaEntranceMarker.say ChallengeKhajiit 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 8 ) DABoethiaChosen07Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Nord..." DABoethiaEntranceMarker.say ChallengeNord 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 9 ) DABoethiaChosen08Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Orc..." DABoethiaEntranceMarker.say ChallengeOrc 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 10 ) DABoethiaChosen09Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Redguard..." DABoethiaEntranceMarker.say ChallengeRedguard 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 1 ) DABoethiaChosen10Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Wood Elf..." DABoethiaEntranceMarker.say ChallengeWoodElf 1 DABoethiaVoice 1 elseif ( DABoethia.RaceVAR == 2 ) DABoethiaChosen01Ref.AddScriptPackage DABoethiaFindPlayer ;messagebox "This way to the Argonian..." DABoethiaEntranceMarker.say ChallengeArgonian 1 DABoethiaVoice 1 endif set triggered to 1 endif end
1080TrigZonePlayerDoonce01DABoethiaSCRIPT10scn TrigZonePlayerDoonce01_DABoethiaSCRIPT10 ;DABoethia ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 && DABoethia.warriorVAR == 11 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 DABoethiaEntranceMarker.say Farewell 1 DABoethiaVoice 1 set triggered to 1 endif end
1081TrigZonePlayerDoonce01MS13SCRIPTscn TrigZonePlayerDoonce01_MS13SCRIPT ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if ( triggered == 0 ) && ( GetStage MS13 >= 60 ) set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 endif end
1082TrigZonePLAYEROBDoorLockedScript01scn TrigZonePLAYEROBDoorLockedScript01 ; Displays locked message. ; Activates linked Parent object once short triggered ref target ref mySelf begin onTrigger player if triggered == 0 message "The gates can not be opened from here." set triggered to 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 endif end
1083TrigZonePLAYERRESET01bSCRIPTscn TrigZonePLAYERRESET01bSCRIPT ; Activates linked Parent object, resets after 2 seconds short triggered ref target ref mySelf float timer begin onTrigger player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 2 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1084TrigZonePlayerRESET01SCRIPTscn TrigZonePlayerRESET01SCRIPT ; Activates linked Parent ; Can be triggered again after a 6 second delay short triggered ref target ref mySelf float timer begin onTrigger Player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 6 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1085TrigZonePlayerRESET04SCRIPTscn TrigZonePlayerRESET04SCRIPT ; Activates linked Parent ; Can be triggered again after a 60 second delay short triggered ref target ref mySelf float timer begin onTrigger player if triggered == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 60 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1086TrigZonePLAYERRESETSwitchSCRIPTscn TrigZonePLAYERRESETSwitchSCRIPT ; Activates linked Parent object, resets after 2 seconds ; Can be turned off by linked switch ; Trap is ON by default short triggered short turnedOff ref target ref mySelf float timer begin onActivate if turnedOff == 0 set turnedOff to 1 else set turnedOff to 0 endif end begin onTrigger player if triggered == 0 && turnedOff == 0 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 set triggered to 1 set timer to 2 endif end begin gameMode if triggered == 1 && timer <= 0 set triggered to 0 endif if timer >= 0 set timer to timer - getSecondsPassed endif end
1087TrigZonePLAYERwarp01SCRIPTscn TrigZonePLAYERwarp01SCRIPT ; warps player to DreamofMercyStart xmarker float timer short activated begin onTrigger player if activated == 0 set activated to 1 set timer to 1 TriggerHitShader player.moveto DreamofMercyStart endif end begin gamemode if activated == 1 && timer <= 0 set activated to 0 endif if timer > 0 set timer to timer - getsecondspassed endif end
1088TrigZoneSE08PasswallBattleSCRIPTscn TrigZoneSE08PasswallBattleSCRIPT short BattleBegin short DoOnce short Tick float Timer BEGIN OnTrigger Player ;Adds packages to Saints/Seducers to start them moving when player arrives. if ( GetStage SE08 == 10 ) If ( GetStageDone SE07A 200 == 1 ) SE08KiskellaUdicoRef.AddScriptPackage SE08AllyInitialBattleRunTo SE08DarkSeducer01Ref.AddScriptPackage SE08AllyInitialBattleRunTo SE08DarkSeducer02Ref.AddScriptPackage SE08AllyInitialBattleRunTo endif If ( GetStageDone SE07B 200 == 1 ) SE08AurigDeshaRef.AddScriptPackage SE08AllyInitialBattleRunTo SE08GoldenSaint01Ref.AddScriptPackage SE08AllyInitialBattleRunTo SE08GoldenSaint02Ref.AddScriptPackage SE08AllyInitialBattleRunTo endif Set BattleBegin to 1 endif END BEGIN GameMode ;Controls timing for the initial battle in Passwall if ( BattleBegin == 1 ) if ( DoOnce == 0 ) Set Timer to 8 Set DoOnce to -1 Set Tick to 1 endif Set Timer to ( Timer - GetSecondsPassed ) if ( Timer <= 8 ) && ( Tick == 1 ) Set Tick to 2 if ( GetStageDone SE07A 200 == 1 ) SE08KiskellaUdicoRef.evp endif if ( GetStageDone SE07B 200 == 1 ) SE08AurigDeshaRef.evp endif endif if ( Timer <= 6 ) && ( Tick == 2 ) Set Tick to 3 if ( GetStageDone SE07A 200 == 1 ) SE08KiskellaUdicoRef.Say SE08CommanderBattle01 Set Timer to SE08KiskellaUdicoRef.Say SE08CommanderBattle01 endif if ( GetStageDone SE07A 200 == 1 ) SE08AurigDeshaRef.Say SE08CommanderBattle01 Set Timer to SE08AurigDeshaRef.Say SE08CommanderBattle01 endif SE08PasswallInitialBattleKnightMarker01.PlaceAtMe SE08LL1KnightOfOrderInitial, 2 SE08PasswallInitialBattleKnightMarker02.PlaceAtMe SE08LL1KnightOfOrderInitial, 1 endif if ( Timer <= 1 ) && ( Tick == 3 ) Set Tick to 4 endif if (Timer <= .5 ) && ( Tick == 4 ) SetStage SE08 20 Set Tick to -1 Set BattleBegin to -1 endif endif ;Removes ally regen abilty after initial fight if ( GetStage SE08 == 20 ) && ( SE08.KnightDeathCount >= 3 ) if ( GetStageDone SE07A 200 == 1 ) SE08DarkSeducer01Ref.RemoveSpell SE08AbAllyRegen SE08DarkSeducer02Ref.RemoveSpell SE08AbAllyRegen SE08DarkSeducer03Ref.RemoveSpell SE08AbAllyRegen SE08DarkSeducer04Ref.RemoveSpell SE08AbAllyRegen endif if ( GetStageDone SE07A 200 == 1 ) SE08GoldenSaint01Ref.RemoveSpell SE08AbAllyRegen SE08GoldenSaint02Ref.RemoveSpell SE08AbAllyRegen SE08GoldenSaint03Ref.RemoveSpell SE08AbAllyRegen SE08GoldenSaint04Ref.RemoveSpell SE08AbAllyRegen endif endif END
1089UmbacanoScriptscn UmbacanoScript ; used in MS21, MS22, MS27 short sayCount begin gamemode if getstage ms27 == 80 && getiscurrentpackage MS27UmbacanoToThrone == 1 && getsitting == 3 setstage ms27 85 endif end begin OnPackageStart MS21UmbacanoPlaceStatue1 set MS21.fQuestDelayTime to .1 end begin OnPackageDone MS21UmbacanoPlaceStatue1 set MS21.placeStatues to 1 end begin OnPackageStart MS21UmbacanoPlaceStatues set MS21.fQuestDelayTime to .1 end begin OnPackageDone MS21UmbacanoPlaceStatues set MS21.placeStatues to 1 end begin OnPackageStart MS27WaitAtNenalata additem LL2NPCWeaponBossCombDaggerLvl100 1 end begin OnPackageStart MS27UmbacanoActivateCarvingWall set MS27CarvingWall.timer to Say MS27Voice MS27CarvingWall.activate umbacanoRef 1 end begin OnPackageStart MS27UmbacanoWaitAtCarvingWall if sayCount == 0 SayTo player MS27Voice set sayCount to 1 endif end begin OnPackageStart MS27UmbacanoToThrone if sayCount < 2 Say MS27Voice set sayCount to 2 endif end begin OnDeath if getstage ms27 >= 60 && getstage ms27 < 80 setstage ms27 89 endif if getstage ms27 == 80 ; trigger undead attack so player can escape setstage ms27 84 endif if getstagedone ms27 55 == 1 && getstage MS27 == 85 setstage ms27 95 endif if getstagedone ms27 86 == 1 ; turn off exterior minions when he dies as King Nenalata03Start.disable endif ; complete MS21 setstage MS21 100 end
1090UmoggraMaradSCRIPTscn UmoggraMaradSCRIPT short UmogBribe begin OnPackageEnd ICUmbacanoManorUmogBribe set UmogBribe to 0 end begin OnPackageChange ICUmbacanoManorUmogBribeUnlockDoors ; unlock front door on the way out -- but still trespassing if player enters ICUmbacanoFrontInteriorDoorRef.unlock end
1091ValenDrethScriptscn ValenDrethScript float timer short talk short lastStage begin gamemode if timer > 0 set timer to timer - getsecondspassed elseif talk == 1 set lastStage to CharacterGen.tauntStage set timer to SayTo player, CharGenTaunt2 1 if getstage characterGen == 9 set characterGen.convTimer to timer - .5 if characterGen.debug == 1 message "DEBUG: Valen Dreth last info, convTimer to %.2f", characterGen.convTimer endif endif ; pause briefly between taunt stages if lastStage< CharacterGen.tauntStage set timer to timer + 10 endif endif if talk == 0 if getstage charactergen == 6 && CGValenDrethTauntMarker.getdistance player < 610 && getstagedone MQ01 10 == 1 set talk to 1 evp endif endif if talk == 2 && timer <= 0 set talk to 3 evp endif end begin onHit player stopcombat if getav health < 15 forceav health 15 endif end
1092VilverinNewBossScriptscn VilverinNewBossScript ;enable new boss on leaving vilverin04 begin onTrigger player JalbertReplacementREF.enable end
1093WabbajackCreatureScriptscn WabbajackCreatureScript short doOnce float timer short done ref originalRef ref me short dead begin OnLoad if doOnce == 0 && GetSelf != 0 set me to GetSelf set DAWabbajack.replacement to me set originalRef to DAWabbajack.target originalRef.disable ; messageBox "Setting replacement: %.0f", me pme STRP playsound SPLConjurationCast set doOnce to 1 endif end begin gamemode if done == 0 set timer to timer + getsecondspassed if timer > 10 set DAWabbajack.spellRunning to 2 set done to 1 endif endif if ( dead == 0 ) if ( GetDead == 1 ) set dead to 1 ; if Wabbajack creature dies, disable and replace with original (dead) creature set originalRef to DAWabbajack.target set me to GetSelf originalRef.kill player originalRef.enable originalRef.moveto me disable return endif endif end ;begin OnDeath player ; ; if Wabbajack creature dies, disable and replace with original (dead) creature ; set originalRef to DAWabbajack.target ; set me to GetSelf ; originalRef.kill player ; originalRef.enable ; originalRef.moveto me ; disable ; return ; don't go to generic onDeath block. Only difference is there we don't tell it that the player killed it. ;end ;begin OnDeath ; ; if Wabbajack creature dies, disable and replace with original (dead) creature ; set originalRef to DAWabbajack.target ; set me to GetSelf ; originalRef.kill ; originalRef.enable ; originalRef.moveto me ; disable ; return ;end
1094WabbajackQuestScriptscn WabbajackQuestScript short spellRunning ref target ref replacement begin gamemode if spellRunning == 2 ; message "Wabbajack quest script: moving original creature back" set spellRunning to 0 ; spell effect finished ; if replacement is still alive, move target back and disable replacement if replacement.GetDead == 0 ; message "Wabbajack quest script: replacement still alive, disabling and moving target back" target.enable target.moveto replacement replacement.disable endif endif end
1095WabbajackSpellEffectscn WabbajackSpellEffect ref self ref horsetest begin ScriptEffectStart set horsetest to GetSelf if DAWabbajack.spellRunning == 0 && ( GetSelf != CreatureMehrunesDagon ) && ( horsetest.IsRidingHorse == 0 ) && ( horsetest.GetDead == 0 ) if ( IsEssential == 0 ) && ( GetIsCreature == 1 ) && ( GetInFaction NoWabbaFaction == 0 ) ; message "Wabbajack start" ; only one target allowed at a time set DAWabbajack.spellRunning to 1 ; set target ref so we can put it back if necessary set DAWabbajack.target to GetSelf ; messageBox "DAWabbajack.target: %.0f", DAWabbajack.target set self to GetSelf ; messageBox "GetSelf: %.0f", self ; create replacement creature placeAtMe WabbajackList 1 endif endif end
1096WelkyndStoneSCRIPTscn WelkyndStoneSCRIPT begin onAdd player playSound ITMWelkyndStoneUse end
1097XaselmDarts01SCRIPTscn XaselmDarts01SCRIPT float timer short next short activated ref mySelf ref myParent float fTrapDamage float fTrapPushBack float fTrapMinVelocity float fLevelledDamage short bTrapContinuous begin onActivate if activated == 0 set myParent to getParentRef set mySelf to getSelf set activated to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 ; set up the damage values set fTrapDamage to 5 set fLevelledDamage to 1 set fTrapPushBack to 0 set fTrapMinVelocity to 20 set bTrapContinuous to 1 set timer to 5 set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <= 1.5 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif ;reset for next time if timer <= 0 && activated == 1 set fTrapDamage to 0 set fLevelledDamage to 0 set activated to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end
1098XaselmGasEmitter01SCRIPTscn XaselmGasEmitter01SCRIPT ; spurt gas on activation short init float timer short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 set init to 2 ; set up the damage values set fTrapDamage to 10 set fTrapPushBack to 0 set fLevelledDamage to 0.125 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set timer to 3 ;messagebox "set timer" set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 ;messagebox "timer less than zero" endif if timer <= 0 && init == 2 playgroup forward 1 set timer to 22 endif if timer > 0 set timer to timer - getSecondsPassed endif end
1099XaselmGasEmitter02SCRIPTscn XaselmGasEmitter02SCRIPT ; spurt gas on activation short init float timer short next ref mySelf ref myParent float fTrapDamage float fLevelledDamage float fTrapPushBack float fTrapMinVelocity short bTrapContinuous begin onActivate if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif if isActionRef player == 0 && isActionRef mySelf == 0 set init to 2 ; set up the damage values set fTrapDamage to 10 set fTrapPushBack to 0 set fLevelledDamage to 0.125 set fTrapMinVelocity to 20 set bTrapContinuous to 0 set timer to 1 ;messagebox "set timer" set next to 1 playgroup forward 1 endif end begin gameMode ;daisy-chain if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 ;messagebox "timer less than zero" endif if timer <= 0 && init == 2 playgroup forward 1 set timer to 22 endif if timer > 0 set timer to timer - getSecondsPassed endif end
1100XaselmTRAPFloorSCRIPTscn XaselmTRAPFloorSCRIPT float timer ref mySelf ref myParent short init short triggered short busy short next begin onActivate set mySelf to getSelf set myParent to getParentRef if triggered == 0 && isActionRef player == 0 if busy == 0 playgroup forward 0 set triggered to 1 set busy to 1 set timer to 5 set next to 1 endif elseif triggered == 1 && isActionRef player == 0 if busy == 0 playgroup backward 0 set timer to 2 set busy to 1 endif endif end begin gameMode if timer > 0 set timer to timer - getSecondsPassed endif if next == 1 && triggered == 1 && timer <= 1 myParent.activate mySelf 1 set next to 0 endif if busy == 1 && isAnimPlaying == 0 && timer <= 0 set busy to 0 endif if init == 0 set mySelf to getSelf set myParent to getParentRef set init to 1 endif end
1101Xirethard02RuinTRAPHunger02TargetSCRIPTscn Xirethard02RuinTRAPHunger02TargetSCRIPT ; When activated will shoot custom Damage Health spell at parent-linked ref ; A trigger parent-links to this statue and the statue then parent-links to a target ref (such as an X Marker) ; ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 set mySelf to getSelf set myParent to getParentRef ; Leveled spell casting, tops out at lvl 21+ if player.GetLevel <= 5 cast TRAPDamageHealthTarget01 myParent elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) cast TRAPDamageHealthTarget02 myParent elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) cast TRAPDamageHealthTarget03 myParent elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) cast TRAPDamageHealthTarget04 myParent elseif player.GetLevel >= 21 cast TRAPDamageHealthTarget05 myParent endif endif end
1102Xirethard02TrigZonePLAYER01SCRIPTscn Xirethard02TrigZonePLAYER01SCRIPT ; Activates linked Parent object once short triggered short counter ref target ref mySelf01 ref mySelf02 float timer begin onTrigger player set triggered to 1 if triggered == 1 && (timer >= 0 && timer <=0.25) && counter == 1 set mySelf01 to Xirethard02StatueHungerTarget01REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget02REF.getSelf Xirethard02StatueHungerTarget01REF.activate mySelf01 1 Xirethard02StatueHungerTarget02REF.activate mySelf02 1 set counter to 2 endif if triggered == 1 && (timer >= 1 && timer <=1.25) && counter == 2 set mySelf01 to Xirethard02StatueHungerTarget03REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget04REF.getSelf Xirethard02StatueHungerTarget03REF.activate mySelf01 1 Xirethard02StatueHungerTarget04REF.activate mySelf02 1 set counter to 3 endif if triggered == 1 && (timer >= 2 && timer <=2.25) && counter == 3 set mySelf01 to Xirethard02StatueHungerTarget05REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget06REF.getSelf Xirethard02StatueHungerTarget05REF.activate mySelf01 1 Xirethard02StatueHungerTarget06REF.activate mySelf02 1 set counter to 4 endif if triggered == 1 && (timer >= 3 && timer <=3.25) && counter == 4 set mySelf01 to Xirethard02StatueHungerTarget07REF.getSelf set mySelf02 to Xirethard02StatueHungerTarget08REF.getSelf Xirethard02StatueHungerTarget07REF.activate mySelf01 1 Xirethard02StatueHungerTarget08REF.activate mySelf02 1 set counter to 0 endif if triggered == 1 && timer > 5 set counter to 0 endif end begin gameMode if triggered == 1 && counter == 0 set triggered to 0 set counter to 1 set timer to 0 endif if timer >= 0 && triggered == 1 set timer to timer + getSecondsPassed endif end begin onReset set triggered to 0 end
1103XPAichan01DartControlButtonSCRIPTscn XPAichan01DartControlButtonSCRIPT ; activates parent and resets to starting position short busy short stage short dartsDeactivated float timer ref mySelf ref dartTrigger begin onActivate set mySelf to getSelf set dartTrigger to XPAichan01DartTrapControlTrig01REF if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set dartTrigger to XPAichan01DartTrapControlTrig01REF if dartsDeactivated == 0 dartTrigger.disable set dartsDeactivated to 1 elseif dartsDeactivated == 1 dartTrigger.enable set dartsDeactivated to 0 endif set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 set dartsDeactivated to 0 end
1104XPCorpserotChestTriggerSCRIPTscn XPCorpserotChestTriggerSCRIPT ; Generates a Grummite guard when triggered. ; Guard comes into room from downstairs & then ; wanders within detection range of the chest short triggered begin onTrigger player if triggered == 0 set triggered to 1 XPCorpseRotEndGuardREF.placeatme SELLCorpserotGrummite02 1 endif end begin onReset set triggered to 0 end
1105XPEbroccaBoltTimerSCRIPTscn XPEbroccaBoltTimerSCRIPT float timer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate XPEbroccaBossREF end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1106XPEbroccaBossSCRIPTscn XPEbroccaBossSCRIPT ref mySelf float wallTimer short CloseGate2Once short resurrectOnce ; prevents a second resurrection short doResurrect ; flags gameMode to do stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set wallTimer to 3 ; depends upon speed of secret wall anim. must tweak if it changes set mySelf to getSelf end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate ;if isActionRef player if resurrectOnce == 0 if mySelf.getAv health > 0 ;refuse the activation endif elseif resurrectOnce == 1 if mySelf.getAV health <= 0 activate endif endif ;endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if CloseGate2Once == 0 if XPEbroccaBossREF.getDistance XPEbroccaRadMarker < 1200 if player.getDistance XPEbroccaRadMarker < 1200 XPEbroccaBossGate02b.activate mySelf 1 set CloseGate2Once to 1 endif endif endif if doResurrect == 1 && resurrectOnce != 1 set resurrectOnce to 1 XPEbroccaBossWall01.activate mySelf 1 XPEbroccaBossWall02.activate mySelf 1 XPEbroccaBossWall03.activate mySelf 1 XPEbroccaBossWall04.activate mySelf 1 XPEbroccaBossWall05.activate mySelf 1 XPEbroccaBossWall06.activate mySelf 1 XPEbroccaBossWall07.activate mySelf 1 XPEbroccaBossWall08.activate mySelf 1 XPEbroccaBossWall09.activate mySelf 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onDeath if resurrectOnce == 0 set doResurrect to 1 endif if resurrectOnce == 1 sms effectShockDamage endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1107XPEbroccaBossTrigSCRIPTscn XPEbroccaBossTrigSCRIPT short triggered short airlockDone float gateTimer ref mySelf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set mySelf to getSelf set gateTimer to 3 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onTrigger player if triggered == 0 && airlockDone == 0 set triggered to 1 XPEbroccaBossGate01.activate mySelf 1 endif if triggered == 1 && gateTimer <= 0 XPEbroccaBossGate02b.activate mySelf 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if triggered == 1 if gatetimer > 0 set gateTimer to (gateTimer - getSecondsPassed) ; decrement timer elseif gateTimer <= 0 XPEbroccaBossGate02b.activate mySelf 1 set triggered to 0 set airlockDone to 1 endif endif end
1108XPEbroccaCrematorySCRIPTscn XPEbroccaCrematorySCRIPT ; This button activates a crematory furnace. Any bones placed in the crematory retort urn are replaced with ashen remains short Bone01count short Bone02count short Bone03count short Bone04count short Bone05count short Bone06count short Bone07count short Bone08count short bone09count ; adding support for SEBoneShard short BoneAllcount begin onActivate player ;fire statue #1 XPEbroccaCrematoryStatue01.cast StandardFireDamageTarget1Novice XPEbroccaCrematoryRetortREF ;fire statue #2 XPEbroccaCrematoryStatue02.cast StandardFireDamageTarget1Novice XPEbroccaCrematoryRetortREF ;play fx XPEbroccaCrematoryRetortREF.pms effectFireDamage ;swap out bones set Bone01count to (XPEbroccaCrematoryRetortREF.getItemCount skelBigBone01) set Bone02count to (XPEbroccaCrematoryRetortREF.getItemCount skelBoneThin01) set Bone03count to (XPEbroccaCrematoryRetortREF.getItemCount skelClavicle01) set Bone04count to (XPEbroccaCrematoryRetortREF.getItemCount skelPelvis01) set Bone05count to (XPEbroccaCrematoryRetortREF.getItemCount skelRibcage01) set Bone06count to (XPEbroccaCrematoryRetortREF.getItemCount skull01) set Bone07count to (XPEbroccaCrematoryRetortREF.getItemCount SEShamblesSkullClutter) set Bone08count to (XPEbroccaCrematoryRetortREF.getItemCount SEFracturedBone) set Bone09count to (XPEbroccaCrematoryRetortREF.getItemCount SEBoneShard) XPEbroccaCrematoryRetortREF.removeItem skelBigBone01 Bone01Count XPEbroccaCrematoryRetortREF.removeItem skelBoneThin01 Bone02Count XPEbroccaCrematoryRetortREF.removeItem skelClavicle01 Bone03Count XPEbroccaCrematoryRetortREF.removeItem skelPelvis01 Bone04Count XPEbroccaCrematoryRetortREF.removeItem skelRibcage01 Bone05Count XPEbroccaCrematoryRetortREF.removeItem skull01 Bone06Count XPEbroccaCrematoryRetortREF.removeItem SEShamblesSkullClutter Bone07Count XPEbroccaCrematoryRetortREF.removeItem SEFracturedBone Bone08Count XPEbroccaCrematoryRetortREF.removeItem SEBoneShard Bone09Count ; add ash set BoneAllCount to (Bone01Count + Bone02Count + Bone03Count + Bone04Count + Bone05Count + Bone06Count + Bone07Count + Bone08Count + Bone09Count) XPEbroccaCrematoryRetortREF.additem SEAshenRemains BoneAllCount ; stop FX XPEbroccaCrematoryRetortREF.sms effectFireDamage end
1109XPEbroccaHungerCustomSCRIPTscn XPEbroccaHungerCustomSCRIPT ; fires a ring of spells from conglomeration of hunger statues in cell 05 ; [Base Statue 1] ; |___>>>>>>>> [Target 1] ; |_____>>>>>[Statue 2] ; |___>>>>>>[Target 3] etc. up to 8 statue/targets ref LvlSpell ref Statue1 ref Target1 ref Statue2 ref Target2 ref Statue3 ref Target3 ref Statue4 ref Target4 ref Statue5 ref Target5 ref Statue6 ref Target6 ref Statue7 ref Target7 ref Statue8 ref Target8 short triggered short count float timer float interval ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set count to 1 ; we want to count from one, not zero for this. set interval to 0.5 ; determine how much a pause we want between firings set Statue1 to getSelf ; set up the refs. Modular in case we choose to re-use set Target1 to Statue1.getParentRef set Statue2 to Target1.getParentRef set Target2 to Statue2.getParentRef set Statue3 to Target2.getParentRef set Target3 to Statue3.getParentRef set Statue4 to Target3.getParentRef set Target4 to Statue4.getParentRef set Statue5 to Target4.getParentRef set Target5 to Statue5.getParentRef set Statue6 to Target5.getParentRef set Target6 to Statue6.getParentRef set Statue7 to Target6.getParentRef set Target7 to Statue7.getParentRef set Statue8 to Target7.getParentRef set Target8 to Statue8.getParentRef if player.GetLevel <= 5 ;Standard Leveled spell casting, tops out at lvl 21+ set LvlSpell to TRAPDamageHealthTarget01 elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) set LvlSpell to TRAPDamageHealthTarget02 elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) set LvlSpell to TRAPDamageHealthTarget03 elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) set LvlSpell to TRAPDamageHealthTarget04 elseif player.GetLevel >= 21 set LvlSpell to TRAPDamageHealthTarget05 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate if triggered == 0 set triggered to 1 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if triggered == 1 if timer > 0 set timer to (timer - getSecondsPassed) elseif timer <= 0 set timer to interval ; set the timer up for next loop if count == 1 ; check our progress to where to fire Statue1.cast LvlSpell Target1 elseif count == 2 Statue2.cast LvlSpell Target2 elseif count == 3 Statue3.cast LvlSpell Target3 elseif count == 4 Statue4.cast LvlSpell Target4 elseif count == 5 Statue5.cast LvlSpell Target5 elseif count == 6 Statue6.cast LvlSpell Target6 elseif count == 7 Statue7.cast LvlSpell Target7 elseif count == 8 Statue8.cast LvlSpell Target8 endif if count >= 1 && count <= 7 ; increment count if we're in progress set count to (count + 1) elseif count >= 8 set count to 1 ; otherwise reset it set triggered to 0 ; and break the loop endif endif endif end
1110XPEbroccaSpecialBossWallSCRIPTscn XPEbroccaSpecialBossWallSCRIPT short init short busy short open short next short RezFlag ;Special flag for hack job short BaseHP short BaseMP short BaseFP float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if isActionRef player == 0 && isActionRef myself == 0 && busy == 0 if open == 0 playgroup forward 0 set open to 1 enableLinkedPathPoints else playgroup backward 1 set open to 0 disableLinkedPathPoints endif set next to 1 set busy to 1 set timer to 1 endif end begin gameMode if init == 0 ; set up ref vars set mySelf to getSelf set myParent to getParentRef ; prepare linked pathsgrid points disableLinkedPathPoints set init to 1 endif ; daisy-chain activation if next == 1 && timer <=0 set next to 0 myParent.activate mySelf 1 ; Now we hijack normal activation to set off the rest of the effect if RezFlag == 0 set RezFlag to 1 XPEbroccaBossBust01.cast StandardShockDamageTarget1Novice XPEbroccaBossREF XPEbroccaBossBust02.cast StandardShockDamageTarget1Novice XPEbroccaBossREF XPEbroccaBossBust03.cast StandardShockDamageTarget1Novice XPEbroccaBossREF XPEbroccaBossBust04.cast StandardShockDamageTarget1Novice XPEbroccaBossREF XPEbroccaBossREF.resurrect 1 XPEbroccaBossBust01.cast StandardParalyze3Journeyman player XPEbroccaBossBust02.cast StandardParalyze3Journeyman player XPEbroccaBossBust03.cast StandardParalyze3Journeyman player XPEbroccaBossBust04.cast StandardParalyze3Journeyman player XPEbroccaBossBust01.cast StandardRestoreHealthTarget2Apprentice XPEbroccaBossREF XPEbroccaBossBust02.cast StandardRestoreHealthTarget2Apprentice XPEbroccaBossREF XPEbroccaBossBust03.cast StandardRestoreHealthTarget2Apprentice XPEbroccaBossREF XPEbroccaBossBust04.cast StandardRestoreHealthTarget2Apprentice XPEbroccaBossREF XPEbroccaBossRef.setScale 1.2 XPEbroccaBossRef.pms effectShockDamage XPEbroccaBossMinion01.enable ; run to find PC only if in same cell XPEbroccaBossMinion01.evp XPEbroccaBossMinion02.enable XPEbroccaBossMinion02.evp XPEbroccaBossMinion03.enable XPEbroccaBossMinion03.evp ;set BaseHP to (XPEbroccaBossREF.getBaseAv Health) ;set BaseMP to (XPEbroccaBossREF.getBaseAv magicka) ;set BaseFP to (XPEbroccaBossREF.getBaseAv fatigue) ;XPEbroccaBossREf.modav health BaseHP ;XPEbroccaBossREf.modav magicka BaseMP ;XPEbroccaBossREf.modav fatigue BaseFP endif endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set open to 0 set next to 0 set busy to 0 disableLinkedPathPoints end
1111XPEbroccaUniqueStatueSCRIPTscn XPEbroccaUniqueStatueSCRIPT ; test test blah blah blah short activated short count short TargetCount short DoOnceDEBUG float timer ; holds current time float timeTotal ; controls length of timer float interval ; controls rate of fire (timeTotal / # of marker targets) float nextTimeActivated ref mySelf ref myTargetDummy ref CurrentTarget ref Target01 ;onLoad populates these ref vars ref Target02 ref Target03 ref Target04 ref Target05 ref Target06 ref Target07 ref Target08 ref Target09 ref Target10 ref Target11 ref Target12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onLoad set mySelf to getSelf set timeTotal to 1 set activated to 0 set count to 0 set timer to 0 set nextTimeActivated to 0 set Target01 to mySelf.getParentRef if Target01 != 0 set targetCount to (targetCount + 1) endif set Target02 to Target01.getParentRef if Target02 != 0 set targetCount to (targetCount + 1) endif set Target03 to Target02.getParentRef if Target03 != 0 set targetCount to (targetCount + 1) endif set Target04 to Target03.getParentRef if Target04 != 0 set targetCount to (targetCount + 1) endif set Target05 to Target04.getParentRef if Target05 != 0 set targetCount to (targetCount + 1) endif set Target06 to Target05.getParentRef if Target06 != 0 set targetCount to (targetCount + 1) endif set Target07 to Target06.getParentRef if Target07 != 0 set targetCount to (targetCount + 1) endif set Target08 to Target07.getParentRef if Target08 != 0 set targetCount to (targetCount + 1) endif set Target09 to Target08.getParentRef if Target09 != 0 set targetCount to (targetCount + 1) endif set Target10 to Target09.getParentRef if Target10 != 0 set targetCount to (targetCount + 1) endif set Target11 to Target10.getParentRef if Target11 != 0 set targetCount to (targetCount + 1) endif set Target12 to Target11.getParentRef if Target12 != 0 set targetCount to (targetCount + 1) endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onActivate if DoOnceDEBUG != 1 && TargetCount > 0 ;fix 0 value for endian conversion if TargetCount == 0 set TargetCount to 1 endif set DoOnceDEBUG to 1 set interval to (timeTotal/targetCount) endif if isActionRef player == 0 && activated == 0 set activated to 1 set count to 0 set timer to 0 set nextTimeActivated to 0 endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin gameMode if activated == 1 set timer to (timer + getSecondsPassed) if timer >= nextTimeActivated set count to (count + 1) set nextTimeActivated to (nextTimeActivated + interval) if count == 0 && targetCount >= 1 set currentTarget to Target01.getSelf ; is the getSelf needed? Check later. if targetCount == 1 set activated to 0 endif elseif count == 1 && targetCount >= 2 set currentTarget to Target02.getSelf if targetCount == 2 set activated to 0 endif elseif count == 2 && targetCount >= 3 set currentTarget to Target03.getSelf if targetCount == 3 set activated to 0 endif elseif count == 3 && targetCount >= 4 set currentTarget to Target04.getSelf if targetCount == 4 set activated to 0 endif elseif count == 4 && targetCount >= 5 set currentTarget to Target05.getSelf if targetCount == 5 set activated to 0 endif elseif count == 5 && targetCount >= 6 set currentTarget to Target06.getSelf if targetCount == 6 set activated to 0 endif elseif count == 6 && targetCount >= 7 set currentTarget to Target07.getSelf if targetCount == 7 set activated to 0 endif elseif count == 7 && targetCount >= 8 set currentTarget to Target08.getSelf if targetCount == 8 set activated to 0 endif elseif count == 8 && targetCount >= 9 set currentTarget to Target09.getSelf if targetCount == 9 set activated to 0 endif elseif count == 9 && targetCount >= 10 set currentTarget to Target10.getSelf if targetCount == 10 set activated to 0 endif elseif count == 10 && targetCount >= 11 set currentTarget to Target11.getSelf if targetCount == 11 set activated to 0 endif elseif count == 12 && targetCount >=12 set currentTarget to Target12.getSelf if targetCount == 12 set activated to 0 endif endif if player.GetLevel <= 5 ;Leveled spell casting, tops out at lvl 21+ cast TRAPFireballArea01 currentTarget ;This uses a new *shock* spell that copies the standard damage health elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 ) cast TRAPFireballArea02 currentTarget elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 ) cast TRAPFireballArea03 currentTarget elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 ) cast TRAPFireballArea04 currentTarget elseif player.GetLevel >= 21 cast TRAPFireballArea05 currentTarget endif endif endif end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; begin onReset set activated to 0 set count to 0 set nextTimeActivated to 0 end
1112XPGardens03RuinsButtonResetSCRIPTscn XPGardens03RuinsButtonResetSCRIPT ; activates parent and resets to starting position short busy short stage float timer begin onActivate if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 XPBloodPoolDoorREF.unlock XPBloodPoolDoorREF.SetOpenState 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
1113XPGardens03TR01SCRIPTscn XPGardens03TR01SCRIPT short triggered begin onTrigger player if triggered == 0 set triggered to 1 XPGarden03TrapRoom01DoorREF.SetOpenState 0 XPGarden03TrapRoom01DoorREF.Lock 90 endif end begin onReset set triggered to 0 end
1114XPGardens03TR01SwitchSCRIPTscn XPGardens03TR01SwitchSCRIPT ; activates parent and resets to starting position short busy short stage float timer begin onActivate if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 XPGarden03TrapRoom01DoorREF.unlock XPGarden03TrapRoom01DoorREF.SetOpenState 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
1115XPGardensGateCloserSCRIPTscn XPGardensGateCloserSCRIPT short triggered begin onTrigger player if triggered == 0 set triggered to 1 XPGardensSafeGateRef.playgroup backward 1 XPGardensGateCloser02REF.disable endif end begin onReset set triggered to 0 end
1116XPGardensGateOpenerSCRIPTscn XPGardensGateOpenerSCRIPT short triggered begin onTrigger player if triggered == 0 set triggered to 1 XPGardensExitGateREF.playgroup forward 1 endif end begin onReset set triggered to 0 end
1117XPGardensTrigZoneDisscn XPGardensTrigZoneDis ; Disables linked Parent object once (for getting rid of crap when the player reaches a specific point) short triggered begin onTrigger player if triggered == 0 XPGardensSafeGate02Ref.playgroup backward 1 XPGardensGateCloserREF.disable set triggered to 1 endif end begin onReset set triggered to 0 end
1118XPKnotboneFactionFixerSCRIPTscn XPKnotboneFactionFixerSCRIPT ; this will be triggered once the cell is loaded ; and remove the creatures from their shared "creature" faction ; allowing the combat to initiate. After the timer expires, ; they will be added back into the faction. This is a hack. short doFlag ref Actor float timer begin onTriggerActor set Actor to getActionRef if Actor.getInFaction CreatureFaction == 1 set doFlag to 1 set timer to 5 ; allow five seconds before correcting factions endif end Begin gameMode if doFlag == 1 Actor.setFactionRank CreatureFaction -1 MESSAGEBOX "%0.f taken out", Actor endif if timer > 0 set timer to (timer - getSecondsPassed) endif if timer <= 0 && doFlag == 1 Actor.setFactionRank CreatureFaction 1 MESSAGEBOX "%0.f added back", Actor set doFlag to 0 endif end
1119XPKnottyBramCryptTriggerSCRIPTscn XPKnottyBramCryptTriggerSCRIPT ; Enables a SpellTarget, which is linked to two leveled lists in the crypt. Also disables the bodies of the ; Preserved Zealots. short triggered begin onTrigger player if triggered == 0 set triggered to 1 SEKnottyBramZealot01REF.disable SEKnottyBramZealot02REF.disable SEKnotBramZealSpot01REF.placeatme SEKnottyBramZealot02Live 1 SEKnotBramZealSpot02REF.placeatme SEKnottyBramZealot01Live 1 endif end begin onReset set triggered to 0 SEKnottyBramZealot01REF.enable SEKnottyBramZealot02REF.enable end
1120XPKnottyBramDeadZealotEnableTriggerSCRIPTscn XPKnottyBramDeadZealotEnableTriggerSCRIPT ; Enables the bodies of the two dead Zealots in the crypt short triggered begin onTrigger player if triggered == 0 set triggered to 1 SEKnottyBramZealot01REF.enable SEKnottyBramZealot02REF.enable endif end begin onReset set triggered to 0 end
1121XPKnottySecretWallSCRIPTscn XPKnottySecretWallSCRIPT short open begin onActivate if open == 0 playgroup forward 0 set open to 1 endif end begin onReset Reset3DState set open to 0 end
1122XPXirethard01TrapButton01SCRIPTscn XPXirethard01TrapButton01SCRIPT ; activates parent and resets to starting position short busy short stage float timer ref mySelf ref myParent begin onActivate set mySelf to getSelf set myParent to getParentRef if busy == 0 && stage == 0 set stage to 1 set busy to 1 playgroup forward 1 set timer to 4 endif end begin gameMode if stage == 1 && timer <= 3 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 ; Now activate each trig, making them turn off or turn on XirethardTrigZone01REF.activate mySelf 1 XirethardTrigZone02REF.activate mySelf 1 XirethardTrigZone03REF.activate mySelf 1 XirethardTrigZone04REF.activate mySelf 1 XirethardTrigZone05REF.activate mySelf 1 XirethardTrigZone06REF.activate mySelf 1 XirethardTrigZone07REF.activate mySelf 1 set stage to 2 endif if (isAnimPlaying == 0) && stage == 2 && timer <= 2 playgroup backward 0 set stage to 3 endif if (isAnimPlaying == 0) && stage == 3 && timer <= 0 set busy to 0 set stage to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset reset3DState set stage to 0 set busy to 0 end
1123XPXirethardTrigPlayerDoonce01SCRIPTscn XPXirethardTrigPlayerDoonce01SCRIPT ; Activates linked Parent short triggered ref secretWall01 ref secretWall02 ref seducer01 ref seducer02 ref seducer03 ref gate01 ref mySelf begin onTrigger Player if triggered == 0 set mySelf to getSelf set secretWall01 to Xirethard01SecretWall01REF set secretWall02 to Xirethard01SecretWall02REF set gate01 to Xirethard01Gate01REF set seducer01 to Xirethard01Melee02REF set seducer02 to Xirethard01Melee03REF set seducer03 to Xirethard01Melee04REF secretWall01.activate mySelf 1 secretWall02.activate mySelf 1 seducer01.SetAlert 1 seducer02.SetAlert 1 seducer03.SetAlert 1 if Xirethard01Gate01REF.closed == 0 gate01.activate mySelf 1 endif set triggered to 1 endif end
1124AbandonedMineTrap02ScriptscriptName AbandonedMineTrap02Script short triggered begin gameMode if ( getDistance player < 160 ) && ( triggered == 0 ) playgroup forward 1 AbandonedMineTrap03REF.playgroup unequip 1 set triggered to 1 endif end
1125AlawenScriptScriptName AlawenScript Begin OnDeath if ( GetStage TrainingMarksman >= 10 ) && ( GetStage TrainingMarksman < 100 ) SetStage TrainingMarksman 200 endif End
1126AlessiaCaroScriptScriptName AlessiaCaroScript short DaysInChorrol Short RunIdle Begin OnPackageChange AlessiaCaroTravelToChorrol set DaysInChorrol to 2 End Begin OnPackageChange AlessiaCaroSleepChorrol set DaysInChorrol to DaysInChorrol - 1 End Begin OnPackageChange TG04AlessiaFindJewelryBox If AlessiaCaroRef.GetItemCount TG04AhdarjisRing >= 1 Set RunIdle to 1 PickIdle AlessiaCaroRef.RemoveItem TG04AhdarjisRing 2 TGAlessiaCaroJewelryBox.AddItem TG04AhdarjisRing 1 Set RunIdle to 0 EndIf End Begin OnPackageChange TG04AlessiaCaroGetRing If TGAlessiaCaroJewelryBox.GetItemCount TG04AhdarjisRing >= 1 Set RunIdle to 1 PickIdle TGAlessiaCaroJewelryBox.RemoveItem TG04AhdarjisRing 2 AlessiaCaroRef.AddItem TG04AhdarjisRing 1 AlessiaCaroRef.EquipItem TG04AhdarjisRing Set RunIdle to 0 EndIf End Begin OnDeath Player If GetStage TG04Mistake >= 10 && GetStage TG04Mistake < 100 Set TG04Mistake.TotalDead to TG04Mistake.TotalDead + 1 SetStage TG04BloodPrice 40 EndIf End ;this chunk is for DASanguine Begin OnPackageEnd DASanguineCaroGetClothes DASanguineChest2.RemoveAllItems AlessiaCaroREF End
1127AlixLencoliaScriptScriptName AlixLencoliaScript Begin OnDeath if ( GetStage TrainingBlade >= 10 ) && ( GetStage TrainingBlade < 100 ) SetStage TrainingBlade 200 endif End
1128AltarofAkatoshScriptName AltarofAkatosh short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Seek not the Dragon's blessing, sinner!" elseif FameAkatosh == 0 MessageBox "Make a pilgrimage to a Wayshrine of Akatosh, and henceforth receive a blessing at Akatosh's holy altars." elseif FameAkatosh > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "You make Father Akatosh proud!" Cast AltarAkatosh Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarAkatosh target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1129AltarofArkayScriptName AltarofArkay short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Your crimes corrupt your body and spirit!" elseif FameArkay == 0 MessageBox "Make a pilgrimage to a Wayshrine of Arkay, and henceforth receive a blessing at Arkay's holy altars." elseif FameArkay > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "An unstained spirit pleases Arkay!" Cast AltarArkay Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarArkay target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1130AltarofDibellaScriptName AltarofDibella short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Not even Dibella loves a sinner!" elseif FameDibella == 0 MessageBox "Make a pilgrimage to a Wayshrine of Dibella, and henceforth receive a blessing at Dibella's holy altars." elseif FameDibella > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "Dibella loves you!" Cast AltarDibella Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarDibella target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1131AltarofJulianosScriptName AltarofJulianos short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Lawbreaker! You tempt the wrath of Julianos!" elseif FameJulianos == 0 MessageBox "Make a pilgrimage to a Wayshrine of Julianos, and henceforth receive a blessing at Julianos' holy altars." elseif FameJulianos > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "Your weight is true in the scales of Julianos!" Cast AltarJulianos Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarJulianos target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1132AltarofKynarethScriptName AltarofKynareth short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Break not laws of man nor beast!" elseif FameKynareth == 0 MessageBox "Make a pilgrimage to a Wayshrine of Kynareth, and henceforth receive a blessing at Kynareth's holy altars." elseif FameKynareth > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "Kynareth is with you!" Cast AltarKynareth Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarKynareth target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1133AltarofMaraScriptName AltarofMara short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Offend not against the peace of Mara!" elseif FameMara == 0 MessageBox "Make a pilgrimage to a Wayshrine of Mara, and henceforth receive a blessing at Mara's holy altars." elseif FameMara > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "Mara smiles upon you!" Cast AltarMara Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarMara target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1134AltarofStendarrScriptName AltarofStendarr short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "The weak and poor suffer by your crimes!" elseif FameStendarr == 0 MessageBox "Make a pilgrimage to a Wayshrine of Stendarr, and henceforth receive a blessing at Stendarr's holy altars." elseif FameStendarr > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "Blessings of Stendarr!" Cast AltarStendarr Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarStendarr target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1135AltaroftheNineScriptName AltaroftheNine short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Repent your crimes, wicked one!" Else if GetDayofWeek == DayofLastUse MessageBox "You've already received your blessing this day." else MessageBox "Rejoice! Through faith, your afflictions are banished!" Cast AltarNine Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarNine target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1136AltarofTiberSeptimScriptName AltarofTiberSeptim short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Break not the peace of Tiber Septim!" elseif FameTiberSeptim == 0 MessageBox "Make a pilgrimage to a Wayshrine of Tiber Septim, and henceforth receive a blessing at Tiber Septim's holy altars." elseif FameTiberSeptim > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "The lawful gain the gifts of Talos!" Cast AltarTiberSeptim Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarTiberSeptim target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1137AltarofZenitharScriptName AltarofZenithar short doonce short DayofLastUse ref target Begin OnActivate if IsActionRef player == 1 If Player.GetCrimeGold > 0 || GetPCInfamy > GetPCFame MessageBox "Zenithar hates the thief and lawbreaker!" elseif FameZenithar == 0 MessageBox "Make a pilgrimage to a Wayshrine of Zenithar, and henceforth receive a blessing at Zenithar's holy altars." elseif FameZenithar > 0 if GetDayofWeek == DayofLastUse MessageBox "You've already been blessed this day." else MessageBox "You work for the glory of Zenithar!" Cast AltarZenithar Player Set DayofLastUse to GetDayofWeek endif endif else set target to GetActionRef Cast AltarAkatosh target endif end begin gamemode if doonce == 0 ;days are numbered 0-6 - prevents first visit on 0 day and being told you've used it today set DayofLastUse to 10 set doonce to 1 endif end
1138AmantiusAllectusScriptScriptName AmantiusAllectusScript Begin OnDeath Player If GetStage TG01BestThief >= 10 && GetStage TG01BestThief < 100 Set TG01BestThief.AmantiusDead to TG01BestThief.AmantiusDead + 1 SetStage TG01BloodPrice 10 EndIf End
1139AmuseiScriptScriptName AmuseiScript Short GuardsMoved Short VampireEnabled Short AmuseiAtBedroll Short PCJailed Begin GameMode If AmuseiAtBedRoll == 0 If AmuseiRef.GetDistance SleepingMatAmuseiSkingrad < 500 Set AmuseiAtBedroll to 1 EndIf EndIf If TG04Mistake.AmuseiEscape == 0 If AmuseiPrisonCellDoorRef.GetLocked == 0 Set TG04Mistake.AmuseiEscape to 1 EndIf EndIf If VampireEnabled == 0 If Player.GetDistance FirstBloodStainRef <= 256 TG06PaleLadyVampireRef.Enable TG06PaleLadyVampireRef.ModDisposition AmuseiRef 60 Set VampireEnabled to 1 EndIf EndIf If GetStage TG06Atonement == 60 If Player.GetInSameCell TG06PaleLadyVampireRef == 0 && TG06PaleLadyVampireRef.GetDisabled == 0 TG06PaleLadyVampireRef.Disable EndIf EndIf If GetStage TG06Atonement == 50 If GuardsMoved == 0 SkingradGuardPatrolDay01Ref.EvaluatePackage If SkingradGuardPatrolDay01Ref.GetIsCurrentPackage TG06SkingradGuardAway == 1 SkingradGuardPatrolDay01Ref.MoveTo SkingradTownGuardMessHall Endif SkingradGuardPatrolDay02Ref.EvaluatePackage If SkingradGuardPatrolDay02Ref.GetIsCurrentPackage TG06SkingradGuardAway == 1 SkingradGuardPatrolDay02Ref.MoveTo SkingradTownGuardMessHall Endif SkingradGuardPatrolNight01Ref.EvaluatePackage If SkingradGuardPatrolNight01Ref.GetIsCurrentPackage TG06SkingradGuardAway == 1 SkingradGuardPatrolNight01Ref.MoveTo SkingradTownGuardMessHall Endif SkingradGuardPatrolNight02Ref.EvaluatePackage If SkingradGuardPatrolNight02Ref.GetIsCurrentPackage TG06SkingradGuardAway == 1 SkingradGuardPatrolNight02Ref.MoveTo SkingradTownGuardMessHall Endif Set GuardsMoved to 1 EndIf If Player.GetDistance AmuseiEscapes < 512 SetStage TG06Atonement 51 AddScriptPackage TG06AmuseiFindPC EndIf If TG06Atonement.EscapePartOne == 0 If Player.GetInCell SkingradCastleCourtyard Set TG06Atonement.EscapePartOne to 1 EndIf EndIf If IsPlayerInJail == 1 Wait TG06AmuseiFollowPCSneak Wait TG06AmuseiFollowPCRun MoveTo TG06AmuseiHide EndIf EndIf End
1140AndragilScriptScriptName AndragilScript ;controls combat situation for quest TrainingBlock short combatvar float timer Begin Gamemode if ( Combatvar == 1 ) ; if ( Player.GetWeaponAnimType == 0 ) SetCombatStyle AndragilTraining startcombat Player set combatvar to 2 ; else ; SetCombatStyle ; set Combatvar to 5 ;if player has weapon equipped at the beginning, don't even start combat ; endif elseif ( Combatvar == 2 ) ; if ( Player.GetWeaponAnimType != 0 ) ; stopcombat Player ; set Combatvar to 5 ;flag for player having equipped weapon during combat; this resets the whole thing ; SetCombatStyle ; set timer to 0 ; endif if ( timer < 40 ) set timer to ( timer + GetSecondsPassed ) else stopcombat Player set Combatvar to 3 SetCombatStyle Startconversation player endif endif End Begin OnDeath if ( GetStage TrainingBlock >= 10 ) && ( GetStage TrainingBlock < 100 ) SetStage TrainingBlock 200 endif End
1141AntusOdiilScriptScriptname AntusOdiilScript ;Handles simple 'pacing' movement during stage 10 of quest, while he waits for player short position short doonce ;Position is used to check distance to the two Xmarkers marking the edge of Antus' patrol ;Doonce used to initiate packages begin gamemode ;Give Antus a starting package, so he'll go to one of the points and start the patrol ;Needed when conversation stops him outside of range of either of the points ;All scripted conversations will set doonce to 0 again so this package runs if ( doonce == 0 ) EvaluatePackage set doonce to 1 endif ;Have Antus Evaluate AI Package when within range of first marker ;pause this scenario when the guys are talking if ( GetDistance player > 700 ) if ( position == 0 ) if ( GetDistance MS18AntusPatrolMarker1 < 100 ) EvaluatePackage set position to 1 endif elseif ( position == 1 ) if ( GetDistance MS18AntusPatrolMarker2 < 100 ) EvaluatePackage set position to 0 endif endif endif End
1142AnvilCastleGuardScriptScriptName AnvilCastleGuardScript ; the OnDeath script is on many guards in Castle Anvil Begin OnDeath Player If GetStage TG07Lex >= 10 && GetStage TG07Lex < 100 Set TG07Lex.TotalDead to TG07Lex.TotalDead + 1 SetStage TG07BloodPrice 70 EndIf End
1143AnvilCastleJailorScriptScriptName AnvilCastleJailorScript Float KeepTime ; the OnDeath script is on many guards in Castle Anvil Begin OnDeath Player If GetStage TG07Lex >= 10 && GetStage TG07Lex < 100 Set TG07Lex.TotalDead to TG07Lex.TotalDead + 1 SetStage TG07BloodPrice 70 EndIf End Begin OnPackageEnd AnvilPrisonFollowPCDay Set NQDGuard.AnvilDoorOpen to 0 End Begin OnPackageEnd AnvilPrisonFollowPCNight Set NQDGuard.AnvilDoorOpen to 0 End Begin GameMode If NQDGuard.SayWarnings == 1 && GetInFaction Jailor == 1 If KeepTime <= 0 Set KeepTime to 6 SayTo Player NQDGuardWarning Else Set KeepTime to KeepTime - GetSecondsPassed EndIf EndIf End
1144AnvilCastleSecretDoorLever01REFSCRIPTscriptName AnvilCastleSecretDoorLever01REFSCRIPT short open short busy begin onActivate if open == 0 && isAnimPlaying == 0 if busy == 0 && AnvilCastleSecretDoor01REF.isAnimPlaying == 0 set busy to 1 AnvilSecretBlack01.disable playgroup forward 1 AnvilCastleSecretDoor01REF.playgroup forward 1 set open to 1 endif else if busy == 0 && AnvilCastleSecretDoor01REF.isAnimPlaying == 0 playgroup backward 1 AnvilCastleSecretDoor01REF.playgroup backward 1 set open to 0 endif endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
1145AnvilCastleSecretDoorLever02SCRIPTscriptName AnvilCastleSecretDoorLever02SCRIPT short open short busy begin onActivate if open == 0 && isAnimPlaying == 0 if busy == 0 && AnvilCastleSecretDoorREF02.isAnimPlaying == 0 set busy to 1 CastleSecretBlack02.disable playgroup forward 1 AnvilCastleSecretDoorREF02.playgroup forward 1 set open to 1 endif else if busy == 0 && AnvilCastleSecretDoorREF02.isAnimPlaying == 0 set busy to 1 playgroup backward 1 AnvilCastleSecretDoorREF02.playgroup backward 1 set open to 0 endif endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
1146AnvilCastleSecretDoorLever03SCRIPTscriptName AnvilCastleSecretDoorLever03SCRIPT short open short busy begin onActivate if open == 0 && isAnimPlaying == 0 if busy == 0 && AnvilCastleSecretDoorRef03.isAnimPlaying == 0 set busy to 1 CastleSecretBlack03.disable playgroup forward 1 AnvilCastleSecretDoorRef03.playgroup forward 1 set open to 1 endif else if busy == 0 && AnvilCastleSecretDoorRef03.isAnimPlaying == 0 set busy to 1 playgroup backward 1 AnvilCastleSecretDoorRef03.playgroup backward 1 set open to 0 endif endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
1147AnvilCastleSecretDoorLever04SCRIPTscriptName AnvilCastleSecretDoorLever04SCRIPT short open short busy begin onActivate if open == 0 && isAnimPlaying == 0 if busy == 0 && AnvilCastleSecretDoorRef04.isAnimPlaying == 0 set busy to 1 CastleSecretBlack04.disable playgroup forward 1 AnvilCastleSecretDoorRef04.playgroup forward 1 set open to 1 endif else if busy == 0 && AnvilCastleSecretDoorRef04.isAnimPlaying == 0 set busy to 1 playgroup backward 1 AnvilCastleSecretDoorRef04.playgroup backward 1 set open to 0 endif endif end begin gameMode if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end
1148AnvilMGPetImpScriptScriptName AnvilMGPetImpScript begin ScriptEffectStart PlayMagicShaderVisuals creatureAnvilMGPetImp end begin ScriptEffectFinish StopMagicShaderVisuals creatureAnvilMGPetImp end
1149AnvilPrisonDoorScriptScriptName AnvilPrisonDoorScript Begin GameMode Set NQDGuard.AnvilDoorOpen to 0 If GetLocked == 0 Set NQDGuard.AnvilDoorOpen to 1 EndIf End
1150ArcaneUApprentice10ScriptScriptname ArcaneUApprentice10Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student10Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student10Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1151ArcaneUApprentice1ScriptScriptname ArcaneUApprentice1Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student1Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student1Var > 0 ) set MageConvSystem.clear to 1 endif End
1152ArcaneUApprentice2ScriptScriptname ArcaneUApprentice2Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student2Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student2Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1153ArcaneUApprentice3ScriptScriptname ArcaneUApprentice3Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student3Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student3Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1154ArcaneUApprentice4ScriptScriptname ArcaneUApprentice4Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student4Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student4Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1155ArcaneUApprentice5ScriptScriptname ArcaneUApprentice5Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student5Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student5Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1156ArcaneUApprentice6ScriptScriptname ArcaneUApprentice6Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student6Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student6Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1157ArcaneUApprentice7ScriptScriptname ArcaneUApprentice7Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student7Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student7Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Misdirection.TotalDead to TG05Misdirection.TotalDead + 1 SetStage TG05BloodPrice 50 EndIf End
1158ArcaneUApprentice8ScriptScriptname ArcaneUApprentice8Script Begin Gamemode if ( Player.GetFactionRank MagesGuild < 9 ) return endif if ( MageConvSystem.ArchFollower == 0 ) if ( MageConvSystem.Student8Var == 1 ) set MageConvSystem.ArchFollower to 1 endif endif End Begin OnDeath if ( MageConvSystem.Student8Var > 0 ) set MageConvSystem.clear to 1 endif End Begin OnDeath Player If GetStage TG05Misdirection >= 15 && GetStage TG05Misdirection < 60 Set TG05Mi