Scripts

TR_m1_q_SlaveDiseased

TR_Mainland.esm
Variables 10
Local Variables
diseased
slaveStatus
doOnce
NoLore
TR_Map
control
addOnce
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m1_q_SlaveDiseased 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 diseased 14short slaveStatus 15short doOnce 16short NoLore 17short TR_Map 18short control 19short addOnce 20short T_Local_NPC 21short T_Local_NoLore 22short T_Local_Khajiit 23 24if ( GetCommonDisease ) 25 set diseased to 1 26elseif ( addOnce == 0 ) 27 if ( getJournalIndex TR_m1_TT_2 >= 10 ) 28 set diseased to 0 29 set TR_m1_TT_2_PTSlavesReward to ( TR_m1_TT_2_PTSlavesReward + 1 ) 30 Journal TR_m1_TT_2 50 31 if ( TR_m1_TT_2_PTSlavesReward == 4 ) 32 Journal TR_m1_TT_2_Status 50 33 endif 34 set addOnce to 1 35 endif 36endif 37 38if ( slaveStatus == 2 ) 39 if ( doOnce == 0 ) 40 AIFollow Player 0 0 0 0 0 41 Set doOnce to 1 42 endif 43 return 44endif 45 46if ( slaveStatus == 3 ) 47 if ( GetCurrentAIPackage == 3 ) 48 AIWander 512 0 0 0 0 0 0 0 0 0 0 0 49 endif 50 if ( GetItemCount Slave_Bracer_Left > 0 ) 51 Drop Slave_Bracer_Left 1 52 endif 53 if ( GetItemCount Slave_Bracer_Right > 0 ) 54 Drop Slave_Bracer_Right 1 55 endif 56 if ( CellChanged ) 57 Disable 58 endif 59endif 60 61 62if ( T_Local_Khajiit ) 63 return 64endif 65 66set T_Local_Khajiit to -1 67 68if ( GetRace "T_Els_Cathay" ) 69 set T_Local_Khajiit to 1 70elseif ( GetRace "T_Els_Cathay-raht" ) 71 set T_Local_Khajiit to 1 72elseif ( GetRace "T_Els_Dagi-raht" ) 73 set T_Local_Khajiit to 1 74elseif ( GetRace "T_Els_Ohmes" ) 75 set T_Local_Khajiit to 1 76elseif ( GetRace "T_Els_Ohmes-raht" ) 77 set T_Local_Khajiit to 1 78elseif ( GetRace "T_Els_Suthay" ) 79 set T_Local_Khajiit to 1 80elseif ( GetRace "T_Els_Tojay" ) 81 set T_Local_Khajiit to 1 82elseif ( GetRace "Khajiit" ) 83 set T_Local_Khajiit to 1 84endif 85set TR_Map to 1 86 87end