Advertisement
Guest User

Untitled

a guest
May 7th, 2025
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. Begin TR_m4_TT_Felani_Vathri_sc
  2.  
  3. ; Script on NPC TR_m4_TT_Felani_Vathri (Ulmon's daughter)
  4. ; for Bal Foyen Temple quest TR_m4_TT_LastWillAndTestament.
  5.  
  6. short TR_Map
  7. short control
  8. short controlQ
  9. short NoLore
  10. short T_Local_NPC
  11. short T_Local_NoLore
  12. long posX
  13. long posY
  14. long posZ
  15.  
  16. ; Enable only from the quest onwards.
  17.  
  18. if ( GetJournalIndex TR_m4_TT_LastWillAndTestament < 20 )
  19. if ( GetDisabled == 0 )
  20. Disable
  21. endif
  22. Return
  23. elseif ( GetJournalIndex TR_m4_TT_LastWillAndTestament >= 20 )
  24. if ( GetDisabled == 1 )
  25. Enable
  26. endif
  27. endif
  28.  
  29. if ( control == 0 )
  30. if ( GetDistance player < 400 )
  31. set control to 1
  32. Say "TR\Vo\TR_DeF_Cry.mp3" "[Soft weeping.]"
  33. endif
  34. endif
  35.  
  36. if ( controlQ == 1 )
  37. ; Felani is following the player to the Temple, yet outside the Temple.
  38. ; if ( CellChanged )
  39. ; Commented this out, since it seems to sometimes fail to fire
  40. ; (maybe because Felani appears in the Temple later than the
  41. ; player?). -- arvisrend
  42. if ( GetPCCell "Bal Foyen, Temple" )
  43. PositionCell 3592 4184 14784 14034 "Bal Foyen, Temple"
  44. AIFollow player 0 0 0 0
  45. if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
  46. TR_m4_TT_Marja_Iannus->PositionCell 3592 4320 14784 17820 "Bal Foyen, Temple"
  47. TR_m4_TT_Marja_Iannus->AIFollow TR_m4_TT_Felani_Vathri 0 0 0 0
  48. endif
  49. set controlQ to 2
  50. endif
  51. ; endif
  52. elseif ( controlQ == 2 )
  53. ; Felani is following the player inside the Bal Foyen Temple.
  54. ; Don't follow the player out of the Temple!
  55. ; if ( CellChanged )
  56. if ( GetPCCell "Bal Foyen, Temple" != 1 )
  57. PositionCell 3592 4184 14784 14034 "Bal Foyen, Temple"
  58. AIFollow player 0 0 0 0
  59. if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
  60. TR_m4_TT_Marja_Iannus->PositionCell 3592 4320 14784 17820 "Bal Foyen, Temple"
  61. TR_m4_TT_Marja_Iannus->AIFollow TR_m4_TT_Felani_Vathri 0 0 0 0
  62. endif
  63. return
  64. endif
  65. ; endif
  66. if ( GetPos Z < 14352 )
  67. if ( GetDistance TR_m4_TT_Ulmon_Dead < 800 )
  68. Journal TR_m4_TT_LastWillAndTestament 30
  69. set controlQ to 3
  70. set TR_m4_TT_Marja_Iannus.controlQ to 3
  71. AITravel 4016 4160 14016
  72. if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
  73. TR_m4_TT_Marja_Iannus->AITravel 4056 4256 14016
  74. endif
  75. endif
  76. endif
  77. elseif ( controlQ == 3 )
  78. if ( GetAIPackageDone )
  79. set controlQ to 4
  80. AIWander 0 0 0 10 20 0 30 20 0 0 20 0
  81. Face 4148 3980
  82. endif
  83. ; controlQ will be set to 5 from dialogue (when Felani asks the player
  84. ; to escort her back out of the Temple).
  85. elseif ( controlQ == 5 )
  86. ; following the player out of the Temple:
  87. if ( GetInterior == 0 )
  88. if ( GetDistance player > 500 )
  89. ;do nothing
  90. elseif ( GetPCCell "Bal Foyen" )
  91. ; move marja
  92. if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
  93. TR_m4_TT_Marja_Iannus->PositionCell 2498 -132190 500 0 "Bal Foyen"
  94. TR_m4_TT_Marja_Iannus->AITravel 5370 -132967 74
  95. set TR_m4_TT_Marja_Iannus.controlQ to 5
  96. endif
  97. PositionCell 2630 -132160 500 0 "Bal Foyen"
  98. Say "Vo\D\F\Flw_DF003.mp3" "Thank you."
  99. Journal TR_m4_TT_LastWillAndTestament 45
  100. AITravel 5267 -132962 72
  101. set controlQ to 9
  102. Return
  103. endif
  104. endif
  105. elseif ( controlQ <= 7 )
  106. ; walking back to the Dancing Cup:
  107. if ( controlQ >= 6 )
  108. if ( controlQ == 6 )
  109. if ( GetAIPackageDone )
  110. set controlQ to 7
  111. AIWander 0 0 0 10 20 0 30 20 0 0 20 0
  112. endif
  113. endif
  114. if ( CellChanged )
  115. set controlQ to 8
  116. PositionCell 3682 3960 14214 8694 "Bal Foyen, The Dancing Cup"
  117. AIWander 0 0 0 10 20 0 30 20 0 0 20 0
  118. endif
  119. endif
  120. elseif ( controlQ == 9 )
  121. ; bounceback!
  122. set controlQ to 6
  123. endif
  124.  
  125. if ( TR_Map )
  126. return
  127. endif
  128.  
  129. set TR_Map to 4
  130.  
  131. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement