Scripts

mirpalFollow

Morrowind.esm
Variables 5
Local Variables
followDone
noLore
followNow
distanceCheck
timer
Source
1Begin mirpalFollow 2 3; follow script on Sinnammu Mirpal 4; Main quest B2_AhemmusaSafe 5; follow PC to Ald Daedroth to prove it is safe 6 7short followDone 8short noLore 9short followNow 10short distanceCheck 11float timer 12;global short NPCVoiceDistance 13 14if ( OnDeath == 1 ) 15 Journal B2_AhemmusaKill 1 16 Journal B8_Failed_Nerevarine 1 17endif 18 19if ( GetHealth <= 0 ) 20 return 21endif 22 23if ( MenuMode == 1 ) 24 return 25endif 26 27if ( GetJournalIndex "B2_AhemmusaSafe" >= 40 ) 28 return 29endif 30 31;don't check the rest if you don't have to 32;avoid adding AI packages over and over 33 34if ( GetCurrentAiPackage == 3 ) 35 ;if follow is the current package, set followNow and continue 36 set followNow to 1 37 SetHello 0 38 39 if ( GetAIPackageDone == 1 ) 40 ;if the follow is done, set followDone to 1, reset followNow to 0 41 set followDone to 1 42 set followNow to 0 43 44 ;Give NPC new package to avoid dumb-looking behavior 45 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 46 47 ;And journal entry gives feedback to the player... 48 Journal, "B2_AhemmusaSafe", 40 49 50 ;And increase PC Reputation... 51 Player->ModReputation 1 52 53 Say "Vo\D\F\Flw_DF003.mp3" "Thank you." 54 55 ForceGreeting 56 57 SetHello 30 58 endif 59 60 if ( timer < 2 ) 61 set timer to ( timer + GetSecondsPassed ) 62 return 63 endif 64 65 if ( GetPCCell "Ald Daedroth, Inner Shrine" == 1 ) 66 if ( GetDistance "active_dae_sheogorath_ad" < 400 ) 67 ;if she misses her point, guarantee it... 68 set followDone to 1 69 set followNow to 0 70 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 71 Journal, "B2_AhemmusaSafe", 40 72 Player->ModReputation 1 73 Say "Vo\D\F\Flw_DF003.mp3" "Thank you." 74 ForceGreeting 75 SetHello 30 76 endif 77 endif 78 79 if ( GetDistance Player < NPCVoiceDistance ) 80 if ( GetDistance Player < 500 ) 81 set distanceCheck to 0 82 endif 83 set timer to 0 84 return 85 endif 86 87 if ( distanceCheck == 0 ) 88 Say "Vo\D\F\Flw_DF004.mp3" "Hey! Wait for me!" 89 set distanceCheck to 1 90 endif 91 92else 93 ;if follow is NOT the current package, make sure followNow is zero 94 set followNow to 0 95endif 96 97End