Scripts

TR_m3_q_Astien_Lothaire_sc

TR_Mainland.esm
Variables 12
Local Variables
doOnce
alsoDoOnce
enableonce
control
controlq
NoLore
TR_Map
levitation
T_Local_NPC
T_Local_NoLore
timer
ZPos
Source
1Begin TR_m3_q_Astien_Lothaire_sc 2 3short doOnce 4short alsoDoOnce 5short enableonce 6short control 7short controlq 8short NoLore 9float timer 10short TR_Map 11short levitation 12float ZPos 13short T_Local_NPC 14short T_Local_NoLore 15 16 17if ( GetJournalIndex "TR_m3_MG_OE_Q3" < 10 ) 18 if ( GetDisabled == 0 ) 19 disable 20 endif 21 return 22endif 23 24If ( GetPCCell "Old Ebonheart, Sewers: Eastern Well" == 0 ) 25 return 26endif 27 28;Astien won't rise to the top with waterbreathing 29;however, Astien will start to drown if not given waterbreathing 30;so, only give him waterbreathing when he starts to drown 31if ( GetHealth < 50 ) 32 SetWaterBreathing 1 33endif 34 35if ( OnDeath ) 36 Journal "TR_m3_MG_OE_Q3" 50 37endif 38 39;reset after player leaves this area 40if ( CellChanged ) 41 if ( GetJournalIndex "TR_m3_MG_OE_Q3" < 30 ) 42 if ( doOnce > 3 ) 43 set doOnce to 2 ;call again if player hasn't found him yet 44 set timer to 3 45 endif 46 endif 47endif 48 49if ( TR_Map != 3 ) 50 set TR_Map to 3 51endif 52 53if ( GetJournalIndex "TR_m3_MG_OE_Q3" >= 10 ) 54 if ( GetJournalIndex "TR_m3_MG_OE_Q3" >= 30 ) 55 elseIf ( MenuMode ) 56 elseif ( doOnce > 3 ) 57 elseif ( levitation > 0 ) 58 else 59 if ( doOnce == 3 ) 60 ;call again if player hasn't found him yet 61 Say "vo\b\m\Fle_BM002.mp3" " " 62 set doOnce to 4 63 elseif ( doOnce == 2 ) 64 if ( timer > 5 ) 65 set timer to 0 66 set doOnce to 3 67 endif 68 elseif ( doOnce == 1 ) 69 if ( GetDistance Player < 600 ) 70 Say "vo\b\m\Fle_BM002.mp3" " " 71 MessageBox "You hear a voice calling from below the ladder." 72 set doOnce to 2 73 endif 74 elseif ( timer > 1.5 ) 75 set doOnce to 1 76 endif 77 set timer to ( timer + GetSecondsPassed ) 78 endif 79 80 if ( GetEffect sEffectLevitate ) 81 if ( levitation == 0 ) 82 set levitation to 1 83 set timer to 0 84 set ZPos to ( GetPos Z ) 85 MessageBox "Astien Lothaire rises..." 86 endif 87 endif 88 if ( levitation == 1 ) 89 If ( MenuMode == 0 ) 90 set timer to ( timer + GetSecondsPassed ) 91 endif 92 set ZPos to ( ZPos + GetSecondsPassed * 100 ) 93 SetPos Z ZPos 94 if ( timer > 1 ) 95 RemoveEffects 10 96 set levitation to 2 97 endif 98 elseif ( levitation == 2 ) 99 set ZPos to ( GetPos, Z ) 100 if ( ZPos > -550 ) 101 set ZPos to ( ZPos - 10 ) 102 SetPos Z ZPos 103 endif 104 MessageBox "... then falls with a splash. It doesn't look like he's in any state to levitate out of this predicament." 105 PlaySound "FootWaterRight" 106 PlaySound "FootWaterLeft" 107 PlaySound "Body Fall Medium" 108 set levitation to -1 109 endif 110 111 if ( enableonce == 1 ) 112 return 113 endif 114 if ( GetDisabled ) 115 enable 116 set enableonce to 1 117 endif 118endif 119 120end