18-01-2009, 09:00 AM
Anthony Wrote: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.
Thanks a lot dude, this really helped me out. Could you give an example of parsing one of the stats though? It might be that I'm missing something obvious, or the fact it's two in the morning, but that's the only thing I have a problem understanding. If I can get that, than I think I can definitely program this in myself... Than again, that's the biggest part. xD