Scripts

TR_m2_445_sc_DummyKeyS

TR_Mainland.esm
Variables 2
Local Variables
status
timer
Source
1Begin TR_m2_445_sc_DummyKeyS 2 3short status 4float timer 5 6if ( MenuMode ) 7 Return 8endif 9 10if ( TR_m2_445_KeySTracker == 1 ) 11 if ( GetDisabled == 1 ) 12 Enable 13 endif 14 if ( status == 0 ) 15 set status to 1 16 SetAngle Y 90 17 endif 18else 19 if ( GetDisabled == 0 ) 20 Disable 21 endif 22 if ( status > 0 ) 23 set status to 0 24 set timer to 0 25 SetPos Y 1120.000 26 endif 27endif 28 29if ( status <= 0 ) 30 Return 31elseif ( status < 3 ) 32 set timer to ( timer + GetSecondsPassed ) 33 if ( timer <= 0.5 ) 34 MoveWorld Y -20 35 elseif ( timer <= 1.5 ) 36 if ( status == 1 ) 37 set status to 2 38 SetPos Y 1110 39 endif 40 Rotate Y -360 41 else 42 set status to 3 43 set timer to 0 44 SetAngle Y 90 45 endif 46endif 47 48if ( status == 3 ) 49 set timer to ( timer + GetSecondsPassed ) 50 if ( timer >= 1 ) 51 if ( TR_m2_445_KeySTracker > 0 ) 52 set status to 4 53 set TR_m2_445_KeySTracker to 2 54 player->AddItem T_De_UNI_NecromKeyS 1 55 Disable 56 PlaySound "Item Misc Up" 57 MessageBox "Necrom Temple Key 'S' has been added to your inventory." 58 endif 59 endif 60endif 61 62if ( OnActivate ) 63 if ( TR_m2_445_KeySTracker > 0 ) 64 set status to 4 65 set TR_m2_445_KeySTracker to 2 66 player->AddItem T_De_UNI_NecromKeyS 1 67 Disable 68 PlaySound "Item Misc Up" 69 MessageBox "Necrom Temple Key 'S' has been added to your inventory." 70 endif 71 Return 72endif 73 74End