thebadman 0 #1 Posted August 2, 2015 When I change the range str of a bow and pack ,it changes the whole gear to that bonus and also doesn't add the bonuses together when I wield armour or bolts, anyone know how to fix? Share this post Link to post Share on other sites
0 NewWorldRSPS 0 #2 Posted August 2, 2015 No idea, but sounds extremely strange. Goodluck getting this fixed! Share this post Link to post Share on other sites
0 xketoo 0 #3 Posted August 3, 2015 odd if i figure it out ill post a fix Share this post Link to post Share on other sites
0 Arix 59 #4 Posted August 3, 2015 It's an anti-leech. You should check the method where it uses the stats of equipment (i think it was in playercombat, not sure) there is a little method that sets the stats for all other equipped armour if a certain armour had a certain thing about ranged. I've fixed it in an old server I was using. Share this post Link to post Share on other sites
0 thebadman 0 #5 Posted August 5, 2015 [quote name='Arix']It's an anti-leech. You should check the method where it uses the stats of equipment (i think it was in playercombat, not sure) there is a little method that sets the stats for all other equipped armour if a certain armour had a certain thing about ranged. I've fixed it in an old server I was using.[/QUOTE] I cant figure it out, do you know what exactly I should be looking for? Share this post Link to post Share on other sites
0 Arix 59 #6 Posted August 5, 2015 Open CombatDefinitions, and check refreshBonuses() method. [code] for (int id = 0; id < bonuses.length; id++) { // if (id == RANGED_STR_BONUS && this.bonuses[RANGED_STR_BONUS] != 0) { // continue; // } this.bonuses[id] += bonuses[id]; } [/code] This commented code makes it so that there is already a ranged str bonus, it wont get added up. If you comment that it should solve some or all of your problems. The commented code is what is the anti-leech. Basically, if Share this post Link to post Share on other sites
0 thebadman 0 #7 Posted August 5, 2015 [quote name='Arix']Open CombatDefinitions, and check refreshBonuses() method. [code] for (int id = 0; id < bonuses.length; id++) { // if (id == RANGED_STR_BONUS && this.bonuses[RANGED_STR_BONUS] != 0) { // continue; // } this.bonuses[id] += bonuses[id]; } [/code] This commented code makes it so that there is already a ranged str bonus, it wont get added up. If you comment that it should solve some or all of your problems. The commented code is what is the anti-leech. Basically, if[/QUOTE] I have that code but how do I comment it so that I adds them up, sorry im noob thanks for your help Share this post Link to post Share on other sites
0 Arix 59 #8 Posted August 5, 2015 [quote name='thebadman']I have that code but how do I comment it so that I adds them up, sorry im noob thanks for your help[/QUOTE] Just like the code shows. That for does this: for each bonus of the item, if the bonus is ranged strength, and the player already has a ranged strength bonus then don't add it up: [code]// if (id == RANGED_STR_BONUS && this.bonuses[RANGED_STR_BONUS] != 0) { // continue; // }[/code] Otherwise add the bonus to the player's bonuses. Continue means "go to the next bonus" so for ranged strength it would skip the adding. Though if you comment out the if structure or remove it then it will just always add up. Share this post Link to post Share on other sites
0 thebadman 0 #9 Posted August 6, 2015 [quote name='Arix']Just like the code shows. That for does this: for each bonus of the item, if the bonus is ranged strength, and the player already has a ranged strength bonus then don't add it up: [code]// if (id == RANGED_STR_BONUS && this.bonuses[RANGED_STR_BONUS] != 0) { // continue; // }[/code] Otherwise add the bonus to the player's bonuses. Continue means "go to the next bonus" so for ranged strength it would skip the adding. Though if you comment out the if structure or remove it then it will just always add up.[/QUOTE] It worked, thanks man! Share this post Link to post Share on other sites
Share this post
Link to post
Share on other sites