Scripts

MaduraFollow

Morrowind.esm
Variables 5
Local Variables
followDone
noLore
followNow
distanceCheck
timer
Source
1Begin MaduraFollow 2 3;script on Madura Seran, pilgrim held captive south of ald velothi 4 5short followDone 6short noLore 7short followNow 8short distanceCheck 9float timer 10;global short MaduraRescued -- used in some dialogue 11 12if ( MenuMode == 1 ) 13 Return 14endif 15 16if ( FollowDone >= 1 ) 17 Return 18endif 19 20if ( GetHealth <= 0 ) 21 return 22endif 23 24if ( GetCurrentAiPackage == 3 ) 25 ;if follow is the current package, set followNow and continue 26 set followNow to 1 27 SetHello 0 28 29 if ( GetPCCell "Ald Velothi, Outpost" == 1 ) 30 ;if the follow is done, set followDone to 1, reset followNow to 0 31 set followDone to 1 32 33 set MaduraRescued to 1 34 35 ;Give NPC new package to avoid dumb-looking behavior 36 AiWander 256 0 0 40 20 20 0 0 0 0 0 0 37 38 ;And journal entry gives feedback to the player... 39 Journal, "IL_RescuePilgrim", 70 40 41 ;And increase PC Reputation... 42 Player->ModReputation 1 43 ModPCFacRep, 5, "Imperial Legion" 44 ModPCFacRep, 5, "Temple" 45 46 ;And increase Dispositions 47 ModDisposition 30 48 49 Say "Vo\D\F\Flw_DF003.mp3" "Thank you." 50 51 ForceGreeting 52 53 SetHello 30 54 55 endif 56 57 if ( timer < 2 ) 58 set timer to ( timer + GetSecondsPassed ) 59 return 60 endif 61 62 if ( GetDistance Player < NPCVoiceDistance ) 63 if ( GetDistance Player < 500 ) 64 set distanceCheck to 0 65 endif 66 set timer to 0 67 return 68 endif 69 70 if ( distanceCheck == 0 ) 71 Say "Vo\D\F\Flw_DF004.mp3" "Hey! Wait for me!" 72 set distanceCheck to 1 73 endif 74 75else 76 ;if follow is NOT the current package, make sure followNow is zero 77 set followNow to 0 78 79endif 80 81End