TR_m2_q_29_4_Surol_Script
TR_Mainland.esm
Variables
12
Local Variables
TR_Map
control
controlQ
doOnce
NoLore
OnPCHitMe
championmode
T_Local_NPC
T_Local_NoLore
xpos
ypos
zpos
Source
1Begin TR_m2_q_29_4_Surol_Script
2
3short TR_Map
4short control
5short controlQ
6short doOnce
7short NoLore
8short OnPCHitMe
9float xpos
10float ypos
11float zpos
12short championmode
13short T_Local_NPC
14short T_Local_NoLore
15
16;meet Surol Volayn, the weird girl who makes an appearance a couple of times in the Akamora questline
17;this is the script that handles most of her behavior (some of it is done via dialogue result boxes)
18;I've done my best to add comments
19
20;10 Apr 2014 - cleanup, fixes and blocks moved around
21
22;11th December 2013 edit: the script has been altered so that it _works_
23;however, it looks like a clusterfuck
24;sorry
25
26;3rd January 2014 edit: further edits. works even better
27
28if ( MenuMode == 1 )
29 return
30endif
31
32if ( GetEffect, sEffectCommandHumanoids == 1 ) ;she's immune to Command spells
33 RemoveEffects, 119
34endif
35
36if ( GetPCCell "Shambalu, Shrine" == 1 )
37 if ( controlQ < 5 ) ;Surol will disappear and appear in Shambalu after the player has completed the previous quest (topic Akavorioc)
38 if ( GetJournalIndex "TR_m2_FG_Irano3" >= 100 )
39 SetParalysis 1 ;she'll be paralyzed to emulate captivity
40 set controlQ to 5
41 endif
42 endif
43endif
44
45
46; TR_m2_FG_Irano4 _____________________________________________________________
47
48if ( GetJournalIndex "TR_m2_FG_Irano4" >= 10 )
49
50 if ( OnDeath == 1 )
51 if ( GetJournalIndex "TR_m2_FG_Irano4" >= 60 )
52 Journal "TR_m2_FG_Irano4" 80
53 else
54 Journal "TR_m2_FG_Irano4" 85
55 endif
56 endif
57
58 if ( OnPCHitMe == 1 )
59 SetParalysis 0
60 if ( championmode == 0 )
61 set championmode to 1
62 endif
63 endif
64 if ( championmode == 1 ) ;this so-called "championmode" can also be triggered to 1 via Surol's dialogue, the OnPCHitMe chunk above is there just in case
65 set xpos to ( GetPos, X )
66 set ypos to ( GetPos, Y )
67 set zpos to ( GetPos, Z )
68 set zpos to ( zpos + 30 )
69 Placeitem "sprigganup" xpos ypos zpos 0 ;places effect
70 sethealth 350 ;she'll earn a couple of nice perks such as 350 health...
71 setmagicka 500
72 AddSpell, "TR_m2_q_29_4_SurolChamp" ;...and a few spells which make her a badass
73 setFight 100
74 StartCombat, player
75 set championmode to 2
76 endif
77
78 if ( GetJournalIndex "TR_m2_FG_Irano4" < 50 )
79 if ( GetDistance, player <= 600 )
80 Journal "TR_m2_FG_Irano4" 50 ;okay so you found Surol yay!
81 endif
82 elseif ( GetJournalIndex "TR_m2_FG_Irano4" == 50 ) ;when you've killed the Spider Daedra in Shambalu, Shrine, Surol won't be paralyzed anymore
83 if ( GetDeadCount "TR_m2_SpiderShambaluL" >= 4 )
84 if ( controlQ != 6 )
85 SetParalysis 0
86 set controlQ to 6
87 endif
88 endif
89 endif
90
91
92
93; TR_m2_FG_Irano1-2 _____________________________________________________________
94
95elseif ( controlQ < 2 )
96 if ( GetJournalIndex "TR_m2_FG_Irano2" >= 50 )
97 if ( GetJournalIndex "TR_m2_FG_Irano2" <= 60 )
98 if ( GetDistance, player <= 128 ) ;when/if the player enters the Manor, Surol will greet them (she's positioned there in topic bodyguards)
99 ForceGreeting
100 return
101 endif
102 endif
103 endif
104 if ( GetJournalIndex "TR_m2_FG_Irano1" == 120 ) ;if the player didn't kill Olmu Llendu, Surol will congratulate them (she'll be teleported outside the Guild Hall in TR_m2_Laalalvo Irano's dialogue)
105 if ( controlQ == 0 ) ;the controlQ variable is used to detect much of her stuff
106 if ( GetDistance, player <= 256 )
107 ForceGreeting
108 return
109 endif
110 endif
111 if ( GetJournalIndex "TR_m2_FG_AkaStat" == 10 )
112 if ( doOnce == 0 )
113 if ( CellChanged == 1 ) ;this chunk will take Surol back home
114 PositionCell 251810 -88859 3776 16800 "Akamora" ;TR_m2_MARK_q_29_4_Surol
115 AiWander 0 0 0 0 0 0 0 0 0 0 0 0
116 set doOnce to 1
117 elseif ( GetDistance, player >= 2000 )
118 PositionCell 251810 -88859 3776 16800 "Akamora" ;TR_m2_MARK_q_29_4_Surol
119 AiWander 0 0 0 0 0 0 0 0 0 0 0 0
120 set doOnce to 1
121 endif
122 endif
123 endif
124 endif
125endif
126
127if ( TR_Map == 2 ) ;these are just the usual TR_Map nonsense :P
128 return
129endif
130
131set TR_Map to 2
132
133End