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

(Help) The Bank As a Button


hardcorex9
 Share

Recommended Posts

Could someone please tell me a Script that can make the Bank as a button like on the char button and the inv button. if you can please tell me if there is a script for it because i cant find one about changing something like that into a button.

regards

Hardcorex9
Link to comment
Share on other sites

First open up the client.vbp and open up modEnumeration and find:

```
' Make sure CMSG_COUNT is below everything else

CMSG_COUNT
```

Above that add:

```
COpenBank
```

Open up modClientTCP and at the bottom add this in:

```

Sub SendOpenBank()

Dim Buffer As clsBuffer

' If debug mode, handle error then exit out

If Options.Debug = 1 Then On Error GoTo errorhandler

Set Buffer = New clsBuffer

Buffer.WriteLong COpenBank

SendData Buffer.ToArray()

Set Buffer = Nothing

' Error handler

Exit Sub

errorhandler:

HandleError "SendOpenBank", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext

Err.Clear

Exit Sub

End Sub

```

Open up frmMain and add in a button. Double click the button and add this code in:

```

Call SendOpenBank

```

Open up the server.vbp and open up modEnumeration. Find:

```

' Make sure CMSG_COUNT is below everything else

CMSG_COUNT

```

Above that add:

```
COpenBank
```

Open up modHandleData. At the bottom of Public Sub InitMessages() add in:

```

HandleDataSub(COpenBank) = GetAddress(AddressOf HandleOpenBank)

```

At the bottom of modHandleData add in this:

```

Sub HandleOpenBank(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

SendBank index

End Sub

```

Once you done that, just run both the client and server, login and click on the button.
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...