Scripts

TR_m3_q_Deed_Script_JarJo

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_m3_q_Deed_Script_JarJo 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 13; alterations to disable slaves 14 15short slaveStatus 16short doOnce 17short NoLore 18short TR_Map 19short control 20short controlQ 21short T_Local_NPC 22short T_Local_NoLore 23short T_Local_Khajiit 24 25if ( GetDisabled ) 26 return 27endif 28 29if ( CellChanged ) 30 if ( GetHealth > 0 ) 31 if ( GetJournalIndex TR_m3_AT_Deed > 10 ) 32 Disable 33 elseif ( GetJournalIndex TR_m3_AT_Deed_d == 100 ) 34 Disable 35 set TR_m3_AT_Deed_SlaveFreed to 1 36 StartScript TR_m3_q_Deed_Script_01 37 endif 38 endif 39endif 40 41if ( OnDeath ) 42 if ( GetJournalIndex TR_m3_AT_Deed == 10 ) 43 set TR_m3_AT_Deed_SlaveKilled to 1 44 endif 45endif 46 47if ( slaveStatus == 2 ) 48 if ( doOnce == 0 ) 49 AIFollow Player 0 0 0 0 0 50 Set doOnce to 1 51 endif 52 return 53endif 54 55if ( slaveStatus == 3 ) 56 if ( GetCurrentAIPackage == 3 ) 57 AIWander 512 0 0 0 0 0 0 0 0 0 0 0 58 endif 59 if ( GetItemCount Slave_Bracer_Left > 0 ) 60 Drop Slave_Bracer_Left 1 61 endif 62 if ( GetItemCount Slave_Bracer_Right > 0 ) 63 Drop Slave_Bracer_Right 1 64 endif 65 if ( CellChanged == 1 ) 66 Disable 67 endif 68endif 69 70if ( T_Local_Khajiit ) 71 return 72endif 73 74set T_Local_Khajiit to -1 75 76if ( GetRace "T_Els_Cathay" ) 77 set T_Local_Khajiit to 1 78elseif ( GetRace "T_Els_Cathay-raht" ) 79 set T_Local_Khajiit to 1 80elseif ( GetRace "T_Els_Dagi-raht" ) 81 set T_Local_Khajiit to 1 82elseif ( GetRace "T_Els_Ohmes" ) 83 set T_Local_Khajiit to 1 84elseif ( GetRace "T_Els_Ohmes-raht" ) 85 set T_Local_Khajiit to 1 86elseif ( GetRace "T_Els_Suthay" ) 87 set T_Local_Khajiit to 1 88elseif ( GetRace "T_Els_Tojay" ) 89 set T_Local_Khajiit to 1 90elseif ( GetRace "Khajiit" ) 91 set T_Local_Khajiit to 1 92endif 93set TR_Map to 3 94 95end