Scripts

TR_m7_NPC_Shojata

TR_Mainland.esm
Variables 8
Local Variables
slaveStatus
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m7_NPC_Shojata 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 slave NPCs. 5; 6;Slave Status... each slave has a status as follows 7;0 = Owned ( default state... does not indicate who they are owned by ) 8;1 = For Sale ( someone in the game can "sell" this slave via dialogue ) 9;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player ) 10;3 = Freed ( the player has freed this slave, the slave eventually disables himself) 11;dead = not in slave status, but a state one should check for 12 13short slaveStatus 14short NoLore 15short TR_Map 16short control 17short controlQ 18short T_Local_NPC 19short T_Local_NoLore 20short T_Local_Khajiit 21 22if ( CellChanged == 1 ) 23 if ( GetDisabled ) 24 if ( slaveStatus != 3 ) 25 if ( GetJournalIndex TR_m7_HR_AldIuval_q4 == 10 ) 26 Enable 27 endif 28 endif 29 elseif ( slaveStatus == 3 ) 30 if ( GetPCCell "Hlerynhul, Selvilo Manor" == 1 ) 31 Disable 32 elseif ( GetDistance "Player" >= 8192 ) 33 Disable 34 endif 35 elseif ( GetJournalIndex TR_m7_HR_AldIuval_q4 >= 30 ) 36 Disable 37 endif 38endif 39 40if ( slaveStatus == 3 ) 41 if ( GetItemCount Slave_Bracer_Left > 0 ) 42 Drop Slave_Bracer_Left 1 43 endif 44 if ( MenuMode == 0 ) 45 if ( GetJournalIndex TR_m7_HR_AldIuval_q4_a == 100 ) 46 if ( "TR_m7_Mendyn Hereloth".controlQ == 0 ) 47 "TR_m7_Mendyn Hereloth"->ForceGreeting 48 endif 49 endif 50 endif 51endif 52 53if ( T_Local_Khajiit ) 54 return 55endif 56 57set T_Local_Khajiit to 1 58set TR_Map to 7 59 60end