Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unbreakable items
#1
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.
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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)