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

Bank(1 to MAX_PLAYER), change to 1 to MAX_CHARACTER or something?


Jacquelinett
 Share

Recommended Posts

So, Im trying to create a character creation system for all the newbie that wanted that system ;P Well, im a newbie too, but still ;P

Well, I understand the basic concept of how to make a character system, but im facing a problem.

I dont know how exactly should i tackle the bank system
So far, as you can see in EO, in ModType, bank are declare as Bank(1 to MAX_PLAYER) as BankRec

What im trying to ask is, how do i change it so that it work with 3 character from the player? This is how I set up character:

```
Public Type CharacterRec

    ' General
    Name As String * ACCOUNT_LENGTH
    Sex As Byte
    Class As Long
    Sprite As Long
    Level As Byte
    exp As Long
    Access As Byte
    PK As Byte
    Title As String

    ' Vitals
    Vital(1 To Vitals.Vital_Count - 1) As Long

    ' Stats
    Stat(1 To Stats.Stat_Count - 1) As Byte
    POINTS As Long

    ' Worn equipment
    Equipment(1 To Equipment.Equipment_Count - 1) As Long

    ' Inventory
    Inv(1 To MAX_INV) As PlayerInvRec
    Spell(1 To MAX_PLAYER_SPELLS) As Long

    ' Hotbar
    Hotbar(1 To MAX_HOTBAR) As HotbarRec

    ' Position
    Map As Long
    x As Byte
    y As Byte
    Dir As Byte

End Type

```
Then PlayerRec:
```
Private Type PlayerRec

    ' Account
    Login As String * ACCOUNT_LENGTH
    Password As String * NAME_LENGTH
    Character(1 To MAX_CHARACTER) As CharacterRec
End Type

```

So an example code would be:

Function GetPlayerEXP(Byval Index as Long, CharacterSlot as Long) as Long
GetPlayerEXP = Player(Index).Character(CharacterSlot).EXP
End Function

But I dont know how do I make the bank work since it doesnt work in the same way as the Player(index) thing.
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...