Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Elysium Mail System
#1
BTW, I ask these questions because you guys are credible, and the good ol' ED 3.3.2 isn't supported at OGC anymore. Sad

So I was bored, and figured it might be a bit fun to design. So far, I'm using GetVar and Putvar functions, to put it in their account file, and then when they want to check it, it grabs the var. However, I have a problem. The way I have the PutVar set up, it always sets it to Msg1. I want there to be ten mail slots, so how would I do this? What I'm asking, is how do I check to see if Msg1 is an open slot to put it, if it's full go to slot 2, and so on and so forth, until there are no slots open. Here's my code.

Code:
Case MAILMSG_CHAR
            MsgTo = FindPlayer(Parse$(1))
            Msg = Parse$(2)

            ' Prevent hacking
            For i = 1 To Len(Msg)

                If Asc(Mid$(Msg, i, 1)) < 32 Or Asc(Mid$(Msg, i, 1)) > 126 Then
                    Call HackingAttempt(Index, "Player Msg Text Modification")
                    Exit Sub
                End If

            Next

            'If frmServer.chkP.Value = Unchecked Then
            '    If GetPlayerAccess(Index)  0 Then
                    Call AddLog(GetPlayerName(Index) & " mailed " & GetPlayerName(MsgTo) & ", " & Msg & "'", PLAYER_LOG)
                    Call PutVar(App.Path & "/accounts/" & GetPlayerLogin(Index) & ".ini", "Mail", "msg1", Msg)
                    Call PlayerMsg(Index, "You sent " & GetPlayerName(MsgTo) & " a message", TellColor)
                Else
                    Call PlayerMsg(Index, "Player is not online.", White)
                End If

(Yeah, yeah, yeah, I know I ripped a lot of code :\, in fact pretty much all of it.)
Reply
#2
For i = 1 to [max message slots]
if getvar(app.path & "/accounts/"& getplayerlogin(MsgTo) & "ini", Mail, "msg" & i) "" then
Call PutVar(App.Path & "/accounts/" & GetPlayerLogin(MsgTo) & ".ini", "Mail", "msg" & i, Msg)
exit sub
end if
next i

Something like that..
Reply
#3
OGC

(a guy masturbating sideways)
Reply
#4
Hehehe
Reply
#5
And yes, Online Game Core is secretly a porn site.
Reply
#6
Rofl, I never noticed that about OGC. XD
Reply
#7
GIAKEN Wrote:OGC

(a guy masturbating sideways)

ROFLMFAO
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)