TR_m7_NPC_DrabashtiScript
TR_Mainland.esm
Variables
8
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_Khajiit
Source
1Begin TR_m7_NPC_DrabashtiScript
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_Khajiit
21
22if ( slaveStatus == 2 )
23 if ( doOnce == 0 )
24 AIFollow Player 0 0 0 0 0
25 Set doOnce to 1
26 endif
27 return
28endif
29
30if ( slaveStatus == 3 )
31 if ( GetCurrentAIPackage == 3 )
32 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
33 endif
34 if ( GetItemCount "Slave_Bracer_Left" > 0 )
35 Drop "Slave_Bracer_Left" 1
36 endif
37 if ( GetItemCount "Slave_Bracer_Right" > 0 )
38 Drop "Slave_Bracer_Right" 1
39 endif
40 if ( CellChanged == 1 )
41 Disable
42 endif
43endif
44
45if ( GetJournalIndex "TR_m7_HH_Raran2" == 100 )
46 if ( CellChanged == 1 )
47 PositionCell 4871.644043 2678.656982 15559.291016 0 "Narsis, Slave Market"
48 AIWander 0, 0, 0
49 set SlaveStatus to 0
50 endif
51endif
52
53if ( T_Local_Khajiit )
54 return
55endif
56
57set T_Local_Khajiit to 1
58set TR_Map to 7
59AddTopic "go free"
60
61End