Scripts

sanvynScript

Morrowind.esm
Variables 4
Local Variables
gettinghealth
nolore
currenthealth
halfhealth
Source
1Begin sanvynScript 2 3float currenthealth 4float halfhealth 5short gettinghealth 6short nolore 7 8if ( MenuMode == 1 ) 9 Return 10endif 11 12if ( gettinghealth == -1 ) 13 return 14endif 15 16if ( OnDeath == 1 ) 17 if ( GetJournalIndex "VA_Vamprich" > 10 ) 18 Journal "VA_VampRich" 90 19 endif 20endif 21 22if ( GetJournalIndex "VA_VampRich" >= 60 ) 23 if ( GetTarget Player == 1 ) 24 if ( gettinghealth == 0 ) 25 set currenthealth to ( player->GetHealth ) 26 set halfhealth to ( currenthealth * 0.5 ) 27 set gettinghealth to 1 28 endif 29 endif 30endif 31 32if ( GetJournalIndex "VA_VampRich" >= 60 ) 33 if ( gettinghealth == 1 ) 34 if ( GetTarget Player == 1 ) 35 if ( player->GetHealth <= halfhealth ) 36 StopCombat Player 37 Journal "VA_VampRich" 65 38 ForceGreeting 39 set gettinghealth to -1 40 endif 41 endif 42 endif 43endif 44 45end sanvynScript