Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tweak] Additional Mapping Layer (For MS4)
#1
Need to change it to Layer(0 To 3) As Integer or something...makes it easier to add more.
Reply
#2
I've a bug in making of client !
error: " Else Without if "

In this code , pls help me !

Code:
Public Sub MapEditorMouseDown(Button As Integer)
    If Not isInBounds Then Exit Sub
    
    Select Case Button
    
        Case vbLeftButton
        
        If frmMirage.optLayers.Value Then
            
            With Map.Tile(CurX, CurY)
                If frmMirage.optGround.Value Then .Ground = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optMask.Value Then .Mask = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optAnim.Value Then .Anim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optReMask.Value Then .ReMask = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optReAnim.Value Then .ReAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optFringe.Value Then .Fringe = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optFAnim.Value Then .FAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optOver.Value Then .Over = EditorTileY * TILESHEET_WIDTH + EditorTileX
                If frmMirage.optOverAnim.Value Then .OverAnim = EditorTileY * TILESHEET_WIDTH + EditorTileX
            End With
        
            Call CalcTilePositions
            
        Else
        
            With Map.Tile(CurX, CurY)
            
                ' clear data
                .Type = 0
                .Data1 = 0
                .Data2 = 0
                .Data3 = 0
            
                If frmMirage.optBlocked.Value Then .Type = TILE_TYPE_BLOCKED
                
                If frmMirage.optWarp.Value Then
                    .Type = TILE_TYPE_WARP
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = EditorData3
                End If
                If frmMirage.optItem.Value Then
                    .Type = TILE_TYPE_ITEM
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = 0
                End If
                If frmMirage.optNpcAvoid.Value Then
                    .Type = TILE_TYPE_NPCAVOID
                    .Data1 = 0
                    .Data2 = 0
                    .Data3 = 0
                End If
                If frmMirage.optKey.Value Then
                    .Type = TILE_TYPE_KEY
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = 0
                End If
                If frmMirage.optKeyOpen.Value Then
                    .Type = TILE_TYPE_KEYOPEN
                    .Data1 = EditorData1
                    .Data2 = EditorData2
                    .Data3 = 0
                End If
            End With
        End If
    
    Case vbRightButton
    
        If frmMirage.optLayers.Value Then
            
            With Map.Tile(CurX, CurY)
            
            If frmMirage.optGround.Value Then .Ground = 0
                If frmMirage.optMask.Value Then .Mask = 0
                If frmMirage.optAnim.Value Then .Anim = 0
                If frmMirage.optReMask.Value Then .ReMask = 0
                If frmMirage.optReAnim.Value Then .ReAnim = 0
                If frmMirage.optFringe.Value Then .Fringe = 0
                If frmMirage.optFAnim.Value Then .FAnim = 0
                If frmMirage.optOver.Value Then .Over = 0
                If frmMirage.optOverAnim.Value Then .OverAnim = 0
            Call CalcTilePositions
            
          [b]Else[/b]
            
            With Map.Tile(CurX, CurY)
                .Type = 0
                .Data1 = 0
                .Data2 = 0
                .Data3 = 0
            End With
        End If

    End Select

End Sub
Reply
#3
Need an End If after:

Code:
With Map.Tile(CurX, CurY)
                .Type = 0
                .Data1 = 0
                .Data2 = 0
                .Data3 = 0
            End With
Reply
#4
James Wrote:After that, add all the necessary components client-side on frmMirage and you're set.

That should do it. Not the most difficult thing in the world, but for those who can't figure it out.

Well. No where near all of it. You need to edit the map data packets and the MapCache_Create on the Server or this won't work. (It only saves the Original Setup of Ground, Mask, Animation and Fringe.)
Reply
#5
James Wrote:In MS4 is bases them off the enumeration. I don't remember editing any of that and it worked fine.
but i used ms4 to do this and it didnt work. the actual data is not sent/recieved or saved by the server
Reply
#6
Which version of MS4? This works for the byte array version because of the way I cache the maps.
Reply
#7
Jacob Wrote:Which version of MS4? This works for the byte array version because of the way I cache the maps.
Lol im using 3.78 still. Once I finish a couple more features Im just going to convert it from .78 to .79
Reply
#8
From the looks of it, it wont work. Unless the packets are really sent differently the server'll expect less tiles than it's recieving.
Reply
#9
In 3.79, I take the memory address of the map and use that to send data. This way you don't really mess with the packet data at all.

It's the same for Items, Npcs, Spells, and shops.
Reply
#10
Jacob Wrote:In 3.79, I take the memory address of the map and use that to send data. This way you don't really mess with the packet data at all.

It's the same for Items, Npcs, Spells, and shops.

I saw that. I dont understand BAP's though. But if I can successfully rip it from MS 3.79 and put it into 3.78 i'll be fine.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)