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

[EO] Bank Currency Fix


Ravey
 Share

Recommended Posts

Hello,

I don't hang around here too often, and I probably won't for a long time, still.

I don't know if there isn't a fix for this somewhere else, but I decided to figure it out myself and post it here.
There is a bug in Eclipse Origins, and as I read here, even in Nightly releases.

This bug prevents you from withdrawing currencies from banks in a normal way, while you input the amount of items you want to drop and then hit the button, it withdraws items from the bank based on your inventory amounts, NOT bank amounts. So, for example, if you have 0 Gold in inventory, the bank withdraws an useless "zero" piece of currency. If you have like 50 coins in the inventory, it withdraws 50 from the bank, conclusion is, it doesn't check for the bank amounts at all.

Here's the fix (Client Side only):

**modGameLogic**
Find:

```
Public Function GetBankItemValue(ByVal bankslot As Long) As Long
```
Replace With:

```
Public Function GetBankItemValue(ByVal index As Long, ByVal bankslot As Long) As Long
```

* * *

Add **above** GetBankItemValue = Bank.Item(bankslot).Value :

```
If index > MAX_PLAYERS Then Exit Function
```

* * *

**modDirectDraw7**

Find these two:

```
If GetBankItemValue(i) > 1 Then
``````
Amount = CStr(GetBankItemValue(i))
```
Add 0 for Index:

```
If GetBankItemValue(0, i) > 1 Then
``````
Amount = CStr(GetBankItemValue(0, i))
```
**frmMain (Code)**

Find:
```
Private Sub lblCurrencyOk_Click()
```
Reffer to this:

```
If IsNumeric(txtCurrency.text) Then
        If Val(txtCurrency.text) > GetPlayerInvItemValue(MyIndex, tmpCurrencyItem) Then txtCurrency.text = GetPlayerInvItemValue(MyIndex, tmpCurrencyItem)
```
**Replace the 2 lines with this, instead:**
Here, you make an exception that if we're withdrawing, we use currency menu 3, so we check for Bank amounts instead of Inventory amounts.

```
If IsNumeric(txtCurrency.text) Then
        If CurrencyMenu = 3 Then
            If Val(txtCurrency.text) > GetBankItemValue(MyIndex, tmpCurrencyItem) Then txtCurrency.text = GetBankItemValue(MyIndex, tmpCurrencyItem)
        ElseIf Val(txtCurrency.text) > GetPlayerInvItemValue(MyIndex, tmpCurrencyItem) Then txtCurrency.text = GetPlayerInvItemValue(MyIndex, tmpCurrencyItem)
        End If
```
And that's all.

Regards,
Ravey.
Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

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...