Scripts

TR_m4_NPC_AndasBathGuard

TR_Mainland.esm
Variables 7
Local Variables
TR_Map
control
controlQ
doOnce
greetOnce
NoLore
T_Local_NPC
Source
1Begin TR_m4_NPC_AndasBathGuard 2 3short TR_Map 4short control 5short controlQ 6short doOnce 7short greetOnce 8;global TR_m4_AndasGuestState 9short NoLore 10short T_Local_NPC 11 12if ( MenuMode == 1 ) 13 return 14endif 15 16if ( GetJournalIndex "TR_m4_FG_Map" >= 20 ) 17 if ( GetJournalIndex "TR_m4_FG_Map" < 200 ) 18 return 19 endif 20endif 21 22if ( greetOnce == 1 ) 23 if ( doOnce == 1 ) 24 ForceGreeting 25 set greetOnce to 0 26 endif 27endif 28 29if ( doOnce == 0 ) 30 if ( TR_m4_AndasGuestState == 0 ) 31 if ( GetDistance, player < 700 ) 32 33 if ( player->GetEffect sEffectInvisibility == 1 ) 34 if ( GetPCSneaking == 1 ) 35 if ( GetDistance player >= 32 ) 36 return 37 endif 38 endif 39 endif 40 41 if ( GetDetected player == 1 ) 42 if ( GetLOS player == 1 ) 43 if ( GetPCSneaking == 1 ) 44 if ( GetDistance player <= 128 ) 45 set greetOnce to 1 46 set doOnce to 1 47 endif 48 elseif ( GetDistance player <= 256 ) 49 set greetOnce to 1 50 set doOnce to 1 51 endif 52 endif 53 endif 54 endif 55 endif 56endif 57 58if ( TR_Map ) 59 return 60endif 61 62set TR_Map to 4 63 64End