27-06-2008, 01:27 AM
It was after the edit:
Double clicking an item will use it:
Right clicking an item will drop it:
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