TR_m4_NPC_Jerra
TR_Mainland.esm
Variables
13
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
TR_m4_OranSlave
disableOnce
thisDay
goalDay
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m4_NPC_Jerra
2
3; this script is on NPC TR_m4_Jerra.
4
5;this is for the Slaves in the Oran Plantation and its surrounding area
6;they have a unique short TR_m4_OranSlave, which will be used when freeing the slaves
7
8; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
9; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
10; appropriate to the location the NPC is. This version is for slave NPCs.
11;
12;Slave Status... each slave has a status as follows
13;0 = Owned ( default state... does not indicate who they are owned by )
14;1 = For Sale ( someone in the game can "sell" this slave via dialogue )
15;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player )
16;3 = Freed ( the player has freed this slave, the slave eventually disables himself)
17;dead = not in slave status, but a state one should check for
18
19
20short slaveStatus
21short doOnce
22short NoLore
23short TR_Map
24short control
25short controlQ
26short TR_m4_OranSlave
27short disableOnce
28short thisDay
29short goalDay
30short T_Local_NPC
31short T_Local_NoLore
32short T_Local_Khajiit
33
34if ( disableOnce == 0 )
35 disable
36 set disableOnce to 1
37endif
38
39if ( GetJournalIndex "TR_m4_wil_HouseholdSlave" == 110 )
40 if ( goalDay == 0 )
41 set thisDay to Day
42 set goalDay to ( thisDay + 5 )
43 endif
44endif
45
46if ( Day == goalDay )
47 if ( disableOnce == 1 )
48 set disableOnce to 2
49 enable
50 endif
51endif
52
53if ( slaveStatus == 2 )
54 if ( doOnce == 0 )
55 AIFollow Player 0 0 0 0 0
56 Set doOnce to 1
57 endif
58 return
59endif
60
61if ( slaveStatus == 3 )
62 if ( GetCurrentAIPackage == 3 )
63 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
64 endif
65 if ( GetItemCount Slave_Bracer_Left > 0 )
66 Drop Slave_Bracer_Left 1
67 endif
68 if ( GetItemCount Slave_Bracer_Right > 0 )
69 Drop Slave_Bracer_Right 1
70 endif
71 if ( CellChanged == 1 )
72 Disable
73 endif
74endif
75
76if ( T_Local_Khajiit )
77 return
78endif
79
80set TR_Map to 4
81set T_Local_Khajiit to 1
82
83end