Scripts

TR_m3_HI_FastTravelSlave

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