Scripts

TR_m3_q_6_Edryon

TR_Mainland.esm
Variables 7
Local Variables
TR_Map
control
done
nohello
nolore
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m3_q_6_Edryon 2 3short TR_Map 4short control 5short done 6short nohello 7short nolore 8short T_Local_NPC 9short T_Local_NoLore 10 11if ( OnActivate == 1 ) 12 if ( done == 0 ) 13 ;player only wakes up Edryon once he has talked to Folvalie. 14 if ( GetJournalIndex "TR_m3_Dr_Daughter" == 65 ) 15 MessageBox "You shake him a bit and he wakes up." 16 Say, "vo\d\m\bIdl_DM014.mp3", "Yawn..." 17 set done to 1 18 Journal "TR_m3_Dr_Daughter" 70 19 elseif ( GetJournalIndex "TR_m3_Dr_Daughter" == 85 ) 20 MessageBox "You shake him a bit and he wakes up." 21 Say, "vo\d\m\bIdl_DM014.mp3", "Yawn..." 22 set done to 1 23 Journal "TR_m3_Dr_Daughter" 90 24 else 25 MessageBox "He appears to be sleeping peacefully." 26 endif 27 elseif ( done >= 1 ) 28 activate 29 endif 30endif 31 32if ( GetDisabled != 1 ) 33 if ( OnDeath == 1 ) 34 If ( GetJournalIndex "TR_m3_Dr_Daughter" > 0 ) 35 Journal TR_m3_Dr_Daughter 1 36 Endif 37 endif 38 39 if ( done == 0 ) 40 if ( GetHealth < 19 ) ;stop sleeping if attacked 41 SetParalysis 0 42 SetFatigue 155 43 set done to 3 44 return 45 endif 46 setfatigue -20 47 ;rot- assuming paralysis below is to slow down his breathing animation? 48 if ( GetParalysis == 0 ) 49 SetParalysis 1 50 elseif ( Random100 > 66 ) 51 SetParalysis 0 52 endif 53 elseif ( done == 1 ) 54 ;once player wakes up Edryon, fatigue damage and paralysis are set to normal 55 SetParalysis 0 56 SetFatigue 155 57 set done to 2 58 ;once removed, Edyon and Folvalie leave when player is far enough away 59 elseif ( done == 2 ) 60 if ( GetDistance player > 2048 ) 61 "TR_m3_Folvalie"->PositionCell, 6671, 10410, 16064, 1680 "Dreynim Spa, Hot Springs" ;marker TR_m3_MARK_q_6_Edryon 62 "TR_m3_Folvalie"->AiWander 0 0 0 0 0 0 0 0 0 0 0 0 63 disable 64 endif 65 endif 66endif 67 68if ( TR_Map == 3 ) 69 return 70endif 71 72set TR_Map to 3 73 74End