TR_NecMQ_SovorSadusScript
TR_Mainland.esm
Variables
5
Local Variables
TR_Map
NoLore
T_Local_NPC
controlQ
T_Local_Nolore
Source
1Begin TR_NecMQ_SovorSadusScript
2
3; this script controls Sovor Sadus (the avatar of Sotha Sil) during the madman's ringlet quest
4; 6+
5
6Short TR_Map
7Short NoLore
8Short T_Local_NPC
9Short controlQ
10short T_Local_Nolore
11
12set tr_map to 3
13
14if ( MenuMode == 1 )
15 Return
16endif
17
18; if the PC murders Sovor for some reason, update journal and optionally add the ringlet to his inventory
19
20if ( OnDeath == 1 )
21 if ( GetJournalIndex TR_NecMQ_Madman < 45 )
22 Journal TR_NecMQ_Madman 40
23 AddItem TR_NecMQ_RingletMadman 1
24 Set controlQ to 2
25 else
26 Set controlQ to 3
27 endif
28endif
29
30; the PC got the ringlet from Sovor who can be disappear again
31
32if ( controlQ == 4 )
33 if ( GetDisabled == 0 )
34 Disable
35 else
36 SetDelete 1
37 endif
38
39elseif ( controlQ == 3 )
40 if ( GetJournalIndex TR_NecMQ_Madman == 55 )
41 Set controlQ to 4
42 elseif ( GetJournalIndex TR_NecMQ_Madman == 70 )
43 Set controlQ to 4
44 endif
45
46; if the PC takes the ringlet from Sovor's dead body, update the journal
47
48elseif ( controlQ == 2 )
49 if ( Player -> GetItemCount TR_NecMQ_RingletMadman > 0 )
50 if ( GetJournalIndex TR_NecMQ_2Path == 10 )
51 Journal TR_NecMQ_Madman 50
52 elseif ( GetJournalIndex TR_NecMQ_2Path == 50 )
53 Journal TR_NecMQ_Madman 65
54 endif
55 Set controlQ to 3
56 endif
57
58; enable Sovor once the PC learns his name from Mephala
59
60elseif ( controlQ == 1 )
61 if ( GetJournalIndex TR_NecMQ_Madman >= 8 )
62 if ( GetDisabled == 1 )
63 Enable
64 else
65 Set controlQ to 3
66 endif
67 endif
68
69; Sovor starts out disabled
70
71elseif ( controlQ == 0 )
72 if ( GetDisabled == 0 )
73 Disable
74 else
75 Set controlQ to 1
76 endif
77
78endif
79
80End