Scripts

itermerelScript

Morrowind.esm
Variables 4
Local Variables
noLore
followNow
distanceCheck
timer
Source
1Begin itermerelScript 2 3short noLore 4short followNow 5short distanceCheck 6float timer 7;global NPCVoiceDistance 8 9if ( MenuMode == 1 ) 10 Return 11endif 12 13if ( GetJournalIndex MG_EscortScholar2 >= 70 ) 14 Return 15endif 16 17if ( GetJournalIndex MG_EscortScholar2 < 50 ) 18 Return 19endif 20 21if ( GetHealth <= 0 ) 22 return 23endif 24 25if ( GetCurrentAiPackage == 3 ) 26;if follow is the current package, set followNow and continue... 27 28 set followNow to 1 29 SetHello 0 30 31 if ( GetAIPackageDone == 1 ) 32 ;original conditions, and in case something funky happens... 33 Journal MG_EscortScholar2 70 34 set followNow to 0 35 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 36 Say "Vo\H\M\Flw_HM003.mp3" "Thank you." 37 SetHello 30 38 endif 39 40 if ( timer < 2 ) 41 set timer to ( timer + GetSecondsPassed ) 42 return 43 endif 44 45 if ( GetPCCell "Pelagiad, Halfway Tavern" == 1 ) 46 ;since the above method may not actually work... 47 Journal MG_EscortScholar2 70 48 set followNow to 0 49 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 50 Say "Vo\H\M\Flw_HM003.mp3" "Thank you." 51 SetHello 30 52 endif 53 54 if ( GetDistance Player < NPCVoiceDistance ) 55 if ( GetDistance Player < 500 ) 56 set distanceCheck to 0 57 endif 58 set timer to 0 59 return 60 endif 61 62 if ( distanceCheck == 0 ) 63 Say "Vo\H\M\Flw_HM004.mp3" "Hey! Wait for me!" 64 set distanceCheck to 1 65 endif 66 67else 68 ;if follow is NOT the current package, make sure followNow is zero 69 set followNow to 0 70endif 71 72End