Scripts

TR_m4_AA_UrnuridunGuar_script

TR_Mainland.esm
Variables 2
Local Variables
controlQ
OnPCHitMe
Source
1begin TR_m4_AA_UrnuridunGuar_script 2 3;global TR_m4_AA_UrnuridunGuarState 4;1=cured 5;2=dead 6 7short controlQ 8short OnPCHitMe 9 10if ( MenuMode ) 11 return 12endif 13 14if ( OnPCHitMe ) 15 set OnPCHitMe to 0 16 StopCombat 17 SetFight 0 18endif 19 20if ( GetEffect sEffectCurePoison ) 21 if ( TR_m4_AA_UrnuridunGuarState == 0 ) 22 MessageBox "The guar is cured of poison." 23 set TR_m4_AA_UrnuridunGuarState to 1 24 if ( GetJournalIndex "TR_m4_wil_UrnuridunGuar" < 100 ) 25 Journal "TR_m4_wil_UrnuridunGuar" 100 26 endif 27 endif 28endif 29 30if ( OnDeath ) 31 AddItem "TR_m4_ing_rotten_guar_meat" 3 32 if ( controlQ < 2 ) 33 Journal "TR_m4_wil_UrnuridunGuar" 200 34 endif 35endif 36 37if ( GetJournalIndex "TR_m4_wil_UrnuridunGuar" == 10 ) 38 if ( GetDistance player > 1524 ) 39 if ( controlQ == 0 ) 40 set controlQ to 1 41 endif 42 endif 43endif 44 45if ( controlQ == 1 ) 46 if ( GetDistance player < 700 ) 47 set controlQ to 2 48 Journal "TR_m4_wil_UrnuridunGuar" 300 49 SetHealth 0 50 endif 51endif 52 53end