Scripts

TR_m3_q_3_guard

TR_Mainland.esm
Variables 7
Local Variables
TR_Map
control
alldone
dead
T_Local_NPC
NoLore
casttimer
Source
1Begin TR_m3_q_3_guard 2 3;script on the guards in Bosmora 4;they're supposed to be away during the quest TR_m3_Bo_Burglar2, so they're disabled for the day (Vault guards) or the evening (all guards) 5 6 7short TR_Map 8short control 9float casttimer 10short alldone 11short dead 12short T_Local_NPC 13short NoLore 14 15If ( alldone == 1 ) 16 Return 17ElseIf ( dead == 1 ) 18 Return 19ElseIf ( OnDeath == 1 ) 20 set dead to 1 21 Return 22Endif 23 24If ( GetPCCell, "Bosmora, Indoril Vault" == 1 ) ;this is one of the guards in the vault 25 If ( TR_m3_q_3_guardsGone >= 1 ) ;they're gone when the quest starts 26 If ( GetDisabled == 0 ) 27 If ( CellChanged == 1 ) ;if the player wasn't in the cell at the time they should've disappeared/reappeared 28 Disable ;no need for spelleffects to mask it 29 Else 30 If ( casttimer == 0 ) 31 ExplodeSpell telekinesis 32 set casttimer to 0.1 33 Else 34 set casttimer to ( casttimer + GetSecondsPassed ) 35 if ( casttimer > 2.5 ) 36 Disable 37 set casttimer to 0 38 endif 39 Endif 40 Endif 41 Endif 42 ElseIf ( TR_m3_q_3_guardsGone == -1 ) ;they should be back now 43 If ( GetDisabled == 1 ) 44 Enable 45 set alldone to 1 46 ExplodeSpell telekinesis 47 Else 48 set alldone to 1 ;this guard was never disabled (impossible in the vault...?) 49 Return 50 Endif 51 Endif 52Else ;elsewhere in Bosmora 53 If ( TR_m3_q_3_guardsGone == 2 ) ;all guards are out of town from 5 to 10 PM 54 If ( GetDisabled == 0 ) 55 If ( CellChanged == 1 ) ;if the player wasn't in the cell at the time they should've disappeared/reappeared 56 Disable ;no need for spelleffects to mask it 57 Else 58 If ( casttimer == 0 ) 59 ExplodeSpell telekinesis 60 set casttimer to 0.1 61 Else 62 set casttimer to ( casttimer + GetSecondsPassed ) 63 if ( casttimer > 2.5 ) 64 Disable 65 set casttimer to 0 66 endif 67 Endif 68 Endif 69 Endif 70 ElseIf ( TR_m3_q_3_guardsGone == -1 ) ;should be back 71 If ( GetDisabled == 1 ) 72 Enable 73 set alldone to 1 74 ExplodeSpell telekinesis 75 Else ;this guard was never disabled 76 set alldone to 1 77 Return 78 Endif 79 Endif 80Endif 81 82if ( TR_Map > 0 ) 83 return 84endif 85 86set TR_Map to 3 87 88End