TR_m3_MG_OE_Q5_Reward_sc
TR_Mainland.esm
Variables
3
Local Variables
OnPCEquip
DayTarget
HourTarget
Source
1Begin TR_m3_MG_OE_Q5_Reward_sc
2
3; This is the script on misc item TR_m3_MG_OE_Q5_Reward, which
4; the player gets as a reward for quest TR_m3_MG_OE_Q5.
5; It allows you to once a day summon a random Daedra follower.
6; If you want to add more Daedra to the list you have to make a copy of that Daedra's base variant, assign them the script TR_m3_MG_OE_Q5_SummonedDaedra_SC, add them to the block below and adjust the random100 variables.
7
8Short OnPCEquip
9Short DayTarget
10Float HourTarget
11
12If ( OnPCEquip )
13Else
14 Return
15Endif
16
17Set OnPCEquip to 0
18
19;One day timer.
20If ( DaysPassed < DayTarget )
21 PlaySound "Spell Failure Conjuration"
22 MessageBox "The item does not have enough charge."
23 Return
24ElseIf ( DaysPassed == DayTarget )
25 If ( GameHour < HourTarget )
26 PlaySound "Spell Failure Conjuration"
27 MessageBox "The item does not have enough charge."
28 Return
29 Endif
30Endif
31Set DayTarget to ( DaysPassed + 1 )
32Set HourTarget to GameHour
33
34if ( TR_m3_MG_OE_Q5_DaedraSummoned == 0 )
35 if ( random100 > 70 )
36 placeatPC TR_m3_MG_OE_Dremora 1 100 0
37 elseif ( random100 > 45 )
38 placeatPC TR_m3_MG_OE_Clannfear 1 100 0
39 elseif ( random100 > 20 )
40 placeatPC TR_m3_MG_OE_Scamp 1 100 0
41 else
42 placeatPC TR_m3_MG_OE_GoldSaint 1 100 0
43 endif
44 playsound "Conjuration Hit"
45 set TR_m3_MG_OE_Q5_DaedraSummoned to 1
46endif
47
48End