Jump to content

Fizo

Members
  • Posts

    912
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Fizo

  1. Wrong Compile ! or problem from Pack ! try to Compile again
  2. Custom Bonus Enchant on Armor { Hi5 } Hello MxC this is my first Share here at java code's so dont flame and etc ! The Normal Enchant Bonus on armor's when the armor goes to +6 plus u can do at +12 or +16 or both This is for the Last rev on L2JServer H5 Here's the Code : ### Eclipse Workspace Patch 1.0 #P L2J_Server Index: java/com/l2jserver/gameserver/datatables/ArmorSetsData.java =================================================================== --- java/com/l2jserver/gameserver/datatables/ArmorSetsData.java (revision 5685) +++ java/com/l2jserver/gameserver/datatables/ArmorSetsData.java (working copy) @@ -119,6 +119,20 @@ set.addEnchant6Skill(new SkillHolder(skillId, skillLevel)); break; } + case "enchant12skill": + { + int skillId = parseInt(attrs, "id"); + int skillLevel = parseInt(attrs, "level"); + set.addEnchant12Skill(new SkillHolder(skillId, skillLevel)); + break; + } + case "enchant16skill": + { + int skillId = parseInt(attrs, "id"); + int skillLevel = parseInt(attrs, "level"); + set.addEnchant12Skill(new SkillHolder(skillId, skillLevel)); + break; + } case "con": { set.addCon(parseInt(attrs, "val")); Index: java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java =================================================================== --- java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java (revision 5685) +++ java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java (working copy) @@ -570,6 +570,34 @@ _log.warning("Inventory.ArmorSetListener: Incorrect skill: " + holder + "."); } } + + if (armorSet.isEnchanted12(player)) // has all parts of set enchanted to 12 or more + { + for (SkillHolder holder : armorSet.getEnchant12skillId()) + { + if (holder.getSkill() != null) + { + player.addSkill(holder.getSkill(), false); + update = true; + } + else + _log.warning("Inventory.ArmorSetListener: Incorrect skill: " + holder + "."); + } + } + + if (armorSet.isEnchanted16(player)) // has all parts of set enchanted to 6 or more + { + for (SkillHolder holder : armorSet.getEnchant16skillId()) + { + if (holder.getSkill() != null) + { + player.addSkill(holder.getSkill(), false); + update = true; + } + else + _log.warning("Inventory.ArmorSetListener: Incorrect skill: " + holder + "."); + } + } } } else if (armorSet.containShield(item.getItemId())) @@ -608,6 +636,8 @@ List<SkillHolder> skills = null; List<SkillHolder> shieldSkill = null; // shield skill List<SkillHolder> skillId6 = null; // enchant +6 skill + List<SkillHolder> skillId12 = null; // enchant +12 skill + List<SkillHolder> skillId16 = null; // enchant +16 skill if (slot == PAPERDOLL_CHEST) { @@ -620,6 +650,8 @@ skills = armorSet.getSkills(); shieldSkill = armorSet.getShieldSkillId(); skillId6 = armorSet.getEnchant6skillId(); + skillId12 = armorSet.getEnchant12skillId(); + skillId16 = armorSet.getEnchant16skillId(); } else { @@ -637,6 +669,8 @@ skills = armorSet.getSkills(); shieldSkill = armorSet.getShieldSkillId(); skillId6 = armorSet.getEnchant6skillId(); + skillId12 = armorSet.getEnchant12skillId(); + skillId16 = armorSet.getEnchant16skillId(); } else if (armorSet.containShield(item.getItemId())) // removed shield { @@ -683,6 +717,30 @@ } } + if (skillId12 != null) + { + for (SkillHolder holder : skillId12) + { + itemSkill = holder.getSkill(); + if (itemSkill != null) + player.removeSkill(itemSkill, false, itemSkill.isPassive()); + else + _log.warning("Inventory.ArmorSetListener: Incorrect skill: " + holder + "."); + } + } + + if (skillId16 != null) + { + for (SkillHolder holder : skillId16) + { + itemSkill = holder.getSkill(); + if (itemSkill != null) + player.removeSkill(itemSkill, false, itemSkill.isPassive()); + else + _log.warning("Inventory.ArmorSetListener: Incorrect skill: " + holder + "."); + } + } + player.checkItemRestriction(); player.sendSkillList(); } Index: java/com/l2jserver/gameserver/model/L2ArmorSet.java =================================================================== --- java/com/l2jserver/gameserver/model/L2ArmorSet.java (revision 5685) +++ java/com/l2jserver/gameserver/model/L2ArmorSet.java (working copy) @@ -37,6 +37,8 @@ private final List<SkillHolder> _skills; private final List<SkillHolder> _shieldSkills; private final List<SkillHolder> _enchant6Skill; + private final List<SkillHolder> _enchant12Skill; + private final List<SkillHolder> _enchant16Skill; private int _con; private int _dex; @@ -56,6 +58,8 @@ _skills = new ArrayList<>(); _shieldSkills = new ArrayList<>(); _enchant6Skill = new ArrayList<>(); + _enchant12Skill = new ArrayList<>(); + _enchant16Skill = new ArrayList<>(); } public void addChest(int id) @@ -102,6 +106,16 @@ { _enchant6Skill.add(holder); } + + public void addEnchant12Skill(SkillHolder holder) + { + _enchant12Skill.add(holder); + } + + public void addEnchant16Skill(SkillHolder holder) + { + _enchant16Skill.add(holder); + } public void addCon(int val) { @@ -237,6 +251,16 @@ return _enchant6Skill; } + public List<SkillHolder> getEnchant12skillId() + { + return _enchant12Skill; + } + + public List<SkillHolder> getEnchant16skillId() + { + return _enchant16Skill; + } + /** * @param player * @return true if all parts of set are enchanted to +6 or more @@ -269,6 +293,60 @@ return true; } + public boolean isEnchanted12(L2PcInstance player) + { + // Player don't have full set + if (!containAll(player)) + return false; + + Inventory inv = player.getInventory(); + + L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST); + L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS); + L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD); + L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES); + L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET); + + if (chestItem == null || chestItem.getEnchantLevel() < 12) + return false; + if (!_legs.isEmpty() && (legsItem == null || legsItem.getEnchantLevel() < 12)) + return false; + if (!_gloves.isEmpty() && (glovesItem == null || glovesItem.getEnchantLevel() < 12)) + return false; + if (!_head.isEmpty() && (headItem == null || headItem.getEnchantLevel() < 12)) + return false; + if (!_feet.isEmpty() && (feetItem == null || feetItem.getEnchantLevel() < 12)) + return false; + + return true; + } + public boolean isEnchanted16(L2PcInstance player) + { + // Player don't have full set + if (!containAll(player)) + return false; + + Inventory inv = player.getInventory(); + + L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST); + L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS); + L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD); + L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES); + L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET); + + if (chestItem == null || chestItem.getEnchantLevel() < 16) + return false; + if (!_legs.isEmpty() && (legsItem == null || legsItem.getEnchantLevel() < 16)) + return false; + if (!_gloves.isEmpty() && (glovesItem == null || glovesItem.getEnchantLevel() < 16)) + return false; + if (!_head.isEmpty() && (headItem == null || headItem.getEnchantLevel() < 16)) + return false; + if (!_feet.isEmpty() && (feetItem == null || feetItem.getEnchantLevel() < 16)) + return false; + + return true; + } public int getCON() { return _con; Also U need to Add this Line's On armorSets.xsd <xs:element name="enchant6skill" maxOccurs="1" minOccurs="0"> <xs:complexType> <xs:attribute name="id" type="xs:positiveInteger" use="required" /> <xs:attribute name="level" type="xs:positiveInteger" use="required" /> </xs:complexType> </xs:element> + <xs:element name="enchant12skill" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:attribute name="id" type="xs:positiveInteger" use="required" /> + <xs:attribute name="level" type="xs:positiveInteger" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="enchant16skill" maxOccurs="1" minOccurs="0"> + <xs:complexType> + <xs:attribute name="id" type="xs:positiveInteger" use="required" /> + <xs:attribute name="level" type="xs:positiveInteger" use="required" /> + </xs:complexType> + </xs:element> It's easy to add a skill Just found the Armorset folder open your armor file ( like s84_elegia.xml ) and then add ur skill like <enchant12skill id="8461" level="1" /> <!-- Enchant Heavy Armor (S Grade) --> For Armor Set's at +12 <enchant16skill id="8461" level="1" /> <!-- Enchant Heavy Armor (S Grade) --> For Armor Set's at +16 Like :
  3. try to adapt the code from l2jserver h5 version ! Also u have already found solution http://trac.l2jserver.com/changeset/4917 http://trac.l2jdp.com/changeset/8369
  4. if i am right with that u vote for the best player ?
  5. This is how one good MxC member wanna help other's ! Thanks again and again ! <3
  6. it is possible to add some1 one guide how to connect the database with Site ?
  7. i have one error ! on game side ! i use your method for Hi5 Server L2J - Server and all works Perfect on Eclipse and when i create one NPC at game i cant see NPC Name and normal Player Can Target them ! i change npc id cause 70012 it's too high for normal NPC and of course i am using Custom Table's and nothing :S
  8. Thats a crazy share ! i think a lot of ppl looking for that !!!! Panel With Donate voting and etC ! Crazy Crazy Crazy !
  9. thats works on latest stable version of L2J Server?
  10. i will try it right now and i will leave feedback soon ! btw great share !
  11. Thanks for Share Great Work and also it's So Easy to edit this !! Also if u want to add the code try this !!! It's easier Server\game\data\stats\initialEquipment.xml Find this File and then Open It ! Then u will see something Like that ! And how add an Item ? Easy!
  12. Nice Mod ! great works for me i am Using the Last Rev Of L2JServer not the Beta the other ! +1 keep working !
  13. Nop ! :) Some1 Can Lock i :P
  14. Are u sure the Patch from MySQL is right ? like set mysqlBinPath=%ProgramFiles%\MySQL\MySQL Server 5.1\bin or at your current MySQL Version ? :/ Or Try to Install them Again and be sure u add right the database , password and user name at Installer
  15. It's Easy !! First go to Server\game\data\skillTrees\forgottenSkillTree.xml Open this File " forgottenSkillTree " And u will see Forgotten Skill Per Class All u must need to do is Search for ur class thats u want to add a skill ! Example. ! This Is Skill's for Phoenix Knight Class if u want to add One skill u must do this Search for ur Forgootten Skill Learn Skill ID , Name and Level and then add this after the last one Like u want to add Flame Hawk u do this Save the file and u are done
  16. Hellp MxC ! i have one problem with L2JServer Pack ( i am using source's ) and i ask for help at l2jserver forum but nothing ! so i decide to ask help here too I am using the latest Rev from L2JServer Pack .. Also i Enable the Option Auto Learn Skill's and Forgotten too and when i create a char and char start instance 85 lvl and complete class change skill's learn but not at full of the level Example ! I make Adventurer 3 class dagger 85 lvl ! and Light Armor Mastery Skill is 21 lvl max skill of this class is 47 if i remember well ! i need to make 4-5 Restart's ! to take full of skills lvl if anyone know how can i fix this please post it !!! Thanks for your time !
  17. An proseksis sto Client ta Misa macro's Gemizoun dld ta 24 opote ta ypolipa 24 menoun kena ! Kai apo emena thanks gt einai xrisimo se server me aio's ! gia lista me macro's
  18. +1 From me test it and works perfect ! Thanks
  19. Something wrong ! :/ i cant run it ! with compiled version or with svn version ! :S
  20. i will try it right now ! also virus scan ? :/
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock