Sanity 435 Posted September 28, 2017 Report Share Posted September 28, 2017 I decided not to add degrading armours so basically it's dead code I made a while back. If you wan't to use it enjoy. CombatFactory: Find: /** PHOENIX NECK **/ Add all this above that line. /** DHAROKS DEGRADE START BY JAKE **/ /** DHAROKS HELM **/ else if(t2.getEquipment().getItems()[Equipment.HEAD_SLOT].getId() == 4716) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_HELM); } /** DHAROKS HELM 100 **/ else if(t2.getEquipment().getItems()[Equipment.HEAD_SLOT].getId() == 4880) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_HELM_100); } /** DHAROKS HELM 75 **/ else if(t2.getEquipment().getItems()[Equipment.HEAD_SLOT].getId() == 4881) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_HELM_75); } /** DHAROKS HELM 50 **/ else if(t2.getEquipment().getItems()[Equipment.HEAD_SLOT].getId() == 4882) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_HELM_50); } /** DHAROKS HELM 25 **/ else if(t2.getEquipment().getItems()[Equipment.HEAD_SLOT].getId() == 4883) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_HELM_25); } /** DHAROKS PLATE **/ else if(t2.getEquipment().getItems()[Equipment.BODY_SLOT].getId() == 4720) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_BODY); } /** DHAROKS PLATE 100 **/ else if(t2.getEquipment().getItems()[Equipment.BODY_SLOT].getId() == 4892) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_BODY_100); } /** DHAROKS PLATE 75 **/ else if(t2.getEquipment().getItems()[Equipment.BODY_SLOT].getId() == 4893) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_BODY_75); } /** DHAROKS PLATE 50 **/ else if(t2.getEquipment().getItems()[Equipment.BODY_SLOT].getId() == 4894) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_BODY_50); } /** DHAROKS PLATE 25 **/ else if(t2.getEquipment().getItems()[Equipment.BODY_SLOT].getId() == 4895) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_BODY_25); } /** DHAROKS LEGS **/ else if(t2.getEquipment().getItems()[Equipment.LEG_SLOT].getId() == 4722) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_LEGS); } /** DHAROKS LEGS 100 **/ else if(t2.getEquipment().getItems()[Equipment.LEG_SLOT].getId() == 4898) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_LEGS_100); } /** DHAROKS LEGES 75 **/ else if(t2.getEquipment().getItems()[Equipment.LEG_SLOT].getId() == 4899) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_LEGS_75); } /** DHAROKS LEGS 50 **/ else if(t2.getEquipment().getItems()[Equipment.LEG_SLOT].getId() == 4900) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_LEGS_50); } /** DHAROKS LEGS 25 **/ else if(t2.getEquipment().getItems()[Equipment.LEG_SLOT].getId() == 4901) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_LEGS_25); } /** DHAROKS AXE **/ else if(t2.getEquipment().getItems()[Equipment.WEAPON_SLOT].getId() == 4718) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE); } /** DHAROKS AXE 100 **/ else if(t2.getEquipment().getItems()[Equipment.WEAPON_SLOT].getId() == 4886) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE_100); } /** DHAROKS AXE 75 **/ else if(t2.getEquipment().getItems()[Equipment.WEAPON_SLOT].getId() == 4887) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE_75); } /** DHAROKS AXE 50 **/ else if(t2.getEquipment().getItems()[Equipment.WEAPON_SLOT].getId() == 4888) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE_50); } /** DHAROKS AXE 25 **/ else if(t2.getEquipment().getItems()[Equipment.WEAPON_SLOT].getId() == 4889) { int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE_25); } /** DHAROKS END BY JAKE **/ DegradingItem: (Under Ring of Wealth) //Dharoks By Jake DHAROKS_HELM(4716, 4880, Equipment.HEAD_SLOT, 20), DHAROKS_HELM_100(4880, 4881, Equipment.HEAD_SLOT, 20), DHAROKS_HELM_75(4881, 4882, Equipment.HEAD_SLOT, 20), DHAROKS_HELM_50(4882, 4883, Equipment.HEAD_SLOT, 20), DHAROKS_HELM_25(4883, 0, Equipment.HEAD_SLOT, 20), DHAROKS_BODY(4720, 4892, Equipment.BODY_SLOT, 20), DHAROKS_BODY_100(4892, 4893, Equipment.BODY_SLOT, 20), DHAROKS_BODY_75(4893, 4894, Equipment.BODY_SLOT, 20), DHAROKS_BODY_50(4894, 4895, Equipment.BODY_SLOT, 20), DHAROKS_BODY_25(4895, 0, Equipment.BODY_SLOT, 20), DHAROKS_LEGS(4722, 4898, Equipment.LEG_SLOT, 20), DHAROKS_LEGS_100(4898, 4899, Equipment.LEG_SLOT, 20), DHAROKS_LEGS_75(4899, 4900, Equipment.LEG_SLOT, 20), DHAROKS_LEGS_50(4900, 4901, Equipment.LEG_SLOT, 20), DHAROKS_LEGS_25(4901, 0, Equipment.LEG_SLOT, 20), DHAROKS_AXE(4718, 4886, Equipment.WEAPON_SLOT, 20), DHAROKS_AXE_100(4886, 4887, Equipment.WEAPON_SLOT, 20), DHAROKS_AXE_75(4887, 4888, Equipment.WEAPON_SLOT, 20), DHAROKS_AXE_50(4888, 4889, Equipment.WEAPON_SLOT, 20), DHAROKS_AXE_25(4889, 0, Equipment.WEAPON_SLOT, 20), 1 Link to comment Share on other sites More sharing options...
Baller pk10 0 Posted January 15, 2020 Report Share Posted January 15, 2020 thanks for the help. ill give this a try Link to comment Share on other sites More sharing options...
dung120 0 Posted March 31, 2020 Report Share Posted March 31, 2020 Thanks for releasing this, will use this! Link to comment Share on other sites More sharing options...
Artur 0 Posted April 6, 2020 Report Share Posted April 6, 2020 Thank you for the release! very helpful Link to comment Share on other sites More sharing options...
khalilrs 0 Posted April 6, 2020 Report Share Posted April 6, 2020 thanks for release. added to ruse bookmarks. But what project are you on now? did everyone leave ruse? Link to comment Share on other sites More sharing options...
bowlcutgod 16 Posted May 6, 2020 Report Share Posted May 6, 2020 weejo a zahbe dit is omin hard nek je die Link to comment Share on other sites More sharing options...
ryuesu 2 Posted May 7, 2020 Report Share Posted May 7, 2020 Thanks will use this, nice contribution Link to comment Share on other sites More sharing options...
SpiritOfTheLau 0 Posted May 9, 2020 Report Share Posted May 9, 2020 This is a good attempt. I have a couple of ideas for improvement int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) { recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE_25); } This is all reused code. You might consider turning this into a method and calling it for each case statement so that if you ever make changes to this code, you only need to do it in one place. For this to be possible, you'd need to dynamically map the broken barrows pieces together. You could do this in an enum which can dynamically handle changing the item ID in another method so that you don't have to explicitly hardcode it in these case statements. Link to comment Share on other sites More sharing options...
Sparry 0 Posted May 10, 2023 Report Share Posted May 10, 2023 Cool! Link to comment Share on other sites More sharing options...
umix 0 Posted June 11, 2023 Report Share Posted June 11, 2023 Its cool to see how you set this code up. Thanks for sharing. 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