Scripts

TR_m4_HH_GalesaAmulet

TR_Mainland.esm
Variables 3
Local Variables
OnPCAdd
doOnce
detected
Source
1Begin TR_m4_HH_GalesaAmulet 2 3; script for Galesa Arethi's amulet to control disable and theft mechanics 4 5short OnPCAdd 6short doOnce 7short detected 8 9if ( GetJournalIndex "TR_m4_HH_AND_ReverseRescue" < 10 ) 10 if ( GetDisabled == 0 ) 11 Disable 12 endif 13 return 14elseif ( GetPCCell "Bodrum, Varalaryn Tradehouse" == 0 ) 15 return 16endif 17 18if ( doOnce == 1 ) 19 if ( detected == 0 ) 20 if ( "TR_m4_q_Galesa Arethi"->GetHealth > 0 ) 21 Journal "TR_m4_HH_AND_ReverseRescue2" 50 22 if ( ScriptRunning TR_m4_HH_RescueScript == 0 ) 23 ; in the unlikely event you steal the amulet before talking to Galesa 24 "TR_m4_q_Galesa Arethi"->StartScript TR_m4_HH_RescueScript 25 endif 26 endif 27 endif 28 Set doOnce to 2 29 return 30elseif ( doOnce == 2 ) 31 return 32endif 33 34if ( OnPCAdd ) 35 Set doOnce to 1 36 if ( GetDetected Player ) 37 Set "TR_m4_q_Galesa Arethi".controlQ to 2 38 if ( ScriptRunning TR_m4_HH_RescueScript ) 39 StopScript TR_m4_HH_RescueScript 40 endif 41 Set detected to 1 42 endif 43endif 44 45End