Scripts

TR_m4_NPC_Falx_Smitius

TR_Mainland.esm
Variables 6
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
T_Local_NoLore
Source
1Begin TR_m4_NPC_Falx_Smitius 2 3; This short script is there to allow dialogue to be filtered on the TR_Map local variable, 4; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be 5; appropriate to the location the NPC is. 6 7short TR_Map 8short control 9short controlQ 10short T_Local_NPC 11short NoLore 12short T_Local_NoLore 13 14if ( OnDeath ) 15 set TR_m4_WillToGoOn_Willpower to -1 16 set TR_m4_WillToGoOn_Dead to 1 17 if ( GetJournalIndex "TR_m4_IR_WillToGoOn" >= 10 ) 18 if ( GetJournalIndex "TR_m4_IR_WillToGoOn" < 100 ) 19 Journal TR_m4_IR_WillToGoOn 200 20 return 21 endif 22 endif 23endif 24 25if ( TR_m4_WillToGoOn_Willpower == 0 ) 26 if ( getEffect sEffectRestoreAttribute == 1 ) 27 28 ; base willpower == 40 29 ; curse decreases 10 30 31 if ( control == 0 ) ; first check 32 if ( GetWillpower > 39 ) ; sometimes "restore willpower 10" spell restores 9.86 points 33 ; willpower increased; either restore or fortify applied; we need only restore 34 ; remove all fortify effects 35 set control to 1 36 RemoveEffects 79 37 return 38 endif 39 else ; second check without fortify effects 40 set control to 0 41 if ( GetWillpower > 39 ) 42 ; now it's a restore spell, remove curse and set global var 43 set control to 0 44 RemoveSpell TR_m4_WillToGoOn_Curse 45 set TR_m4_WillToGoOn_Willpower to 1 46 ModDisposition 10 47 if ( GetJournalIndex "TR_m4_IR_WillToGoOn" == 10 ) 48 Journal TR_m4_IR_WillToGoOn 50 49 endif 50 endif 51 endif 52 53 endif 54endif 55 56if ( CellChanged ) 57 if ( GetDisabled ) 58 return 59 elseif ( GetJournalIndex "TR_m4_IR_WillToGoOn" >= 100 ) 60 disable 61 return 62 elseif ( TR_m4_WillToGoOn_Dead == 1 ) 63 disable 64 return 65 endif 66endif 67 68if ( TR_Map == 4 ) 69 return 70endif 71 72set TR_Map to 4 73 74End