TR_m3_NPC_HvaldurScript
TR_Mainland.esm
Variables
8
Local Variables
slaveStatus
doOnce
NoLore
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m3_NPC_HvaldurScript
2
3; this is a script for Hvaldur Harrow-Hand (TR_m3_S_Hvaldur),
4; a slave in Munat Egg Mine.
5; he has a tiny quest attached to him, hence the unique script.
6
7; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
8; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
9; appropriate to the location the NPC is. This version is for slave NPCs.
10;
11;Slave Status... each slave has a status as follows
12;0 = Owned ( default state... does not indicate who they are owned by )
13;1 = For Sale ( someone in the game can "sell" this slave via dialogue )
14;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player )
15;3 = Freed ( the player has freed this slave, the slave eventually disables himself)
16;dead = not in slave status, but a state one should check for
17
18short slaveStatus
19short doOnce
20short NoLore
21short TR_Map
22short control
23short controlQ
24short T_Local_NPC
25short T_Local_NoLore
26
27if ( OnDeath == 1 )
28 if ( GetJournalIndex "TR_m3_wil_Hvaldur" == 10 )
29 Journal "TR_m3_wil_Hvaldur" 200
30 endif
31endif
32
33if ( slaveStatus == 3 )
34 if ( GetCurrentAIPackage == 3 )
35 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
36 endif
37 if ( GetItemCount Slave_Bracer_Right > 0 )
38 Drop Slave_Bracer_Right 1
39 endif
40 if ( CellChanged == 1 )
41 Disable
42 endif
43endif
44
45
46if ( TR_Map == 3 )
47 return
48endif
49
50set TR_Map to 3
51
52end