Scripts

TR_m4_HauthPearlSmash

TR_Mainland.esm
Variables 4
Local Variables
OnPCEquip
messageOn
button
hautharmodead
Source
1Begin TR_m4_HauthPearlSmash 2 3;this script is a modified version of TR_m3_Sabine scripts 4;it, and two other scripts, TR_m4_HautharmoPearlRemove and TR_m4_HautharmoScript, handle the lich Hautharmo in Malarnubi 5; (the original script was edited for performance -- arvisrend, 26 July 2012 6 7short OnPCEquip 8;short reset 9short messageOn 10short button 11short hautharmodead 12 13if ( hautharmodead == 1 ) 14 return 15endif 16 17if ( GetDeadCount "TR_m4_cr_Hautharmo" > 0 ) 18 set hautharmodead to 1 19 Return 20endif 21 22;if ( OnPCEquip == 0 ) 23; Set reset to 0 24;endif 25; 26;if ( reset == 1 ) 27; Return 28;endif 29 30if ( OnPCEquip == 1 ) 31; if ( reset == 0 ) 32 Set OnPCEquip to 0 33 if ( player->GetIntelligence >= 60 ) 34 MessageBox "As you touch the pearl, you sense an evil presence within. This pearl has to be the lich's phylactery, the source of its immortality." "Crush the pearl" "Do nothing" 35 Set messageOn to 1 36 elseif ( player->GetIntelligence <= 59 ) 37 MessageBox "As you touch the pearl, you sense an evil presence within." "Crush the pearl" "Do nothing" 38 Set messageOn to 1 39 endif 40 Return 41; endif 42endif 43 44if ( messageOn == 1 ) 45 set button to GetButtonPressed 46 if ( button >= 0 ) 47 Set messageOn to 0 48 endif 49 if ( button == 0 ) 50 Set "TR_m4_cr_Hautharmo".amuletDestroyed to 1 51 PlaySound "destruction hit" 52 MessageBox "The pearl is no more!" 53 StartScript TR_m4_HauthPearlRemove 54 elseif ( button == 1 ) 55; Set reset to 1 56 Return 57 endif 58endif 59 60End