damian666 Posted March 22, 2013 Author Share Posted March 22, 2013 client sidefirst add the provided files to your client, and the inbox form to your project.Open frmMain and Make a button and name it cmdMail, make sure it has a height of 36 and a width of 36, and set the style to 1 in the properties window.Then paste this code into frmMain:```Private Sub cmdMail_Click()If frmInbox.Visible = False ThenfrmInbox.Visible = TrueEnd IfEnd Sub```Go to ModEnumerationsin Public Enum ServerPacketsjust above```' Make sure SMSG_COUNT is below everything elseSMSG_COUNT```add```'mail stuffSSetMsgBodySMyInboxSMyOutBoxSUnreadMsg```and then inPublic Enum ClientPacketsadd just above```' Make sure CMSG_COUNT is below everything elseCMSG_COUNT```this:```'mail stuffCSendEmailCGetMsgBodyCDeleteMsgCUpdateInboxCCheckChar```Go to modhandledatain modHandledata, sub InitMessages, just above```' Error handlerExit Sub```add```'mail stuffHandleDataSub(SSetMsgBody) = GetAddress(AddressOf HandleSetMsgBody)HandleDataSub(SMyInbox) = GetAddress(AddressOf HandleMyInbox)HandleDataSub(SMyOutBox) = GetAddress(AddressOf HandleMyOutBox)HandleDataSub(SUnreadMsg) = GetAddress(AddressOf HandleUnreadMessage)```then at the bottom of modhandledata add these subs```Sub HandleSetMsgBody(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim Sender As String, Subject As String, Body As String, MailType As Byte' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()Sender = Buffer.ReadStringSubject = Buffer.ReadStringBody = Buffer.ReadStringMailType = Buffer.ReadByteIf MailType = 1 ThenfrmInbox.txtSender.text = SenderfrmInbox.txtSubject.text = SubjectfrmInbox.txtBody.text = BodyfrmInbox.txtBody2.text = BodyElsefrmInbox.txtReceiver2.text = SenderfrmInbox.txtSubject.text = SubjectfrmInbox.txtBody.text = BodyfrmInbox.txtBody3.text = BodyEnd IfSet Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "HandleSetMsgBody", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubSub HandleMyInbox(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim Name As String, Number As Long, Subject As String' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()Name = Buffer.ReadString '1Number = Buffer.ReadLong '2Subject = Buffer.ReadString '3If Number <= 9 ThenfrmInbox.lstMail.AddItem "[000" & Number & "]" & " " & Name & " - " & SubjectElseIf Number >= 9 And Number <= 99 ThenfrmInbox.lstMail.AddItem "[00" & Number & "]" & " " & Name & " - " & SubjectElseIf Number > 99 ThenfrmInbox.lstMail.AddItem "[0" & Number & "]" & " " & Name & " - " & SubjectElsefrmInbox.lstMail.AddItem "[" & Number & "]" & " " & Name & " - " & SubjectEnd IfSet Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "HandleMyInbox", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubSub HandleMyOutbox(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim Name As String, Number As Long, Subject As String' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()Name = Buffer.ReadStringNumber = Buffer.ReadLongSubject = Buffer.ReadStringIf Number <= 9 ThenfrmInbox.lstOutbox.AddItem "[000" & Number & "]" & " " & Name & " - " & SubjectElseIf Number >= 9 And Number <= 99 ThenfrmInbox.lstOutbox.AddItem "[00" & Number & "]" & " " & Name & " - " & SubjectElseIf Number > 99 ThenfrmInbox.lstOutbox.AddItem "[0" & Number & "]" & " " & Name & " - " & SubjectElsefrmInbox.lstOutbox.AddItem "[" & Number & "]" & " " & Name & " - " & SubjectEnd IfSet Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "HandleMyOutbox", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubSub HandleUnreadMessage(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim E As Long, Unread As LongDim Ending1 As String' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()Unread = Buffer.ReadLongIf Unread > 0 ThenFor E = 1 To 3If E = 1 Then Ending1 = ".gif"If E = 2 Then Ending1 = ".jpg"If E = 3 Then Ending1 = ".bmp"If FileExist(GFX_PATH & "gui\main\Inbox2" & Ending1) ThenfrmMain.cmdMail.Picture = LoadPicture(App.Path & GFX_PATH & "gui\main\Inbox2" & Ending1)End IfNext EElseFor E = 1 To 3If E = 1 Then Ending1 = ".gif"If E = 2 Then Ending1 = ".jpg"If E = 3 Then Ending1 = ".bmp"If FileExist(GFX_PATH & "gui\main\Inbox" & Ending1) ThenfrmMain.cmdMail.Picture = LoadPicture(App.Path & GFX_PATH & "gui\main\Inbox" & Ending1)End IfNext EEnd IfSet Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "HandleUnreadMessage", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```Now open up ModClientTCP and just paste this at the bottom:```Public Sub SendEmail(ByVal msgSender As String, ByVal msgReceiver As String, ByVal msgSubject As String, ByVal msgBody As String)Dim Buffer As clsBuffer' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteLong CSendEmailBuffer.WriteString msgSenderBuffer.WriteString msgReceiverBuffer.WriteString msgSubjectBuffer.WriteString msgBodySendData Buffer.ToArray()Set Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "SendEmail", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPublic Sub GetMsgBody(ByVal MyName As String, ByVal ListedMsg As Long, ByVal Either As Long)Dim Buffer As clsBuffer' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteLong CGetMsgBodyBuffer.WriteString MyNameBuffer.WriteLong ListedMsgBuffer.WriteLong EitherSendData Buffer.ToArray()Set Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "GetMsgBody", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPublic Sub RemoveMail(ByVal MyName As String, ByVal DltMsgNum As Long, ByVal Either As Long)Dim Buffer As clsBuffer' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteLong CDeleteMsgBuffer.WriteString MyNameBuffer.WriteLong DltMsgNumBuffer.WriteLong EitherSendData Buffer.ToArray()Set Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "RemoveMail", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPublic Sub CheckInbox(ByVal MyInbox As String, ByVal Either As Long)Dim Buffer As clsBuffer' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteLong CUpdateInboxBuffer.WriteString MyInboxBuffer.WriteLong EitherSendData Buffer.ToArray()Set Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "CheckInbox", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPublic Sub CheckChar(ByVal msgSender As String, ByVal msgReceiver As String, ByVal msgSubject As String, ByVal msgBody As String)Dim Buffer As clsBuffer' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteLong CCheckCharBuffer.WriteString msgSenderBuffer.WriteString msgReceiverBuffer.WriteString msgSubjectBuffer.WriteString msgBodySendData Buffer.ToArray()Set Buffer = Nothing' Error handlerExit Suberrorhandler:HandleError "CheckChar", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```'SAVE YOUR PROJECT, and close the client.server sideGo to ModEnumerationsin Public Enum ServerPacketsjust above```' Make sure SMSG_COUNT is below everything elseSMSG_COUNT```add```'mail stuffSSetMsgBodySMyInboxSMyOutBoxSUnreadMsg```and then inPublic Enum ClientPacketsadd just above```' Make sure CMSG_COUNT is below everything elseCMSG_COUNT```this:```'mail stuffCSendEmailCGetMsgBodyCDeleteMsgCUpdateInboxCCheckChar```in modGeneral, sub InitServer, under```ChkDir App.Path & "\Data\", "spells"```add:```ChkDir App.Path & "\Data\", "mail"ChkDir App.Path & "\Data\Mail\", "outbox"```Open up ModHandleData, sub initmessages, and put this right under the other other ones```HandleDataSub(CSendEmail) = GetAddress(AddressOf HandleSendEmail)HandleDataSub(CGetMsgBody) = GetAddress(AddressOf HandleGetMsgBody)HandleDataSub(CDeleteMsg) = GetAddress(AddressOf HandleDeleteMsg)HandleDataSub(CUpdateInbox) = GetAddress(AddressOf HandleUpdateInbox)HandleDataSub(CCheckChar) = GetAddress(AddressOf HandleCheckChar)```after that add these to the bottom of the modhandledata```Public Sub HandleSendEmail(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim buffer As clsBuffer Dim msgSender As String, msgReceiver As String Dim msgSubject As String, msgBody As String Set buffer = New clsBuffer buffer.WriteBytes Data() msgSender = buffer.ReadString msgReceiver = buffer.ReadString msgSubject = buffer.ReadString msgBody = buffer.ReadString Set buffer = Nothing SendEmail Index, msgSender, msgReceiver, msgSubject, msgBodyEnd SubPublic Sub HandleGetMsgBody(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim FileName As String, Inbox As Long Dim MyName As String, ListedMsg As Long, Either As Long Dim buffer As clsBuffer Set buffer = New clsBuffer buffer.WriteBytes Data() MyName = buffer.ReadString ListedMsg = buffer.ReadLong Either = buffer.ReadLong Set buffer = Nothing If GetPlayerName(Index) <> MyName Then Call HackingAttempt(Index, "Email Modification") Exit Sub End If If Either = 1 Then FileName = App.Path & "\Data\Mail\" & MyName & ".txt" Inbox = Val(GetVar(FileName, "INBOX", "amount")) Do While Inbox >= 1 If Val(GetVar(FileName, STR$(ListedMsg), "Number")) = Inbox Then Set buffer = New clsBuffer buffer.WriteLong SSetMsgBody buffer.WriteString GetVar(FileName, STR$(ListedMsg), "Sender") buffer.WriteString GetVar(FileName, STR$(ListedMsg), "Subject") buffer.WriteString GetVar(FileName, STR$(ListedMsg), "Body") buffer.WriteLong Either SendDataTo Index, buffer.ToArray() Set buffer = Nothing Call PutVar(FileName, STR$(ListedMsg), "Read", 0) Exit Do End If Inbox = Inbox - 1 Loop Call Unread(Index, MyName) Else FileName = App.Path & "\Data\Mail\Outbox\" & MyName & ".txt" Inbox = Val(GetVar(FileName, "OUTBOX", "amount")) Do While Inbox >= 1 If Val(GetVar(FileName, STR$(ListedMsg), "Number")) = Inbox Then Set buffer = New clsBuffer buffer.WriteLong SSetMsgBody buffer.WriteString GetVar(FileName, STR$(ListedMsg), "Sent") buffer.WriteString GetVar(FileName, STR$(ListedMsg), "Subject") buffer.WriteString GetVar(FileName, STR$(ListedMsg), "Body") buffer.WriteLong Either SendDataTo Index, buffer.ToArray() Set buffer = Nothing Exit Do End If Inbox = Inbox - 1 Loop End IfEnd SubPublic Sub HandleDeleteMsg(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim FileName As String, MyName As String, DltMsgNum As Long Dim Inbox As Long, Total As Long, Either As Long Dim buffer As clsBuffer Set buffer = New clsBuffer buffer.WriteBytes Data() MyName = buffer.ReadString DltMsgNum = buffer.ReadLong Either = buffer.ReadLong Set buffer = Nothing If GetPlayerName(Index) <> MyName Then Call HackingAttempt(Index, "Email Modification") Exit Sub End If If Either = 1 Then FileName = App.Path & "\Data\Mail\" & MyName & ".txt" Call PutVar(FileName, STR$(DltMsgNum), "Number", 0) Call PutVar(FileName, STR$(DltMsgNum), "Read", 0) Call PutVar(FileName, STR$(DltMsgNum), "Sender", vbNullString) Call PutVar(FileName, STR$(DltMsgNum), "Subject", vbNullString) Call PutVar(FileName, STR$(DltMsgNum), "Body", vbNullString) Inbox = Val(GetVar(FileName, "INBOX", "amount")) Total = Val(GetVar(FileName, "INBOX", "total")) Call PutVar(FileName, "INBOX", "amount", STR$(Inbox - 1)) Call PutVar(FileName, "INBOX", "total", STR$(Total - 1)) Call Unread(Index, MyName) Else FileName = App.Path & "\Data\Mail\Outbox\" & MyName & ".txt" Call PutVar(FileName, STR$(DltMsgNum), "Number", 0) Call PutVar(FileName, STR$(DltMsgNum), "Sent", vbNullString) Call PutVar(FileName, STR$(DltMsgNum), "Subject", vbNullString) Call PutVar(FileName, STR$(DltMsgNum), "Body", vbNullString) Inbox = Val(GetVar(FileName, "OUTBOX", "amount")) Total = Val(GetVar(FileName, "OUTBOX", "total")) Call PutVar(FileName, "OUTBOX", "amount", STR$(Inbox - 1)) Call PutVar(FileName, "OUTBOX", "total", STR$(Total - 1)) End IfEnd SubPublic Sub HandleUpdateInbox(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim FileName As String, MyInbox As String Dim Inbox As Long, Either As Long Dim buffer As clsBuffer Set buffer = New clsBuffer buffer.WriteBytes Data() MyInbox = buffer.ReadString Either = buffer.ReadLong Set buffer = Nothing If GetPlayerName(Index) <> MyInbox Then Call HackingAttempt(Index, "Email Modification") Exit Sub End If If Either = 1 Then FileName = App.Path & "\Data\Mail\" & MyInbox & ".txt" Inbox = Val(GetVar(FileName, "INBOX", "amount")) Do While Inbox >= 1 If Val(GetVar(FileName, STR$(Inbox), "Number")) > 0 Then Set buffer = New clsBuffer buffer.WriteLong SMyInbox buffer.WriteString GetVar(FileName, STR$(Inbox), "Sender") buffer.WriteLong Val(GetVar(FileName, STR$(Inbox), "Number")) buffer.WriteString GetVar(FileName, STR$(Inbox), "Subject") SendDataTo Index, buffer.ToArray() Set buffer = Nothing End If Inbox = Inbox - 1 Loop 'Call Unread(Index, MyInbox) Else FileName = App.Path & "\Data\Mail\Outbox\" & MyInbox & ".txt" Inbox = Val(GetVar(FileName, "OUTBOX", "amount")) Do While Inbox >= 1 If Val(GetVar(FileName, STR$(Inbox), "Number")) > 0 Then Set buffer = New clsBuffer buffer.WriteLong SMyOutbox buffer.WriteString GetVar(FileName, STR$(Inbox), "Sent") buffer.WriteLong Val(GetVar(FileName, STR$(Inbox), "Number")) buffer.WriteString GetVar(FileName, STR$(Inbox), "Subject") SendDataTo Index, buffer.ToArray() Set buffer = Nothing End If Inbox = Inbox - 1 Loop End IfEnd SubPublic Sub HandleCheckChar(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim msgSender As String, msgReciever As String, msgSubject As String, msgBody As String Dim buffer As clsBuffer Set buffer = New clsBuffer buffer.WriteBytes Data() msgSender = buffer.ReadString msgReciever = buffer.ReadString msgSubject = buffer.ReadString msgBody = buffer.ReadString Set buffer = Nothing If FindChar(msgReciever) = True Then Call SendEmail(Index, msgSender, msgReciever, msgSubject, msgBody) Else Call PlayerMsg(Index, "That Player Does Not Exist!", BrightRed) End IfEnd Sub```Go to ModPlayer and in the JoinGame Sub put this at the bottom:```Call Unread(Index, GetPlayerName(Index))```and add these subs```Public Sub SendEmail(ByVal index As Long, ByVal msgSender As String, ByVal msgReciever As String, ByVal msgSubject As String, ByVal msgBody As String) Dim FileName As String, Inbox As Long, Total As Long If GetPlayerName(index) <> msgSender Then Call HackingAttempt(index, "Email Modification") Exit Sub End If FileName = App.Path & "\Data\Mail\" & msgReciever & ".txt" If Not FileExist("\Data\Mail\" & msgReciever & ".txt") Then Call PutVar(FileName, "INBOX", "amount", 1) Call PutVar(FileName, "INBOX", "total", 1) Call PutVar(FileName, 1, "Number", 1) Call PutVar(FileName, 1, "Read", 1) Call PutVar(FileName, 1, "Sender", msgSender) Call PutVar(FileName, 1, "Subject", msgSubject) Call PutVar(FileName, 1, "Body", msgBody) If IsPlaying(FindPlayer(msgReciever)) Then If FindPlayer(msgReciever) <> index Then Call Unread(FindPlayer(msgReciever), msgReciever) Else Call Unread(index, msgSender) End If End If Call SendEmail2(index, msgSender, msgReciever, msgSubject, msgBody) Else Inbox = Val(GetVar(FileName, "INBOX", "amount")) Total = Val(GetVar(FileName, "INBOX", "total")) If Inbox = 9999 Or Total = 9999 Then Exit Sub End If Call PutVar(FileName, STR$(Inbox + 1), "Number", STR$(Total + 1)) Call PutVar(FileName, STR$(Inbox + 1), "Read", 1) Call PutVar(FileName, STR$(Inbox + 1), "Sender", msgSender) Call PutVar(FileName, STR$(Inbox + 1), "Subject", msgSubject) Call PutVar(FileName, STR$(Inbox + 1), "Body", msgBody) Call PutVar(FileName, "INBOX", "amount", STR$(Inbox + 1)) Call PutVar(FileName, "INBOX", "total", STR$(Total + 1)) If IsPlaying(FindPlayer(msgReciever)) = True Then If FindPlayer(msgReciever) <> index Then Call Unread(FindPlayer(msgReciever), msgReciever) Else Call Unread(index, msgSender) End If End If Call SendEmail2(index, msgSender, msgReciever, msgSubject, msgBody) Exit Sub End IfEnd SubPublic Sub SendEmail2(ByVal index As Long, ByVal msgSender As String, ByVal msgReciever As String, ByVal msgSubject As String, ByVal msgBody As String) Dim FileName As String Dim Inbox As Long Dim Total As Long If GetPlayerName(index) <> msgSender Then Call HackingAttempt(index, "Email Modification") Exit Sub End If FileName = App.Path & "\Data\Mail\Outbox\" & msgSender & ".txt" If Not FileExist("\Data\Mail\Outbox\" & msgSender & ".txt") Then Call PutVar(FileName, "OUTBOX", "amount", 1) Call PutVar(FileName, "OUTBOX", "total", 1) Call PutVar(FileName, 1, "Number", 1) Call PutVar(FileName, 1, "Sent", msgReciever) Call PutVar(FileName, 1, "Subject", msgSubject) Call PutVar(FileName, 1, "Body", msgBody) Else Inbox = Val(GetVar(FileName, "OUTBOX", "amount")) Total = Val(GetVar(FileName, "OUTBOX", "total")) If Inbox = 9999 Or Total = 9999 Then Exit Sub End If Call PutVar(FileName, STR$(Inbox + 1), "Number", STR$(Total + 1)) Call PutVar(FileName, STR$(Inbox + 1), "Sent", msgReciever) Call PutVar(FileName, STR$(Inbox + 1), "Subject", msgSubject) Call PutVar(FileName, STR$(Inbox + 1), "Body", msgBody) Call PutVar(FileName, "OUTBOX", "amount", STR$(Inbox + 1)) Call PutVar(FileName, "OUTBOX", "total", STR$(Total + 1)) Exit Sub End IfEnd SubPublic Sub Unread(ByVal index As Long, ByVal MyInbox As String) Dim Unread As Long, Inbox As Long Dim FileName As String Dim buffer As clsBuffer If GetPlayerName(index) <> MyInbox Then Call HackingAttempt(index, "Email Modification") Exit Sub End If FileName = App.Path & "\Data\Mail\" & MyInbox & ".txt" Inbox = Val(GetVar(FileName, "INBOX", "amount")) Do While Inbox >= 1 If Val(GetVar(FileName, STR$(Inbox), "Read")) = 1 Then Unread = Unread + 1 End If Inbox = Inbox - 1 Loop If Unread > 0 Then Call PlayerMsg(index, "You Have " & Unread & " New Message!", BrightRed) End If Set buffer = New clsBuffer buffer.WriteLong SUnreadMsg buffer.WriteLong Unread SendDataTo index, buffer.ToArray() Set buffer = NothingEnd Sub```'SAVE YOUR PROJECTCredits to varinyc for the original tutorial, i just converted it ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)[http://www.touchofde…__+mail](http://www.touchofde...__+mail) +systemDamian Link to comment Share on other sites More sharing options...
Alerd Posted March 22, 2013 Share Posted March 22, 2013 Thanx for tutorialthis email system a free of bug? Link to comment Share on other sites More sharing options...
tslusny Posted March 22, 2013 Share Posted March 22, 2013 You are missing **HandleSendEmail** sub.(server-side/modHandleData)So i wrote it, here it is:```Public Sub HandleSendEmail(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim buffer as clsBufferDim msgSender As StringDim msgReceiver As StringDim msgSubject As StringDim msgBody As StringSet buffer = New clsBufferbuffer.WriteBytes Data()msgSender = buffer.ReadStringmsgReceiver = buffer.ReadStringmsgSubject = buffer.ReadStringmsgBody = buffer.ReadStringSet buffer = NothingSendEmail Index, msgSender, msgReceiver, msgSubject, msgBodyEnd Sub``` Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 22, 2013 Share Posted March 22, 2013 Nice tutorial-AdiifYes its an free bug xDNah really test it and youll see Link to comment Share on other sites More sharing options...
damian666 Posted March 22, 2013 Author Share Posted March 22, 2013 fixed it, thanx for pointing that out, proberly copy/paste error O.o Link to comment Share on other sites More sharing options...
DeathlyCreation Posted March 22, 2013 Share Posted March 22, 2013 For ClientPackets it's suppose to be```' Make sure CMSG_COUNT is below everything elseCMSG_COUNT``` Link to comment Share on other sites More sharing options...
damian666 Posted March 22, 2013 Author Share Posted March 22, 2013 lol, suits me for copying it from the same source >.< Link to comment Share on other sites More sharing options...
DeathlyCreation Posted March 22, 2013 Share Posted March 22, 2013 'ModEnumerations 'Public Enum ServerPackets```' Make sure SMSG_COUNT is below everything elseSMSG_COUNT```' and then in'Public Enum ClientPackets```' Make sure CMSG_COUNT is below everything elseCMSG_COUNT```server side' and then in'Public Enum ClientPackets```' Make sure CMSG_COUNT is below everything elseCMSG_COUNT``` Link to comment Share on other sites More sharing options...
damian666 Posted March 22, 2013 Author Share Posted March 22, 2013 yeah, im rechecking and rewriting it ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
DMF Posted March 22, 2013 Share Posted March 22, 2013 ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) awesome cantwait for you to finish this xD.OMG o-o VAR DUCKED UP!!! xD he left out the admin code…..orginaly what he converted dis from had a admin panel that had ability to send a message to all like from the "mod or admins" .O.o but this is weird he had it in with HolyShadow guilds client.. XD he must have never updated his topic here wow. Link to comment Share on other sites More sharing options...
damian666 Posted March 22, 2013 Author Share Posted March 22, 2013 sigh… the post editor doesnt work well on IE10 >.< Link to comment Share on other sites More sharing options...
DeathlyCreation Posted March 22, 2013 Share Posted March 22, 2013 lol, DarkMatchFlame ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
DeathlyCreation Posted March 22, 2013 Share Posted March 22, 2013 Server & ClientPackets at top haft to be reversed only for the finding expressions```' Make sure CMSG_COUNT is below everything elseCMSG_COUNT``` Link to comment Share on other sites More sharing options...
DeathlyCreation Posted March 22, 2013 Share Posted March 22, 2013 You fixed it ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
damian666 Posted March 22, 2013 Author Share Posted March 22, 2013 thank god xd Link to comment Share on other sites More sharing options...
DMF Posted March 22, 2013 Share Posted March 22, 2013 Damian read your mail xD Link to comment Share on other sites More sharing options...
damian666 Posted March 23, 2013 Author Share Posted March 23, 2013 DarkMatchFlame pointed out a bug, so i fixed that, and rewrote some other shit.just re-paste server side subs, and your updated ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
damian666 Posted March 24, 2013 Author Share Posted March 24, 2013 updated the mail form, and updated server sided subs from modplayerjust replace the frm, and recompile your client, then server side replace the subs and recompile, done. updated ^^ Link to comment Share on other sites More sharing options...
DMF Posted March 24, 2013 Share Posted March 24, 2013 dont see a difference in the form o-o Link to comment Share on other sites More sharing options...
damian666 Posted March 24, 2013 Author Share Posted March 24, 2013 purely code side mate ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
DMF Posted March 24, 2013 Share Posted March 24, 2013 ah xD.. Link to comment Share on other sites More sharing options...
santa-clause Posted April 11, 2013 Share Posted April 11, 2013 Tnx for this code it is really handy as a base for a more advanced mail system ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
ravhi1044 Posted July 4, 2013 Share Posted July 4, 2013 Run time error '9'subscript out off rangeon these line :```HandleDataSub(CSendEmail) = GetAddress(AddressOf HandleSendEmail)HandleDataSub(CGetMsgBody) = GetAddress(AddressOf HandleGetMsgBody)HandleDataSub(CDeleteMsg) = GetAddress(AddressOf HandleDeleteMsg)HandleDataSub(CUpdateInbox) = GetAddress(AddressOf HandleUpdateInbox)HandleDataSub(CCheckChar) = GetAddress(AddressOf HandleCheckChar)```On Server side Link to comment Share on other sites More sharing options...
Stein Posted July 4, 2013 Share Posted July 4, 2013 You've messed up something really badly there. I would revert the tutorial and try again. Link to comment Share on other sites More sharing options...
GeminiXcasorm Posted July 2, 2014 Share Posted July 2, 2014 ~~For some reason, i know this post is totally dead btw, but if anyone's still alive, my image for the message button doesn't cover the whole 36 by 36\. its like it try's to stretch it and make the image a rectangle and its really annoying~~Nevermind. I got it. silly me. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now