Scripts

TR_m4_Cr_StrayGuar_Scp

TR_Mainland.esm
Variables 5
Local Variables
doOnce
randomOnce
ran
controlQ
stayoutside
Source
1begin TR_m4_Cr_StrayGuar_Scp 2 3short doOnce 4short randomOnce 5short ran 6short controlQ 7short stayoutside 8 9if ( MenuMode ) 10 return 11endif 12 13if ( randomOnce == 0 ) 14 set ran to Random 100 15 set randomOnce to 1 16endif 17 18if ( OnActivate ) 19 if ( doOnce == 0 ) 20 if ( ran < 10 ) 21 StartCombat player 22 MessageBox "Crazed by the wilderness, the stray guar snaps at you." 23 elseif ( ran < 20 ) 24 SetHealth 0 25 MessageBox "The exhausted guar collapses." 26 else 27 set stayoutside to 1 28 AIFollow player 0 0 0 0 29 MessageBox "The stray guar follows you." 30 endif 31 set doOnce to 1 32 else 33 Activate 34 endif 35endif 36 37if ( controlQ == 0 ) 38 if ( GetDistance "TR_m4_Seresa Maanith" < 700 ) 39 set TR_m4_AA_GuarSeresa to ( TR_m4_AA_GuarSeresa + 1 ) 40 set controlQ to 1 41 SetFight 0 42 AIFollow "TR_m4_Seresa Maanith" 0 0 0 0 43 elseif ( GetDistance "TR_m4_Nassuran Omoril" < 700 ) 44 set TR_m4_AA_GuarNassuran to ( TR_m4_AA_GuarNassuran + 1 ) 45 set controlQ to 1 46 SetFight 0 47 AIFollow "TR_m4_Nassuran Omoril" 0 0 0 0 48 endif 49elseif ( CellChanged ) 50 if ( GetDisabled == 0 ) 51 Disable 52 endif 53endif 54 55end