Scripts

TR_m4_Bal_VunalShield_Sc

TR_Mainland.esm
Variables 2
Local Variables
control
button
Source
1begin TR_m4_Bal_VunalShield_Sc 2 3; Baluath Questline 4; Displays Vunal's epitaph in message boxes before letting you pick the shield up. 5; Attached to shield. 6 7; control = 1-4: message 1-4 displayed 8; control = -1: read engraving 9; control = -1: can pick up shield 10; control = -2: try to pick up shield 11; control = -3: picked up shield 12; button = button pressed on message boxes 13 14short control 15short button 16 17; begin message box chain or try to pick up shield depending on whether you read the full epitaph 18if ( OnActivate ) 19 if ( control == 0 ) 20 if ( PCVampire == 0 ) 21 MessageBox "[You attempt to pick up the shield, but an unknown force holds it in place.]" 22 return 23 elseif ( PCVampire == -1 ) 24 elseif ( VampClan != 100 ) 25 elseif ( GetDeadCount "TR_m4_v_Kashshaptu" > 0 ) 26 elseif ( GetDeadCount "TR_m4_v_Etemmu" > 0 ) 27 elseif ( GetDeadCount "TR_m4_v_UtukkuSeri" > 0 ) 28 elseif ( GetDeadCount "TR_m4_v_Ofelia" > 0 ) 29 elseif ( GetJournalIndex "TR_m4_Bal_Hannat" >= 10 ) 30 else 31 MessageBox "[You attempt to pick up the shield, but an unknown force holds it in place.]" 32 return 33 endif 34 MessageBox "[You begin reading an engraving on the shield.]" "Continue" "Stop" 35 set control to 1 36 elseif ( control == -1 ) 37 set control to -2 38 else 39 Activate 40 endif 41endif 42 43if ( control == -3 ) 44 return 45 46; subroutine to try picking up the shield, used through OnActivate and MessageBox 47elseif ( control == -2 ) 48 if ( GetJournalIndex "TR_m4_Bal_Hannat" >= 10 ) 49 Journal "TR_m4_Bal_Hannat" 20 50 endif 51 set TR_m4_Bal_DevourerSpawned to 1 52 playsound "conjuration hit" 53 set control to -3 54 Activate 55 return 56 57; traverse through message boxes 58elseif ( control > 0 ) 59 set button to GetButtonPressed 60 if ( button == -1 ) 61 return 62 elseif ( button == 0 ) 63 if ( control == 1 ) 64 MessageBox "The Temple's incursions are rare these days. Their corpses stand tall on the eastern peaks. They forget who we were and what they did. Mortals know not why we resist." "Continue" "Stop" 65 set control to 2 66 elseif ( control == 2 ) 67 MessageBox "My victories secure us the ashlands. But what 'us'? So few and scattered we are. Ancient dead, lair lost, name forgotten. I failed you, Master Turon." "Continue" "Stop" 68 set control to 3 69 elseif ( control == 3 ) 70 MessageBox "I wander the wastes, no foe to defeat. My kin, independent fools, shut me out. Blood against blood, the clan shall fade to dust. And so, tomorrow, I go too." "Pick Up" "End" 71 set control to 4 72 elseif ( control == 4 ) 73 set control to -2 74 endif 75 76 ; reset reading of epitaph if you click Stop before the End 77 elseif ( button == 1 ) 78 if ( control == 4 ) 79 set control to -1 80 else 81 set control to 0 82 endif 83 endif 84endif 85 86end