Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Advanced doors, keys, and switches (v 3.0)


RyokuHasu
 Share

Recommended Posts

  • 3 weeks later...
  • Replies 83
  • Created
  • Last Reply

Top Posters In This Topic

@Justn:

> I haven't had any issues with this updated version are you guys sure you are not putting "empty/blank" doors  on the map?

Don't think theyre lying since I had it in "eclipse omega" and people were complainin about the same shit.. Ryoku could fix it if he knew how
Link to comment
Share on other sites

@Murdoc:

> Don't think theyre lying since I had it in "eclipse omega" and people were complainin about the same shit.. Ryoku could fix it if he knew how

i dont think they are lying but this tutorial has been updated since eclipse omega came out not sure if he fixed it or not :p
Link to comment
Share on other sites

this is a completely new thread that he made after  fixing the 2.0 version didnt know if this was the version u used or the older one for omega… but hope he fixes it i havent had any runtime 9 errors since 3.0 i couldnt even use 2.0 cause of runtime errors maybe u guys just did better stress testing it than i have so far but hope u guys get it worked out :)
Link to comment
Share on other sites

@Justn:

> this is a completely new thread that he made after  fixing the 2.0 version didnt know if this was the version u used or the older one for omega… but hope he fixes it i havent had any runtime 9 errors since 3.0 i couldnt even use 2.0 cause of runtime errors maybe u guys just did better stress testing it than i have so far but hope u guys get it worked out :)

I used this one for eclipse omega.. i thought it was working fine too, until i got complaints about the rte 9.
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
Hello!
I added the code but in admin panel when I click on my door button nothing happens.
It's name: cmdADoor
Code in it:

>! ```
Private Sub cmdADoor_Click()
' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
>!     If GetPlayerAccess(MyIndex) < ADMIN_DEVELOPER Then

        Exit Sub
    End If

    SendRequestEditdoors

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "cmdAItem_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
>! End Sub
```

Help!
Link to comment
Share on other sites

Private Sub cmdADoor_Click()
' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If GetPlayerAccess(MyIndex) < ADMIN_DEVELOPER Then

        Exit Sub
    End If

    SendRequestEditdoors

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "cmdAItem_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub

End Sub
Link to comment
Share on other sites

Sub SendRequestEditdoors
(Bottom of mod client TCP)
```
Public Sub SendRequestEditdoors()
Dim Buffer As clsBuffer

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    Set Buffer = New clsBuffer
    Buffer.WriteLong CRequestEditDoors
    SendData Buffer.ToArray()
    Set Buffer = Nothing

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SendRequestEditdoors", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

```
Bottom of modHandleData (server)

```
'  //////////////////////////////////
' //Request/Save edit Door packets//
'//////////////////////////////////
Sub HandleEditDoors(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    Dim Buffer As clsBuffer

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_DEVELOPER Then
        Exit Sub
    End If

    Set Buffer = New clsBuffer
    Buffer.WriteLong SDoorsEditor
    SendDataTo Index, Buffer.ToArray()
    Set Buffer = Nothing
End Sub

Sub HandleRequestDoors(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    SendDoors Index
End Sub

Private Sub HandleSaveDoor(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    Dim DoorNum As Long
    Dim Buffer As clsBuffer
    Dim DoorSize As Long
    Dim DoorData() As Byte

    ' Prevent hacking
    If GetPlayerAccess(Index) < ADMIN_DEVELOPER Then
        Exit Sub
    End If

    Set Buffer = New clsBuffer
    Buffer.WriteBytes Data()
    DoorNum = Buffer.ReadLong

    ' Prevent hacking
    If DoorNum < 0 Or DoorNum > MAX_DOORS Then
        Exit Sub
    End If

    DoorSize = LenB(Doors(DoorNum))
    ReDim DoorData(DoorSize - 1)
    DoorData = Buffer.ReadBytes(DoorSize)
    CopyMemory ByVal VarPtr(Doors(DoorNum)), ByVal VarPtr(DoorData(0)), DoorSize
    ' Save it
    Call SendUpdateDoorToAll(DoorNum)
    Call SaveDoor(DoorNum)
    Call AddLog(GetPlayerName(Index) & " saved Door #" & DoorNum & ".", ADMIN_LOG)
End Sub

```
Link to comment
Share on other sites

I added the stuff in InitMessages()
and my Modhandledata (bottom)
```
Private Sub HandleDoorsEditor()
    Dim i As Long

    With frmEditor_Doors
        Editor = EDITOR_DOORS
        .lstIndex.Clear

        ' Add the names
        For i = 1 To MAX_DOORS
            .lstIndex.AddItem i & ": " & Trim$(Doors(i).Name)
        Next

        .Show
        .lstIndex.ListIndex = 0
        DoorEditorInit
    End With

End Sub

Private Sub HandleUpdateDoors(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim DoorNum As Long
Dim Buffer As clsBuffer
Dim DoorSize As Long
Dim DoorData() As Byte

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    Set Buffer = New clsBuffer
    Buffer.WriteBytes Data()

    DoorNum = Buffer.ReadLong

    DoorSize = LenB(Doors(DoorNum))
    ReDim DoorData(DoorSize - 1)
    DoorData = Buffer.ReadBytes(DoorSize)

    ClearDoor DoorNum

    CopyMemory ByVal VarPtr(Doors(DoorNum)), ByVal VarPtr(DoorData(0)), DoorSize

    Set Buffer = Nothing

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "HandleUpdateDoors", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...