Scripts

TR_m3_OE_HhontjulfDogSCP

TR_Mainland.esm
Variables 11
Local Variables
Friend
Enemy
check
eatcheck
lastsec
eating
eatmax
stanceOnce
gotDead
timer
eattimer
Source
1begin TR_m3_OE_HhontjulfDogSCP 2 3;a script for "TR_m3_OE_HhontjulfDog", a dog guarding Hhontjulf Fire-Mane's house 4 5short Friend 6short Enemy 7short check 8short eatcheck 9short lastsec 10short eating 11short eatmax 12short stanceOnce 13short gotDead 14float timer 15float eattimer 16 17if ( MenuMode == 1 ) 18 return 19endif 20 21if ( OnDeath == 1 ) 22 set gotDead to 1 23 if ( GetJournalIndex "TR_m3_TG_Fentus3d" >= 10 ) 24 if ( GetJournalIndex "TR_m3_TG_Fentus3d" < 30 ) 25 Journal "TR_m3_TG_Fentus3d" 30 26 endif 27 endif 28endif 29 30if ( gotDead == 1 ) 31 return 32endif 33 34if ( eating == 1 ) 35 if ( eatcheck == 0 ) 36 set eattimer to eattimer + GetSecondsPassed 37 if ( eattimer > 20 ) 38 set eatcheck to 1 39 set eating to 0 40 MessageBox, "The wolfdog is done eating. It pays attention to you again." 41 set timer to 0 42 set check to 0 43 set lastsec to 0 44 endif 45 endif 46endif 47 48if ( CellChanged == 1 ) 49 set timer to 0 50endif 51 52if ( GetJournalIndex "TR_m3_TG_Fentus3d" < 60 ) 53 if ( GetAttacked == 0 ) 54 if ( eating == 0 ) 55 if ( Enemy == 0 ) 56 if ( Friend < 3 ) 57 if ( GetDistance, player <= 666 ) 58 if ( check == 0 ) 59 set timer to timer + GetSecondsPassed 60 if ( timer > 12 ) 61 set Enemy to 1 62 set check to 1 63 set lastsec to 0 64 elseif ( timer > 8 ) 65 if ( lastsec != 2 ) 66 MessageBox "The wolfdog is about to attack..." 67 PlaySoundVP "wolf roar" 0.5 1.0 68 set lastsec to 2 69 endif 70 elseif ( timer > 1 ) 71 if ( lastsec != 1 ) 72 MessageBox "The wolfdog growls... It doesn't like you." 73 PlaySoundVP "wolf moan" 0.5 1.0 74 set lastsec to 1 75 endif 76 endif 77 endif 78 endif 79 endif 80 endif 81 endif 82 endif 83endif 84 85if ( Enemy == 1 ) 86 if ( stanceOnce == 0 ) 87 SetFight 100 88 startcombat, player 89 endif 90endif 91 92end