Scripts

TR_m7_NPC_RuddyEggsSlave

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