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

[EO] Advanced Chest/Sign System [ Difficulty 4/5 ]


Guest
 Share

Recommended Posts

Hey people,
This is my second tutorial after [this silly and stupid one](http://www.touchofdeathforums.com/smf/index.php/topic,70525.msg758612.html#msg758612), so ReSpEcT.
As the title is telling you, the difficulty = 4/5.. this means that it is not made for new people in vb6(noobs)..
But I have something for those noobs, [a blanc EO2.0 Source with this system installed on. Oh and it's with a fixed pm system, because I made it on the same project.](http://www.mediafire.com/?95y9e4n9ay2aqec).

Features:
Add a sign wich will have the possibility to do the next,
  - Only say something, nothing more, nothing specials.
  - Say something + give an item as many as you [Ctrl] it.
  - Say Something + give an item just the first time you [Ctrl] it.
  - Of course it also can give you an item without saying anything.
  - And of course it can also give you an item just once without saying anything.

Example:
  - You are about to enter a jungle, there is a sign on the map with text on it..
    You [Ctrl] the sign, it says "You will not survive this jungle.".
  - You are about to enter a jungle, there is a sign with many papers on the
    ground in front of it, you [Ctrl] the sign and it says "You will not survive
    this jungle. *You have found a Jungle Map on the ground*"
  - You are about to enter a jungle, there is a box with text on it, you read
    "A Tentacle Axe, cuts all trees in the jungle." and you got a Tentacle Axe
    in your inventory.
    Next time you [Ctrl] it, it say "A Tentacle Axe, cuts all trees in the jungle."
    and "You already got this item before" and you don't get anything.
  - You have entered a jungle, at the end of the jungle there is a chest with text
    written on it, you read "This chest contains marihuana", you got a tea-bag, so you
    [Ctrl]'ed it again(hoping to get the marihuana), it said "You already got this item before."
    ~~So you're stressed, and threw the tea-bag back in the chest.~~
  - An Npc standing without moving in front of a wall, you [Ctrl] it, it say "Hello, take
    this, it's 20k.", and you got 20k money.

  -.- No more examples,  Use ur Fu*king imagination.

Let's start the real Shit
This color means in wich module/form you have to paste it.
This color means where you have to paste it.
**This color means a post script(ps.).**

> **Server Side**
> **Create a folder "server\data\sign".**
>
> modSign
> ```
> Public Const MAX_SIGNS As Long = 255
>
> Public Sub SaveSigns()
>     Dim i As Long
>
>     For i = 1 To MAX_SIGNS
>         Call SaveSign(i)
>     Next
> End Sub
> Public Sub SaveSign(ByVal SignNum As Long)
>     Dim filename As String
>     Dim F As Long
>     filename = App.Path & "\data\sign\sign" & SignNum & ".dat"
>     F = FreeFile
>     Open filename For Binary As #F
>         Put #F, , Sign(SignNum)
>     Close #F
> End Sub
> Public Sub LoadSigns()
>     Dim filename As String
>     Dim i As Long
>     Dim F As Long
>     Dim sLen As Long
>    
>     Call CheckSigns
>
>     For i = 1 To MAX_SIGNS
>         filename = App.Path & "\data\sign\sign" & i & ".dat"
>         F = FreeFile
>         Open filename For Binary As #F
>             Get #F, , Sign(i)
>         Close #F
>     Next
> End Sub
> Public Sub CheckSigns()
>     Dim i As Long
>
>     For i = 1 To MAX_SIGNS
>         If Not FileExist("\Data\sign\sign" & i & ".dat") Then
>             Call SaveSign(i)
>         End If
>     Next
> End Sub
> Public Sub ClearSigns()
>     Dim i As Long
>
>     For i = 1 To MAX_SIGNS
>         Call ClearSign(i)
>     Next
> End Sub
> Public Sub CacheSigns(ByVal mapNum As Long)
>     Dim x As Long, y As Long, Sign_Count As Long
>     Sign_Count = 0
>     For x = 0 To Map(mapNum).MaxX
>         For y = 0 To Map(mapNum).MaxY
>             If Map(mapNum).Tile(x, y).Type = TILE_TYPE_SIGN Then
>                 Sign_Count = Sign_Count + 1
>                 ReDim Preserve SignCache(mapNum).SignData(0 To Sign_Count)
>                 SignCache(mapNum).SignData(Sign_Count).x = x
>                 SignCache(mapNum).SignData(Sign_Count).y = y
>             End If
>         Next
>     Next
>     SignCache(mapNum).Sign_Count = Sign_Count
> End Sub
> Public Sub HandleRequestEditSign(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 SSignEditor
>     SendDataTo index, Buffer.ToArray()
>     Set Buffer = Nothing
> End Sub
> Public Sub HandleSaveSign(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
>     Dim SignNum As Long
>     Dim Buffer As clsBuffer
>     Dim SignSize As Long
>     Dim SignData() As Byte
>
>     ' Prevent hacking
>     If GetPlayerAccess(index) < ADMIN_DEVELOPER Then
>         Exit Sub
>     End If
>
>     Set Buffer = New clsBuffer
>     Buffer.WriteBytes Data()
>     SignNum = Buffer.ReadLong
>
>     ' Prevent hacking
>     If SignNum < 0 Or SignNum > MAX_SIGNS Then
>         Exit Sub
>     End If
>
>     SignSize = LenB(Sign(SignNum))
>     ReDim SignData(SignSize - 1)
>     SignData = Buffer.ReadBytes(SignSize)
>     CopyMemory ByVal VarPtr(Sign(SignNum)), ByVal VarPtr(SignData(0)), SignSize
>     ' Save it
>     Call SendUpdateSignToAll(SignNum)
>     Call SaveSign(SignNum)
>     Call AddLog(GetPlayerName(index) & " saved Sign #" & SignNum & ".", ADMIN_LOG)
> End Sub
> Public Sub HandleRequestSigns(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
>     SendSigns index
> End Sub
> Public Sub SendSigns(ByVal index As Long)
>     Dim i As Long
>     For i = 1 To MAX_SIGNS
>
>         If LenB(Trim$(Sign(i).Name)) > 0 Then
>             Call SendUpdateSignTo(index, i)
>         End If
>     Next
> End Sub
> Public Sub SendUpdateSignToAll(ByVal SignNum As Long)
>     Dim packet As String
>     Dim Buffer As clsBuffer
>     Dim SignSize As Long
>     Dim SignData() As Byte
>    
>     Set Buffer = New clsBuffer
>    
>     SignSize = LenB(Sign(SignNum))
>     ReDim SignData(SignSize - 1)
>     CopyMemory SignData(0), ByVal VarPtr(Sign(SignNum)), SignSize
>    
>     Buffer.WriteLong SUpdateSign
>     Buffer.WriteLong SignNum
>     Buffer.WriteBytes SignData
>
>     SendDataToAll Buffer.ToArray()
>     Set Buffer = Nothing
> End Sub
> Public Sub SendUpdateSignTo(ByVal index As Long, ByVal SignNum As Long)
>     Dim packet As String
>     Dim Buffer As clsBuffer
>     Dim SignSize As Long
>     Dim SignData() As Byte
>    
>     Set Buffer = New clsBuffer
>    
>     SignSize = LenB(Sign(SignNum))
>     ReDim SignData(SignSize - 1)
>     CopyMemory SignData(0), ByVal VarPtr(Sign(SignNum)), SignSize
>    
>     Buffer.WriteLong SUpdateSign
>     Buffer.WriteLong SignNum
>     Buffer.WriteBytes SignData
>    
>     SendDataTo index, Buffer.ToArray()
>     Set Buffer = Nothing
> End Sub
> Public Sub SendSignCacheTo(ByVal index As Long, ByVal Sign_num As Long)
>     Dim Buffer As clsBuffer
>     Dim i As Long
>     Set Buffer = New clsBuffer
>     Buffer.WriteLong SSignCache
>     Buffer.WriteLong SignCache(GetPlayerMap(index)).Sign_Count
>     If SignCache(GetPlayerMap(index)).Sign_Count > 0 Then
>         For i = 0 To SignCache(GetPlayerMap(index)).Sign_Count
>             Buffer.WriteLong SignCache(GetPlayerMap(index)).SignData(i).x
>             Buffer.WriteLong SignCache(GetPlayerMap(index)).SignData(i).y
>         Next
>     End If
>     SendDataTo index, Buffer.ToArray()
>     Set Buffer = Nothing
> End Sub
> Public Sub SendSignCacheToMap(ByVal mapNum As Long, ByVal Sign_num As Long)
>     Dim Buffer As clsBuffer
>     Dim i As Long
>     Set Buffer = New clsBuffer
>     Buffer.WriteLong SSignCache
>     Buffer.WriteLong SignCache(mapNum).Sign_Count
>     If SignCache(mapNum).Sign_Count > 0 Then
>
>         For i = 0 To SignCache(mapNum).Sign_Count
>             Buffer.WriteLong SignCache(mapNum).SignData(i).x
>             Buffer.WriteLong SignCache(mapNum).SignData(i).y
>         Next
>     End If
>     SendDataToMap mapNum, Buffer.ToArray()
>     Set Buffer = Nothing
> End Sub
> Public Sub CheckSign(ByVal index As Long, ByVal x As Long, ByVal y As Long)
>     Dim Sign_num As Long
>     Dim Sign_index As Long
>     Dim rX As Long, rY As Long
>     Dim i As Long
>     Dim Damage As Long
>    
>     If Map(GetPlayerMap(index)).Tile(x, y).Type = TILE_TYPE_SIGN Then
>         Sign_num = 0
>         Sign_index = Map(GetPlayerMap(index)).Tile(x, y).Data1
>
>         For i = 0 To SignCache(GetPlayerMap(index)).Sign_Count
>
>             If SignCache(GetPlayerMap(index)).SignData(i).x = x Then
>                 If SignCache(GetPlayerMap(index)).SignData(i).y = y Then
>                     Sign_num = i
>                 End If
>             End If
>
>         Next
>        
>                 If Sign_num > 0 Then
>                     ' inv space?
>                     If Sign(Sign_index).AllowItem = True Then
>                         If FindOpenInvSlot(index, Sign(Sign_index).Item) = 0 Then
>                             PlayerMsg index, "Make sure you have enough inventory space first.", BrightRed
>                             Exit Sub
>                         End If
>                     End If
>                    
>                         rX = SignCache(GetPlayerMap(index)).SignData(Sign_num).x
>                         rY = SignCache(GetPlayerMap(index)).SignData(Sign_num).y
>                         If GetPlayerEquipment(index, Weapon) > 0 Then
>                                 Damage = Item(GetPlayerEquipment(index, Weapon)).Data2
>                         End If
>                         ' check if attacked
>                         If Damage >= 0 Then
>                             ' cut it down!
>                                 SendSignCacheToMap GetPlayerMap(index), Sign_num
>                                 ' send message if it exists
>                             If Len(Trim$(Sign(Sign_index).Text)) > 0 Then
>                                 PlayerMsg index, Trim$(Sign(Sign_index).Text), Sign(Sign_index).color
>                             End If
>                             If Sign(Sign_index).AllowItem = True Then
>                                 If Sign(Sign_index).AllowMultiGain = False Then
>                                     If Player(index).Signs(Sign_index) = False Then
>                                         GiveInvItem index, Sign(Sign_index).Item, Sign(Sign_index).amount
>                                         Player(index).Signs(Sign_index) = True
>                                     Else
>                                         PlayerMsg index, "You have already taken the item before.", Sign(Sign_index).color + 1
>                                     End If
>                                 Else
>                                     GiveInvItem index, Sign(Sign_index).Item, Sign(Sign_index).amount
>                                 End If
>                             End If
>                         End If
>                     End If
>                 End If
> End Sub
>
> ```
> modDatabase
> ```
> Public Sub ClearSign(ByVal index As Long)
>     Call ZeroMemory(ByVal VarPtr(Sign(index)), LenB(Sign(index)))
>     Sign(index).Text = vbNullString
>     Sign(index).Name = vbNullString
> End Sub
> ```
> modDatabase LoadMaps
> ```
> CacheSigns i
> ```
> modGeneral InitServer
> ```
> ChkDir App.Path & "\Data\", "sign"
> ```
> modGeneral ClearGameData
> ```
> Call SetStatus("Clearing Signs...")
> Call ClearSigns
> ```
> modGeneral LoadGameData
> ```
> Call SetStatus("Loading Signs...")
> Call LoadSigns
> ```
> modHandleData InitMessages
> ```
> HandleDataSub(CSaveSign) = GetAddress(AddressOf HandleSaveSign)
> HandleDataSub(CRequestSigns) = GetAddress(AddressOf HandleRequestSigns)
> HandleDataSub(CRequestEditSign) = GetAddress(AddressOf HandleRequestEditSign)
> ```
> modHandleData HandleAttack
> ```
> CheckSign index, x, y
> ```
> modHandleData HandleMapData
> ```
> Call CacheSigns(mapNum)
> ```
> modHandleData HandleNeedMap
> ```
> For i = 0 To SignCache(GetPlayerMap(index)).Sign_Count
> SendSignCacheTo index, i
> Next
> ```
> modHandleData HandleMapRespawn
> ```
> CacheSigns GetPlayerMap(index)
> ```
> modTypes
> ```
> Public Sign(1 To MAX_SIGNS) As SignRec
> Public SignCache(1 To MAX_MAPS) As SignCacheRec
> Private Type MapSignRec
>     x As Long
>     y As Long
> End Type
> Private Type SignCacheRec
>     Sign_Count As Long
>     SignData() As MapSignRec
> End Type
> Public Type SignRec
>     Name As String * NAME_LENGTH
>     Text As String * 255
>     color As Byte
>     Item As Byte
>     Image As Byte
>     amount As Long
>     AllowItem As Boolean
>     AllowMultiGain As Boolean
> End Type
> ```
> modTypes PlayerRec
> ```
> Signs(1 To MAX_SIGNS) As Boolean
> ```
> frmServer
> **As you can see you have to creat a "cmdReloadSigns"**
> ![](http://img94.imageshack.us/img94/9434/cmdreloadsigns.png)
> ```
> Private Sub cmdReloadSigns_Click()
> Dim i As Long
>     Call LoadSigns
>     Call TextAdd("All Signs reloaded.")
>     For i = 1 To Player_HighIndex
>         If IsPlaying(i) Then
>             SendSigns i
>         End If
>     Next
> End Sub
> ```
> modEnumerations ServerPackets
> ```
> SUpdateSign
> SSignEditor
> SSignCache
> ```
> modEnumerations ClientPackets
> ```
> CSaveSign
> CRequestSigns
> CRequestEditSign
> ```
> modPlayer JoinGame
> ```
> Call SendSigns(index)
> For i = 0 To SignCache(GetPlayerMap(index)).Sign_Count
> SendSignCacheTo index, i
> Next
> ```
> modConstants
> **Change ## to the next number…**
> ```
> Public Const TILE_TYPE_SIGN As Byte = ##
> ```

> **Client Side**
> **Create a folder "client\data files\graphics\Signs", there goes the pics of the signs.
> Create a form called "frmEditor_Sign", on the pic you will see what you need.**
> ![](http://img828.imageshack.us/img828/4453/frmeditorsign.png)
> frmEditor_Sign
> ```
> Private Sub chkAllowItem_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     If chkAllowItem.Value = 0 Then
>         chkAllowMultiItem.Enabled = False
>         scrlSignItem.Enabled = False
>         scrlSignItemAmount.Enabled = False
>         Sign(EditorIndex).AllowItem = False
>     Else
>         chkAllowMultiItem.Enabled = True
>         scrlSignItem.Enabled = True
>         scrlSignItemAmount.Enabled = True
>         Sign(EditorIndex).AllowItem = True
>     End If
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "chkAllowItem_Click", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub chkAllowMultiItem_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     If chkAllowMultiItem.Value = 0 Then
>         Sign(EditorIndex).AllowMultiGain = False
>     Else
>         Sign(EditorIndex).AllowMultiGain = True
>     End If
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "chkAllowMultiItem_Click", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub cmdCancel_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     Call SignEditorCancel
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "cmdCancel_Click", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub cmdDelete_Click()
> Dim tmpIndex As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     ClearSign EditorIndex
>    
>     tmpIndex = lstSignIndex.ListIndex
>     lstSignIndex.RemoveItem EditorIndex - 1
>     lstSignIndex.AddItem EditorIndex & ": " & Sign(EditorIndex).Name, EditorIndex - 1
>     lstSignIndex.ListIndex = tmpIndex
>    
>     SignEditorInit
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "cmdDelete_Click", "frmEditor_sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub cmdSave_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     Call SignEditorOk
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "cmdSave_Click", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub lstSignIndex_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     SignEditorInit
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "lstSignIndex_Click", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub scrlSignItem_Change()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     If scrlSignItem.Value > 0 Then
>         lblSignItem.Caption = "Give Item: " & Trim$(Item(scrlSignItem.Value).Name)
>     Else
>         lblSignItem.Caption = "Give Item: None."
>     End If
>         If Item(scrlSignItem.Value).Type = ITEM_TYPE_CURRENCY Then
>             scrlSignItemAmount.Enabled = True
>                 Else
>             scrlSignItemAmount.Value = 1
>             scrlSignItemAmount.Enabled = False
>         End If
>     Sign(EditorIndex).Item = scrlSignItem.Value
>
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "scrlSignItem_Change", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub scrlSignItemAmount_Change()
>
>     If scrlSignItemAmount.Value > 0 Then
>         lblSignItemAmount.Caption = "Amount: " & scrlSignItemAmount.Value
>     Else
>         lblSignItemAmount.Caption = "Amount: Nothing."
>     End If
>     Sign(EditorIndex).amount = scrlSignItemAmount.Value
> End Sub
> Private Sub scrlSignPic_Change()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     lblSignPic.Caption = "Sign Image: " & scrlSignPic.Value
>     EditorSign_BltSprite
>     Sign(EditorIndex).Image = scrlSignPic.Value
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "scrlSignPic_Change", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub txtSignColor_Change()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     Sign(EditorIndex).color = Trim$(txtSignColor.text)
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "txtSignText_Change", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub txtSignName_Validate(Cancel As Boolean)
> Dim tmpIndex As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     If EditorIndex = 0 Then Exit Sub
>     tmpIndex = lstSignIndex.ListIndex
>     Sign(EditorIndex).Name = Trim$(txtSignName.text)
>     lstSignIndex.RemoveItem EditorIndex - 1
>     lstSignIndex.AddItem EditorIndex & ": " & Sign(EditorIndex).Name, EditorIndex - 1
>     lstSignIndex.ListIndex = tmpIndex
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "txtSignName_Validate", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub txtSignText_Change()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     Sign(EditorIndex).text = Trim$(txtSignText.text)
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "txtSignText_Change", "frmEditor_Sign", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
>
> ```
> modSign
> ```
> Public Const MAX_SIGNS As Long = 255
> Public Sign_Changed(1 To MAX_SIGNS) As Boolean
> Public DDS_Sign() As DirectDrawSurface7
> Public DDSD_Sign() As DDSURFACEDESC2
> Public SignTimer() As Long
> Public NumSigns As Long
> Public SignEditorNum As Long
> Public MapSign() As MapSignRec
> Public Sign_Index As Long
> Public Signs_Init As Boolean
> Public Sub CacheSigns()
> Dim X As Long, Y As Long, Sign_Count As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     Sign_Count = 0
>
>     For X = 0 To Map.MaxX
>         For Y = 0 To Map.MaxY
>             If Map.Tile(X, Y).Type = TILE_TYPE_SIGN Then
>                 Sign_Count = Sign_Count + 1
>                 ReDim Preserve MapSign(0 To Sign_Count)
>                 MapSign(Sign_Count).X = X
>                 MapSign(Sign_Count).Y = Y
>             End If
>         Next
>     Next
>
>     Sign_Index = Sign_Count
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "CacheSigns", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub SendSaveSign(ByVal SignNum As Long)
> Dim Buffer As clsBuffer
> Dim SignSize As Long
> Dim SignData() As Byte
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     Set Buffer = New clsBuffer
>     SignSize = LenB(Sign(SignNum))
>     ReDim SignData(SignSize - 1)
>     CopyMemory SignData(0), ByVal VarPtr(Sign(SignNum)), SignSize
>     Buffer.WriteLong CSaveSign
>     Buffer.WriteLong SignNum
>     Buffer.WriteBytes SignData
>     SendData Buffer.ToArray()
>     Set Buffer = Nothing
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "SendSaveSign", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub SendRequestSigns()
> 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 CRequestSigns
>     SendData Buffer.ToArray()
>     Set Buffer = Nothing
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "SendRequestSigns", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub SendRequestEditSign()
> 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 CRequestEditSign
>     SendData Buffer.ToArray()
>     Set Buffer = Nothing
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "SendRequestEditSign", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub ClearSign(ByVal Index As Long)
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     Call ZeroMemory(ByVal VarPtr(Sign(Index)), LenB(Sign(Index)))
>     Sign(Index).text = vbNullString
>     Sign(Index).Name = vbNullString
>
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "ClearSign", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> public Sub ClearSigns()
> Dim i As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     For i = 1 To MAX_SIGNS
>         Call ClearSign(i)
>     Next
>
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "ClearSigns", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub CheckSigns()
> Dim i As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     i = 1
>
>     While FileExist(GFX_PATH & "Signs\" & i & GFX_EXT)
>         NumSigns = NumSigns + 1
>         i = i + 1
>     Wend
>    
>     If NumSigns = 0 Then Exit Sub
>
>     ReDim DDS_Sign(1 To NumSigns)
>     ReDim DDSD_Sign(1 To NumSigns)
>     ReDim SignTimer(1 To NumSigns)
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "CheckSigns", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub SignEditorInit()
> Dim i As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     If frmEditor_Sign.Visible = False Then Exit Sub
>     EditorIndex = frmEditor_Sign.lstSignIndex.ListIndex + 1
>    
>
>    
>     With frmEditor_Sign
>         .scrlSignPic.Max = NumSigns
>         .scrlSignItem.Max = MAX_ITEMS
>         If Sign(EditorIndex).Item > 0 Then
>             .scrlSignItem.Value = Sign(EditorIndex).Item
>         End If
>         If Sign(EditorIndex).amount > 0 Then
>             .scrlSignItemAmount = Sign(EditorIndex).amount
>         End If
>         .scrlSignPic = Sign(EditorIndex).Image
>         .txtSignColor = Sign(EditorIndex).color
>         .txtSignName = Sign(EditorIndex).Name
>         .txtSignText = Sign(EditorIndex).text
>         If Sign(EditorIndex).AllowItem Then
>             .chkAllowItem.Value = 1
>         Else
>             .chkAllowItem.Value = 0
>         End If
>         If Sign(EditorIndex).AllowMultiGain Then
>             .chkAllowMultiItem.Value = 1
>         Else
>             .chkAllowMultiItem.Value = 0
>         End If
>     End With
>        
>     Call EditorSign_BltSprite
>    
>     Sign_Changed(EditorIndex) = True
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "SignEditorInit", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub SignEditorOk()
> Dim i As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     For i = 1 To MAX_SIGNS
>         If Sign_Changed(i) Then
>             Call SendSaveSign(i)
>         End If
>     Next
>    
>     Unload frmEditor_Sign
>     Editor = 0
>     ClearChanged_Sign
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "SignEditorOk", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub SignEditorCancel()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     Editor = 0
>     Unload frmEditor_Sign
>     ClearChanged_Sign
>     ClearSigns
>     SendRequestSigns
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "SignEditorCancel", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub ClearChanged_Sign()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     ZeroMemory Sign_Changed(1), MAX_SIGNS * 2 ' 2 = boolean length
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "ClearChanged_Sign", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub EditorSign_BltSprite()
> Dim Sprite As Long
> Dim sRECT As DxVBLib.RECT
> Dim dRECT As DxVBLib.RECT
>    
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     ' normal sprite
>     Sprite = frmEditor_Sign.scrlSignPic.Value
>
>     If Sprite < 1 Or Sprite > NumSigns Then
>         frmEditor_Sign.picSignPic.Cls
>     Else
>         SignTimer(Sprite) = GetTickCount + SurfaceTimerMax
>         If DDS_Sign(Sprite) Is Nothing Then
>             Call InitDDSurf("Signs\" & Sprite, DDSD_Sign(Sprite), DDS_Sign(Sprite))
>         End If
>         sRECT.top = 0
>         sRECT.Bottom = DDSD_Sign(Sprite).lHeight
>         sRECT.Left = 0
>         sRECT.Right = DDSD_Sign(Sprite).lWidth
>         dRECT.top = 0
>         dRECT.Bottom = DDSD_Sign(Sprite).lHeight
>         dRECT.Left = 0
>         dRECT.Right = DDSD_Sign(Sprite).lWidth
>         Call Engine_BltToDC(DDS_Sign(Sprite), sRECT, dRECT, frmEditor_Sign.picSignPic)
>     End If
>
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "EditorSign_BltSprite", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     End Sub
> Public Sub ScreenshotSign(ByVal Sign As Long, ByVal X As Long, Y As Long, rec As DxVBLib.RECT)
> Dim width As Long
> Dim height As Long
> Dim destRECT As DxVBLib.RECT
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     If Sign < 1 Or Sign > NumSigns Then Exit Sub
>    
>     SignTimer(Sign) = GetTickCount + SurfaceTimerMax
>
>     If DDS_Sign(Sign) Is Nothing Then
>         Call InitDDSurf("Signs\" & Sign, DDSD_Sign(Sign), DDS_Sign(Sign))
>     End If
>    
>     width = (rec.Right - rec.Left)
>     height = (rec.Bottom - rec.top)
>
>     If Y < 0 Then
>         With rec
>             .top = .top - Y
>         End With
>         Y = 0
>     End If
>
>     If X < 0 Then
>         With rec
>             .Left = .Left - X
>         End With
>         X = 0
>     End If
>
>     If Y + height > DDSD_Map.lHeight Then
>         rec.Bottom = rec.Bottom - (Y + height - DDSD_Map.lHeight)
>     End If
>
>     If X + width > DDSD_Map.lWidth Then
>         rec.Right = rec.Right - (X + width - DDSD_Map.lWidth)
>     End If
>
>     ' End clipping
>     'Call Engine_BltFast(x, y, DDS_Sign(Sign), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
>     DDS_Map.BltFast X, Y, DDS_Sign(Sign), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "ScreenshotSign", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub BltSign(ByVal Sign As Long, ByVal dx As Long, dy As Long, rec As DxVBLib.RECT)
> Dim X As Long
> Dim Y As Long
> Dim width As Long
> Dim height As Long
> Dim destRECT As DxVBLib.RECT
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     If Sign < 1 Or Sign > NumSigns Then Exit Sub
>    
>     SignTimer(Sign) = GetTickCount + SurfaceTimerMax
>
>     If DDS_Sign(Sign) Is Nothing Then
>         Call InitDDSurf("Signs\" & Sign, DDSD_Sign(Sign), DDS_Sign(Sign))
>     End If
>
>     X = ConvertMapX(dx)
>     Y = ConvertMapY(dy)
>    
>     width = (rec.Right - rec.Left)
>     height = (rec.Bottom - rec.top)
>
>     If Y < 0 Then
>         With rec
>             .top = .top - Y
>         End With
>         Y = 0
>     End If
>
>     If X < 0 Then
>         With rec
>             .Left = .Left - X
>         End With
>         X = 0
>     End If
>
>     If Y + height > DDSD_BackBuffer.lHeight Then
>         rec.Bottom = rec.Bottom - (Y + height - DDSD_BackBuffer.lHeight)
>     End If
>
>     If X + width > DDSD_BackBuffer.lWidth Then
>         rec.Right = rec.Right - (X + width - DDSD_BackBuffer.lWidth)
>     End If
>
>     ' End clipping
>     Call Engine_BltFast(X, Y, DDS_Sign(Sign), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "BltSign", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub BltMapSign(ByVal Sign_num As Long, Optional ByVal screenShot As Boolean = False)
> Dim Sign_master As Long
> Dim Sign_state As Long
> Dim Sign_sprite As Long
> Dim rec As DxVBLib.RECT
> Dim X As Long, Y As Long
>    
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>
>     ' make sure it's not out of map
>     If MapSign(Sign_num).X > Map.MaxX Then Exit Sub
>     If MapSign(Sign_num).Y > Map.MaxY Then Exit Sub
>    
>
>    
>     ' Get the Sign type
>     Sign_master = Map.Tile(MapSign(Sign_num).X, MapSign(Sign_num).Y).Data1
>    
>     If Sign_master = 0 Then Exit Sub
>
>     If Sign(Sign_master).Image = 0 Then Exit Sub
>    
>     ' cut down everything if we're editing
>     If InMapEditor Then
>         Sign_sprite = Sign(Sign_master).Image
>     End If
>    
>     Sign_sprite = Sign(Sign_master).Image
>
>     ' Load early
>     If DDS_Sign(Sign_sprite) Is Nothing Then
>         Call InitDDSurf("Signs\" & Sign_sprite, DDSD_Sign(Sign_sprite), DDS_Sign(Sign_sprite))
>     End If
>
>     ' src rect
>     With rec
>         .top = 0
>         .Bottom = DDSD_Sign(Sign_sprite).lHeight
>         .Left = 0
>         .Right = DDSD_Sign(Sign_sprite).lWidth
>     End With
>
>     ' Set base x + y, then the offset due to size
>     X = (MapSign(Sign_num).X * PIC_X) - (DDSD_Sign(Sign_sprite).lWidth / 2) + 16
>     Y = (MapSign(Sign_num).Y * PIC_Y) - DDSD_Sign(Sign_sprite).lHeight + 32
>    
>     ' render it
>     If Not screenShot Then
>         Call BltSign(Sign_sprite, X, Y, rec)
>     Else
>         Call ScreenshotSign(Sign_sprite, X, Y, rec)
>     End If
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "BltMapSign", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub HandleUpdateSign(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> Dim SignNum As Long
> Dim Buffer As clsBuffer
> Dim SignSize As Long
> Dim SignData() 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()
>    
>     SignNum = Buffer.ReadLong
>    
>     SignSize = LenB(Sign(SignNum))
>     ReDim SignData(SignSize - 1)
>     SignData = Buffer.ReadBytes(SignSize)
>    
>     ClearSign SignNum
>    
>     CopyMemory ByVal VarPtr(Sign(SignNum)), ByVal VarPtr(SignData(0)), SignSize
>    
>     Set Buffer = Nothing
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "HandleUpdateSign", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub HandleSignEditor()
> Dim i As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     With frmEditor_Sign
>         Editor = EDITOR_SIGN
>         .lstSignIndex.Clear
>
>         ' Add the names
>         For i = 1 To MAX_SIGNS
>             .lstSignIndex.AddItem i & ": " & Trim$(Sign(i).Name)
>         Next
>
>         .Show
>         .lstSignIndex.ListIndex = 0
>         SignEditorInit
>     End With
>
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "HandleSignEditor", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Public Sub HandleSignCache(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> Dim Buffer As clsBuffer
> Dim i As Long
>
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     ' if in map editor, we cache shit ourselves
>     If InMapEditor Then Exit Sub
>     Set Buffer = New clsBuffer
>     Buffer.WriteBytes Data()
>     Sign_Index = Buffer.ReadLong
>     Signs_Init = False
>
>     If Sign_Index > 0 Then
>         ReDim Preserve MapSign(0 To Sign_Index)
>
>         For i = 0 To Sign_Index
>             MapSign(i).X = Buffer.ReadLong
>             MapSign(i).Y = Buffer.ReadLong
>         Next
>
>         Signs_Init = True
>     Else
>         ReDim MapSign(0 To 1)
>     End If
>
>     Set Buffer = Nothing
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "HandleSignCache", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
>
> ```
> frmMain
>
> **You have to create button in the admin panel of frmMain called "cmdASign".**
> ```
> Private Sub cmdASign_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
>
>     SendRequestEditSign
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "cmdASign_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
>
> ```modText BltMapAttributes
> ```
> Case TILE_TYPE_SIGN
> DrawText TexthDC, tX, tY, "S", QBColor(Brown)
> ```
> modTypes
> ```
> Public Sign(1 To MAX_SIGNS) As SignRec
> Public MapSign() As MapSignRec
> Public Type MapSignRec
>     X As Long
>     Y As Long
> End Type
> Private Type SignRec
>     Name As String * NAME_LENGTH
>     text As String * 255
>     color As Byte
>     Item As Byte
>     Image As Byte
>     amount As Long
>     AllowItem As Boolean
>     AllowMultiGain As Boolean
> End Type
> ```
> modTypes PlayerRec
> ```
> Signs(1 To MAX_SIGNS) As Boolean
> ```
> modGameLogic GameLoop
> ```
> If NumSigns > 0 Then
>                 For i = 1 To NumSigns    'Check to unload surfaces
>                     If SignTimer(i) > 0 Then 'Only update surfaces in use
>                         If SignTimer(i) < Tick Then  'Unload the surface
>                             Call ZeroMemory(ByVal VarPtr(DDSD_Sign(i)), LenB(DDSD_Sign(i)))
>                             Set DDS_Sign(i) = Nothing
>                             SignTimer(i) = 0
>                         End If
>                     End If
>                 Next
>             End If
> ```
> modGameLogic CheckDirection
> ```
> If Map.Tile(X, Y).Type = TILE_TYPE_SIGN Then
>         CheckDirection = True
>         Exit Function
>     End If
> ```
> modConstants
> **Change the ## to the next number…**
> ```
> Public Const TILE_TYPE_SIGN As Byte = ##
>
> Public Const EDITOR_SIGN As Byte = ##
> ```
> modGeneral Main
> ```
> ChkDir App.Path & "\data files\graphics\", "signs"
>
> Call CheckSigns
> ```
> modGeneral logoutGame
> ```
> Unload frmEditor_Sign
> ```
> modGameEditors MapEditorMouseDown
> ```
> If frmEditor_Map.optSign.Value Then
> .Type = TILE_TYPE_SIGN
> .Data1 = SignEditorNum
> .Data2 = 0
> .Data3 = 0
> End If
>
> CacheSigns
> ```
> modDirectDraw7 DestroyDirectDraw
> ```
> For i = 1 To NumSigns
>         Set DDS_Sign(i) = Nothing
>         ZeroMemory ByVal VarPtr(DDSD_Sign(i)), LenB(DDSD_Sign(i))
>     Next
> ```
> modDirectDraw7 ScreenshotMap
> ```
> ' render the signs
>     For Y = 0 To Map.MaxY
>         If NumSigns > 0 Then
>             If Signs_Init Then
>                 If Sign_Index > 0 Then
>                     For i = 1 To Sign_Index
>                         If MapSign(i).Y = Y Then
>                             Call BltMapSign(i, True)
>                         End If
>                     Next
>                 End If
>             End If
>         End If
>     Next
> ```
> modDirectDraw7 Render_Graphics
> ```
> If NumSigns > 0 Then
>             If Signs_Init Then
>                 If Sign_Index > 0 Then
>                     For i = 1 To Sign_Index
>                         If MapSign(i).Y = Y Then
>                             Call BltMapSign(i)
>                         End If
>                     Next
>                 End If
>             End If
>         End If
>
> ```
> modEnumerations ServerPackets
> ```
> SUpdateSign
> SSignEditor
> SSignCache
> ```
> modEnumerations ClientPackets
> ```
> CSaveSign
> CRequestSigns
> CRequestEditSign
> ```
> modHandleData
> ```
> HandleDataSub(SUpdateSign) = GetAddress(AddressOf HandleUpdateSign)
> HandleDataSub(SSignEditor) = GetAddress(AddressOf HandleSignEditor)
> HandleDataSub(SSignCache) = GetAddress(AddressOf HandleSignCache)
> ```
> frmEditor_Map
> **As you can see you have to add to the attributes section "optSign"
> In picAttributes, add fraSign with in it, lblSign, scrlSign and cmdSign.
> It have to look like fraTrap, but the names of the objects are different.**
> ```
> Private Sub cmdSign_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     SignEditorNum = scrlSign.Value
>     picAttributes.Visible = False
>     fraResource.Visible = False
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "cmdSign_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub optSign_Click()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     ClearAttributeDialogue
>     picAttributes.Visible = True
>     fraSign.Visible = True
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "optSign_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub scrlSign_Change()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     lblSign.Caption = "Sign: " & scrlSign.Value & " " & Sign(scrlSign.Value).Name
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "scrlSign_Change", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> Private Sub scrlSign_Scroll()
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     scrlSign_Change
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "scrlSign_Scroll", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
>
> ```
Link to comment
Share on other sites

@Murdoc:

> Good job. I can see a few good uses with this, just using my imagination. Gonna test it out later.

Thnx for the compliment

@HeartHunt3r:

> OH MY GOD!! This is awesome!! good job ..
>
> ~~PS: also could you help me i got an error  :confused:
> look at the pic what it highlights
> modSign is the module~~

Lol, you just missed some code …
And you too thnx for the compliment.
Link to comment
Share on other sites

Link to the EO2.0 with Signs System
[http://www.mediafire.com/?95y9e4n9ay2aqec](http://www.mediafire.com/?95y9e4n9ay2aqec)
[It's with the fix of pm system…](http://www.touchofdeathforums.com/smf/index.php/topic,76880.0.html)
Link to comment
Share on other sites

THIS IS GREAT! NICE WORK! =D

I only have 2 problems with it.

1\. difficulty on this is at least a 3/5 compared to the tuts that only have 1 to 5 instructions. lol

2\. your lack of specific places to put the code. you just point out the mod and sub/function, some of those need a bit more direction of where to place. (for the noobs)

But other than that FREAKEN EPIC!
Link to comment
Share on other sites

First, thanks for your compliment.

@Ryoku:

> 2\. your lack of specific places to put the code. you just point out the mod and sub/function, some of those need a bit more direction of where to place. (for the noobs)

That is why I made the difficulty 1/5, because I didn't say the direction…
I have 3 reasons why I didn't call the direction.

1\. Eclipse Origens is now a long time active, everyone have done a tutorial before this and
    that made them know that "Dim bla as bla" allways is on top of a sub/function,
    made them also know that a "Public Sub bla()" can be everywhere in the source.
    Also if someone want to install a tutorial on his/her project, this signs system wouldn't be
    the first he/she want, there are other tutorials wich are more wanted then this.

2\. I am too lazy.

3\. I forgot the third reason while writing the first one, but there is really a third reason...

EDIT: spell fail..
Link to comment
Share on other sites

I think you and I have backwards 1/5 - 5/5 difficulty scales XD

Mine
1/5 = Easiest , and 5/5 hardest

I think 1/5 is the easiest because its smaller and you are grading on difficulty, naturally a smaller number would be easier.

XD it's just really confusing the way you have it… but maybe  that's just me. lol
Link to comment
Share on other sites

@Ryoku:

> I think you and I have backwards 1/5 - 5/5 difficulty scales XD
>
> Mine
> 1/5 = Easiest , and 5/5 hardest
>
> I think 1/5 is the easiest because its smaller and you are grading on difficulty, naturally a smaller number would be easier.
>
> XD it's just really confusing the way you have it… but maybe  that's just me. lol

You are right, I am grading difficulty 1 on 5, that means it's 1/5 hard.. I have to do 4/5…
Link to comment
Share on other sites

@boynaar:

> Deleted for some political reasons.
>
> [http://www.mediafire.com/?95y9e4n9ay2aqec](http://www.mediafire.com/?95y9e4n9ay2aqec)
> Here you can still download it, tutorial coming back soon, there are some thing I have to repair.

You deleted it for "political reasons"? Im sorry but that seems lame. Youre letting people get to you too easily man. Well, at least youre putting it back up when its fixed. I was hopin to use it at some point….
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
hey i gots an error when trying to compile the server…It says```
Compile error:
Method or data member not found
```And then it highlights .Signs in modSigns
Any help on that???

EDIT:I also got an error when trying to play the client, it says something like:
```
Compile error:
Circular dependencies between modules

```and then it highlights MapSign() As MapSignRec

someone plz help.
Link to comment
Share on other sites

@Growlith1223:

> oh ok i guess i will delete all the copying xD

Well Meteor Rain got it to work just fine he said so you might want to try again… I attempted it twice and gave up cause I wanted to make sure it was working to add to the source index.. Seeing how the author got banned or something I guess you will have to ask Meteor or try to debug it yourself. Still I think Yami's chest system is better but the signs tutorial is pretty basic but works 100%.

EDIT: I never tried the downloadable version of it so I guess you could see if that works and rip it from there =)
Link to comment
Share on other sites

@Justn:

> EDIT: I never tried the downloadable version of it so I guess you could see if that works and rip it from there =)

Thats what I did second time around and it worked fine.  The tutorial doesn't show you where to put some of the lines.

EDIT: Doesn't work if you installed ranged weapons and have one equipped.  Should be easy to fix though.
Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...
In modTypes on the client side on this part of the code
```
Public Sign(1 To MAX_SIGNS) As SignRec
```it says MAX_SIGNS is an undefined variable. Excuse me, if I may not know anything, but I am relatively new to programming. I did copy exactly as it was on the downloaded version to make sure I got nothing wrong. Any help would be greatly appreciated.
Link to comment
Share on other sites

Public Const MAX_SIGNS As Long = 255

You missed that part of the tutorial, you never defined MAX_SIGNS.

(PS, it is defined rather shitty in this tutorial, if you only want 255 you should make it a byte and not a long.)
Link to comment
Share on other sites

Oh derp, I created the file outside of VB and didn't import the module. >.<, thanks.

But now, another problem. Well, there can be two problem, depending on the way. For modSign, I get different problems for when I copy the file from the download, and another when I just copy-paste the code posted. Well, for the one when I just copy the file. I can login, but the sign box instantly comes up, and when I try to close it I get "Run-time error '9' subscript out of range" from the server.

Edit: This being what happens the other way
@Growlith1223:

> EDIT:I also got an error when trying to play the client, it says something like:
> ```
> Compile error:
> Circular dependencies between modules
>
> ```and then it highlights MapSign() As MapSignRec
>
> someone plz help.

I suspect there might be differences between the posted codes and the downloadable (the downloadable works perfect when I tried it all by itself).
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...