Scripts

sleeperScript

Morrowind.esm
Variables 3
Local Variables
sleeperOn
doOnce
NoLore
Source
1Begin sleeperScript 2 3short sleeperOn 4;activates sleeper dialogue at night 5;other sleeper behavior (endgame, etc) is handled in dialogue 6 7short doOnce 8;keeps sleepers from ForceGreeting over and over 9 10short NoLore 11;don't want sleepers being too talkative 12 13if ( GetJournalIndex TT_SanctusShrine >= 20 ) 14 if ( GetJournalIndex TT_SanctusShrine < 50 ) 15 Return 16 endif 17endif 18 19if ( GetJournalIndex A1_2_AntabolisInformant < 10 ) 20 Set sleeperOn to 0 21 Return 22 ;sleepers don't forceGreeting you before this event 23endif 24 25if ( GetJournalIndex C3_DestroyDagoth >= 50 ) 26 Set sleeperOn to 0 27 Return 28 ;no more sleepers after endgame 29endif 30 31Set sleeperOn to 1 32 33if ( GameHour > 6 ) 34 if ( GameHour < 18 ) 35 Set sleeperOn to 0 36 ;1 unless sun is up... estimate, adjust 37 ;not sleepers anymore after endgame 38 Return 39 endif 40endif 41 42if ( GetDistance Player > 3000 ) 43 set doOnce to 0 44 Return 45endif 46 47if ( doOnce != 0 ) 48 Return 49endif 50 51if ( GetDistance Player < 150 ) 52 ForceGreeting 53 set doOnce to 1 54endif 55 56;the idea is to have them annoyingly initiate conversation 57;whenever the player approaches... But only do this 58;once per approach... needs testing. 59 60End