judoka Posted August 31, 2011 Author Share Posted August 31, 2011 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 Suberrorhandler: HandleError "scrlRarity_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd 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 More sharing options...
Athagekin Posted September 1, 2011 Share Posted September 1, 2011 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 More sharing options...
judoka Posted September 2, 2011 Author Share Posted September 2, 2011 I didn't understand you, but I think that is for reset to the simply rarity system? Link to comment Share on other sites More sharing options...
Athagekin Posted September 3, 2011 Share Posted September 3, 2011 The second part of your tutorial shows how rarity levels affect the item's name. All of that code is processed before the item name caption reset, making it show the item's original name without rarity modification. Link to comment Share on other sites More sharing options...
judoka Posted September 15, 2011 Author Share Posted September 15, 2011 For me works well :S All is showed when I need. Link to comment Share on other sites More sharing options...
farrel24 Posted July 27, 2012 Share Posted July 27, 2012 how to fix this??Error DescSubscript 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 More sharing options...
NexSteve Posted July 27, 2012 Share Posted July 27, 2012 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 More sharing options...
farrel24 Posted July 27, 2012 Share Posted July 27, 2012 I do not know what was wrong, I have followed all the above, but still wrong Link to comment Share on other sites More sharing options...
farrel24 Posted July 27, 2012 Share Posted July 27, 2012 somebody help me, please.i use Dragon Eclipse Link to comment Share on other sites More sharing options...
NexSteve Posted July 27, 2012 Share Posted July 27, 2012 @Lazlike:> somebody help me, please.> i use Dragon EclipseEither I is out of range, or stat, maybe index. Cant really help you without more information on what is trying to be accessed. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now