Scripts

teresArothanScript

Morrowind.esm
Variables 5
Local Variables
noLore
followNow
distanceCheck
once
timer
Source
1Begin teresArothanScript 2 3short noLore 4short followNow 5short distanceCheck 6float timer 7short once 8;global short NPCVoiceDistance 9 10;local to tell if NPC is currently following or not for dialogue. 11 12if ( MenuMode == 1 ) 13 return 14endif 15 16if ( GetJournalIndex FG_DissaplaMine >= 70 ) 17 ;no need to check if the escort is done 18 return 19endif 20 21if ( GetJournalIndex FG_DissaplaMine < 50 ) 22 ;no need to check if the escort hasn't started 23 return 24endif 25 26if ( GetHealth <= 0 ) 27 ;if he's dead... 28 return 29endif 30 31if ( GetCurrentAiPackage == 3 ) 32 ;if follow is the current package, set followNow and continue... 33 34 set followNow to 1 35 SetHello 0 36 37 if ( timer < 2 ) 38 set timer to ( timer + GetSecondsPassed ) 39 return 40 endif 41 42 if ( GetDistance "Novor Drethan" < 512 ) 43 ;if Teres arrives, give player journal 44 ;set followNow and replace Follow AI Package 45 46 Say "Vo\D\M\Flw_DM004.mp3" "Thank you." 47 Journal FG_DissaplaMine 70 48 set followNow to 0 49 AiWander 128 0 0 40 20 20 0 0 0 0 0 0 50 SetHello 30 51 endif 52 53 if ( GetDistance Player < NPCVoiceDistance ) 54 if ( GetDistance Player < 500 ) 55 set distanceCheck to 0 56 endif 57 set timer to 0 58 return 59 endif 60 61 if ( distanceCheck == 0 ) 62 Say "Vo\D\M\Flw_DM001.mp3" "Where are you going?" 63 set distanceCheck to 1 64 endif 65 66else 67 ;if follow is NOT the current package, make sure followNow is zero 68 set followNow to 0 69endif 70 71End