Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making advanced items
#9
Asrrin made it sound way more complicated than it actually is haha.

Add this to your ItemRec UDT on client and server side.

Code:
Stat(1 To Stats.Stat_Count - 1) As Byte

Then parse the data back and forth properly and have it all save and make it work with the editor.

On the server side find the GetPlayerStat function and make it look like this.

Code:
Public Function GetPlayerStat(ByVal Index As Long, ByVal Stat As Stats) As Long
Dim Add As Long, i As Long

    Add = 0

    For i = 1 To Equipment.Equipment_Count - 1
        If GetPlayerEquipmentSlot(Index, i) > 0 Then
            Add = Add + Item(GetPlayerInvItemNum(Index, GetPlayerEquipmentSlot(Index, i))).Stat(Stat)
        End If
    Next i

    GetPlayerStat = Player(Index).Char(TempPlayer(Index).CharNum).Stat(Stat) + Add
End Function

That's how I did mine. So if you have any item equipped it checks for any bonuses that have been added then just adds it to the stat. This works in MS4.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)