Scripts

TR_m4_NPC_Dredase_Devani

TR_Mainland.esm
Variables 6
Local Variables
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
NoLore
Source
1Begin TR_m4_NPC_Dredase_Devani 2 3short TR_Map 4short control 5short controlQ 6short T_Local_NPC 7short T_Local_NoLore 8short NoLore 9 10if ( MenuMode ) 11 return 12endif 13 14if ( GetJournalIndex "TR_m4_wil_CureDredaseDevani" >= 200 ) 15 if ( GetSpell "T_Vamp_Dis_Baluath" ) 16 RemoveSpell "T_Vamp_Dis_Baluath" 17 endif 18endif 19 20if ( GetJournalIndex "TR_m4_wil_CureDredaseDevani" <= 10 ) 21 if ( GetSpell "T_Vamp_Dis_Baluath" == 0 ) 22 Journal "TR_m4_wil_CureDredaseDevani" 200 23 endif 24endif 25 26if ( OnDeath ) 27 StartScript TR_m4_MoveGorasRayveth 28 set TR_m4_Barendreth_DeadOrd to ( TR_m4_Barendreth_DeadOrd + 1 ) 29 if ( TR_m4_Barendreth_DeadOrd >= 10 ) 30 if ( GetJournalIndex "TR_m4_VA_BarendrethProtection" >= 10 ) 31 if ( GetJournalIndex "TR_m4_VA_BarendrethProtection" < 100 ) 32 Journal "TR_m4_VA_BarendrethProtection" 20 33 endif 34 endif 35 endif 36 if ( GetJournalIndex TR_m4_wil_CureDredaseDevani == 10 ) 37 Journal TR_m4_wil_CureDredaseDevani 150 38 endif 39endif 40 41if ( TR_m4_DredaseDevani == 0 ) 42 if ( GetDisabled ) 43 enable 44 endif 45elseif ( GetDisabled == 0 ) 46 disable 47endif 48 49if ( PCVampire == -1 ) 50 ; become peaceful if you cured your vampirism 51 if ( control < 2 ) 52 set control to 2 53 setfight 30 54 endif 55elseif ( PCVampire ) 56 ; attack on sight if you're a vampire 57 if ( control == 0 ) 58 set control to 1 59 setfight 100 60 endif 61endif 62 63if ( TR_Map ) 64 return 65endif 66 67set TR_Map to 4 68 69End