Scripts

TR_m4_NPC_Galesa_Arethi

TR_Mainland.esm
Variables 9
Local Variables
TR_Map
control
controlQ
doOnce
NoLore
NoIntruder
T_Local_NPC
T_Local_NoLore
timer
Source
1Begin TR_m4_NPC_Galesa_Arethi 2 3; script for the Hlaalu nightblade used in The Reverse Rescue 4 5short TR_Map 6short control 7short controlQ ; toggles force greet and teleport 8short doOnce 9short NoLore 10short NoIntruder 11short T_Local_NPC 12short T_Local_NoLore 13float timer 14 15if ( MenuMode ) 16 return 17endif 18 19if ( GetJournalIndex "TR_m4_HH_AND_ReverseRescue" < 10 ) 20 if ( GetDisabled == 0 ) 21 Disable 22 endif 23 return 24elseif ( GetDisabled ) 25 return 26endif 27 28if ( OnDeath ) 29 if ( GetJournalIndex "TR_m4_HH_AND_ReverseRescue" < 50 ) 30 Journal "TR_m4_HH_AND_ReverseRescue2" 70 31 endif 32 return 33endif 34 35if ( controlQ == 1 ) 36 if ( GetJournalIndex "TR_m4_HH_AND_ReverseRescue" >= 50 ) 37 if ( GetDistance Player >= 200 ) 38 return 39 endif 40 endif 41 if ( doOnce == 0 ) 42 ClearForceSneak 43 RemoveSpellEffects TR_m4_lightInvis 44 ForceGreeting 45 set doOnce to 1 46 endif 47elseif ( controlQ == 4 ) 48 Cast "almsivi intervention" "TR_m4_q_Galesa Arethi" 49 Set controlQ to 5 50 Set timer to 0 51elseif ( controlQ == 5 ) 52 ; wait for cast effect to finish 53 Set timer to ( timer + GetSecondsPassed ) 54 if ( timer < 2.2 ) 55 return 56 endif 57 Disable 58 Set controlQ to 7 59endif 60 61if ( TR_Map != 4 ) 62 Set TR_Map to 4 63endif 64 65End