Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin TR_m4_TT_Felani_Vathri_sc
- ; Script on NPC TR_m4_TT_Felani_Vathri (Ulmon's daughter)
- ; for Bal Foyen Temple quest TR_m4_TT_LastWillAndTestament.
- short TR_Map
- short control
- short controlQ
- short NoLore
- short T_Local_NPC
- short T_Local_NoLore
- long posX
- long posY
- long posZ
- ; Enable only from the quest onwards.
- if ( GetJournalIndex TR_m4_TT_LastWillAndTestament < 20 )
- if ( GetDisabled == 0 )
- Disable
- endif
- Return
- elseif ( GetJournalIndex TR_m4_TT_LastWillAndTestament >= 20 )
- if ( GetDisabled == 1 )
- Enable
- endif
- endif
- if ( control == 0 )
- if ( GetDistance player < 400 )
- set control to 1
- Say "TR\Vo\TR_DeF_Cry.mp3" "[Soft weeping.]"
- endif
- endif
- if ( controlQ == 1 )
- ; Felani is following the player to the Temple, yet outside the Temple.
- ; if ( CellChanged )
- ; Commented this out, since it seems to sometimes fail to fire
- ; (maybe because Felani appears in the Temple later than the
- ; player?). -- arvisrend
- if ( GetPCCell "Bal Foyen, Temple" )
- PositionCell 3592 4184 14784 14034 "Bal Foyen, Temple"
- AIFollow player 0 0 0 0
- if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
- TR_m4_TT_Marja_Iannus->PositionCell 3592 4320 14784 17820 "Bal Foyen, Temple"
- TR_m4_TT_Marja_Iannus->AIFollow TR_m4_TT_Felani_Vathri 0 0 0 0
- endif
- set controlQ to 2
- endif
- ; endif
- elseif ( controlQ == 2 )
- ; Felani is following the player inside the Bal Foyen Temple.
- ; Don't follow the player out of the Temple!
- ; if ( CellChanged )
- if ( GetPCCell "Bal Foyen, Temple" != 1 )
- PositionCell 3592 4184 14784 14034 "Bal Foyen, Temple"
- AIFollow player 0 0 0 0
- if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
- TR_m4_TT_Marja_Iannus->PositionCell 3592 4320 14784 17820 "Bal Foyen, Temple"
- TR_m4_TT_Marja_Iannus->AIFollow TR_m4_TT_Felani_Vathri 0 0 0 0
- endif
- return
- endif
- ; endif
- if ( GetPos Z < 14352 )
- if ( GetDistance TR_m4_TT_Ulmon_Dead < 800 )
- Journal TR_m4_TT_LastWillAndTestament 30
- set controlQ to 3
- set TR_m4_TT_Marja_Iannus.controlQ to 3
- AITravel 4016 4160 14016
- if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
- TR_m4_TT_Marja_Iannus->AITravel 4056 4256 14016
- endif
- endif
- endif
- elseif ( controlQ == 3 )
- if ( GetAIPackageDone )
- set controlQ to 4
- AIWander 0 0 0 10 20 0 30 20 0 0 20 0
- Face 4148 3980
- endif
- ; controlQ will be set to 5 from dialogue (when Felani asks the player
- ; to escort her back out of the Temple).
- elseif ( controlQ == 5 )
- ; following the player out of the Temple:
- if ( GetInterior == 0 )
- if ( GetDistance player > 500 )
- ;do nothing
- elseif ( GetPCCell "Bal Foyen" )
- ; move marja
- if ( GetDeadCount TR_m4_TT_Marja_Iannus == 0 )
- TR_m4_TT_Marja_Iannus->PositionCell 2498 -132190 500 0 "Bal Foyen"
- TR_m4_TT_Marja_Iannus->AITravel 5370 -132967 74
- set TR_m4_TT_Marja_Iannus.controlQ to 5
- endif
- PositionCell 2630 -132160 500 0 "Bal Foyen"
- Say "Vo\D\F\Flw_DF003.mp3" "Thank you."
- Journal TR_m4_TT_LastWillAndTestament 45
- AITravel 5267 -132962 72
- set controlQ to 9
- Return
- endif
- endif
- elseif ( controlQ <= 7 )
- ; walking back to the Dancing Cup:
- if ( controlQ >= 6 )
- if ( controlQ == 6 )
- if ( GetAIPackageDone )
- set controlQ to 7
- AIWander 0 0 0 10 20 0 30 20 0 0 20 0
- endif
- endif
- if ( CellChanged )
- set controlQ to 8
- PositionCell 3682 3960 14214 8694 "Bal Foyen, The Dancing Cup"
- AIWander 0 0 0 10 20 0 30 20 0 0 20 0
- endif
- endif
- elseif ( controlQ == 9 )
- ; bounceback!
- set controlQ to 6
- endif
- if ( TR_Map )
- return
- endif
- set TR_Map to 4
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement