TR_m4_GorasRayveth_sc
TR_Mainland.esm
Variables
8
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
T_Local_NoLore
castonce
doonce
Source
1Begin TR_m4_GorasRayveth_sc
2
3short TR_Map
4short control
5short controlQ
6short T_Local_NPC
7short NoLore
8short T_Local_NoLore
9short castonce
10short doonce
11
12if ( doonce == 0 )
13 if ( GetDeadCount "TR_m4_Dredase_Devani" >= 1 )
14 setfight 100
15 return
16 endif
17endif
18
19if ( GetJournalIndex TR_m4_wil_CureDredaseDevani >= 10 )
20 if ( GetPCCell "Barendreth, Underground" == 1 )
21 if ( GetDistance "TR_m4_Dredase_Devani" < 350 )
22 if ( castonce == 0 )
23 Cast "cure common disease other" "TR_m4_Dredase_Devani"
24 set castonce to 1
25 AiWander 100 0 0 40 20 20 0 0 0 0 0 0
26 StartScript TR_m4_MoveGorasRayveth
27 return
28 endif
29 endif
30 endif
31endif
32
33if ( OnDeath )
34 set TR_m4_Barendreth_DeadOrd to ( TR_m4_Barendreth_DeadOrd + 1 )
35 if ( TR_m4_Barendreth_DeadOrd >= 10 )
36 if ( GetJournalIndex "TR_m4_VA_BarendrethProtection" >= 10 )
37 if ( GetJournalIndex "TR_m4_VA_BarendrethProtection" < 100 )
38 Journal "TR_m4_VA_BarendrethProtection" 20
39 endif
40 endif
41 endif
42endif
43
44if ( PCVampire == -1 )
45 ; become peaceful if you cured your vampirism
46 if ( control < 2 )
47 set control to 2
48 setfight 30
49 endif
50elseif ( PCVampire )
51 ; attack on sight if you're a vampire
52 if ( control == 0 )
53 set control to 1
54 setfight 100
55 endif
56endif
57
58if ( TR_Map )
59 return
60endif
61
62set TR_Map to 4
63
64End