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

[EO] Weapon Proficiencies/Skill Level


DJMaxus
 Share

Recommended Posts

@DJMaxus:

> Not too sure about that one then. All I could suggest is retracing your steps, or checking to see what the "Damage" variable returns in Sub PlayerAttackNpc. From there you should be able to find out why it's only 1-2.

I'v searched everything what I changed about damage with skills and found that not correctly set Function GetPlayerDamage So now everything works. :)
Thanks.
Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

Make sure u put this in modtype under player rec before end type
>! ' Proficiencies
    Swords As Byte
    SwordsExp As Long
and make sure u added this part to the end of :Function GetPlayerNextLevel

>! ' Proficeicies
'***************************************
' Swords Skill Level
'***************************************
Function GetPlayerSwords(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSwords = Player(Index).Swords
End Function
Function SetPlayerSwords(ByVal Index As Long, ByVal Swords As Long)
    SetPlayerSwords = False
    If Swords > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Swords = Swords
    SetPlayerSwords = True
End Function
Function GetPlayerSwordsExp(ByVal Index As Long) As Long
    GetPlayerSwordsExp = Player(Index).SwordsExp
End Function
Sub SetPlayerSwordsExp(ByVal Index As Long, ByVal SwordsExp As Long)
    Player(Index).SwordsExp = SwordsExp
    SendEXP Index
    If GetPlayerSwordsExp(Index) >= GetPlayerNextSwordsLevel(Index) Then
SwordsLevelUp Index
End Sub
Public Function GetPlayerNextSwordsLevel(ByVal Index As Long) As Long 
GetPlayerNextSwordsLevel = (50 / 3) * ((GetPlayerSwords(Index) + 1) ^ 3 - (6 * (GetPlayerSwords(Index) + 1) ^ 2) + 17 * (GetPlayerSwords(Index) + 1) - 12)
End Function
Link to comment
Share on other sites

  • 2 weeks later...
:O
does that go in the getplayernextlevel function or after? cause i got it after
otherwise im sure i got that all, i do have 13 types of weapons though

Here my playerrec:
```
Private Type PlayerRec
    ' Account
    Login As String * ACCOUNT_LENGTH
    Password As String * NAME_LENGTH

    ' 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

    ' 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
    PlayerQuest(1 To MAX_QUESTS) As PlayerQuestRec
    ' Proficiencies
    Swords As Byte
    ' sw
    Axes As Byte
    ' ax
    Bows As Byte
    ' bw
    Pistols As Byte
    ' ps
    Daggers As Byte
    ' dg
    Maces As Byte
    ' mc
    Scythes As Byte
    ' sy
    Staffs As Byte
    ' st
    Claws As Byte
    ' cw
    Clubs As Byte
    ' cl
    Hammers As Byte
    ' hm
    Launchers As Byte
    ' lc
    Slings As Byte
    ' sl
    SwordsExp As Long
    AxesExp As Long
    BowsExp As Long
    PistolsExp As Long
    DaggersExp As Long
    MacesExp As Long
    ScythesExp As Long
    StaffsExp As Long
    ClawsExp As Long
    ClubsExp As Long
    HammersExp As Long
    LaunchersExp As Long
    SlingsExp As Long
End Type
```
heres my itemrec:
```
Private Type ItemRec
    Name As String * NAME_LENGTH
    Desc As String * 255
    Sound As String * NAME_LENGTH

    Pic As Long

    Type As Byte
    Data1 As Long
    Data2 As Long
    Data3 As Long
    ClassReq As Long
    AccessReq As Long
    LevelReq As Long
    Mastery As Byte
    price As Long
    Add_Stat(1 To Stats.Stat_Count - 1) As Byte
    Rarity As Byte
    Speed As Long
    Handed As Long
    BindType As Byte
    Stat_Req(1 To Stats.Stat_Count - 1) As Byte
    Animation As Long
    Paperdoll As Long

    AddHP As Long
    AddMP As Long
    AddEXP As Long
    CastSpell As Long
    instaCast As Byte
    ProjecTile As ProjectileRec
        ' Proficiencies
    Swords As Long
    Axes As Long
    Bows As Long
    Pistols As Long
    Daggers As Long
    Maces As Long
    Scythes As Long
    Staffs As Long
    Claws As Long
    Clubs As Long
    Hammers As Long
    Launchers As Long
    Slings As Long
    SwordsExp As Long
    AxesExp As Long
    BowsExp As Long
    PistolsExp As Long
    DaggersExp As Long
    MacesExp As Long
    ScythesExp As Long
    StaffsExp As Long
    ClawsExp As Long
    ClubsExp As Long
    HammersExp As Long
    LaunchersExp As Long
    SlingsExp As Long
End Type
```
and heres my getplayernextlevel (and the code i added "after" it):
```
Function GetPlayerNextLevel(ByVal Index As Long) As Long
    GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(Index) + 1) ^ 3 - (6 * (GetPlayerLevel(Index) + 1) ^ 2) + 17 * (GetPlayerLevel(Index) + 1) - 12)
End Function

' Proficeicies
'***************************************
' Swords Skill Level
'***************************************
Function GetPlayerSwords(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSwords = Player(Index).Swords
End Function
Function SetPlayerSwords(ByVal Index As Long, ByVal Swords As Long)
    SetPlayerSwords = False
    If Swords > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Swords = Swords
    SetPlayerSwords = True
End Function
Function GetPlayerSwordsExp(ByVal Index As Long) As Long
    GetPlayerSwordsExp = Player(Index).SwordsExp
End Function
Sub SetPlayerSwordsExp(ByVal Index As Long, ByVal SwordsExp As Long)
    Player(Index).SwordsExp = SwordsExp
    SendEXP Index
    If GetPlayerSwordsExp(Index) >= GetPlayerNextSwordsLevel(Index) Then SwordsLevelUp Index
End Sub

Public Function GetPlayerNextSwordsLevel(ByVal Index As Long) As Long
    GetPlayerNextSwordsLevel = (50 / 3) * ((GetPlayerSwords(Index) + 1) ^ 3 - (6 * (GetPlayerSwords(Index) + 1) ^ 2) + 17 * (GetPlayerSwords(Index) + 1) - 12)
End Function
' axes skill level
Function GetPlayerAxes(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerAxes = Player(Index).Axes
End Function
Function SetPlayerAxes(ByVal Index As Long, ByVal Axes As Long)
    SetPlayerAxes = False
    If Axes > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Axes = Axes
    SetPlayerAxes = True
End Function
Function GetPlayerAxesExp(ByVal Index As Long) As Long
    GetPlayerAxesExp = Player(Index).AxesExp
End Function
Sub SetPlayerAxesExp(ByVal Index As Long, ByVal AxesExp As Long)
    Player(Index).AxesExp = AxesExp
    SendEXP Index
    If GetPlayerAxesExp(Index) >= GetPlayerNextAxesLevel(Index) Then AxesLevelUp Index
End Sub

Public Function GetPlayerNextAxesLevel(ByVal Index As Long) As Long
    GetPlayerNextAxesLevel = (50 / 3) * ((GetPlayerAxes(Index) + 1) ^ 3 - (6 * (GetPlayerAxes(Index) + 1) ^ 2) + 17 * (GetPlayerAxes(Index) + 1) - 12)
End Function
'Bows
Function GetPlayerBows(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerBows = Player(Index).Bows
End Function
Function SetPlayerBows(ByVal Index As Long, ByVal Bows As Long)
    SetPlayerBows = False
    If Bows > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Bows = Bows
    SetPlayerBows = True
End Function
Function GetPlayerBowsExp(ByVal Index As Long) As Long
    GetPlayerBowsExp = Player(Index).BowsExp
End Function
Sub SetPlayerBowsExp(ByVal Index As Long, ByVal BowsExp As Long)
    Player(Index).BowsExp = BowsExp
    SendEXP Index
    If GetPlayerBowsExp(Index) >= GetPlayerNextBowsLevel(Index) Then BowsLevelUp Index
End Sub

Public Function GetPlayerNextBowsLevel(ByVal Index As Long) As Long
    GetPlayerNextBowsLevel = (50 / 3) * ((GetPlayerBows(Index) + 1) ^ 3 - (6 * (GetPlayerBows(Index) + 1) ^ 2) + 17 * (GetPlayerBows(Index) + 1) - 12)
End Function
' Pistols
Function GetPlayerPistols(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerPistols = Player(Index).Pistols
End Function
Function SetPlayerPistols(ByVal Index As Long, ByVal Pistols As Long)
    SetPlayerPistols = False
    If Pistols > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Pistols = Pistols
    SetPlayerPistols = True
End Function
Function GetPlayerPistolsExp(ByVal Index As Long) As Long
    GetPlayerPistolsExp = Player(Index).PistolsExp
End Function
Sub SetPlayerPistolsExp(ByVal Index As Long, ByVal PistolsExp As Long)
    Player(Index).PistolsExp = PistolsExp
    SendEXP Index
    If GetPlayerPistolsExp(Index) >= GetPlayerNextPistolsLevel(Index) Then PistolsLevelUp Index
End Sub

Public Function GetPlayerNextPistolsLevel(ByVal Index As Long) As Long
    GetPlayerNextPistolsLevel = (50 / 3) * ((GetPlayerPistols(Index) + 1) ^ 3 - (6 * (GetPlayerPistols(Index) + 1) ^ 2) + 17 * (GetPlayerPistols(Index) + 1) - 12)
End Function
' Daggers
Function GetPlayerDaggers(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerDaggers = Player(Index).Daggers
End Function
Function SetPlayerDaggers(ByVal Index As Long, ByVal Daggers As Long)
    SetPlayerDaggers = False
    If Daggers > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Daggers = Daggers
    SetPlayerDaggers = True
End Function
Function GetPlayerDaggersExp(ByVal Index As Long) As Long
    GetPlayerDaggersExp = Player(Index).DaggersExp
End Function
Sub SetPlayerDaggersExp(ByVal Index As Long, ByVal DaggersExp As Long)
    Player(Index).DaggersExp = DaggersExp
    SendEXP Index
    If GetPlayerDaggersExp(Index) >= GetPlayerNextDaggersLevel(Index) Then DaggersLevelUp Index
End Sub

Public Function GetPlayerNextDaggersLevel(ByVal Index As Long) As Long
    GetPlayerNextDaggersLevel = (50 / 3) * ((GetPlayerDaggers(Index) + 1) ^ 3 - (6 * (GetPlayerDaggers(Index) + 1) ^ 2) + 17 * (GetPlayerDaggers(Index) + 1) - 12)
End Function
' Maces
Function GetPlayerMaces(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerMaces = Player(Index).Maces
End Function
Function SetPlayerMaces(ByVal Index As Long, ByVal Maces As Long)
    SetPlayerMaces = False
    If Maces > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Maces = Maces
    SetPlayerMaces = True
End Function
Function GetPlayerMacesExp(ByVal Index As Long) As Long
    GetPlayerMacesExp = Player(Index).MacesExp
End Function
Sub SetPlayerMacesExp(ByVal Index As Long, ByVal MacesExp As Long)
    Player(Index).MacesExp = MacesExp
    SendEXP Index
    If GetPlayerMacesExp(Index) >= GetPlayerNextMacesLevel(Index) Then MacesLevelUp Index
End Sub

Public Function GetPlayerNextMacesLevel(ByVal Index As Long) As Long
    GetPlayerNextMacesLevel = (50 / 3) * ((GetPlayerMaces(Index) + 1) ^ 3 - (6 * (GetPlayerMaces(Index) + 1) ^ 2) + 17 * (GetPlayerMaces(Index) + 1) - 12)
End Function
' Scythes
Function GetPlayerScythes(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerScythes = Player(Index).Scythes
End Function
Function SetPlayerScythes(ByVal Index As Long, ByVal Scythes As Long)
    SetPlayerScythes = False
    If Scythes > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Scythes = Scythes
    SetPlayerScythes = True
End Function
Function GetPlayerScythesExp(ByVal Index As Long) As Long
    GetPlayerScythesExp = Player(Index).ScythesExp
End Function
Sub SetPlayerScythesExp(ByVal Index As Long, ByVal ScythesExp As Long)
    Player(Index).ScythesExp = ScythesExp
    SendEXP Index
    If GetPlayerScythesExp(Index) >= GetPlayerNextScythesLevel(Index) Then ScythesLevelUp Index
End Sub

Public Function GetPlayerNextScythesLevel(ByVal Index As Long) As Long
    GetPlayerNextScythesLevel = (50 / 3) * ((GetPlayerScythes(Index) + 1) ^ 3 - (6 * (GetPlayerScythes(Index) + 1) ^ 2) + 17 * (GetPlayerScythes(Index) + 1) - 12)
End Function
' Staffs
Function GetPlayerStaffs(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerStaffs = Player(Index).Staffs
End Function
Function SetPlayerStaffs(ByVal Index As Long, ByVal Staffs As Long)
    SetPlayerStaffs = False
    If Staffs > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Staffs = Staffs
    SetPlayerStaffs = True
End Function
Function GetPlayerStaffsExp(ByVal Index As Long) As Long
    GetPlayerStaffsExp = Player(Index).StaffsExp
End Function
Sub SetPlayerStaffsExp(ByVal Index As Long, ByVal StaffsExp As Long)
    Player(Index).StaffsExp = StaffsExp
    SendEXP Index
    If GetPlayerStaffsExp(Index) >= GetPlayerNextStaffsLevel(Index) Then StaffsLevelUp Index
End Sub

Public Function GetPlayerNextStaffsLevel(ByVal Index As Long) As Long
    GetPlayerNextStaffsLevel = (50 / 3) * ((GetPlayerStaffs(Index) + 1) ^ 3 - (6 * (GetPlayerStaffs(Index) + 1) ^ 2) + 17 * (GetPlayerStaffs(Index) + 1) - 12)
End Function
' Claws
Function GetPlayerClaws(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerClaws = Player(Index).Claws
End Function
Function SetPlayerClaws(ByVal Index As Long, ByVal Claws As Long)
    SetPlayerClaws = False
    If Claws > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Claws = Claws
    SetPlayerClaws = True
End Function
Function GetPlayerClawsExp(ByVal Index As Long) As Long
    GetPlayerClawsExp = Player(Index).ClawsExp
End Function
Sub SetPlayerClawsExp(ByVal Index As Long, ByVal ClawsExp As Long)
    Player(Index).ClawsExp = ClawsExp
    SendEXP Index
    If GetPlayerClawsExp(Index) >= GetPlayerNextClawsLevel(Index) Then ClawsLevelUp Index
End Sub

Public Function GetPlayerNextClawsLevel(ByVal Index As Long) As Long
    GetPlayerNextClawsLevel = (50 / 3) * ((GetPlayerClaws(Index) + 1) ^ 3 - (6 * (GetPlayerClaws(Index) + 1) ^ 2) + 17 * (GetPlayerClaws(Index) + 1) - 12)
End Function
' Clubs
Function GetPlayerClubs(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerClubs = Player(Index).Clubs
End Function
Function SetPlayerClubs(ByVal Index As Long, ByVal Clubs As Long)
    SetPlayerClubs = False
    If Clubs > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Clubs = Clubs
    SetPlayerClubs = True
End Function
Function GetPlayerClubsExp(ByVal Index As Long) As Long
    GetPlayerClubsExp = Player(Index).ClubsExp
End Function
Sub SetPlayerClubsExp(ByVal Index As Long, ByVal ClubsExp As Long)
    Player(Index).ClubsExp = ClubsExp
    SendEXP Index
    If GetPlayerClubsExp(Index) >= GetPlayerNextClubsLevel(Index) Then ClubsLevelUp Index
End Sub

Public Function GetPlayerNextClubsLevel(ByVal Index As Long) As Long
    GetPlayerNextClubsLevel = (50 / 3) * ((GetPlayerClubs(Index) + 1) ^ 3 - (6 * (GetPlayerClubs(Index) + 1) ^ 2) + 17 * (GetPlayerClubs(Index) + 1) - 12)
End Function
' Hammers
Function GetPlayerHammers(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerHammers = Player(Index).Hammers
End Function
Function SetPlayerHammers(ByVal Index As Long, ByVal Hammers As Long)
    SetPlayerHammers = False
    If Hammers > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Hammers = Hammers
    SetPlayerHammers = True
End Function
Function GetPlayerHammersExp(ByVal Index As Long) As Long
    GetPlayerHammersExp = Player(Index).HammersExp
End Function
Sub SetPlayerHammersExp(ByVal Index As Long, ByVal HammersExp As Long)
    Player(Index).HammersExp = HammersExp
    SendEXP Index
    If GetPlayerHammersExp(Index) >= GetPlayerNextHammersLevel(Index) Then HammersLevelUp Index
End Sub

Public Function GetPlayerNextHammersLevel(ByVal Index As Long) As Long
    GetPlayerNextHammersLevel = (50 / 3) * ((GetPlayerHammers(Index) + 1) ^ 3 - (6 * (GetPlayerHammers(Index) + 1) ^ 2) + 17 * (GetPlayerHammers(Index) + 1) - 12)
End Function
' Launchers
Function GetPlayerLaunchers(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerLaunchers = Player(Index).Launchers
End Function
Function SetPlayerLaunchers(ByVal Index As Long, ByVal Launchers As Long)
    SetPlayerLaunchers = False
    If Launchers > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Launchers = Launchers
    SetPlayerLaunchers = True
End Function
Function GetPlayerLaunchersExp(ByVal Index As Long) As Long
    GetPlayerLaunchersExp = Player(Index).LaunchersExp
End Function
Sub SetPlayerLaunchersExp(ByVal Index As Long, ByVal LaunchersExp As Long)
    Player(Index).LaunchersExp = LaunchersExp
    SendEXP Index
    If GetPlayerLaunchersExp(Index) >= GetPlayerNextLaunchersLevel(Index) Then LaunchersLevelUp Index
End Sub

Public Function GetPlayerNextLaunchersLevel(ByVal Index As Long) As Long
    GetPlayerNextLaunchersLevel = (50 / 3) * ((GetPlayerLaunchers(Index) + 1) ^ 3 - (6 * (GetPlayerLaunchers(Index) + 1) ^ 2) + 17 * (GetPlayerLaunchers(Index) + 1) - 12)
End Function
' Slings
Function GetPlayerSlings(ByVal Index As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSlings = Player(Index).Slings
End Function
Function SetPlayerSlings(ByVal Index As Long, ByVal Slings As Long)
    SetPlayerSlings = False
    If Slings > MAX_SKILL_LEVEL Then Exit Function
    Player(Index).Slings = Slings
    SetPlayerSlings = True
End Function
Function GetPlayerSlingsExp(ByVal Index As Long) As Long
    GetPlayerSlingsExp = Player(Index).SlingsExp
End Function
Sub SetPlayerSlingsExp(ByVal Index As Long, ByVal SlingsExp As Long)
    Player(Index).SlingsExp = SlingsExp
    SendEXP Index
    If GetPlayerSlingsExp(Index) >= GetPlayerNextSlingsLevel(Index) Then SlingsLevelUp Index
End Sub

Public Function GetPlayerNextSlingsLevel(ByVal Index As Long) As Long
    GetPlayerNextSlingsLevel = (50 / 3) * ((GetPlayerSlings(Index) + 1) ^ 3 - (6 * (GetPlayerSlings(Index) + 1) ^ 2) + 17 * (GetPlayerSlings(Index) + 1) - 12)
End Function
' end of proficiencies!!!!!!!!!!!!!!!!!!!!!!!!!
```
Link to comment
Share on other sites

Everything looks good… I know this sounds dumb but are you sure you added this to modDatabase under the sub setplayerexp?

>! Function GetPlayerSwordsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSwordsExp = Player(Index).SwordsExp
    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function
Sub SetPlayerSwordsExp(ByVal Index As Long, ByVal SwordsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).SwordsExp = SwordsExp
    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
Link to comment
Share on other sites

umm yep , i think i got it all correct…..
```
Sub SetPlayerExp(ByVal Index As Long, ByVal EXP As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).EXP = EXP

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

'proficiencies
'sword
Function GetPlayerSwords(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSwords = Player(Index).Swords

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerSwords", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerSwords(ByVal Index As Long, ByVal Swords As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Swords = Swords

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerSwords", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerSwordsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSwordsExp = Player(Index).SwordsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerSwordsExp(ByVal Index As Long, ByVal SwordsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).SwordsExp = SwordsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' axes
Function GetPlayerAxes(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerAxes = Player(Index).Axes

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerAxes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerAxes(ByVal Index As Long, ByVal Axes As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Axes = Axes

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerAxes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerAxesExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerAxesExp = Player(Index).AxesExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerAxesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerAxesExp(ByVal Index As Long, ByVal AxesExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).AxesExp = AxesExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerAxesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' bows
Function GetPlayerBows(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerBows = Player(Index).Bows

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerBows", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerBows(ByVal Index As Long, ByVal Bows As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Bows = Bows

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerBows", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerBowsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerBowsExp = Player(Index).BowsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerBowsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerBowsExp(ByVal Index As Long, ByVal BowsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).BowsExp = BowsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerBowsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' pistols
Function GetPlayerPistols(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerPistols = Player(Index).Pistols

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerPistols", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerPistols(ByVal Index As Long, ByVal Pistols As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Pistols = Pistols

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerPistols", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerPistolsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerPistolsExp = Player(Index).PistolsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerPistolsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerPistolsExp(ByVal Index As Long, ByVal PistolsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).PistolsExp = PistolsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerPistolsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' daggers
Function GetPlayerDaggers(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerDaggers = Player(Index).daggers

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerdaggers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerDaggers(ByVal Index As Long, ByVal daggers As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).daggers = daggers

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerDaggers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerDaggersExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerDaggersExp = Player(Index).DaggersExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerDaggersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerDaggersExp(ByVal Index As Long, ByVal DaggersExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).DaggersExp = DaggersExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerDaggersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' maces
Function GetPlayerMaces(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerMaces = Player(Index).Maces

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerMaces", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerMaces(ByVal Index As Long, ByVal Maces As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Maces = Maces

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerMaces", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerMacesExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerMacesExp = Player(Index).MacesExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerMacesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerMacesExp(ByVal Index As Long, ByVal MacesExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).MacesExp = MacesExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerMacesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' Scythes
Function GetPlayerScythes(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerScythes = Player(Index).Scythes

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerScythes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerScythes(ByVal Index As Long, ByVal Scythes As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Scythes = Scythes

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerscythes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerScythesExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerScythesExp = Player(Index).ScythesExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerScythesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerScythesExp(ByVal Index As Long, ByVal ScythesExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).ScythesExp = ScythesExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerScythesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' staffs
Function GetPlayerStaffs(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerStaffs = Player(Index).Staffs

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerStaffs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerStaffs(ByVal Index As Long, ByVal Staffs As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Staffs = Staffs

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerStaffs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerStaffsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerStaffsExp = Player(Index).StaffsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerStaffsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerStaffsExp(ByVal Index As Long, ByVal StaffsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).StaffsExp = StaffsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerStaffsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' claws
Function GetPlayerClaws(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerClaws = Player(Index).Claws

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerClaws", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerClaws(ByVal Index As Long, ByVal Claws As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Claws = Claws

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerClaws", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerClawsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerClawsExp = Player(Index).ClawsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerClawsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerClawsExp(ByVal Index As Long, ByVal ClawsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).ClawsExp = ClawsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerClawsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' clubs
Function GetPlayerClubs(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerClubs = Player(Index).Clubs

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerClubs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerClubs(ByVal Index As Long, ByVal Clubs As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Clubs = Clubs

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerClubs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerClubsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerClubsExp = Player(Index).ClubsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerClubsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerClubsExp(ByVal Index As Long, ByVal ClubsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).ClubsExp = ClubsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerClubsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' hammers
Function GetPlayerHammers(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerHammers = Player(Index).Hammers

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerHammers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerHammers(ByVal Index As Long, ByVal Hammers As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Hammers = Hammers

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerHammers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerHammersExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerHammersExp = Player(Index).HammersExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerHammersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerHammersExp(ByVal Index As Long, ByVal HammersExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).HammersExp = HammersExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerHammersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' launchers
Function GetPlayerLaunchers(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerLaunchers = Player(Index).Launchers

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerLaunchers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerLaunchers(ByVal Index As Long, ByVal Launchers As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Launchers = Launchers

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerLaunchers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerLaunchersExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerLaunchersExp = Player(Index).LaunchersExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerLaunchersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerLaunchersExp(ByVal Index As Long, ByVal LaunchersExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).LaunchersExp = LaunchersExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerLaunchersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
' Slings
Function GetPlayerSlings(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSlings = Player(Index).Slings

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerSlings", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerSlings(ByVal Index As Long, ByVal Slings As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).Slings = Slings

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerSlings", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

Function GetPlayerSlingsExp(ByVal Index As Long) As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerSlingsExp = Player(Index).SlingsExp

    ' Error handler
    Exit Function
errorhandler:
    HandleError "GetPlayerSlingsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

Sub SetPlayerSlingsExp(ByVal Index As Long, ByVal SlingsExp As Long)
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Sub
    Player(Index).SlingsExp = SlingsExp

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "SetPlayerSlingsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

' end proficiencies
```
Link to comment
Share on other sites

  • 2 months later...
Ok in this part of the tutorial with all my extra weapon types added I just used the same  ' Proficiency damage bonus calculation 's for every weapon type.. It works but that seems like a lot of checks. Someone suggested adding a select case for it instead? Is that the best way to do or is having that many checks not bad?

Find **Function GetPlayerDamage**

Change that entire function to:
```
Function GetPlayerDamage(ByVal index As Long) As Long
    Dim weaponNum As Long

    GetPlayerDamage = 0

    ' Check for subscript out of range
    If IsPlaying(index) = False Or index <= 0 Or index > MAX_PLAYERS Then
        Exit Function
    End If
    If GetPlayerEquipment(index, Weapon) > 0 Then
        weaponNum = GetPlayerEquipment(index, Weapon)
        ' Proficiency damage bonus calculation
        If Item(weaponNum).Sword > 0 Then
            GetPlayerDamage = 0.085 * 5 * GetPlayerStat(index, Strength) * Item(weaponNum).Data2 + (GetPlayerLevel(index) / 5) + (GetPlayerSwords(index) / 5)
        Else
            GetPlayerDamage = 0.085 * 5 * GetPlayerStat(index, Strength) * Item(weaponNum).Data2 + (GetPlayerLevel(index) / 5)
        End If
    Else
        GetPlayerDamage = 0.085 * 5 * GetPlayerStat(index, Strength) + (GetPlayerLevel(index) / 5)
    End If

End Function
```
Link to comment
Share on other sites

  • 3 months later...
@Justn:

> Ok in this part of the tutorial with all my extra weapon types added I just used the same  ' Proficiency damage bonus calculation 's for every weapon type.. It works but that seems like a lot of checks. Someone suggested adding a select case for it instead? Is that the best way to do or is having that many checks not bad?

I re-added this tutorial recently and I see what you mean. This was the way I did it in MRDE and it didn't seem to give me any problems. But having a select case may prove better for that section.
```
Select Case Item(weaponNum)
            Case Sword
                GetPlayerDamage = 0.085 * 5 * GetPlayerStat(index, Strength) * Item(weaponNum).Data2 + (GetPlayerLevel(index) / 5) + (GetPlayerSwords(index) / 5)
        End Select
```Since I am removing the Else function for normal weapons, this would require that every weapon you have in the game be selectable for skill growth, otherwise just add in another check for normal weapons so it can still calculate the damage properly.
Link to comment
Share on other sites

@Justn:

> Thanks man.. it's been working fine the old way but since all my weapons have skill growth I will atleast try the select case out :)

That's great to hear, glad you pointed that out. Still haven't tested both to check for any differences, but select case seems much cleaner.
Link to comment
Share on other sites

  • 4 weeks later...
This is great, so far i have managed to add the following skills:
Lumberjack
Woodwork
Mining
Smithing
Essence Finding
Arcane craft
Fishing

I simply used this as a basis and changed it so you level up when you hit a resource with a few minor tweaks. I then added the recipe tutorial and changed it so you need a required level to use different harvesting tools and recipes. Works great and can replicate other mmorpgs such as runescape.
Link to comment
Share on other sites

  • 1 month later...
@waseemk:

> Never mind I just removed it

You removed the code that makes the server actually a server. Now you have a server that doesn't even connect to clients. Very nice job.

The problem here is that you haven't installed Service Pack 6, or that you're using Visual Basic 6 Portable. If you're using Portable, you have to follow step 3 and step 4 in the "Installing Eclipse" guide. If you're not using Portable, you only have to follow step 3 (Service Pack 6). Once you've done that, you have to redownload the source code.
Link to comment
Share on other sites

  • 3 months later...
Because i have multiple weapon proficiency, i wanted to simplify some of the functions. Unfortunately, they did not work.  Can anyone help me?

This is an example of the GetPlayerSwords function that i did.
```
Function GetPlayerProficiencyLvl(ByVal Index As Long, ByVal EqType As Long) As Long
    If Index > MAX_PLAYERS Then Exit Function
    GetPlayerProficiencyLvl = Player(Index).EqType
End Function
```
Link to comment
Share on other sites

THis is awsome, although I notice when I gain my sword XP I gain xp for my overal level as well. How can I change this so I ONLY get sword XP?
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...