Scripts

TR_m4_NPC_BthuangthuvThug

TR_Mainland.esm
Variables 6
Local Variables
TR_Map
disableOnce
combatOnce
T_Local_NPC
NoLore
timer
Source
1Begin TR_m4_NPC_BthuangthuvThug 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. 5 6short TR_Map 7short disableOnce 8short combatOnce 9float timer 10short T_Local_NPC 11short NoLore 12 13if ( disableOnce == 0 ) 14 if ( GetDisabled == 0 ) 15 disable 16 ForceRun 17 set disableOnce to 1 18 endif 19endif 20 21if ( GetDisabled == 1 ) 22 return 23endif 24 25if ( GetJournalIndex "TR_m4_TG_Shei6" >= 110 ) ;disable if there's peace 26 if ( GetJournalIndex "TR_m4_TG_Shei6" <= 125 ) 27 disable 28 endif 29endif 30 31if ( timer >= 7 ) 32 if ( combatOnce == 0 ) 33 set combatOnce to 1 34 endif 35endif 36 37if ( combatOnce == 1 ) 38 39 if ( GetDistance, "TR_m4_Shei" < 512 ) 40 if ( "TR_m4_Shei"->GetHealth >= 5 ) 41 startcombat, "TR_m4_Shei" 42 set combatOnce to 0 43 set timer to 0 44 endif 45 endif 46 47 if ( GetDistance, "TR_m4_Marug2" < 512 ) 48 if ( "TR_m4_Marug2"->GetHealth >= 5 ) 49 startcombat, "TR_m4_Marug2" 50 set combatOnce to 0 51 set timer to 0 52 endif 53 endif 54 55 if ( GetDistance, "TR_m4_rowdy rilmas" < 512 ) 56 if ( "TR_m4_rowdy rilmas"->GetHealth >= 5 ) 57 startcombat, "TR_m4_rowdy rilmas" 58 set combatOnce to 0 59 set timer to 0 60 endif 61 endif 62 63 if ( GetDistance, "TR_m4_Tattara2" < 512 ) 64 if ( "TR_m4_Tattara2"->GetHealth >= 5 ) 65 if ( "TR_m4_Tattara2"->GetDisabled == 0 ) 66 startcombat, "TR_m4_Tattara2" 67 set combatOnce to 0 68 set timer to 0 69 endif 70 endif 71 endif 72 73endif 74 75set timer to ( timer + GetSecondsPassed ) 76 77if ( TR_Map == 4 ) 78 return 79endif 80 81set TR_Map to 4 82 83End