Scripts

TR_m4_q_Amandin_Platier_sc

TR_Mainland.esm
Variables 14
Local Variables
T_Local_NPC
T_Local_NoLore
TR_Map
control
controlQ
NoLore
curePc
startedCombat
escaping
companion
hasWeapon
armorType
armorCount
gaveAshes
Source
1Begin TR_m4_q_Amandin_Platier_sc 2 3short T_Local_NPC 4short T_Local_NoLore 5short TR_Map 6short control 7;1 talked about the vampire 8;2 talked about the vampire and agreed to help 9;3 player killed the vampire 10short controlQ 11short NoLore 12short curePc 13short startedCombat 14short escaping 15;1 start following 16;2 following player 17;3 outside 18;4 forcegreet 19short companion 20short hasWeapon 21short armorType 22short armorCount 23short gaveAshes 24 25if ( TR_m4_LostTransit_Control_glb == 0 ) 26 if ( GetDisabled == 0 ) 27 disable 28 endif 29endif 30 31if ( OnDeath ) 32 if ( gaveAshes == 0 ) 33 if ( TR_m4_LostTransit_Control_glb <= 20 ) 34 AddItem TR_m4_q_Mervur_ashes 1 35 endif 36 endif 37 StopScript TR_m4_LostTransit_Control_sc 38endif 39 40if ( MenuMode ) 41 return 42endif 43 44;flavor 45if ( curePc ) 46 cast "cure common disease other" player 47 set curePc to 0 48endif 49 50if ( GetCurrentAIPackage == 3 ) 51 if ( gaveAshes == 0 ) 52 if ( GetJournalIndex TR_m4_Bd_Lost_in_Transit_D < 10 ) 53 if ( GetJournalIndex TR_m4_Bd_Lost_in_Transit < 80 ) 54 if ( GetDistance TR_m4_Fendel_Moryn < 256 ) 55 Journal TR_m4_Bd_Lost_in_Transit 80 56 elseif ( GetDistance TR_m4_Llaala_Moryn < 256 ) 57 Journal TR_m4_Bd_Lost_in_Transit 80 58 endif 59 if ( GetJournalIndex TR_m4_Bd_Lost_in_Transit == 80 ) 60 Say "Vo\B\M\Flw_BM006.mp3" "I'm grateful for your help, thank you." 61 AIWander 0 0 0 0 60 20 10 10 0 0 0 0 62 set TR_m4_LostTransit_Control_glb to 21 63 endif 64 endif 65 endif 66 endif 67endif 68 69if ( TR_m4_LostTransit_Control_glb == 4 ) 70 if ( startedCombat == 0 ) 71 if ( GetDistance TR_m4_q_Vrashammu < 500 ) 72 StartCombat TR_m4_q_Vrashammu 73 TR_m4_q_Vrashammu->StartCombat TR_m4_q_Amandin_Platier 74 set startedCombat to 1 75 endif 76 endif 77elseif ( TR_m4_LostTransit_Control_glb == 8 ) 78 if ( escaping == 0 ) 79 if ( GetCurrentAIPackage == 3 ) 80 "TR_m4_Ibbisin-Mammus"->StartCombat player 81 TR_m4_Yakasamshi->StartCombat player 82 set escaping to 1 83 endif 84 if ( TR_m4_Yakasamshi->GetTarget player ) 85 if ( TR_m4_Yakasamshi->GetWeaponDrawn ) 86 set escaping to 1 87 elseif ( TR_m4_Yakasamshi->GetSpellReadied ) 88 set escaping to 1 89 endif 90 elseif ( "TR_m4_Ibbisin-Mammus"->GetTarget player ) 91 if ( "TR_m4_Ibbisin-Mammus"->GetWeaponDrawn ) 92 set escaping to 1 93 elseif ( "TR_m4_Ibbisin-Mammus"->GetSpellReadied ) 94 set escaping to 1 95 endif 96 endif 97 elseif ( escaping == 1 ) 98 ModDisposition 5 99 AIFollow player 0 0 0 0 0 100 set companion to 1 101 set escaping to 2 102 elseif ( escaping == 2 ) 103 if ( GetInterior == 0 ) 104 if ( GetJournalIndex TR_m4_Bd_Lost_in_Transit_C < 30 ) 105 TR_m4_Adadnirai->StartCombat player 106 TR_m4_Sohemus->StartCombat player 107 endif 108 set escaping to 3 109 set hasWeapon to 0 110 if ( GetItemCount "silver flamesword" > 0 ) 111 set hasWeapon to 1 112 endif 113 set armorCount to 0 114;if only GetArmorType took a variable argument... 115 set armorType to ( GetArmorType 0 ) 116 if ( armorType > 0 ) 117 set armorCount to ( armorCount + 1 ) 118 endif 119 set armorType to ( GetArmorType 1 ) 120 if ( armorType > 0 ) 121 set armorCount to ( armorCount + 1 ) 122 endif 123 set armorType to ( GetArmorType 2 ) 124 if ( armorType > 0 ) 125 set armorCount to ( armorCount + 1 ) 126 endif 127 set armorType to ( GetArmorType 3 ) 128 if ( armorType > 0 ) 129 set armorCount to ( armorCount + 1 ) 130 endif 131 set armorType to ( GetArmorType 4 ) 132 if ( armorType > 0 ) 133 set armorCount to ( armorCount + 1 ) 134 endif 135 set armorType to ( GetArmorType 5 ) 136 if ( armorType > 0 ) 137 set armorCount to ( armorCount + 1 ) 138 endif 139 set armorType to ( GetArmorType 6 ) 140 if ( armorType > 0 ) 141 set armorCount to ( armorCount + 1 ) 142 endif 143 set armorType to ( GetArmorType 7 ) 144 if ( armorType > 0 ) 145 set armorCount to ( armorCount + 1 ) 146 endif 147 set armorType to ( GetArmorType 8 ) 148 if ( armorType > 0 ) 149 set armorCount to ( armorCount + 1 ) 150 endif 151 set armorType to ( GetArmorType 9 ) 152 if ( armorType > 0 ) 153 set armorCount to ( armorCount + 1 ) 154 endif 155 set armorType to ( GetArmorType 10 ) 156 if ( armorType > 0 ) 157 set armorCount to ( armorCount + 1 ) 158 endif 159 endif 160 elseif ( escaping == 3 ) 161 if ( GetJournalIndex TR_m4_Bd_Lost_in_Transit_C < 30 ) 162 if ( TR_m4_Adadnirai.control == 1 ) 163 if ( TR_m4_Sohemus.control == 1 ) 164 set escaping to 4 165 ForceGreeting 166 endif 167 endif 168 else 169 set escaping to 4 170 ForceGreeting 171 endif 172 endif 173elseif ( TR_m4_LostTransit_Control_glb == 9 ) 174 if ( GetCurrentAIPackage == 3 ) 175 if ( GetDistance TR_m4_LostTransit_Arvud < 500 ) 176 ModDisposition 5 177 TR_m4_q_Amandin_Platier->SetAlarm 100 178 set TR_m4_q_Amandin_Platier.companion to 0 179 Say "Vo\B\M\Flw_BM006.mp3" "I'm grateful for your help, thank you." 180 AIWander 0 0 0 0 60 20 10 10 0 0 0 0 181 set TR_m4_LostTransit_Control_glb to 10 182 endif 183 endif 184endif 185 186if ( TR_Map == 4 ) 187 return 188endif 189 190set TR_Map to 4 191 192End