Scripts

TR_m1_q_DrinksChest_Script

TR_Mainland.esm
Variables 4
Local Variables
state
count
control
doonce
Source
1Begin TR_m1_q_DrinksChest_Script 2 3short state ; number of drinks in chest 4short count 5short control 6short doonce 7 8If ( GetJournalIndex TR_m1_wil_Drink < 20 ) 9 return 10Endif 11 12If ( GetJournalIndex TR_m1_wil_Drink_b >= 20 ) 13 return 14Endif 15 16If ( GetJournalIndex TR_m1_wil_Drink < 40 ) 17 18; Let's count the booze in a way that is friendly to Morrowind's limited mathematic skills. 19 20set state to 0 21set state to ( state + GetItemCount "T_Imp_Drink_WineWolfsbl_01" ) ; Wolfsblood Wine 22set state to ( state + GetItemCount "potion_local_brew_01" ) ; Mazte 23 24; these are the 'special drinks' and will gain you a bonus for giving. 25 26set count to 0 27set count to ( count + GetItemCount "T_Imp_Drink_WineWolfsbl_01" ) ; Wolfsblood Wine 28 29If ( state < 5 ) 30 set TR_m1_Bradasou_Rethre.control to 0 31 set doonce to 0 32Endif 33 34Endif 35 36If ( GetJournalIndex TR_m1_wil_Drink_b >= 10 ) 37 If ( control == 0 ) 38 If ( state >= 1 ) 39 disable 40 Journal TR_m1_wil_Drink_b 20 41 set control to 1 42 Else 43 Journal TR_m1_wil_Drink_b 30 44 set control to 1 45 Endif 46 Endif 47 return 48Endif 49 50If ( state >= 5 ) 51 If ( doonce == 0 ) 52 Journal TR_m1_wil_Drink 30 53 set doonce to 1 54 Endif 55 If ( count >= 5 ) 56 set TR_m1_Bradasou_Rethre.control to 2 57 Else 58 set TR_m1_Bradasou_Rethre.control to 1 59 Endif 60Endif 61 62End