TR_m3_RDHlesVervul-Script
TR_Mainland.esm
Variables
9
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
DoOnce
ProtectOnce
NewOnce
Source
1Begin TR_m3_RDHlesVervul-Script
2
3short TR_Map
4short control
5short controlQ
6short NoLore
7Short T_Local_NPC
8short T_Local_NoLore
9Short DoOnce
10Short ProtectOnce
11Short NewOnce
12
13If ( cellchanged == 1 ) ;disables the npcs on cellchange in the one scenario where you complete the quest in their vicinity.
14 If ( GetJournalIndex "TR_m4_And_Routinedelivery" == 100 )
15 if ( getdisabled == 0 )
16 disable
17 Endif
18 Endif
19Endif
20
21If ( Control == 0 ) ;enables the npc
22 If ( GetJournalIndex "TR_m4_And_Routinedelivery" < 30 )
23 Disable
24 set control to 1
25 Endif
26Endif
27
28If ( newonce == 0 ) ;changes control variable
29 If ( GetJournalIndex "TR_m4_And_Routinedelivery" >= 30 )
30 enable
31 set control to 2
32 set newonce to 1
33 Endif
34Endif
35
36If ( getdisabled == 0 ) ;should disable the npc after the quest is over. unless they're dead.
37 If ( GetJournalIndex "TR_m4_And_Routinedelivery" == 100 )
38 Return
39 Elseif ( GetJournalIndex "TR_m4_And_Routinedelivery" >= 75 )
40 If ( gethealth != 0 )
41 Disable
42 Endif
43 Endif
44Endif
45
46If ( controlq == 0 ) ; should update the journal once the player is in proximity of the npc.
47 If ( control == 2 )
48 If ( GetJournalIndex "TR_m4_And_Routinedelivery" <= 30 )
49 If ( GetDistance, player <= 1000 )
50 Journal "TR_m4_And_Routinedelivery" 40
51 Set controlq to 1
52 Endif
53 Endif
54 Endif
55Endif
56
57If ( ProtectOnce == 0 ) ;should make it so this npc protects other members of Hles Vervul's gang
58 If ( "TR_m3_Dorog_Gro-Durin"->GetAttacked == 1 )
59 StartCombat player
60 SetFight 90
61 SetDisposition 0
62 Set ProtectOnce to 1
63 elseif ("TR_m3_Sulada_Syrivis"->GetAttacked == 1 )
64 StartCombat player
65 Setfight 90
66 SetDisposition 0
67 Set ProtectOnce to 1
68 endif
69endif
70
71If ( DoOnce != 1 ) ;updates global variable TR_m3_q_RD_HlesGangDead when the npc is killed.
72 If ( GetJournalIndex "TR_m4_And_Routinedelivery" < 100 )
73 If ( Ondeath == 1 )
74 Set TR_m3_q_RD_HlesGangDead to ( TR_m3_q_RD_HlesGangDead + 1 )
75 Set DoOnce to 1
76 Endif
77 Endif
78Endif
79
80If ( TR_m3_q_RD_HlesGangDead == 3 )
81 Journal "TR_m4_And_Routinedelivery" 66
82 Set TR_m3_q_RD_HlesGangDead to 4
83Endif
84
85if ( TR_Map == 3 )
86 return
87endif
88
89set TR_Map to 3
90
91end