TR_m4_NPC_S_Razamar
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_m4_NPC_S_Razamar
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_NoLore
21short T_Local_Khajiit
22
23if ( ondeath == 1 )
24 set TR_m4_FG_LlaranStateB to 2
25 if ( GetJournalIndex TR_m3_FG_AT_5 == 10 )
26 journal TR_m3_FG_AT_5_b 10
27 if ( TR_m4_FG_LlaranStateC )
28 journal TR_m3_FG_AT_5 50
29 endif
30 endif
31endif
32
33if ( slaveStatus == 2 )
34 if ( doOnce == 0 )
35 AIFollow Player 0 0 0 0 0
36 Set doOnce to 1
37 endif
38 return
39endif
40
41if ( slaveStatus == 3 )
42 if ( GetCurrentAIPackage == 3 )
43 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
44 endif
45 if ( GetItemCount Slave_Bracer_Left > 0 )
46 Drop Slave_Bracer_Left 1
47 endif
48 if ( GetItemCount Slave_Bracer_Right > 0 )
49 Drop Slave_Bracer_Right 1
50 endif
51 if ( CellChanged == 1 )
52 Disable
53 endif
54endif
55
56if ( slavestatus == 3 )
57 if ( controlQ == 0 )
58 set TR_m4_FG_LlaranStateB to 1
59 if ( GetJournalIndex TR_m3_FG_AT_5 == 10 )
60 journal TR_m3_FG_AT_5_b 5
61 if ( TR_m4_FG_LlaranStateC )
62 journal TR_m3_FG_AT_5 50
63 endif
64 endif
65 set controlQ to 1
66 endif
67endif
68
69if ( T_Local_Khajiit )
70 return
71endif
72
73set TR_Map to 4
74set T_Local_Khajiit to 1
75
76end