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

Sourced refer system.


evilbunnie
 Share

Recommended Posts

[http://www.evilbunnie.org/Scripter/refersystem.html](http://www.evilbunnie.org/Scripter/refersystem.html) - Better formatted version, Easier to read. - Now fully updated with IP limiter.

Refer System by evilbunnie

Tested on eclipse stable

Description:

You ask your friend to play this game, you're friend would put your name in the refer box as a refer. - You would get a refer point!!11one!

You could set it up so it will give you special items with referal points.
Server side
In AccountRec before EndType add:
```
ReferPoints As Long

```
In ModHandleData under
```
Case "givemethemax"
    Call Packet_GiveMeTheMax(Index)
    Exit Sub

```ADD:
```
Case "referpoint"
Dim Ind As Long
        If Not Parse(1) = Nothing Or Not FileExists(App.Path & "\Accounts\" & Parse(1) & ".ini") = false Then
  Ind = FindPlayer(Parse(1))
  If IsPlaying(Ind) Then
  Player(Ind).ReferPoints = Player(Ind).ReferPoints + 1
          SavePlayer (Ind)
  Else
  LoadPlayer (Ind)
  Player(Ind).ReferPoints = Player(Ind).ReferPoints + 1
  SavePlayer (Ind)
  End If
  End If
  Exit Sub

```
In clsCommands add:
```
Public Sub SetReferalPoints(Index as long, Ammount as long)
Player(Index).ReferPoints = Ammount
End Sub

Public Function GetReferalPoints(Index as long) as long
GetReferalPoints = Player(Index).ReferPoints
End Sub

```

Client side
In FrmNewAccount make a new textbox called 'txtRefer' Under

```
If Not IsAlphaNumeric(txtName.Text) Then
        Call MsgBox("Your name must consist of alpha-numeric characters!")
        Exit Sub
    End If

```ADD:
```
If LenB(TxtRefer.Text) > 6 Then
    Call MsgBox("Refer doesn't exist!")
End If

SendData ("referpoint" & SEP_CHAR & TxtRefer.Text & END_CHAR)

```

Now, I do ask for credit, because i gave up 5 minutes of my life to do this for you kind people.

Best regards,

Evilbunnie
Link to comment
Share on other sites

*Doesn't know what this does, skips code and sees it took 5 minutes. Leaves negative comment*

^^^

*Clicked overly advertised link. Reads description* " Yeah I still think this has little use, but hey that's just me. You could have copied/ pasted that for a post instead of forcing us to view it on a web page. "
Link to comment
Share on other sites

  • 2 months later...

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...