Scripts

hidesFootScript

Morrowind.esm
Variables 6
Local Variables
noLore
followNow
distanceCheck
timer
xPos
yPos
Source
1Begin hidesFootScript 2 3short noLore 4short followNow 5short distanceCheck 6float timer 7;global NPCVoiceDistance 8 9float xPos 10float yPos 11 12if ( MenuMode == 1 ) 13 return 14endif 15 16if ( GetJournalIndex HH_TwinLamps3 >= 70 ) 17 return 18endif 19 20if ( GetJournalIndex HH_TwinLamps3 < 50 ) 21 return 22endif 23 24if ( GetHealth <= 0 ) 25 return 26endif 27 28if ( GetCurrentAiPackage == 3 ) 29;if follow is the current package, set followNow and continue... 30 31 set followNow to 1 32 SetHello 0 33 34 if ( GetAIPackageDone == 1 ) 35 ;original conditions, and in case something funky happens... 36 Journal HH_TwinLamps3 70 37 set followNow to 0 38 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 39 Say "Vo\A\M\Flw_AM003.mp3" "Thank you." 40 SetHello 30 41 endif 42 43 if ( timer < 2 ) 44 set timer to ( timer + GetSecondsPassed ) 45 return 46 endif 47 48 Set xPos to GetPos X 49 Set yPos to GetPos Y 50 51 if ( xPos > 34770 ) 52 Set xPos to 1 53 else 54 Set xPos to 0 55 endif 56 57 if ( yPos > -38050 ) 58 Set yPos to 1 59 else 60 Set yPos to 0 61 endif 62 63 if ( GetPCCell "Sterdecan's Farmhouse" == 1 ) 64 ;since the above method may not actually work... 65 Journal HH_TwinLamps3 70 66 set followNow to 0 67 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 68 Say "Vo\A\M\Flw_AM003.mp3" "Thank you." 69 SetHello 30 70 endif 71 72 if ( GetDistance Player < NPCVoiceDistance ) 73 if ( GetDistance Player < 500 ) 74 set distanceCheck to 0 75 endif 76 set timer to 0 77 return 78 endif 79 80 if ( distanceCheck == 0 ) 81 if ( SayDone == 1 ) 82 Say "Vo\A\M\Flw_AM001.mp3" "Where are you going?" 83 endif 84 set distanceCheck to 1 85 endif 86 87else 88 ;if follow is NOT the current package, make sure followNow is zero 89 set followNow to 0 90endif 91 92 93 94End