TR_m1_q_New_Hindas
TR_Mainland.esm
Variables
8
Local Variables
slaveStatus
doOnce
donestate
NoLore
TR_Map
control
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m1_q_New_Hindas
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 donestate
16short NoLore
17short TR_Map
18short control
19short T_Local_NPC
20short T_Local_NoLore
21
22if ( donestate == 0 )
23 disable
24 set donestate to 1
25endif
26
27if ( slaveStatus == 2 )
28 if ( doOnce == 0 )
29 AIFollow Player 0 0 0 0 0
30 Set doOnce to 1
31 endif
32 return
33endif
34
35if ( slaveStatus == 3 )
36 if ( GetCurrentAIPackage == 3 )
37 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
38 endif
39 if ( GetItemCount Slave_Bracer_Left > 0 )
40 Drop Slave_Bracer_Left 1
41 endif
42 if ( GetItemCount Slave_Bracer_Right > 0 )
43 Drop Slave_Bracer_Right 1
44 endif
45 if ( CellChanged )
46 Disable
47 endif
48endif
49
50if ( TR_Map == 1 )
51 return
52endif
53
54set TR_Map to 1
55
56end