Scripts

TR_m4_Cr_SaylenusRamaril_scp

TR_Mainland.esm
Variables 9
Local Variables
sayOnce
hitmeOnce
OnPCHitMe
doOnce
timer
posX
posY
posZ
rotZ
Source
1begin TR_m4_Cr_SaylenusRamaril_scp 2 3short sayOnce 4short hitmeOnce 5short OnPCHitMe 6float timer 7short doOnce 8float posX 9float posY 10float posZ 11float rotZ 12 13if ( GetDisabled == 1 ) 14 return 15endif 16 17if ( GetJournalIndex TR_m4_wil_SkeletonWizardC == 100 ) 18 if ( doOnce == 0 ) 19 set doOnce to 1 20 set posX to GetPos X 21 set posY to GetPos Y 22 set posZ to GetPos Z 23 set rotZ to GetAngle Z 24 Disable 25 "TR_m4_Saylenus Ramaril"->Enable 26 "TR_m4_Saylenus Ramaril"->PositionCell -23670 -135907 1771 0 "Roth Roryn Region" ; TR_m4_MARK_Saylenus 27 "TR_m4_Saylenus Ramaril"->AIWander 0 0 0 0 10 60 20 10 0 0 0 0 0 28 "TR_m4_Saylenus Ramaril"->SetPos X posX 29 "TR_m4_Saylenus Ramaril"->SetPos Y posY 30 "TR_m4_Saylenus Ramaril"->SetPos Z posZ 31 "TR_m4_Saylenus Ramaril"->SetAngle Z rotZ 32 endif 33endif 34 35if ( MenuMode == 1 ) 36 return 37endif 38 39if ( OnDeath == 1 ) 40 if ( GetJournalIndex "TR_m4_wil_SkeletonWizard" < 50 ) 41 Journal "TR_m4_wil_SkeletonWizard" 50 42 43 set doOnce to 1 44 set posX to GetPos X 45 set posY to GetPos Y 46 set posZ to GetPos Z 47 set rotZ to GetAngle Z 48 Disable 49 "TR_m4_Saylenus RamarilD"->PositionCell -23670 -135907 1771 0 "Roth Roryn Region" ; TR_m4_MARK_Saylenus 50 "TR_m4_Saylenus RamarilD"->AIWander 0 0 0 0 10 60 20 10 0 0 0 0 0 51 "TR_m4_Saylenus RamarilD"->SetPos X posX 52 "TR_m4_Saylenus RamarilD"->SetPos Y posY 53 "TR_m4_Saylenus RamarilD"->SetPos Z posZ 54 "TR_m4_Saylenus RamarilD"->SetAngle Z rotZ 55 PlaceAtMe "T_Glb_Var_DustPuffFX_01" 1 1 1 56 PlaySound "illusion hit" 57 58 endif 59endif 60 61if ( GetHealth < 25 ) 62 return 63endif 64 65if ( OnActivate == 1 ) 66 if ( GetFight < 20 ) 67 "TR_m4_Saylenus Ramaril"->ForceGreeting 68 endif 69endif 70 71if ( GetDistance, player <= 320 ) 72 if ( sayOnce == 0 ) 73 player->Say, "vo\d\m\bHlo_DM004.mp3", "Uhmm... there's a perfectly good explanation for this, I assure you..." 74 set sayOnce to 1 75 set timer to 0 76 AiFollow, player, 0 0 0 0 0 0 0 77 endif 78endif 79 80if ( sayOnce == 1 ) 81 if ( timer > 0.5 ) 82 AiWander 0 0 0 0 0 0 0 0 83 set sayOnce to 2 84 set timer to 0 85 endif 86endif 87 88if ( sayOnce == 2 ) 89 if ( GetDistance, player <= 320 ) 90 if ( timer >= 8 ) 91 set sayOnce to 3 92 set timer to 0 93 AiFollow, player, 0 0 0 0 0 0 0 94 endif 95 endif 96endif 97 98if ( sayOnce == 3 ) 99 if ( timer > 0.5 ) 100 player->Say, "vo\d\m\bIdl_DM007.mp3", "Well, if it bothers you so much, just don't look at it, alright?" 101 set sayOnce to 4 102 set timer to 0 103 AiWander 0 0 0 0 0 0 0 0 104 endif 105endif 106 107if ( sayOnce == 4 ) 108 if ( GetDistance, player <= 320 ) 109 if ( timer >= 12 ) 110 set sayOnce to 5 111 set timer to 0 112 AiFollow, player, 0 0 0 0 0 0 0 113 endif 114 endif 115endif 116 117if ( sayOnce == 5 ) 118 if ( timer > 0.5 ) 119 set sayOnce to 6 120 player->Say, "vo\d\m\tHlo_DM050.mp3", "Well, yes... I guess we should talk." 121 set timer to 0 122 AiWander 0 0 0 0 0 0 0 0 123 endif 124endif 125 126if ( sayOnce == 6 ) 127 if ( GetDistance, player <= 320 ) 128 if ( timer >= 14 ) 129 set sayOnce to 7 130 set timer to 0 131 AiFollow, player, 0 0 0 0 0 0 0 132 endif 133 endif 134endif 135 136if ( sayOnce == 7 ) 137 if ( timer > 0.5 ) 138 set sayOnce to 8 139 player->Say, "vo\d\m\tHlo_DM058.mp3", "Could it get any worse?" 140 set timer to 0 141 AiWander 0 0 0 0 0 0 0 0 142 endif 143endif 144 145if ( sayOnce == 8 ) 146 if ( GetDistance, player <= 320 ) 147 if ( timer >= 7 ) 148 set sayOnce to 9 149 set timer to 0 150 AiFollow, player, 0 0 0 0 0 0 0 151 endif 152 endif 153endif 154 155if ( sayOnce == 9 ) 156 if ( timer > 0.5 ) 157 set sayOnce to 2 158 player->Say, "vo\d\m\Hlo_DM181.mp3", "Hello." 159 set timer to 0 160 AiWander 0 0 0 0 0 0 0 0 161 endif 162endif 163 164 165if ( OnPCHitMe == 1 ) 166 if ( player->SayDone == 1 ) 167 if ( hitmeOnce == 0 ) 168 player->Say, "vo\d\m\Fle_DM004.mp3", "Let me live!" 169 set OnPCHitMe to 0 170 set hitmeOnce to 1 171 endif 172 endif 173endif 174 175set timer to ( timer + GetSecondsPassed ) 176 177end