Scripts

TR_m4_NPC_Nalvyna_Balen

TR_Mainland.esm
Variables 16
Local Variables
TR_Map
control
controlQ
controlV
controlA
controlM
dispdrop
egginventory
facRep
timeCtrl
facReward
paysGold
rewardSwapCheck
dispBalance
NoLore
T_Local_NPC
Source
1Begin TR_m4_NPC_Nalvyna_Balen 2; controls Nalvyna Balen's interactions with the player during the House Hlaalu questline 3 4short TR_Map 5short control ; controls Packrat dialogue 6short controlQ ; checks if player lied during first quest 7short controlV ; controls dialogue in fourth quest 8short controlA ; checks if player has mentioned the fight with Assemmus before finishing the quest 9short controlM ; convenience variable to save space 10short dispdrop ; controls disposition. She does not like the smell of rotten eggs 11short egginventory ; number of rotten eggs in inventory 12short facRep ; stores faction reputation rewarded when she's satisfied. Depending on your actions, this may vary a bit 13short timeCtrl ; checks time during second quest 14short facReward ; checks whether faction reputation has been rewarded for the docks quests 15short paysGold ; toggles scrip / gold payment 16short rewardSwapCheck ; controls whether Nalvyna accepts the player to swap reward 17short dispBalance 18short NoLore 19short T_Local_NPC 20 21if ( MenuMode ) 22 if ( GetJournalIndex "TR_m4_HH_AND_DocksQuests" == 10 ) 23 if ( paysGold == 0 ) 24 Set dispBalance to ( 112 - 4 * facRep ) 25 if ( GetDisposition >= dispBalance ) 26 if ( rewardSwapCheck == 0 ) 27 Set rewardSwapCheck to 1 28 endif 29 elseif ( rewardSwapCheck == 1 ) 30 Set rewardSwapCheck to 0 31 endif 32 endif 33 endif 34 return 35endif 36 37if ( dispdrop == 0 ) 38 if ( TR_m4_AndoHH_EggOffice > 0 ) ; eggs on floor 39 ModDisposition -10 40 Set dispdrop to 2 41 elseif ( egginventory > 0 ) ; eggs in inventory 42 ModDisposition -5 43 Set dispdrop to 1 44 endif 45elseif ( dispdrop == 1 ) 46 if ( TR_m4_AndoHH_EggOffice > 0 ) 47 ModDisposition -5 48 Set dispdrop to 2 49 elseif ( egginventory == 0 ) 50 ModDisposition 5 51 Set dispdrop to 0 52 endif 53elseif ( TR_m4_AndoHH_EggOffice == 0 ) 54 if ( egginventory == 0 ) 55 ModDisposition 10 56 Set dispdrop to 0 57 else 58 ModDisposition 5 59 Set dispdrop to 1 60 endif 61endif 62 63if ( GetJournalIndex "TR_m4_HH_AND_Greef" >= 80 ) 64 if ( GetJournalIndex "TR_m4_HH_AND_Greef" < 100 ) 65 if ( GetJournalIndex "TR_m4_HH_AND_Greef2" < 100 ) 66 if ( timeCtrl == 0 ) 67 if ( TR_m4_AndoHH_GreefDay < DaysPassed ) 68 Set timeCtrl to 1 69 StartScript "TR_m4_HH_SavrethiRelocate" 70 elseif ( TR_m4_AndoHH_GreefDay == DaysPassed ) 71 if ( TR_m4_AndoHH_GreefHour < GameHour ) 72 Set timeCtrl to 1 73 StartScript "TR_m4_HH_SavrethiRelocate" 74 endif 75 endif 76 endif 77 endif 78 endif 79endif 80 81if ( TR_Map == 4 ) 82 return 83endif 84 85set TR_Map to 4 86 87End