TR_m3_NPC_Jdaada
TR_Mainland.esm
Variables
9
Local Variables
slaveStatus
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
GameHourCheck
Source
1Begin TR_m3_NPC_Jdaada
2
3short slaveStatus
4short TR_Map
5short control
6short controlQ
7short NoLore
8short T_Local_NPC
9short T_Local_NoLore
10short T_Local_Khajiit
11float GameHourCheck
12
13if ( GetDisabled )
14 return
15endif
16
17if ( OnDeath )
18 if ( GetJournalIndex TR_m3_wil_BrothChain < 100 )
19 if ( GetJournalIndex TR_m3_wil_BrothChain > 0 )
20 Journal TR_m3_wil_BrothChain 200
21 endif
22 endif
23endif
24
25if ( slaveStatus == 3 )
26 if ( GetCurrentAIPackage == 3 )
27 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
28 endif
29 if ( GetItemCount Slave_Bracer_Left > 0 )
30 Drop Slave_Bracer_Left 1
31 endif
32 if ( GetJournalIndex TR_m3_wil_BrothChain > 0 )
33 if ( GetJournalIndex TR_m3_wil_BrothChain < 100 )
34 Journal TR_m3_wil_BrothChain 125
35 endif
36 endif
37 if ( CellChanged )
38 if ( GetInterior )
39 Disable
40 return
41 else
42 ;do not disable when crossing exterior cell borders
43 set GameHourCheck to ( ( GameHour - GameHourCheck ) * 30 / TimeScale )
44 if ( GameHourCheck < 0 )
45 set GameHourCheck to ( -1 * GameHourCheck )
46 endif
47 if ( GameHourCheck < 0.01 )
48 ;max view distance
49 if ( GetDistance player < 7168 )
50 return
51 endif
52 endif
53 Disable
54 endif
55 endif
56endif
57set GameHourCheck to GameHour
58
59if ( TR_Map == 3 )
60 return
61endif
62
63if ( T_Local_Khajiit )
64 return
65endif
66
67set T_Local_Khajiit to 1
68set TR_Map to 3
69AddTopic "go free"
70
71End