Scripts

TR_m3_q_NelynFathis

TR_Mainland.esm
Variables 11
Local Variables
noHello
noIdle
noAlarm
noAttack
doOnce
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m3_q_NelynFathis 2 3; Script on NPC TR_m3_Nelyn_Fathis, for quest tr_m3_sa_thevoice. 4 5short noHello 6short noIdle 7short noAlarm 8short noAttack 9short doOnce 10short TR_Map 11short control 12short controlQ 13short NoLore 14short T_Local_NPC 15short T_Local_NoLore 16 17; disable Nelyn if the player hasn't been warned about him yet: 18if ( GetJournalIndex "TR_m3_Sa_TheVoice" < 30 ) 19 if ( GetDisabled == 0 ) 20 Disable 21 endif 22elseif ( GetJournalIndex "TR_m3_Sa_TheVoice" < 40 ) 23 if ( GetDisabled == 1 ) 24 Enable 25 endif 26endif 27 28; Enables NPC sounds once Nelyn gets his voice back 29if ( noHello == 0 ) 30 if ( GetJournalIndex "TR_m3_Sa_TheVoice" == 80 ) 31 set noHello to 1 32 set noIdle to 1 33 set noAlarm to 1 34 set noAttack to 1 35 endif 36endif 37 38; handling stage 120 (this is if the player reports Nelyn to Veradul, and Veradul dispatches his guards): 39if ( doOnce == 0 ) 40 if ( GetJournalIndex "TR_m3_Sa_TheVoice" == 120 ) 41 set doOnce to 1 42 elseif ( "TR_m3_q_indguard_Nelyn1"->GetDisabled == 0 ) 43 "TR_m3_q_indguard_Nelyn1"->Disable 44 "TR_m3_q_indguard_Nelyn2"->Disable 45 endif 46elseif ( doOnce == 1 ) ; enable the guards 47 "TR_m3_q_indguard_Nelyn1"->Enable 48 "TR_m3_q_indguard_Nelyn2"->Enable 49 set doOnce to 2 50elseif ( doOnce == 2 ) 51 if ( controlQ == 0 ) ; make the guards attack Nelyn 52 if ( GetDistance Player < 2500 ) 53 "TR_m3_q_indguard_Nelyn1"->StartCombat "TR_m3_Nelyn_Fathis" 54 "TR_m3_q_indguard_Nelyn2"->StartCombat "TR_m3_Nelyn_Fathis" 55 set controlQ to 1 56 endif 57 endif 58 if ( OnDeath == 1 ) ; register Nelyn's death 59 set doOnce to 3 60 endif 61elseif ( doOnce == 3 ) 62 if ( CellChanged == 1 ) ; disable the guards 63 "TR_m3_q_indguard_Nelyn1"->Disable 64 "TR_m3_q_indguard_Nelyn2"->Disable 65 set doOnce to 4 66 endif 67endif 68 69 70;Updates the Journal if the Player kills Nelyn after hearing him speak 71if ( OnDeath == 1 ) 72 if ( GetJournalIndex "TR_m3_Sa_TheVoice" == 80 ) 73 Journal TR_m3_Sa_TheVoice 90 74 elseif ( GetJournalIndex "TR_m3_Sa_TheVoice" >= 90 ) 75 else 76 Journal TR_m3_Sa_TheVoice 140 77 endif 78endif 79 80;Standard TR_map3 nolore script below 81 82if ( TR_Map == 3 ) 83 return 84endif 85 86set TR_Map to 3 87 88End