Chronous Posted May 21, 2010 Author Share Posted May 21, 2010 Im not sure if this is an issue with just the Crypto version or not, but when you equip an item that offers a stat boost, and take it off, it shows your stats weird. For example you equip a weapon that gives 5 STR points.STR before equiping weapon 12(All Variations that happen from equipping and un-equipping)STR 12(+5) (I assume this is the correct way it is supposed to display)STR 7(+5) (After the weapon is unequipped, which is technically the correct amount of points, but they should all be base)STR 17 (While equiped)Im not sure if this is changing the actual stat or if it is just messing with the display. I was just wondering if anyone knew of this problem and / or a fix for it. If not just letting me know where the items stats are added to the players stats in the coding would be a great help so i dont have to go searching through it all. Thanks. Also yes i know that the added up values are always correct however it just bothers me that it switches between having (+5) and not having it. Also I just tested it a little further, and if i level up STR while the weapon with the +5 stat boost is equiped it changed my stat by 6 instead of by 1.Before using a stat point STR = 12(+5)After using stat point STR = 18(+5)and unequiping the weapon shows a base stat of 18 from then on out. Link to comment Share on other sites More sharing options...
Chronous Posted May 21, 2010 Author Share Posted May 21, 2010 Ok I think I might have found the issue. Whenever the program is calculating players stats it adds in the Stats boost from weapons and returns the player strength, which is now the weapon strength + the base Strength from the player. So if you are getting a stat boost from a weapon that is equipped and try to add your stat point, the server checks only for playerStrength which is has been calculated to be their Stat + there weapon boost stat. So now you add a stat point, and it resets your base strength to be Your Base + Your Weapon + 1, so I think all i have to do is edit the servers use stat point area so that is subtracts the weapon boost from the playersStat before it adds 1\.Does this sound right or way off base? Im gonna try it out and ill update this post after i test it Link to comment Share on other sites More sharing options...
Chronous Posted May 21, 2010 Author Share Posted May 21, 2010 Ok this fix seems to have worked for the incorrect base stat issue, incase anyone else has the same problem im posting my fix. Go to your server in modHandleData find the Packet_UseStatPoint, and replace it with my code below. This fix simply takes off the boost from stats from the users stats before adding the extra stat point. Also note that this fix is for the Crypto Version, and if you are using another version then the same general idea should work.```Public Sub Packet_PlayerStatsPacket(ByVal STR As Long, ByVal DEX As Long, ByVal CON As Long, ByVal INTEL As Long, ByVal WIS As Long, ByVal CHA As Long, ByVal MaxExp As Long, ByVal Exp As Long, ByVal lvl As Long) Dim SubStr As Long, SubDex As Long, SubCon As Long, SubIntel As Long, SubWis As Long, SubCha As Long SubStr = 0 SubDex = 0 SubCon = 0 SubIntel = 0 SubWis = 0 SubCha = 0 If GetPlayerWeaponSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerWeaponSlot(MyIndex))).AddCHA End If If GetPlayerArmorSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerArmorSlot(MyIndex))).AddCHA End If If GetPlayerShieldSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerShieldSlot(MyIndex))).AddCHA End If If GetPlayerHelmetSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerHelmetSlot(MyIndex))).AddCHA End If If GetPlayerLegsSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerLegsSlot(MyIndex))).AddCHA End If If GetPlayerRingSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerRingSlot(MyIndex))).AddCHA End If If GetPlayerNecklaceSlot(MyIndex) > 0 Then SubStr = SubStr + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddSTR SubDex = SubDex + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddDEX SubCon = SubCon + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddCON SubIntel = SubIntel + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddINTEL SubWis = SubWis + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddWIS SubCha = SubCha + Item(GetPlayerInvItemNum(MyIndex, GetPlayerNecklaceSlot(MyIndex))).AddCHA End If If SubStr > 0 Then frmStable.lblSTR.Caption = Val(STR) - SubStr & " (+" & SubStr & ")" Else frmStable.lblSTR.Caption = Val(STR) End If If SubDex > 0 Then frmStable.lblDEX.Caption = Val(DEX) - SubDex & " (+" & SubDex & ")" Else frmStable.lblDEX.Caption = Val(DEX) End If If SubCon > 0 Then frmStable.lblCON.Caption = Val(CON) - SubCon & " (+" & SubCon & ")" Else frmStable.lblCON.Caption = Val(CON) End If If SubIntel > 0 Then frmStable.lblINTEL.Caption = Val(INTEL) - SubIntel & " (+" & SubIntel & ")" Else frmStable.lblINTEL.Caption = Val(INTEL) End If If SubWis > 0 Then frmStable.lblWIS.Caption = Val(WIS) - SubWis & " (+" & SubWis & ")" Else frmStable.lblWIS.Caption = Val(WIS) End If If SubCha > 0 Then frmStable.lblCHA.Caption = Val(CHA) - SubCha & " (+" & SubCha & ")" Else frmStable.lblCHA.Caption = Val(CHA) End If frmStable.lblEXP.Caption = Val(Exp) & " / " & Val(MaxExp) frmStable.shpTNL.Width = (((Val(Exp)) / (Val(MaxExp))) * 150) frmStable.lblLevel.Caption = Val(lvl) Player(MyIndex).Level = Val(lvl)End Sub``` Link to comment Share on other sites More sharing options...
blackkat9666 Posted May 23, 2010 Share Posted May 23, 2010 you know, you could've just modified your first post…anyways, good job finding a fixbut someone else should test this to see if there is any bugs and stuff... 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