TR_m2_q_38_s_clone
TR_Mainland.esm
Variables
8
Local Variables
DoOnce
TR_Map
control
controlQ
NoLore
disp
T_Local_NPC
T_Local_NoLore
Source
1begin TR_m2_q_38_s_clone
2
3 ; this is Favryn Dareleth, the besurnamed version of Favryn
4 ; combination of copying the TR_m2 Nolore script and something that disables/enables him at the right points
5
6 short DoOnce
7 short TR_Map
8 short control
9 short controlQ
10 short NoLore
11 short disp
12short T_Local_NPC
13short T_Local_NoLore
14
15 if ( DoOnce == 0 )
16 ; we really don't want two Favryns at the start.
17 Disable
18 set DoOnce to 1
19 elseif ( DoOnce == 1 )
20 ; this bit enables him when the ritual is over/you are still in the Temple
21 ; and you didn't sabotage
22 if ( TR_m2_q_38_status >= 95 )
23 if ( TR_m2_q_38_sabotage <= 2 )
24 ; needs to appear when you *enter* the Laughing Goblin, not if you're hanging out there
25 if ( CellChanged == 1 )
26 ; if Favryn is dead, this guy does not appear. FOR SHAME you murdering player you.
27 if ( GetDeadCount "TR_m2_q_38_Favryn" > 0 )
28 SetDelete 1
29 return
30 endif
31 ; making sure their inventories match if the player has been pickpocketing would be too tricky
32 ; but at least they can have the same disposition towards the player
33 set disp to "TR_m2_q_38_Favryn"->GetDisposition
34 "TR_m2_q_38_Favrynclone"->SetDisposition disp
35 ; note - to avoid Favryn being deleted before this happens, must do disp matching BEFORE enabling!
36 Enable
37 ; once enabled he just gets a generic TR Map 2 NPC script
38 set TR_Map to 2
39 set DoOnce to 2
40 endif
41 else
42 ; you sabotaged, he's never going to appear (for shame!)
43 SetDelete 1
44 return
45 endif
46 endif
47 endif
48
49end