Scripts

TR_m3_RDSuladaSyrivis-Script

TR_Mainland.esm
Variables 9
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
DoOnce
ProtectOnce
Newonce
Sulada
Source
1Begin TR_m3_RDSuladaSyrivis-Script 2 3short TR_Map 4short control 5short controlQ 6short NoLore 7Short T_Local_NPC 8Short DoOnce 9Short ProtectOnce 10Short Newonce 11Short Sulada 12 13If ( cellchanged == 1 ) ;disables the npcs on cellchange in the one scenario where you complete the quest in their vicinity. 14 If ( GetJournalIndex "TR_m4_And_Routinedelivery" == 100 ) 15 if ( getdisabled == 0 ) 16 disable 17 Endif 18 Endif 19Endif 20 21If ( Control == 0 ) ;Should disable the npc before the quest starts. 22 If ( GetJournalIndex "TR_m4_And_Routinedelivery" > 0 ) 23 Disable 24 set control to 1 25 Endif 26Endif 27 28If ( newonce == 0 ) ;enables the npc 29 If ( GetJournalIndex "TR_m4_And_Routinedelivery" > 0 ) 30 enable 31 set control to 2 32 set newonce to 1 33 Endif 34Endif 35 36If ( getdisabled == 0 ) ;should disable the npc after the quest is over. unless they're dead. 37 If ( GetJournalIndex "TR_m4_And_Routinedelivery" == 100 ) 38 Return 39 Elseif ( GetJournalIndex "TR_m4_And_Routinedelivery" >= 75 ) 40 If ( gethealth != 0 ) 41 Disable 42 Endif 43 Endif 44Endif 45 46If ( Sulada == 0 ) ; supposed to move sulada syrivis from thirsty saint to almathirr underworks 47 If ( GetJournalIndex "TR_m4_And_Routinedelivery" >= 30 ) 48 If ( CellChanged == 1 ) 49 TR_m3_Sulada_Syrivis->removeitem, "common_robe_01" 1 50 TR_m3_Sulada_Syrivis->Positioncell, 5571, -859, 12424, 16200, "Almas Thirr, Underworks" 51 TR_m3_Sulada_Syrivis->AIWander, 0, 0, 0 52 set Sulada to 1 53 Endif 54 Endif 55Endif 56 57If ( ProtectOnce == 0 ) ;should make it so this npc protects other members of Hles Vervul's gang 58 If ( "TR_m3_Dorog_Gro-Durin"->GetAttacked == 1 ) 59 StartCombat player 60 SetFight 90 61 SetDisposition 0 62 Set ProtectOnce to 1 63 elseif ("TR_m3_Hles_Vervul"->GetAttacked == 1 ) 64 StartCombat player 65 Setfight 90 66 SetDisposition 0 67 Set ProtectOnce to 1 68 endif 69endif 70 71If ( DoOnce != 1 ) ;updates global variable TR_m3_q_RD_HlesGangDead when the npc is killed. 72 If ( GetJournalIndex "TR_m4_And_Routinedelivery" < 100 ) 73 If ( Ondeath == 1 ) 74 Set TR_m3_q_RD_HlesGangDead to ( TR_m3_q_RD_HlesGangDead + 1 ) 75 Set DoOnce to 1 76 Endif 77 Endif 78Endif 79 80If ( TR_m3_q_RD_HlesGangDead == 3 ) 81 Journal "TR_m4_And_Routinedelivery" 66 82 Set TR_m3_q_RD_HlesGangDead to 4 83Endif 84 85if ( TR_Map == 3 ) 86 return 87endif 88 89set TR_Map to 3 90 91end