TR_m2_FG_Rethynscript
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
control
controlQ
NoLore
doonce
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m2_FG_Rethynscript
2; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
3; also makes Rethyn forcegreet and teleport when needed
4; forcegreeting while low hp, causes surrender/giving up of loot
5; artea forcegreeting when near her, this greeting should cause Rethyn to aiwander 0 0 0
6
7short TR_Map
8short control
9short controlQ
10short NoLore
11short doonce
12short T_Local_NPC
13short T_Local_NoLore
14
15if ( TR_map == 0 )
16 set TR_Map to 2
17endif
18
19if ( ondeath == 1 )
20 if ( getjournalindex TR_m2_FG_Hartise_Rethyn < 100 )
21 if ( getjournalindex TR_m2_FG_Hartise_Rethyn > 0 )
22 journal TR_m2_FG_Hartise_Rethyn 60
23 endif
24 elseif ( getjournalindex TR_m2_FG_Hartise_Rethyn > 100 )
25 if ( getjournalindex TR_m2_FG_Hartise_Selyn < 100 )
26 if ( getjournalindex TR_m2_FG_Hartise_Selyn2 < 50 )
27 journal TR_m2_FG_Hartise_Selyn2 50
28 endif
29 endif
30 endif
31endif
32
33if ( getjournalindex TR_m2_FG_Hartise_Rethyn == 10 )
34 if ( doonce == 0 )
35 if ( gethealth < 40 )
36 set doonce to 1
37 stopcombat
38 setfight 0
39 aifollow player 0 0 0 0
40 forcegreeting
41 endif
42 endif
43endif
44
45if ( doonce == 1 )
46 if ( getdistance "TR_m2_Hermea Artea" < 200 )
47 if ( GetJournalIndex TR_m2_FG_Hartise_Selyn2 < 50 )
48 set doonce to 2
49 aiwander 0 0 0 0
50 Journal TR_m2_FG_Hartise_Rethyn 45
51 "TR_m2_Hermea Artea"->forcegreeting
52 endif
53 endif
54endif
55
56if ( getjournalindex TR_m2_FG_Hartise_Selyn2 == 5 )
57 if ( controlQ == 1 )
58 if ( getpccell "Helnim" == 1 )
59 if ( getpccell "Helnim, Prison Tower" == 0 )
60 if ( getpccell "Helnim, Fort Servas" == 0 )
61 if ( getpccell "Helnim, Walls" == 0 )
62 forcegreeting
63 endif
64 endif
65 endif
66 endif
67 endif
68endif
69
70End