162 lines
6.4 KiB
Plaintext
162 lines
6.4 KiB
Plaintext
|
Scriptname _00e_Ark_TravelCrossroadsSC extends ObjectReference
|
||
|
|
||
|
import UIExtensions
|
||
|
|
||
|
;=====================================================================================
|
||
|
; EVENTS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Event OnActivate(ObjectReference akActionRef)
|
||
|
if akActionRef == PlayerREF
|
||
|
if MQ14.GetStage() < 20 && MQ03.GetStage() > 0 && !(MQ12b.GetStage() >= 15 && MQ12c.GetStage() < 5) && (_00E_TeleportGlobal.GetValueInt() == 0)
|
||
|
Game.RequestAutoSave()
|
||
|
ShowTravelMenu()
|
||
|
Elseif MQ12b.GetStage() == 10
|
||
|
ShowMQ12bTravelMenu()
|
||
|
Else
|
||
|
_00E_FastTravel_Ark_CantTravelRightNow.Show()
|
||
|
EndIf
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
;=====================================================================================
|
||
|
; FUNCTIONS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Function ShowTravelMenu()
|
||
|
|
||
|
;setting up the menu, UIExtensions need to be imported first, see line 3
|
||
|
UIListMenu listmenu = GetMenu("UIListMenu") as UIListMenu
|
||
|
|
||
|
;setting up the strings, pulling them from the translate.txt to simplify the localization process
|
||
|
string[] FastTravelList = new string[14]
|
||
|
FastTravelList[0] = "$Fasttravel00"
|
||
|
FastTravelList[1] = "$Fasttravel01"
|
||
|
FastTravelList[2] = "$Fasttravel02"
|
||
|
FastTravelList[3] = "$Fasttravel03"
|
||
|
FastTravelList[4] = "$Fasttravel04"
|
||
|
FastTravelList[5] = "$Fasttravel05"
|
||
|
FastTravelList[6] = "$Fasttravel06"
|
||
|
FastTravelList[7] = "$Fasttravel07"
|
||
|
FastTravelList[8] = "$Fasttravel08"
|
||
|
FastTravelList[9] = "$Fasttravel09"
|
||
|
FastTravelList[10] = "$Fasttravel10"
|
||
|
FastTravelList[11] = "$Fasttravel11"
|
||
|
FastTravelList[12] = "$Fasttravel12"
|
||
|
FastTravelList[13] = "$Back"
|
||
|
|
||
|
;adding the strings to the list menu via a while loop
|
||
|
Int iLength = 0
|
||
|
|
||
|
While iLength < FastTravelList.length
|
||
|
listmenu.AddEntryItem(FastTravelList[iLength], -1, -1, false)
|
||
|
iLength += 1
|
||
|
EndWhile
|
||
|
|
||
|
;setting up the different options from which the player can choose. It's working similar to messagebox options, besides these two lines right here:
|
||
|
int iListMenu = listmenu.OpenMenu()
|
||
|
int iListButton = listmenu.GetResultInt()
|
||
|
If iListButton == 0
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_Entrance)
|
||
|
ElseIf iListButton == 1
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_StrangerQuarter)
|
||
|
ElseIf iListButton == 2
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_Marketplace)
|
||
|
Elseif iListButton == 3
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_SouthQuarter)
|
||
|
Elseif iListButton == 4
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_NoblesQuarter)
|
||
|
Elseif iListButton == 5
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_Harbour)
|
||
|
Elseif iListButton == 6
|
||
|
If MQ03.IsCompleted()
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_Suntemple)
|
||
|
Else
|
||
|
_00E_FastTravel_Ark_NoTemple.Show()
|
||
|
EndIf
|
||
|
ElseIf iListButton == 7
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_Graveyard)
|
||
|
ElseIf iListButton == 8
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_UndercityEntrance)
|
||
|
Elseif iListButton == 09
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_UndercityBarracks)
|
||
|
Elseif iListButton == 10
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_UndercityMarketplace)
|
||
|
Elseif iListButton == 11
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_UndercityTarpit)
|
||
|
Elseif iListButton == 12
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_UndercityArena)
|
||
|
Elseif iListButton == 13
|
||
|
return
|
||
|
EndIf
|
||
|
|
||
|
If !((iListButton == 5 || iListButton == 6) || (iListButton == 4 || iListButton == 5))
|
||
|
If MQ04.GetStage() > 5 && !(MQ04.IsCompleted()) && !(MQ04.IsObjectiveCompleted(25))
|
||
|
Levelsystem.GiveEP(100)
|
||
|
MQ04.SetObjectiveCompleted(25)
|
||
|
EndIf
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
Function ShowMQ12bTravelMenu()
|
||
|
|
||
|
UIListMenu listmenu = UIExtensions.GetMenu("UIListMenu") as UIListMenu
|
||
|
|
||
|
string[] FastTravelList = new string[2]
|
||
|
FastTravelList[0] = "$Fasttravel04"
|
||
|
FastTravelList[1] = "$Quit"
|
||
|
Int iLength = 0
|
||
|
|
||
|
While iLength < FastTravelList.length
|
||
|
listmenu.AddEntryItem(FastTravelList[iLength], -1, -1, false)
|
||
|
iLength += 1
|
||
|
EndWhile
|
||
|
|
||
|
int iListMenu = listmenu.OpenMenu()
|
||
|
int iListButton = listmenu.GetResultInt()
|
||
|
If iListButton == 0
|
||
|
PlayerREF.MoveTo(_00E_FastTravel_Ark_Marker_CapitalCity_NoblesQuarter)
|
||
|
ElseIf iListButton == 1
|
||
|
return
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
;=====================================================================================
|
||
|
; PROPERTIES
|
||
|
;=====================================================================================
|
||
|
|
||
|
_00E_QuestFunctions Property Levelsystem Auto
|
||
|
|
||
|
Actor Property PlayerREF Auto
|
||
|
|
||
|
Quest Property MQ12b Auto
|
||
|
Quest Property MQ12c Auto
|
||
|
Quest Property MQ14 Auto
|
||
|
Quest Property MQ03 Auto
|
||
|
Quest Property MQ04 Auto
|
||
|
|
||
|
Message Property _00E_FastTravel_Ark_CantTravelRightNow Auto
|
||
|
Message Property _00E_FastTravel_Ark_NoTemple Auto
|
||
|
Message Property _00E_FastTravel_Ark_SelectionMenu_01 Auto
|
||
|
Message Property _00E_FastTravel_Ark_SelectionMenu_02 Auto
|
||
|
Message Property _00E_FastTravel_Ark_SelectionMenu_Restricted1 Auto
|
||
|
|
||
|
GlobalVariable Property _00E_TeleportGlobal Auto
|
||
|
GlobalVariable Property _00E_FS_IsForgottenStoriesActivated Auto
|
||
|
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_Entrance Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_StrangerQuarter Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_Marketplace Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_SouthQuarter Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_NoblesQuarter Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_Harbour Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_UndercityEntrance Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_Graveyard Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_Suntemple Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_UndercityBarracks Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_UndercityMarketplace Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_UndercityTarpit Auto
|
||
|
ObjectReference Property _00E_FastTravel_Ark_Marker_CapitalCity_UndercityArena Auto
|