Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[WN] Can't remove items from bank.


WD RPG WD
 Share

Recommended Posts

Alright. I havnt been here in a while..

I cant remove the items from my bank. When I highlight an item in the bank the "information" pops up in front of the item and I cant click on it. Any advice on how to solve this problem?

[![](http://s4.postimage.org/1qhkzhhwk/menusg.jpg)](http://postimage.org/image/1qhkzhhwk/)
Link to comment
Share on other sites

>! ' bank
Private Sub picbank_DblClick()
Dim bankNum As Long
>!     DragBankSlotNum = 0
>!     bankNum = IsBankItem(BankX, BankY)
    If bankNum <> 0 Then
        If GetBankItemNum(bankNum) = ITEM_TYPE_NONE Then Exit Sub

            If Item(GetBankItemNum(bankNum)).Type = ITEM_TYPE_CURRENCY Then
                CurrencyMenu = 3 ' withdraw
                lblCurrency.Caption = "How many do you want to withdraw?"
                tmpCurrencyItem = bankNum
                txtCurrency.text = vbNullString
                picCurrency.Visible = True
                txtCurrency.SetFocus
                Exit Sub
            End If

        WithdrawItem bankNum, 0
        Exit Sub
    End If
End Sub
>! Private Sub picbank_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim bankNum As Long

    bankNum = IsBankItem(x, y)

    If bankNum <> 0 Then

        If Button = 1 Then
            DragBankSlotNum = bankNum
        End If
    End If
End Sub
>! Private Sub picbank_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim i As Long
Dim rec_pos As RECT
' TODO : Add sub to change bankslots client side first so there's no delay in switching
    If DragBankSlotNum > 0 Then
        For i = 1 To MAX_BANK
            With rec_pos
                .top = BankTop + ((BankOffsetY + 32) * ((i - 1) \ BankColumns))
                .Bottom = .top + PIC_Y
                .left = BankLeft + ((BankOffsetX + 32) * (((i - 1) Mod BankColumns)))
                .Right = .left + PIC_X
            End With
>!             If x >= rec_pos.left And x <= rec_pos.Right Then
                If y >= rec_pos.top And y <= rec_pos.Bottom Then
                    If DragBankSlotNum <> i Then
                        ChangeBankSlots DragBankSlotNum, i
                        Exit For
                    End If
                End If
            End If
        Next
    End If
>!     DragBankSlotNum = 0
    picTempBank.Visible = False
End Sub
>! Private Sub picbank_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim bankNum As Long, itemnum As Long, ItemType As Long
Dim x2 As Long, y2 As Long
>!     BankX = x
    BankY = y

    If DragBankSlotNum > 0 Then
        Call BltBankItem(x + picBank.left, y + picBank.top)
    Else
        bankNum = IsBankItem(x, y)

        If bankNum <> 0 Then

            x2 = x + picBank.left + 2
            y2 = y + picBank.top + 2
            UpdateDescWindow Bank.Item(bankNum).num, Bank.Item(bankNum).Value, x2, y2
            Exit Sub
        End If
    End If

    frmMain.picItemDesc.Visible = False
    LastBankDesc = 0
End Sub
>! Private Function IsBankItem(ByVal x As Single, ByVal y As Single) As Long
Dim tempRec As RECT
Dim i As Long
>!     IsBankItem = 0

    For i = 1 To MAX_BANK
        If GetBankItemNum(i) > 0 And GetBankItemNum(i) <= MAX_ITEMS Then

            With tempRec
                .top = BankTop + ((BankOffsetY + 32) * ((i - 1) \ BankColumns))
                .Bottom = .top + PIC_Y
                .left = BankLeft + ((BankOffsetX + 32) * (((i - 1) Mod BankColumns)))
                .Right = .left + PIC_X
            End With

            If x >= tempRec.left And x <= tempRec.Right Then
                If y >= tempRec.top And y <= tempRec.Bottom Then

                    IsBankItem = i

I assume it goes somewhere in here? I'm not much of a programmer so I'm not sure how I would do what you're saying. I've looked around and found very little help but I think I found where it goes.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...