TR_m3_NPC_Staunch-Roots
TR_Mainland.esm
Variables
13
Local Variables
slaveStatus
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
X1
X2
X3
X4
X5
X6
Source
1Begin TR_m3_NPC_Staunch-Roots
2
3; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
4; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
5; appropriate to the location the NPC is. This version is for slave NPCs.
6;
7;Slave Status... each slave has a status as follows
8;0 = Owned ( default state... does not indicate who they are owned by )
9;1 = For Sale ( someone in the game can "sell" this slave via dialogue )
10;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player )
11;3 = Freed ( the player has freed this slave, the slave eventually disables himself)
12;dead = not in slave status, but a state one should check for
13
14short slaveStatus
15short NoLore
16short TR_Map
17short control
18short controlQ
19short T_Local_NPC
20short T_Local_NoLore
21
22; Counts the total amount of books donated during the quest "Slave Rising"
23; Below are local variables which track whether a given book has already been donated during the quest "Slave Rising"
24
25short X1
26short X2
27short X3
28short X4
29short X5
30short X6
31
32; Updates journal if killed during the quest "Slave Rising"
33
34if ( OnDeath == 1 )
35 if ( GetJournalIndex TR_m3_Nnv_SlaveRising >= 10 )
36 if ( GetJournalIndex TR_m3_Nnv_SlaveRising < 100 )
37 Journal "TR_m3_Nnv_SlaveRising" 120
38 StopScript "TR_m3_SR_Timer_sc"
39 endif
40 endif
41endif
42
43if ( CellChanged == 1 )
44 if ( GetJournalIndex "TR_m3_Nnv_SlaveRising" >= 75 )
45 if ( GetJournalIndex "TR_m3_Nnv_SlaveRising" <= 100 )
46 Disable
47 endif
48 endif
49endif
50
51if ( slaveStatus == 3 )
52 if ( GetCurrentAIPackage == 3 )
53 AIWander 180 5 0 40 20 15 0 15
54 endif
55 if ( GetItemCount Slave_Bracer_Right > 0 )
56 Drop Slave_Bracer_Right 1
57 endif
58 if ( CellChanged == 1 )
59 Disable
60 endif
61endif
62
63if ( TR_Map )
64 return
65endif
66
67set TR_Map to 3
68AddTopic "go free"
69
70end