Option Explicit
Implements iScriptInstruction

Public NextInstruction As iScriptInstruction
Public PrevInstruction As iScriptInstruction
Public ParentInstruction As iScriptInstruction
Public ParentsChild As Long

Public X As Long
Public Y As Long
Public Map As Integer

Private Property Set iScriptInstruction_Child(Index As Long, RHS As iScriptInstruction)
    '
End Property

Private Property Get iScriptInstruction_Child(Index As Long) As iScriptInstruction
    Set iScriptInstruction_Child = Nothing
End Property

Private Property Get iScriptInstruction_Description(Index As Long) As String
    iScriptInstruction_Description = "Teleport to [" + Game.MapDefTable.Item(Map).Name + "] at (" & X & "," & Y & ")"
End Property

Private Property Get iScriptInstruction_HasChildren() As Boolean
    iScriptInstruction_HasChildren = False
End Property

Private Property Get iScriptInstruction_InsID() As Long
    iScriptInstruction_InsID = 4
End Property

Private Sub iScriptInstruction_Load(FF As ReadFileBuffer)
    FF.ReadLong X
    FF.ReadLong Y
    FF.ReadInteger Map
End Sub

Private Property Set iScriptInstruction_NextInstruction(ByVal RHS As iScriptInstruction)
    Set NextInstruction = RHS
End Property

Private Property Get iScriptInstruction_NextInstruction() As iScriptInstruction
    Set iScriptInstruction_NextInstruction = NextInstruction
End Property

Private Property Get iScriptInstruction_NumberOfChildren() As Long
    iScriptInstruction_NumberOfChildren = 0
End Property

Private Property Set iScriptInstruction_ParentInstruction(ByVal RHS As iScriptInstruction)
    Set ParentInstruction = RHS
End Property

Private Property Get iScriptInstruction_ParentInstruction() As iScriptInstruction
    Set iScriptInstruction_ParentInstruction = ParentInstruction
End Property

Private Property Let iScriptInstruction_ParentsChild(ByVal RHS As Long)
    ParentsChild = RHS
End Property

Private Property Get iScriptInstruction_ParentsChild() As Long
    iScriptInstruction_ParentsChild = ParentsChild
End Property

Private Property Set iScriptInstruction_PrevInstruction(ByVal RHS As iScriptInstruction)
    Set PrevInstruction = RHS
End Property

Private Property Get iScriptInstruction_PrevInstruction() As iScriptInstruction
    Set iScriptInstruction_PrevInstruction = PrevInstruction
End Property

Private Sub iScriptInstruction_Save(FF As WriteFileBuffer)
    FF.WriteLong X
    FF.WriteLong Y
    FF.WriteInteger Map
End Sub