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

abhi2011

Members
  • Posts

    2897
  • Joined

  • Last visited

    Never

Everything posted by abhi2011

  1. @Killa_: > Can you make it work not through the vb form?I mean all is right but how to make it redeem through chat message? modInput(client side). long list of case selects. Type "/reedem" code underneath it. something check the code if it has the correct digits or something call the packet to send the code to the client and redeem it.
  2. You missed a few points. The ref should be removed from server side and the same ref should be added to client side. change the [email protected] to your Gmail ID and the Passoword to your Gmail ID password. oSmtp.Username = "[email protected]" is actually your Gmail ID so don't type in your username here. To VB6 Newbs. If you either want to change the Subject/Body type your text in quotation marks. If you want to add some variable put a space bar the end quotation the add '&' and the varialble. If you want to put a new line in the body add '&' after message and vbCrLf then again an '&' then text/variable E.G Subject = ``` "This is a test subject showing game name. And the game name is " & options.game_name ``` Body = ``` "Some sample text telling game name. " & options.game_name & "That is the game name. next line would be like this. " & vbCrLf & options.game_name "Now the game name will be displayed in the next line. ```
  3. ~~Okay, I'll do it.~~ Ah I couldn't do it in time. I lost power so my computer crashed. And so I couldn't do it. Anyways. It doesn't matter. requesting delete!
  4. @tslusny: > just replace email id viariable by txtREmail.text huh?
  5. @tslusny: > so do this client side and the wont be any server lag No I don't think so. But the best way would be to make a packet data sent from server to client telling to do the call the email send. That way would be the best making sure that if registered it will be sent!
  6. This is my 4th tutorial and most probs the best one so far. I give credits to GoldSide for actually making one that stores the email ID in account data(though email isn't sent) and to myself. Required tutorials = http://www.touchofdeathforums.com/smf2/index.php/topic,78011.0.html if you have done the tutorial please continue. The email send using gmail's SMTP. How it works is that when the you register there will be a small lag with the server meaning that an email is being sent. (Affects everyone for about 10s.) The server will send an email to the email address specified by the player with the gmail ID the server owner has specified. SERVER SIDE Replace the handleNewAccount in modhandle data with ``` Private Sub HandleNewAccount(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Name As String Dim Password As String Dim Email As String Dim i As Long Dim n As Long Dim oSmtp As New EASendMailObjLib.Mail If Not IsPlaying(Index) Then If Not IsLoggedIn(Index) Then Set Buffer = New clsBuffer Buffer.WriteBytes Data() ' Get the data Name = Buffer.ReadString Password = Buffer.ReadString Email = Buffer.ReadString ' Prevent hacking If Len(Trim$(Name)) < 3 Or Len(Trim$(Password)) < 3 Or Len(Trim$(Email)) < 3 Then Call AlertMsg(Index, "Your account name must be between 3 and 12 characters long. Your password must be between 3 and 20 characters long.") Exit Sub End If ' Prevent hacking If Len(Trim$(Name)) > ACCOUNT_LENGTH Or Len(Trim$(Password)) > NAME_LENGTH Then Call AlertMsg(Index, "Your account name must be between 3 and 12 characters long. Your password must be between 3 and 20 characters long.") Exit Sub End If ' Prevent hacking For i = 1 To Len(Name) n = AscW(Mid$(Name, i, 1)) If Not isNameLegal(n) Then Call AlertMsg(Index, "Invalid name, only letters, numbers, spaces, and _ allowed in names.") Exit Sub End If Next 'send email oSmtp.LicenseCode = "TryIt" ' Set your Gmail email address oSmtp.FromAddr = "[email protected]" ' Add recipient email address oSmtp.AddRecipientEx Email, 0 ' Set email subject oSmtp.Subject = "Account Creation in " & Options.Game_Name ' Set email body oSmtp.BodyText = "An account has been recently created in our game " & Options.Game_Name & "." & vbCrLf & "Your login details are," & vbCrLf & "Username = " & Name & vbCrLf & "Password = " & Password & vbCrLf & "If this wasn't you please reply to this email requesting an account delete" & vbCrLf & "Thank You," & vbCrLf & Options.Game_Name & "Staff" ' Gmail SMTP server address oSmtp.ServerAddr = "smtp.gmail.com" ' If you want to use direct SSL 465 port, ' Please add this line, otherwise TLS will be used. ' oSmtp.ServerPort = 465 ' detect SSL/TLS automatically oSmtp.SSL_init ' Gmail user authentication should use your ' Gmail email address as the user name. ' For example: your email is "[email protected]", then the user should be "[email protected]" oSmtp.UserName = "[email protected]" oSmtp.Password = "password" If oSmtp.SendMail() = 0 Then ' Check to see if account already exists If Not AccountExist(Name) Then Call AddAccount(Index, Name, Password) Call TextAdd("Account " & Name & " has been created.") Call AddLog("Account " & Name & " has been created.", PLAYER_LOG) ' Load the player Call LoadPlayer(Index, Name) ' Check if character data has been created If LenB(Trim$(Player(Index).Name)) > 0 Then ' we have a char! HandleUseChar Index Else ' send new char shit If Not IsPlaying(Index) Then Call SendNewCharClasses(Index) End If End If ' Show the player up on the socket status Call AddLog(GetPlayerLogin(Index) & " has logged in from " & GetPlayerIP(Index) & ".", PLAYER_LOG) Call TextAdd(GetPlayerLogin(Index) & " has logged in from " & GetPlayerIP(Index) & ".") Else Call AlertMsg(Index, "Sorry, that account name is already taken!") End If Set Buffer = Nothing End If End If End If End Sub ``` Then download this file [http://www.emailarchitect.net/webapp/download/easendmail.exe](ftp://www.emailarchitect.net/webapp/download/easendmail.exe) Then in Menu Bar go to Project > References and find "EASendMailObj ActiveX Object", to add the reference. ![](http://www.emailarchitect.net/img/vb_easendmail.jpg) Hope you like it and it is tested with my 2 email id's. Also please replace "[email protected]" & "Passowrd with the appropriate stuff. I also think it will work with email id's given by website hosters as long as it's SMTP.
  7. well i dont have that! i think gmail offers smtp! http://email.about.com/od/accessinggmail/f/Gmail_SMTP_Settings.htm http://lifehacker.com/111166/how-to-use-gmail-as-your-smtp-server
  8. No payments? and who is the coder?
  9. ~~Sorry guys for not releasing the player system as I promised. I ran into some problems with the form. So you guys might have to replace it. Working on moifying the code so that all bug reports are stored in 1 file and all player reports are stored in another file!~~ Work is done. For those who have already done the tutorial please replace the mod: ``` Sub HandleBugReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ```with this ``` Sub HandleBugReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Name As String Dim report As String Dim intFileHandle As Integer Set Buffer = New clsBuffer Buffer.WriteBytes Data Name = Buffer.ReadString report = Buffer.ReadString intFileHandle = FreeFile Open (App.Path & "\data\bug reports.txt") For Append As #intFileHandle Print #intFileHandle, vbCrLf & Name & " has reported a bug - " & report Close #intFileHandle End Sub ``` in modHandleData server side. And check the post directly underneath the main post player reporting. Also please download frmReport again as the previous one was glithced and replace it with this. [http://www.freemmorpgmaker.com/files/imagehost/pics/16549863c6fa5c5faf7c441a362b2384.rar](ftp://www.freemmorpgmaker.com/files/imagehost/pics/16549863c6fa5c5faf7c441a362b2384.rar)
  10. Never thought of that. But what i meant was that the next report wont come leaving a line. Meaning if there was a huge list of reports it will look disorientating. I think we can ad vbCrLf after report because the next report must come leaving a line.
  11. so all i have to do is put in input #f, report & name? and how will you separate 2 reports by a person?
  12. @zomb i'll try that thanks. though i was planning to make the player reports to another folder. i beleive that each report can be made using vbCrLf? @farrel24 actually this forum is for answering ppl's question and helping them
  13. I know that. I also wanted to answer him but when i tried what i said i tried i had no problem. Just saying ;)
  14. @Erwin I tried frmReport.visible using cmdbutton in frmMain. But mine didn't auto close. thx. UPDATED!
  15. Thx. Culdn't do it without u though! I never fully understood Apend except reocrds will go to the end of the text . never actually thought it will make a text file. I will work on the player report now!
  16. Solved! : Figure out a way to make multiple reports recorded in the same file SERVER SIDE Replace HandleBugReport in modHandleData with ``` Sub HandleBugReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Name As String Dim report As String Dim intFileHandle As Integer Set Buffer = New clsBuffer Buffer.WriteBytes Data Name = Buffer.ReadString report = Buffer.ReadString intFileHandle = FreeFile Open (App.Path & "\data\bug reports\" & Name & ".txt") For Append As #intFileHandle Print #intFileHandle, report Close #intFileHandle end sub ``` UPDATED MAIN POST!
  17. @farrel24: > hmm, No Code in lblReportP ? lblreportP is a work in progress. (lblReportPlayer) Will come soon! :D
  18. Btw i forgot something in modInput. Updating tutorial. ("/report") @zomb88 I knew the apend thing before you told me. Just didn't know how to implement it. That is write it on the .txt file
  19. @zomb88: > I didnt even need to go through it i merely took 5secs to look at it. > > 1\. Why use a whole new form for the report then use a frame or something that just gets shown. > 2\. Look at your File Exists check. > 3\. Google vb6 text files. > > Very basic tutorial but could be done alot better imo 1\. I made a frame so that 2 reporting systems can be added Bug and Player. If you want make 2 forms. Bug Report and Player Report. But it will just increase the work. And also the good thing of a frame is that if you make a frame invisible all the controls in the frame will also be invisible. If you were thinking of making both the Bug and Player report in both the same form without the frame, it will take some time to write the code for making each and every wanted control to be visible and also might confuse you. 2\. What is wrong with them? 3\. I will am checking them right now!
  20. @zomb88: > pretty useless tutorial Y may do you say so? And if you think it is useless y did u go through it?
  21. The player report system is out. So before I say anything please download the new frmReport. I have updated the Bug Report system post frmReport also. This is a new frmReport. The old one was glitched. [http://www.freemmorpgmaker.com/files/imagehost/pics/16549863c6fa5c5faf7c441a362b2384.rar](ftp://www.freemmorpgmaker.com/files/imagehost/pics/16549863c6fa5c5faf7c441a362b2384.rar) CLIENT SIDE In modClientTCP add this at the bottom : ``` Sub sendPlayerReport(ByVal Pname As String, ByVal report As String, ByVal RPname As String) Dim Buffer As New clsBuffer If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteLong CPlayerReport Buffer.WriteString Pname Buffer.WriteString report Buffer.WriteString RPname SendData Buffer.ToArray Set Buffer = Nothing 'error handler Exit Sub errorhandler: HandleError "sendPlayerReport", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` In mod enumerations before : ``` ' Make sure CMSG_COUNT is below everything else ```add this ``` CPlayerReport ``` CLIENT SIDE DONE * * * In mod Enumerations above ``` ' Make sure CMSG_COUNT is below everything else ```add this : ``` CPlayerReport ``` In modHandleData at the end of the initMessages() add this ``` HandleDataSub(CPlayerReport) = GetAddress(AddressOf HandleplayerReport) ```and add this at the bottom of the mod ``` Sub HandleplayerReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Pname As String Dim report As String Dim RPname As String Dim intFileHandle As Integer Set Buffer = New clsBuffer Buffer.WriteBytes Data Pname = Buffer.ReadString report = Buffer.ReadString RPname = Buffer.ReadString intFileHandle = FreeFile Open (App.Path & "\data\PlayerReports.txt") For Append As #intFileHandle Print #intFileHandle, vbCrLf & Pname & " Reported " & RPname & " - " & report Close #intFileHandle End Sub ``` THE END. If you find any bugs just post them below the community will help you. :D
  22. This tutorial will show you how to make a report system. How it works is that you can type "/report" and a form will come where you can choose between player and bug report. Currently only bug report is supported. When the server receives the reporters name and report it will save them as a text file in the data files of the server. Also if there is already a report from someone and the player reports again the report will not be saved. (something that should also be implemented) If someone finds a way to do so please post is as a comment! Download and add frmReport to your project! [http://www.freemmorpgmaker.com/files/imagehost/pics/16549863c6fa5c5faf7c441a362b2384.rar](ftp://www.freemmorpgmaker.com/files/imagehost/pics/16549863c6fa5c5faf7c441a362b2384.rar) Client Side! Add ``` CBugReport ```in modEnumerations above ``` ' Make sure CMSG_COUNT is below everything else ``` Add ``` Sub sendBugReport(ByVal Name As String, ByVal report As String) Dim Buffer As New clsBuffer If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteLong CBugReport Buffer.WriteString Name Buffer.WriteString report SendData Buffer.ToArray Set Buffer = Nothing 'error handler Exit Sub errorhandler: HandleError "sendBugReport", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```At the bottom of modClientTCP. In modInput find: ``` Case "/stats" Set Buffer = New clsBuffer Buffer.WriteLong CGetStats SendData Buffer.ToArray() Set Buffer = Nothing ```below it add: ``` Case "/report" frmReport.Show ``` END OF CLIENT SIDE! (YEP I KNOW IT IS SMALL!) –------------------------------------------------------------------------------------------------------------------------------ SERVER SIDE Add this in modHandleData below the long lines of address! ``` HandleDataSub(CBugReport) = GetAddress(AddressOf HandleBugReport) ``` Add this at the end of the mod : ``` Sub HandleBugReport(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Name As String Dim report As String Dim intFileHandle As Integer Set Buffer = New clsBuffer Buffer.WriteBytes Data Name = Buffer.ReadString report = Buffer.ReadString intFileHandle = FreeFile Open (App.Path & "\data\bug reports.txt") For Append As #intFileHandle Print #intFileHandle, vbCrLf & Name & " has reported a bug - " & report Close #intFileHandle End Sub ``` In modEnumerations above ``` ' Make sure CMSG_COUNT is below everything else ```add: ``` CBugReport ``` For those who have added the following piece of code ``` ChkDir App.Path & "\data files\", "Bug Reports" ```remove it as it's not neccesary Credits go to Me! Credits also go to zomb88 for helping me figure out how to record multiple reports in the same file!
  23. @tslusny: > i can hold it myself, i want to make it on login screen becouse im too lazy to make new button and picdelete image :cheesy: okay
  24. abhi2011

    Ayuda !

    if u mean the main screen in which ur character is there and you want add buttons like quest and stuff then there will be a 6 small buttons to the right of picscreen!
×
×
  • Create New...