Scripts

TR_m2_q_9_NilenoScript

TR_Mainland.esm
Variables 11
Local Variables
TR_map
control
controlQ
NoLore
tg_ask
nilvar
T_Local_NPC
T_Local_NoLore
xpos
ypos
Timer
Source
1Begin TR_m2_q_9_NilenoScript 2 3;This is the script on Nileno Dralara for the quest A Lover's Plea 4 5Short TR_map 6Short control 7Short controlQ 8Short NoLore 9short tg_ask ; Helnim TG, "gang of thieves" topic 10Short nilvar ;tracks actions on return to Andar Mok 11float xpos ;x coordinate 12float ypos ;y coordinate 13float Timer ;Timer 14short T_Local_NPC 15short T_Local_NoLore 16 17;standard map check on TR npc 18if ( TR_map != 2 ) 19 Set TR_map to 2 20endif 21 22;This handles Nileno's movement for the quest 23if ( GetJournalIndex "TR_m2_AO_ShackledLove" >= 40 ) ;if quest complete 24 if ( nilvar == 2 ) 25 AiWander, 256, 5, 0, 30, 10, 0, 0, 0, 0, 0, 20, 0 ;wander around again 26 Set nilvar to 3 27 elseif ( nilvar == 3 ) 28 if ( CellChanged == 1 ) ;if player leaves cell 29 Set nilvar to 4 ;stop this repeating 30 RemoveItem "common_shirt_01" 1 31 RemoveItem "common_skirt_01" 1 32 AddItem "common_shoes_04" 1 ;replace her clothes with better ones 33 AddItem "T_De_Cm_Shirt_02" 1 34 AddItem "T_Com_Cm_Skirt_01" 1 35 endif 36 endif 37elseif ( GetJournalIndex "TR_m2_AO_ShackledLove" >= 30 ) ;if Nileno has returned 38 if ( nilvar == 1 ) 39 if ( GetAIPackageDone ) ;when she's walked to the right place 40 Set nilvar to 2 41 AiWander, 0, 0, 0 ;stand still 42 endif 43 endif 44elseif ( GetJournalIndex "TR_m2_AO_ShackledLove" >= 20 ) ;if player agreed to escort her 45 Set Timer to ( Timer + GetSecondsPassed ) 46 if ( GetCurrentAIPackage != 3 ) ;if she isn't following player 47 if ( nilvar != 10 ) ;and we have asked her to 48 AiFollow, player, 0, 0, 0, 0 ;make her follow the player. 49 endif 50 elseif ( Timer > 3 ) ;every 3 seconds, check position 51 Set Timer to 0 52 Set xpos to GetPos, X ;record x coordinate 53 if ( xpos > 266000 ) 54 if ( xpos < 268000 ) 55 Set ypos to GetPos, Y ;record y coordinate 56 if ( ypos > -5100 ) 57 if ( ypos < -3100 ) ;if coordinates are within Andar Mok's center 58 Journal "TR_m2_AO_ShackledLove" 30 ;update journal 59 AiTravel, 266725, -3850, 176, 1 ;walk towards Mithas 60 Set nilvar to 1 61 endif 62 endif 63 endif 64 endif 65 endif 66endif 67 68 69end