T_ScNpc_Mw_Map4Slave
Tamriel_Data.esm
Variables
9
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin T_ScNpc_Mw_Map4Slave
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 ( slaveStatus == 2 )
24 if ( doOnce == 0 )
25 AIFollow Player 0 0 0 0 0
26 Set doOnce to 1
27 endif
28 return
29endif
30
31if ( slaveStatus == 3 )
32 if ( GetCurrentAIPackage == 3 )
33 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
34 endif
35 if ( GetItemCount Slave_Bracer_Left > 0 )
36 Drop Slave_Bracer_Left 1
37 endif
38 if ( GetItemCount Slave_Bracer_Right > 0 )
39 Drop Slave_Bracer_Right 1
40 endif
41 if ( CellChanged == 1 )
42 Disable
43 endif
44endif
45
46if ( T_Local_Khajiit )
47 return
48endif
49
50set T_Local_Khajiit to -1
51
52if ( GetRace "T_Els_Cathay" )
53 set T_Local_Khajiit to 1
54elseif ( GetRace "T_Els_Cathay-raht" )
55 set T_Local_Khajiit to 1
56elseif ( GetRace "T_Els_Dagi-raht" )
57 set T_Local_Khajiit to 1
58elseif ( GetRace "T_Els_Ohmes" )
59 set T_Local_Khajiit to 1
60elseif ( GetRace "T_Els_Ohmes-raht" )
61 set T_Local_Khajiit to 1
62elseif ( GetRace "T_Els_Suthay" )
63 set T_Local_Khajiit to 1
64elseif ( GetRace "T_Els_Tojay" )
65 set T_Local_Khajiit to 1
66elseif ( GetRace "Khajiit" )
67 set T_Local_Khajiit to 1
68endif
69set TR_Map to 4
70AddTopic "go free"
71
72end