TR_m3_Wil_CleanSweep_Ashes_sc
TR_Mainland.esm
Variables
8
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m3_Wil_CleanSweep_Ashes_sc
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 Swept-Ashes, as he's used in the quest
5;TR_m3_Mar_CleanSweep
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 doOnce
16short NoLore
17short TR_Map
18short control
19short controlQ
20short T_Local_NPC
21short T_Local_NoLore
22
23set "TR_m3_Wil_CleanSweep_SA_Slave" to slaveStatus
24
25
26if ( OnDeath )
27 if ( GetJournalIndex "TR_m3_Wil_CleanSweep" >= 10 )
28 if ( GetJournalIndex "TR_m3_Wil_CleanSweep" < 100 )
29 Journal "TR_m3_Wil_CleanSweep" 103
30 endif
31 endif
32endif
33
34
35if ( slaveStatus == 2 )
36 if ( doOnce == 0 )
37 AIFollow Player 0 0 0 0 0
38 Set doOnce to 1
39 endif
40 return
41endif
42
43if ( slaveStatus == 3 )
44 if ( GetCurrentAIPackage == 3 )
45 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
46 endif
47 if ( GetItemCount Slave_Bracer_Left > 0 )
48 Drop Slave_Bracer_Left 1
49 endif
50 if ( GetItemCount Slave_Bracer_Right > 0 )
51 Drop Slave_Bracer_Right 1
52 endif
53 if ( CellChanged == 1 )
54 Disable
55 endif
56endif
57
58set TR_Map to 3
59AddTopic "go free"
60
61end