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

[EO] Modifying the rarity system


judoka
 Share

Recommended Posts

With this we will modify the rarity system for get another like MU (Excellent, Master Items, etc..)

**Client Side:**

Find the Sub scrlRarity_Change() on frmEditor_Item and replace it with:
```
Private Sub scrlRarity_Change()
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub
    Select Case scrlRarity.Value
    'Add Cases as levels of rarity you want. For me, there are only 3:
    Case 0 'Item normal
    lblRarity.Caption = "Rarity: Normal"
    Case 1
    lblRarity.Caption = "Rarity: Excellent"
    Case 2
    lblRarity.Caption = "Rarity: Master"
    Case Else
    lblRarity.Caption = "Rarity: Error"
    End Select
    Item(EditorIndex).Rarity = scrlRarity.Value

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "scrlRarity_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
```
Find  "Select Case Item(itemnum).Rarity" in modGameLogic and replace it with:
```
Select Case Item(itemnum).Rarity
'Add or remove cases as levels of rarity you want
            Case 0 ' white. Item normal.
                .lblItemName.ForeColor = RGB(255, 255, 255)
                .lblItemName.Caption = Name
            Case 1 ' Item Excellent -Green
                .lblItemName.ForeColor = RGB(0, 255, 0)
                .lblItemName.Caption = "Excellent " & Name
            Case 2 ' Item Master -Dark Blue
                .lblItemName.ForeColor = RGB(65, 86, 197)
                .lblItemName.Caption = "Master " & Name
            ' maroon RGB(205, 34, 0)
            ' purple RGB(193, 104, 204)
            ' orange RGB(217, 150, 64)
        End Select

```
**Now, if you want to add extra stats points depends de rarity level:**

**Server Side:**
in modPlayer find "If Item(Player(index).Equipment(i)).Add_Stat(Stat) > 0 Then" and replace it with:

```
If Item(Player(index).Equipment(i)).Add_Stat(Stat) > 0 Then
            Select Case Item(Player(index).Equipment(i)).Rarity
            'Add Cases as levels of rarity you want.
            Case 0 'Item Normal
                x = x + Item(Player(index).Equipment(i)).Add_Stat(Stat)
            Case 1 'Item Excellent. I will add 5 extra points to all
            x = x + Item(Player(index).Equipment(i)).Add_Stat(Stat) + 5
            Case 2 'Item Master. I will add 15 extra points to all
            x = x + Item(Player(index).Equipment(i)).Add_Stat(Stat) + 15
            End Select
            End If
        End If
```
Sorry for my English, I'm from Spain ^^
I hope it'll be useful for someone
Link to comment
Share on other sites

This is a great edit.

May I also point out that after you deal with the second part of the tutorial, you'll need to find this within the same procedure:

```
' set captions
.lblItemName.Caption = Name
```
You need to comment out or remove the second line so that it won't reset the captions back to the normal item names.
Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...
how to fix this??

Error Desc

Subscript out of Range
–--------------------------------------------------------------------------------------------
If Item(Player(Index).Equipment(i)).Add_Stat(stat) > 0 Then
            Select Case Item(Player(Index).Equipment(i)).Rarity
            'Add Cases as levels of rarity you want.
            Case 0 'Item Normal
                x = x + Item(Player(Index).Equipment(i)).Add_Stat(stat)
            Case 1 'Item Excellent. I will add 5 extra points to all
            x = x + Item(Player(Index).Equipment(i)).Add_Stat(stat) + 5
            Case 2 'Item Master. I will add 15 extra points to all
            x = x + Item(Player(Index).Equipment(i)).Add_Stat(stat) + 15
            Case 3 'Item Rare. I will add 25 extra points to all
            x = x + Item(Player(Index).Equipment(i)).Add_Stat(stat) + 25
Link to comment
Share on other sites

One of the variables inside the array its trying to access hasn't been properly defined or doesnt exist.

Need a little more information.

Plus this is kind of a useless tutorial.  You can just add the points manually instead of using this code.
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...