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

[EO] Membership System


Richy420Rich
 Share

Recommended Posts

Yes, I have that in ModTypes, but still throwing errors :/. I solved the part of the Member Items putting as comment the part that fails, but when I do the same with the Map Editor, each time i check the Members Area option when I leave the Map Editor is unchecked. what can be :/?

PS: I'm using Eclipse Nigthly Relalses
Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

davidsaid, try this tutorial : [Click Here](http://www.touchofdeathforums.com/smf2/index.php/topic,81545.0.html)

I'm sorry to the creator of the topic, but it's not because I did your tutorial yet. And as the guy with ta problem, recommending to the similar system that I've tested it and ta working. xD

I hope you do not mind Thanks!
Link to comment
Share on other sites

@Richy:

> Make sure in client - ModTypes,
> ```
> IsMember as Byte
> ```
> Is in MapRec and ItemRec.

Im having the same problem. This is so weird cause everything is there.
Link to comment
Share on other sites

Mkay well everything seems to work except the map saing that its a members only map. I open the map editor , click members map, save it, then reopen mapeditor to find that its unchecked. Belive me I followed everything properly, but how do I fix?
Link to comment
Share on other sites

This damn thing isn't working so I'll have to roll another route.

Originally I had my membership maps distinguished by Moral; Thought it would be easier to add another UDT but now it seems Moral is the only way I can go personally to avoid stupid map errors and I do not want to delete my maps; If you know how to set Moral types then it'll be 10 times easier to go that route, I'll re-work this when I get the Moral installed on this tutorial.
Link to comment
Share on other sites

Okay it works. Only trouble now is, I tested this. I made my character a member, then I logged out. Then I took the characters membership away. When I logged back in I was still in a members only map.How can I auto warp them on next login.
Link to comment
Share on other sites

Yanno thers probably an error on my part due to adding and deleting stuff out of it from all the updates, Ill ad it to a clean version and test it out and ill write back in a moment!
Link to comment
Share on other sites

Na its all good man. But yes, when I am a member, I log out, take away membership, and when I login, it still dosesent warmp me or tell me my membership expired. SO Thers somthing wrong with Sub JoinGames code
Link to comment
Share on other sites

Okay seems the fix is good, I forgot to set a date value which is greater than 31 days when manually turning off a players membership. Just replace these 2 subs in the server form code.

```
Private Sub CmdSave_Click()
Dim Filename As String
Dim f As Long
Dim i As Long
Dim index As Long

If Len(Trim$(lstaccounts.Text)) > 0 Then

AEditor.Name = Trim$(TextName.Text)
AEditor.Password = Trim$(TextPass.Text)

if chkmember.value = 1 then
AEditor.IsMember = 1
else
AEditor.DateCount = "11/11/2011"
end if
AEditor.IsMember = chkmember.value

    index = FindPlayer(Trim$(AEditor.Name))

    If index > 0 And index <= MAX_PLAYERS Then
        If IsPlaying(index) Then

            Player(index).Name = Trim$(TextName.Text)
            Player(index).Password = Trim$(TextPass.Text)
            Player(index).DateCount = trim$(TextCount.text)

                If ChkMember.value = 1 Then
                Player(index).IsMember = 1
                Player(index).DateCount = Trim$(TextCount.Text)
                PlayerMsg index, "You have been granted membership by the server.", yellow"
                Else
                PlayerMsg index, "Your membership has been expired.", BrightRed
                Player(index).IsMember = 0
    Player(index).DateCount = "11/11/2011"
                MemberUnEquipItem index
                If Map(GetPlayerMap(index)).Moral = 2 Then
                PlayerWarp index, Map(GetPlayerMap(index)).BootMap, Map(GetPlayerMap(index)).BootX, Map(GetPlayerMap(index)).BootY
                End If
                End If

    SavePlayer index
    SendPlayerData index
    End If
    Else
    Filename = App.Path & "\data\accounts\" & Trim$(lstaccounts.Text) & ".bin"
    f = FreeFile
    Open Filename For Binary As #f
    Put #f, , AEditor
    Close #f
    End If
    End If

    frmServer.lblInfo.Caption = vbNullString
    frmServer.lblInfo.Caption = "" & Trim$(lstaccounts.Text) & "'s account has been successfully saved!"

End Sub

Private Sub ChkMember_Click()
If ChkMember.value = 1 Then
frmServer.lblInfo.Caption = vbNullString
frmServer.lblInfo.Caption = "Membership goes by date, in the 'Day #' box is listed as today's date. The membership lasts for 31 days from today's date, you may give a longer date prior to membership expiration, EG: Today being 7/11/2012, it can be set to 12/11/2012, to give 5 months of membership. However the correct format is 'd/m/yyyy'. Otherwise this may not work."
frmServer.LblInfo.Visible = True
frmserver.TextCount.text = Format(Date, "m/d/yyyy")
Else
frmServer.lblInfo.Visible = False
frmServer.lblinfo.Caption = vbNullString
frmserver.TextCount.text = "11/11/2011"
End If
End Sub

```
Link to comment
Share on other sites

I added but it still dosent work. Plus another thing to add would be that if Im on 1 map as a non member and I walk onto a map that is for members only, I can stil acsess the map like normal.
Link to comment
Share on other sites

  • 5 weeks later...
I can't believe no one noticed this bug!

In the code for CmdSave on the server, replace

```
PlayerMsg index, "You have been granted membership by the server.", yellow"
```
with

```
PlayerMsg index, "You have been granted membership by the server.", yellow
```
(There shouldn't be a " at the end)
Link to comment
Share on other sites

> I can't believe no one noticed this bug!
>
> In the code for CmdSave on the server, replace
>
> ```
> PlayerMsg index, "You have been granted membership by the server.", yellow"
> ```
> with
>
> ```
> PlayerMsg index, "You have been granted membership by the server.", yellow
> ```
> (There shouldn't be a " at the end)

I noticed, i am already using his membership system in my game(with many fixes and improvements of course) and its very nice base (i based account editor for my game on this)
Link to comment
Share on other sites

I think the problem with the log in is I added extra code:

If Map(GetPlayerMap(index)).Moral = 2 Then

**If Map(GetVar(App.Path & "\Data\accounts\checkpoints.ini", "" & GetPlayerName(index), "MAPNUM")).Moral = MAP_MORAL_MEMBER Then

Call CustomScript(i, 1)

End If**

PlayerWarp index, Map(GetPlayerMap(index)).BootMap, Map(GetPlayerMap(index)).BootX, Map(GetPlayerMap(index)).BootY

End If

And Custom Script #1 is

Call PutVar(App.Path & "\Data\accounts\checkpoints.ini", "*SERVEROPTIONS*", "" & GetPlayerName(index), "" & 0)
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...