01-11-2008, 11:39 PM
Allow the dur scrollbar to go to -1
You might have to change the way dur is dimmed somewhere, but yeah, this works. And you don't need another var to increase the size of the item file.
You might have to change the way dur is dimmed somewhere, but yeah, this works. And you don't need another var to increase the size of the item file.
Code:
Sub DamageEquipment(ByVal Index As Long, ByVal EquipmentSlot As Equipment)
Dim Slot As Long
Slot = GetPlayerEquipmentSlot(Index, EquipmentSlot)
If Slot > 0 And GetPlayerInvItemDur(Index, Slot) > -1 Then
Call SetPlayerInvItemDur(Index, Slot, GetPlayerInvItemDur(Index, Slot) - 1)
If GetPlayerInvItemDur(Index, Slot) = 0 Then
Call PlayerMsg(Index, "Your " & Trim$(Item(GetPlayerInvItemNum(Index, Slot)).Name) & " has broken.", Yellow)
Call TakeItem(Index, GetPlayerInvItemNum(Index, Slot), 0)
Else
If GetPlayerInvItemDur(Index, Slot) 0 Then
Call PlayerMsg(Index, "Your " & Trim$(Item(GetPlayerInvItemNum(Index, Slot)).Name) & " is about to break!", Yellow)
End If
End If
End If