Scripts

TR_m4_NPC_BthuangthuvSquatter

TR_Mainland.esm
Variables 9
Local Variables
TR_Map
control
controlQ
TR_BthuangthuvSquatter
NoLore
doOnce
disableOnce
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m4_NPC_BthuangthuvSquatter 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 control 8short controlQ 9short TR_BthuangthuvSquatter 10short NoLore 11short doOnce 12short disableOnce 13short T_Local_NPC 14short T_Local_NoLore 15;global TR_m4_TG_SquatterDead 16;global TR_m4_TG_AndoSquatterSkooma 17 18 19;----checks if the player has sold skooma to the squatters (Faylene will be upset) 20 21if ( GetItemCount "potion_skooma_01" >= 1 ) 22 if ( TR_m4_TG_AndoSquatterSkooma == 0 ) 23 set TR_m4_TG_AndoSquatterSkooma to 1 24 endif 25endif 26 27;----this keeps track of how many of the squatters in Bthuangthuv have been killed 28 29if ( OnDeath == 1 ) 30 if ( doOnce == 0 ) 31 set TR_m4_TG_SquatterDead to ( TR_m4_TG_SquatterDead + 1 ) 32 set doOnce to 1 33 endif 34endif 35 36;-----this gives a Journal entry if the squatters are killed during the first TG quest 37 38if ( TR_m4_TG_SquatterDead >= 4 ) 39 if ( GetJournalIndex "TR_m4_TG_Shei1" < 80 ) 40 if ( GetJournalIndex "TR_m4_TG_Shei1" >= 30 ) 41 Journal "TR_m4_TG_Shei1" 80 42 endif 43 endif 44endif 45 46;-----this disables the squatters, if the player pays them to leave 47 48if ( GetJournalIndex "TR_m4_TG_Shei1" == 150 ) 49 if ( CellChanged == 1 ) 50 if ( disableOnce == 0 ) 51 disable 52 set disableOnce to 1 53 endif 54 endif 55endif 56 57 58if ( TR_Map == 4 ) 59 return 60endif 61 62set TR_Map to 4 63 64End