Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another Visual Inventory
#7
It was after the edit:

Double clicking an item will use it:
Code:
Private Sub picVisInv_DblClick()
Dim i As Long
Dim InvNum As Long

    InvNum = IsItem(InvPosX, InvPosY)
        
    If InvNum  0 Then
    
        If GetPlayerInvItemNum(MyIndex, InvNum) = ITEM_TYPE_NONE Then Exit Sub
        
        Call SendUseItem(InvNum)
        Exit Sub
    End If
                    
End Sub

Right clicking an item will drop it:
Code:
Private Sub picVisInv_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Long
Dim InvNum As Long
  
    If Button = 2 Then
  
        InvNum = IsItem(X, Y)

        If InvNum  0 Then

             If Item(GetPlayerInvItemNum(MyIndex, InvNum)).Type = ITEM_TYPE_CURRENCY Then
                 frmDrop.Show vbModal
             Else
                 Call SendDropItem(InvNum, 0)
             End If
         End If
    End If
End Sub
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)