Scripts

TR_m4_NPC_Shenjirra

TR_Mainland.esm
Variables 10
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
onPCHitMe
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m4_NPC_Shenjirra 2 3;Slave Status... each slave has a status as follows 4;0 = Owned ( default state... does not indicate who they are owned by ) 5;1 = For Sale ( someone in the game can "sell" this slave via dialogue ) 6;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player ) 7;3 = Freed ( the player has freed this slave, the slave eventually disables himself) 8;dead = not in slave status, but a state one should check for 9 10short slaveStatus 11short doOnce 12short NoLore 13short TR_Map 14short control 15short controlQ 16short onPCHitMe 17short T_Local_NPC 18short T_Local_NoLore 19short T_Local_Khajiit 20 21if ( GetDisabled ) 22 return 23endif 24 25if ( controlQ == 0 ) 26 if ( OnPCHitMe ) 27 set "TR_m4_Mols Varadras".controlQ to 1 28 set "TR_m4_Othrys Armuno".controlQ to 1 29 "TR_m4_Mols Varadras"->setfight 100 30 "TR_m4_Othrys Armuno"->setfight 100 31 "TR_m4_Mols Varadras"->startcombat player 32 "TR_m4_Othrys Armuno"->startcombat player 33 34 if ( GetJournalIndex "TR_m4_wil_CatCatchers" > 0 ) 35 if ( GetJournalIndex "TR_m4_wil_CatCatchers" < 100 ) 36 if ( GetJournalIndex "TR_m4_wil_CatCatchersB" < 20 ) 37 Journal "TR_m4_wil_CatCatchers" 110 38 endif 39 endif 40 endif 41 set controlQ to 1 42 endif 43endif 44 45if ( OnDeath ) 46 if ( GetJournalIndex "TR_m4_wil_CatCatchersB" == 20 ) 47 Journal "TR_m4_wil_CatCatchersB" 105 48 endif 49endif 50 51if ( slaveStatus == 2 ) 52 if ( doOnce == 0 ) 53 AIFollow Player 0 0 0 0 0 54 Set doOnce to 1 55 endif 56 return 57endif 58 59if ( slaveStatus == 3 ) 60 if ( GetCurrentAIPackage == 3 ) 61 AIWander 512 0 0 0 0 0 0 0 0 0 0 0 62 endif 63 if ( GetItemCount Slave_Bracer_Left > 0 ) 64 Drop Slave_Bracer_Left 1 65 endif 66 if ( GetItemCount Slave_Bracer_Right > 0 ) 67 Drop Slave_Bracer_Right 1 68 endif 69 if ( CellChanged == 1 ) 70 Disable 71 endif 72endif 73 74if ( T_Local_Khajiit ) 75 return 76endif 77 78set TR_Map to 4 79set T_Local_Khajiit to 1 80SetScale 0.91 81 82end