Domino_ Posted July 23, 2011 Share Posted July 23, 2011 @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 More sharing options...
ChrisWR Posted August 13, 2011 Share Posted August 13, 2011 Im getting a "compile error: sub or function not defined"It points to modHandleData , private sub HandlePlayerExpCode:SetPlayerSwordsExp Index, Buffer.ReadLong Link to comment Share on other sites More sharing options...
Justn Posted August 13, 2011 Share Posted August 13, 2011 Make sure u put this in modtype under player rec before end type>! ' Proficiencies Swords As Byte SwordsExp As Longand 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).SwordsEnd FunctionFunction SetPlayerSwords(ByVal Index As Long, ByVal Swords As Long) SetPlayerSwords = False If Swords > MAX_SKILL_LEVEL Then Exit Function Player(Index).Swords = Swords SetPlayerSwords = TrueEnd FunctionFunction GetPlayerSwordsExp(ByVal Index As Long) As Long GetPlayerSwordsExp = Player(Index).SwordsExpEnd FunctionSub SetPlayerSwordsExp(ByVal Index As Long, ByVal SwordsExp As Long) Player(Index).SwordsExp = SwordsExp SendEXP Index If GetPlayerSwordsExp(Index) >= GetPlayerNextSwordsLevel(Index) ThenSwordsLevelUp IndexEnd SubPublic 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 More sharing options...
ChrisWR Posted August 26, 2011 Share Posted August 26, 2011 :Odoes that go in the getplayernextlevel function or after? cause i got it afterotherwise im sure i got that all, i do have 13 types of weapons thoughHere 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 LongEnd 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 LongEnd 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).SwordsEnd FunctionFunction SetPlayerSwords(ByVal Index As Long, ByVal Swords As Long) SetPlayerSwords = False If Swords > MAX_SKILL_LEVEL Then Exit Function Player(Index).Swords = Swords SetPlayerSwords = TrueEnd FunctionFunction GetPlayerSwordsExp(ByVal Index As Long) As Long GetPlayerSwordsExp = Player(Index).SwordsExpEnd FunctionSub SetPlayerSwordsExp(ByVal Index As Long, ByVal SwordsExp As Long) Player(Index).SwordsExp = SwordsExp SendEXP Index If GetPlayerSwordsExp(Index) >= GetPlayerNextSwordsLevel(Index) Then SwordsLevelUp IndexEnd SubPublic 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 levelFunction GetPlayerAxes(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerAxes = Player(Index).AxesEnd FunctionFunction SetPlayerAxes(ByVal Index As Long, ByVal Axes As Long) SetPlayerAxes = False If Axes > MAX_SKILL_LEVEL Then Exit Function Player(Index).Axes = Axes SetPlayerAxes = TrueEnd FunctionFunction GetPlayerAxesExp(ByVal Index As Long) As Long GetPlayerAxesExp = Player(Index).AxesExpEnd FunctionSub SetPlayerAxesExp(ByVal Index As Long, ByVal AxesExp As Long) Player(Index).AxesExp = AxesExp SendEXP Index If GetPlayerAxesExp(Index) >= GetPlayerNextAxesLevel(Index) Then AxesLevelUp IndexEnd SubPublic 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'BowsFunction GetPlayerBows(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerBows = Player(Index).BowsEnd FunctionFunction SetPlayerBows(ByVal Index As Long, ByVal Bows As Long) SetPlayerBows = False If Bows > MAX_SKILL_LEVEL Then Exit Function Player(Index).Bows = Bows SetPlayerBows = TrueEnd FunctionFunction GetPlayerBowsExp(ByVal Index As Long) As Long GetPlayerBowsExp = Player(Index).BowsExpEnd FunctionSub SetPlayerBowsExp(ByVal Index As Long, ByVal BowsExp As Long) Player(Index).BowsExp = BowsExp SendEXP Index If GetPlayerBowsExp(Index) >= GetPlayerNextBowsLevel(Index) Then BowsLevelUp IndexEnd SubPublic 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' PistolsFunction GetPlayerPistols(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerPistols = Player(Index).PistolsEnd FunctionFunction SetPlayerPistols(ByVal Index As Long, ByVal Pistols As Long) SetPlayerPistols = False If Pistols > MAX_SKILL_LEVEL Then Exit Function Player(Index).Pistols = Pistols SetPlayerPistols = TrueEnd FunctionFunction GetPlayerPistolsExp(ByVal Index As Long) As Long GetPlayerPistolsExp = Player(Index).PistolsExpEnd FunctionSub SetPlayerPistolsExp(ByVal Index As Long, ByVal PistolsExp As Long) Player(Index).PistolsExp = PistolsExp SendEXP Index If GetPlayerPistolsExp(Index) >= GetPlayerNextPistolsLevel(Index) Then PistolsLevelUp IndexEnd SubPublic 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' DaggersFunction GetPlayerDaggers(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerDaggers = Player(Index).DaggersEnd FunctionFunction SetPlayerDaggers(ByVal Index As Long, ByVal Daggers As Long) SetPlayerDaggers = False If Daggers > MAX_SKILL_LEVEL Then Exit Function Player(Index).Daggers = Daggers SetPlayerDaggers = TrueEnd FunctionFunction GetPlayerDaggersExp(ByVal Index As Long) As Long GetPlayerDaggersExp = Player(Index).DaggersExpEnd FunctionSub SetPlayerDaggersExp(ByVal Index As Long, ByVal DaggersExp As Long) Player(Index).DaggersExp = DaggersExp SendEXP Index If GetPlayerDaggersExp(Index) >= GetPlayerNextDaggersLevel(Index) Then DaggersLevelUp IndexEnd SubPublic 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' MacesFunction GetPlayerMaces(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerMaces = Player(Index).MacesEnd FunctionFunction SetPlayerMaces(ByVal Index As Long, ByVal Maces As Long) SetPlayerMaces = False If Maces > MAX_SKILL_LEVEL Then Exit Function Player(Index).Maces = Maces SetPlayerMaces = TrueEnd FunctionFunction GetPlayerMacesExp(ByVal Index As Long) As Long GetPlayerMacesExp = Player(Index).MacesExpEnd FunctionSub SetPlayerMacesExp(ByVal Index As Long, ByVal MacesExp As Long) Player(Index).MacesExp = MacesExp SendEXP Index If GetPlayerMacesExp(Index) >= GetPlayerNextMacesLevel(Index) Then MacesLevelUp IndexEnd SubPublic 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' ScythesFunction GetPlayerScythes(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerScythes = Player(Index).ScythesEnd FunctionFunction SetPlayerScythes(ByVal Index As Long, ByVal Scythes As Long) SetPlayerScythes = False If Scythes > MAX_SKILL_LEVEL Then Exit Function Player(Index).Scythes = Scythes SetPlayerScythes = TrueEnd FunctionFunction GetPlayerScythesExp(ByVal Index As Long) As Long GetPlayerScythesExp = Player(Index).ScythesExpEnd FunctionSub SetPlayerScythesExp(ByVal Index As Long, ByVal ScythesExp As Long) Player(Index).ScythesExp = ScythesExp SendEXP Index If GetPlayerScythesExp(Index) >= GetPlayerNextScythesLevel(Index) Then ScythesLevelUp IndexEnd SubPublic 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' StaffsFunction GetPlayerStaffs(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerStaffs = Player(Index).StaffsEnd FunctionFunction SetPlayerStaffs(ByVal Index As Long, ByVal Staffs As Long) SetPlayerStaffs = False If Staffs > MAX_SKILL_LEVEL Then Exit Function Player(Index).Staffs = Staffs SetPlayerStaffs = TrueEnd FunctionFunction GetPlayerStaffsExp(ByVal Index As Long) As Long GetPlayerStaffsExp = Player(Index).StaffsExpEnd FunctionSub SetPlayerStaffsExp(ByVal Index As Long, ByVal StaffsExp As Long) Player(Index).StaffsExp = StaffsExp SendEXP Index If GetPlayerStaffsExp(Index) >= GetPlayerNextStaffsLevel(Index) Then StaffsLevelUp IndexEnd SubPublic 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' ClawsFunction GetPlayerClaws(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerClaws = Player(Index).ClawsEnd FunctionFunction SetPlayerClaws(ByVal Index As Long, ByVal Claws As Long) SetPlayerClaws = False If Claws > MAX_SKILL_LEVEL Then Exit Function Player(Index).Claws = Claws SetPlayerClaws = TrueEnd FunctionFunction GetPlayerClawsExp(ByVal Index As Long) As Long GetPlayerClawsExp = Player(Index).ClawsExpEnd FunctionSub SetPlayerClawsExp(ByVal Index As Long, ByVal ClawsExp As Long) Player(Index).ClawsExp = ClawsExp SendEXP Index If GetPlayerClawsExp(Index) >= GetPlayerNextClawsLevel(Index) Then ClawsLevelUp IndexEnd SubPublic 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' ClubsFunction GetPlayerClubs(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerClubs = Player(Index).ClubsEnd FunctionFunction SetPlayerClubs(ByVal Index As Long, ByVal Clubs As Long) SetPlayerClubs = False If Clubs > MAX_SKILL_LEVEL Then Exit Function Player(Index).Clubs = Clubs SetPlayerClubs = TrueEnd FunctionFunction GetPlayerClubsExp(ByVal Index As Long) As Long GetPlayerClubsExp = Player(Index).ClubsExpEnd FunctionSub SetPlayerClubsExp(ByVal Index As Long, ByVal ClubsExp As Long) Player(Index).ClubsExp = ClubsExp SendEXP Index If GetPlayerClubsExp(Index) >= GetPlayerNextClubsLevel(Index) Then ClubsLevelUp IndexEnd SubPublic 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' HammersFunction GetPlayerHammers(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerHammers = Player(Index).HammersEnd FunctionFunction SetPlayerHammers(ByVal Index As Long, ByVal Hammers As Long) SetPlayerHammers = False If Hammers > MAX_SKILL_LEVEL Then Exit Function Player(Index).Hammers = Hammers SetPlayerHammers = TrueEnd FunctionFunction GetPlayerHammersExp(ByVal Index As Long) As Long GetPlayerHammersExp = Player(Index).HammersExpEnd FunctionSub SetPlayerHammersExp(ByVal Index As Long, ByVal HammersExp As Long) Player(Index).HammersExp = HammersExp SendEXP Index If GetPlayerHammersExp(Index) >= GetPlayerNextHammersLevel(Index) Then HammersLevelUp IndexEnd SubPublic 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' LaunchersFunction GetPlayerLaunchers(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerLaunchers = Player(Index).LaunchersEnd FunctionFunction SetPlayerLaunchers(ByVal Index As Long, ByVal Launchers As Long) SetPlayerLaunchers = False If Launchers > MAX_SKILL_LEVEL Then Exit Function Player(Index).Launchers = Launchers SetPlayerLaunchers = TrueEnd FunctionFunction GetPlayerLaunchersExp(ByVal Index As Long) As Long GetPlayerLaunchersExp = Player(Index).LaunchersExpEnd FunctionSub SetPlayerLaunchersExp(ByVal Index As Long, ByVal LaunchersExp As Long) Player(Index).LaunchersExp = LaunchersExp SendEXP Index If GetPlayerLaunchersExp(Index) >= GetPlayerNextLaunchersLevel(Index) Then LaunchersLevelUp IndexEnd SubPublic 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' SlingsFunction GetPlayerSlings(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerSlings = Player(Index).SlingsEnd FunctionFunction SetPlayerSlings(ByVal Index As Long, ByVal Slings As Long) SetPlayerSlings = False If Slings > MAX_SKILL_LEVEL Then Exit Function Player(Index).Slings = Slings SetPlayerSlings = TrueEnd FunctionFunction GetPlayerSlingsExp(ByVal Index As Long) As Long GetPlayerSlingsExp = Player(Index).SlingsExpEnd FunctionSub SetPlayerSlingsExp(ByVal Index As Long, ByVal SlingsExp As Long) Player(Index).SlingsExp = SlingsExp SendEXP Index If GetPlayerSlingsExp(Index) >= GetPlayerNextSlingsLevel(Index) Then SlingsLevelUp IndexEnd SubPublic 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 More sharing options...
Justn Posted August 26, 2011 Share Posted August 26, 2011 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 Functionerrorhandler: HandleError "GetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub Link to comment Share on other sites More sharing options...
ChrisWR Posted August 26, 2011 Share Posted August 26, 2011 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 Suberrorhandler: HandleError "SetPlayerExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub'proficiencies'swordFunction 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 Functionerrorhandler: HandleError "GetPlayerSwords", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerSwords", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerSwordsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' axesFunction 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 Functionerrorhandler: HandleError "GetPlayerAxes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerAxes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerAxesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerAxesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' bowsFunction 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 Functionerrorhandler: HandleError "GetPlayerBows", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerBows", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerBowsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerBowsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' pistolsFunction 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 Functionerrorhandler: HandleError "GetPlayerPistols", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerPistols", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerPistolsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerPistolsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' daggersFunction 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 Functionerrorhandler: HandleError "GetPlayerdaggers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerDaggers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerDaggersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerDaggersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' macesFunction 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 Functionerrorhandler: HandleError "GetPlayerMaces", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerMaces", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerMacesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerMacesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' ScythesFunction 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 Functionerrorhandler: HandleError "GetPlayerScythes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerscythes", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerScythesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerScythesExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' staffsFunction 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 Functionerrorhandler: HandleError "GetPlayerStaffs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerStaffs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerStaffsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerStaffsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' clawsFunction 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 Functionerrorhandler: HandleError "GetPlayerClaws", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerClaws", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerClawsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerClawsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' clubsFunction 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 Functionerrorhandler: HandleError "GetPlayerClubs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerClubs", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerClubsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerClubsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' hammersFunction 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 Functionerrorhandler: HandleError "GetPlayerHammers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerHammers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerHammersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerHammersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' launchersFunction 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 Functionerrorhandler: HandleError "GetPlayerLaunchers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerLaunchers", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerLaunchersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerLaunchersExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' SlingsFunction 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 Functionerrorhandler: HandleError "GetPlayerSlings", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerSlings", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd SubFunction 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 Functionerrorhandler: HandleError "GetPlayerSlingsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit FunctionEnd FunctionSub 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 Suberrorhandler: HandleError "SetPlayerSlingsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub' end proficiencies``` Link to comment Share on other sites More sharing options...
Justn Posted November 5, 2011 Share Posted November 5, 2011 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 IfEnd Function``` Link to comment Share on other sites More sharing options...
DJMaxus Posted February 6, 2012 Author Share Posted February 6, 2012 @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 More sharing options...
Justn Posted February 6, 2012 Share Posted February 6, 2012 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 :) Link to comment Share on other sites More sharing options...
DJMaxus Posted February 7, 2012 Author Share Posted February 7, 2012 @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 More sharing options...
Fragment Posted February 29, 2012 Share Posted February 29, 2012 This is great, so far i have managed to add the following skills:LumberjackWoodworkMiningSmithingEssence FindingArcane craftFishingI 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 More sharing options...
DJMaxus Posted March 2, 2012 Author Share Posted March 2, 2012 @Fragment:> I simply used this as a basis and changed it so you level up when you hit a resource with a few minor tweaks.Nice job man. That's exactly what it was intended for. Link to comment Share on other sites More sharing options...
whittenator25 Posted April 3, 2012 Share Posted April 3, 2012 Im positive I done everything right…i rechecked 3 times. But for some reason my Swordexp and sword level always stays the same. Could someone help me with this problem?![](http://img268.imageshack.us/img268/6839/proficenyproblem.jpg)\ Link to comment Share on other sites More sharing options...
waseemk Posted April 6, 2012 Share Posted April 6, 2012 :confused:why do I always get runtime error 9 subscript out of range?This is what gets high lighted:![](http://i1157.photobucket.com/albums/p584/waseemk/bug-1.jpg) Link to comment Share on other sites More sharing options...
waseemk Posted April 8, 2012 Share Posted April 8, 2012 any help guys? Link to comment Share on other sites More sharing options...
RyokuHasu Posted April 8, 2012 Share Posted April 8, 2012 Ok do it again and when the error pops up hold your mouse over every single part of the line.It should then tell you which exact value is out of range. Link to comment Share on other sites More sharing options...
waseemk Posted April 12, 2012 Share Posted April 12, 2012 ![](http://i1157.photobucket.com/albums/p584/waseemk/bug-2.jpg)is this what you mean? i got the other photo when i click end and get this one when i click debug Link to comment Share on other sites More sharing options...
waseemk Posted April 14, 2012 Share Posted April 14, 2012 Never mind I just removed it Link to comment Share on other sites More sharing options...
fernz123 Posted April 14, 2012 Share Posted April 14, 2012 Looks good, can't wait to check it out later Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 14, 2012 Share Posted April 14, 2012 @waseemk:> Never mind I just removed itYou 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 More sharing options...
waseemk Posted April 14, 2012 Share Posted April 14, 2012 No I removed the codes for the profiences. Now it works Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 14, 2012 Share Posted April 14, 2012 @waseemk:> No I removed the codes for the profiences. Now it worksOh, my bad. I thought you removed frmServer.Socket(0).Listen, hence the comment. Link to comment Share on other sites More sharing options...
or3o Posted April 17, 2012 Share Posted April 17, 2012 Thanks for the tutorial so far its worked perfectly, if i run into any errors ill be sure to report em. Thanks agian! Link to comment Share on other sites More sharing options...
Mistlight Posted August 12, 2012 Share Posted August 12, 2012 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).EqTypeEnd Function``` Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2012 Share Posted August 12, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now