The Elder Scrolls The Elder Scrolls IV: Oblivion® Searchable Database



250 Results For SCPT:SCTX 250 Max
scn ActRockGreatForest01SCRIPT short activated begin onActivate if isActionRef player == 0 && activated == 1 disableLinkedPathPoints set activated to 1 endif end
scn 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
scn AloysBincalScript ; QUESTS ; MS46 short talked begin gamemode if talked == 0 && getdistance player < 1000 startconversation calliabincalref MS46AloysStart set talked to 1 endif end
scn 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
scn 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
scn 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
scn AngaWallSwitch01SCRIPT short open begin onActivate if open == 0 playgroup forward 1 AngaSecretWall01REF.playgroup forward 0 set open to 1 endif end
scn 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
scn 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
scn ArcaneUniversityTeleportSCRIPT ref mySelf ref targetref begin onActivate set targetref to GetActionRef set mySelf to getSelf targetref.pms effectshockshield mySelf.pms effectshockshield activate end
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn AtronachFlameScript begin ScriptEffectStart PlayMagicShaderVisuals effectAtronachFlame end begin ScriptEffectFinish StopMagicShaderVisuals effectAtronachFlame end
scn AtronachFrostHealSCRIPT begin ScriptEffectStart pme frsh ; frost shield effect end begin ScriptEffectFinish sme frsh ; frost shield effect end
scn AtronachFrostScript begin ScriptEffectStart PlayMagicShaderVisuals effectAtronachFrost end begin ScriptEffectFinish StopMagicShaderVisuals effectAtronachFrost end
scn AtronachStormScript begin ScriptEffectStart PlayMagicShaderVisuals effectShockDamage end begin ScriptEffectFinish StopMagicShaderVisuals effectShockDamage end
scn 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
scn BanditRobberSCRIPT begin OnLoad forceav aggression 0 set HighwaymanGotMoney to 0 end
scn 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
scn 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
scn 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
scn 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
scn BlackBrugoScript begin OnDeath if getstagedone MS92 80 == 0 SetStage MS92 80 endif end
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn CGAmbushCBackGateScript begin OnActivate ; nobody can open this gate end
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn CGChest02SCRIPT short done begin gamemode if done == 0 if getitemcount repairhammer == 0 setstage mq01 65 set done to 1 endif endif end
scn 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
scn 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
scn CGDoorToSewersScript begin OnActivate Activate if IsActionRef player == 1 player.removeItem CGExitKey 1 player.scaonactor endif end
scn 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
scn CGDungeon05To02DoorScript begin OnActivate if IsActionRef player == 1 player.scaonactor endif Activate end
scn 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
scn 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
scn CGGoblinLogRun01SCRIPT short activated begin onActivate activate if activated == 0 set activated to 1 evp CGGoblinRunover02REF.evp endif end
scn 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
scn CGHeavyArmorScript begin OnAdd player set MQ01.heavyarmor to 1 end begin OnEquip player set MQ01.heavyArmorEquip to 1 end
scn 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
scn CGMortalPestleSCRIPT begin OnAdd player setstage MQ01 64 end
scn 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
scn 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
scn 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
scn 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
scn CGMythicDawnAmbushB1Script begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end
scn CGMythicDawnAmbushB2Script begin onDeath set characterGen.ambushCount to characterGen.ambushCount + 1 end begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end
scn CGMythicDawnAssassinGenericScript begin onDeath player set characterGen.playerKill to characterGen.playerKill + 1 end
scn 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
scn CGRatAmbushASCRIPT begin OnDeath if getdeadcount CGRatAmbushA >= 2 set MQ01.timer to 3 set MQ01.stage to 15 endif end
scn CGRatMagicTutorialSCRIPT begin onLoad set MQ01.timer to 1 set MQ01.stage to 34 end
scn CGRatPenGateScript short gateOpen begin OnActivate if IsActionRef player == 1 || isActionRef CGRatPenRopeREF == 1 unlock set gateOpen to 1 endif if gateOpen == 1 Activate endif end
scn 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
scn CGRopeBucketScript begin OnHitWith Arrow1Iron if getstagedone MQ01 58 == 0 set MQ01.stage to 58 set MQ01.timer to .5 endif end
scn CGScaredyRate02Script begin OnPackageDone DORatRun02 ; attack the zombie setav confidence 50 startcombat CGZombie01REF end
scn 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
scn 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
scn CGThiefSkeletonScript short looted begin onActivate if IsActionRef player == 1 set looted to 1 endif Activate end
scn 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
scn CGTrigZone01SCRIPT short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef target.evaluatePackage set triggered to 1 endif end
scn 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
scn CGTrigZoneAmbushBSCRIPT ; Triggers start of Ambush B short triggered begin onTrigger player if triggered == 0 setstage charactergen 32 set triggered to 1 endif end
scn 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
scn 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
scn CGZombieSCRIPT begin OnDeath DORatRunner01.modav aggression 30 DORatRunner02.modav aggression 30 DORatRunner03.modav aggression 30 DORatRunner01.EVP DORatRunner02.EVP DORatRunner03.EVP end
scn 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
scn ChorrolGuardHelpTestScript short stageVar
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn DAClavicusDogVARS short dogtalk1 short dogtalk2 short dogtalk3
scn DAClavicusUmbraScript short umbratalk short attack Begin GameMode if ( attack == 1 ) StartCombat Player set attack to 0 endif End
scn 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
scn DaedricSiegeEngineSCRIPT begin OnLoad ; all the stuff to keep player from messing with it setghost 1 end
scn 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
scn 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
scn 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
scn 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
scn DAMolagBalMaceScript Begin OnEquip MelusPetilusREF set DAMolagBal.maceequip to 1 End
scn 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
scn 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
scn 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
scn 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
scn 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
scn DANamiraSpell Begin ScriptEffectStart Set DANamira.target to GetSelf ;MessageBox "SPELL CAST" End
scn 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
scn DAPeryiteDoorToTamrielSCRIPT ;begin OnActivate ; if IsActionRef player == 1 ; Activate ; if ( GetStage DAPeryite == 80 ) ; SetStage DAPeryite 90 ; endif ; endif ;end
scn 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
scn Dark07MercenaryDisableSCRIPT begin GameMode if (GetStage Dark07Medicine >= 10) == 1 disable endif end
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn DASanguineRoseQuestScript ref spelltarget short GoAway short spellworking
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn DASkullofCorruptionActivateScript Begin OnActivate End
scn DASkullofCorruptionQuestScript short raceVAR short sexVAR ref target ref summon short spellworking short changeOnce short vampVAR float fquestdelaytime short goAway
scn 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
scn 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
scn DASkullofCorruptionTargetScript Begin OnActivate End ;Begin OnDeath ;set DASkullofCorruption.goAway to 1 ;end
scn 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
scn DiveRockFrostScript begin ScriptEffectStart PlayMagicShaderVisuals effectAtronachFrost end
scn 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
scn DummyMagicEffectSCRIPT begin ScriptEffectStart end begin ScriptEffectUpdate end begin ScriptEffectFinish end
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn E3KvatchClannfear03SCRIPT short init begin gameMode if getDistance E3KvatchCaptain < 500 && init == 0 startCombat E3KvatchCaptain set init to 1 endif end
scn E3KvatchSoldierALERT02SCRIPT short init begin gameMode if init == 0 setalert 1 evaluatePackage set init to 1 endif end
scn 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
scn 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
scn 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
scn 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
scn E3TrigZone01SCRIPT short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef target.evaluatePackage set triggered to 1 endif end
scn 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
scn E3TrigZonePickIdleSCRIPT short triggered ref target begin onTrigger player if triggered == 0 set target to getParentRef set triggered to 1 target.pickidle endif end
scn EdlaDarkHeartSCRIPT short arrowcount begin OnLoad set arrowcount to getitemcount Arrow2Steel if arrowcount > 13 set arrowcount to arrowcount - 13 removeitem Arrow2Steel arrowcount endif end
scn 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
scn ErandurScript begin onload if player.getLevel < 23 setghost 1 PMS ghosteffect setav aggression 0 endif end
scn 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
scn 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
scn FanacasBossTrigger01SCRIPT short triggered begin onTrigger if triggered == 0 FanacasBossREF.enable set triggered to 1 endif end
scn 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
scn 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
scn 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
scn FGC01MountainLion1Script Begin OnDeath if ( GetStage FGC01Rats == 20 ) SetStage FGC01Rats 30 endif End
scn FGC01MountainLion3Script Begin OnDeath if ( GetStage FGC01Rats == 60 ) SetStage FGC01Rats 65 endif End
scn FGC01PiranusScript short packageVAR Begin OnPackageEnd FGC01PinarusEscort set packageVAR to 2 StartConversation Player End
scn 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
scn FGC03FlagonScript Begin GameMode if ( GetStage FGC03Flagon > 0 ) && ( GetStage FGC03Flagon < 33 ) if ( player.GetItemCount FGC03Tankard > 0 ) SetStage FGC03Flagon 33 endif endif End
scn 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
scn FGC10CorpseScript short nearcorpse Begin GameMode if ( GetDistance Player < 200 ) && ( GetStageDone FGC10Swamp 40 == 0 ) if ( GetStage FGC10Swamp > 0 ) SetStage FGC10Swamp 40 endif endif End
scn FGC10WispScript Begin GameMode if ( GetDistance Player <= 256 ) && ( GetStage FGC10Swamp == 20 ) SetStage FGC10Swamp 30 endif End
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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
scn 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




Stay awile, stay forver!

Incendar.com, Incendar, Incendar Gaming, Incendium, Incendius, Incendara, Incendario, MINcendar
© Incendar 2004-2020

Sitemap  Media  Contact Discord