Scripts

TR_m4_NPC_Maelros

TR_Mainland.esm
Variables 7
Local Variables
TR_Map
control
controlQ
doOnce
NoLore
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m4_NPC_Maelros 2; This short script is there to allow dialogue to be filtered on the TR_Map local variable, 3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be 4; appropriate to the location the NPC is. This version is for "NoLore" NPCs. 5 6short TR_Map 7short control 8short controlQ 9short doOnce 10short NoLore 11short T_Local_NPC 12short T_Local_NoLore 13 14if ( GetJournalIndex "TR_m7_HH_Sathis3" >= 10 ) 15 if ( doOnce == 0 ) 16 "TR_m4_O_Davona"->SetFight 73 17 "TR_m4_O_Dallus"->SetFight 73 18 "TR_m4_O_Cayd"->SetFight 73 19 "TR_m4_O_Maelros"->SetFight 73 20 set doOnce to 1 21 endif 22endif 23 24if ( GetJournalIndex "TR_m7_HH_Sathis3" >= 10 ) 25 if ( GetJournalIndex "TR_m7_HH_Sathis3" < 80 ) 26 if ( GetDeadCount "TR_m4_O_Davona" >= 1 ) 27 if ( GetDeadCount "TR_m4_O_Dallus" >= 1 ) 28 if ( GetDeadCount "TR_m4_O_Cayd" >= 1 ) 29 if ( GetDeadCount "TR_m4_O_Maelros" >= 1 ) 30 Journal "TR_m7_HH_Sathis3" 80 31 endif 32 endif 33 endif 34 endif 35 endif 36endif 37 38if ( control == 0 ) 39 if ( "TR_m4_O_Davona"->GetHealthGetRatio < 1 ) 40 "TR_m4_O_Davona"->SetFight 100 41 "TR_m4_O_Dallus"->SetFight 100 42 "TR_m4_O_Cayd"->SetFight 100 43 "TR_m4_O_Maelros"->SetFight 100 44 set control to 1 45 elseif ( "TR_m4_O_Dallus"->GetHealthGetRatio < 1 ) 46 "TR_m4_O_Davona"->SetFight 100 47 "TR_m4_O_Dallus"->SetFight 100 48 "TR_m4_O_Cayd"->SetFight 100 49 "TR_m4_O_Maelros"->SetFight 100 50 set control to 1 51 elseif ( "TR_m4_O_Cayd"->GetHealthGetRatio < 1 ) 52 "TR_m4_O_Davona"->SetFight 100 53 "TR_m4_O_Dallus"->SetFight 100 54 "TR_m4_O_Cayd"->SetFight 100 55 "TR_m4_O_Maelros"->SetFight 100 56 set control to 1 57 elseif ( "TR_m4_O_Maelros"->GetHealthGetRatio < 1 ) 58 "TR_m4_O_Davona"->SetFight 100 59 "TR_m4_O_Dallus"->SetFight 100 60 "TR_m4_O_Cayd"->SetFight 100 61 "TR_m4_O_Maelros"->SetFight 100 62 set control to 1 63 endif 64endif 65 66if ( TR_Map == 4 ) 67 return 68endif 69 70set TR_Map to 4 71 72End