Scripts

TR_m3_Kha_GhostGeneric

TR_Mainland.esm
Variables 12
Local Variables
TR_Map
TR_m3_Kha_ghost
TR_m3_Kha_ghostGeneric
control
controlQ
NoLore
stage
killed
NoHello
T_Local_NPC
T_Local_NoLore
time
Source
1Begin TR_m3_Kha_GhostGeneric 2; This script copies T_ScNpc_Mw_Map3Nolore 3; and helps filter the dialog entries for Khalaan NPCs 4; TR_m3_Kha_ghost only enable the most basic dialogue that is needed for all ghosts 5; such as persuasion and topics like Almalexia and Solstheim 6; but otherwise keeps them nolore 7; TR_m3_Kha_ghostGeneric also allows for some generic topics 8 9short TR_Map 10short TR_m3_Kha_ghost 11short TR_m3_Kha_ghostGeneric 12short control 13short controlQ 14short NoLore 15short stage 16short killed 17short NoHello 18 19float time 20short T_Local_NPC 21short T_Local_NoLore 22 23if ( stage == 2 ) 24 if ( MenuMode ) 25 return 26 endif 27 28 set time to ( time + GetSecondsPassed ) 29 30 if ( time > 3.7 ) 31 set stage to 0 32 Enable 33 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 64 0 34 Resurrect 35 return 36 endif 37 38 if ( GetDisabled == 0 ) 39 Disable 40 endif 41endif 42 43if ( stage == 0 ) 44 If ( GetHealth < 1 ) 45 set stage to 1 46 If ( GetFatigue <= 0 ) 47 PlaceAtMe "T_Glb_Var_GhostDeathFX1" 1 0 0 48 else 49 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 0 0 50 endif 51 endif 52endif 53 54If ( OnDeath ) 55 set time to 0 56 set stage to 2 57 if ( killed < 1 ) 58 set killed to 1 59 endif 60endif 61 62if ( TR_m3_Kha_ghost == 1 ) 63 return 64endif 65 66set TR_m3_Kha_ghost to 1 67set TR_m3_Kha_ghostGeneric to 1 68set TR_Map to 3 69 70End