InFocus
Members-
Posts
306 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by InFocus
-
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
anyone can help me? -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
Why it is so complicated to explain me how i can add 1 more option? i don't must edit half server in java. i try to add changes in EnchantItemOptionsData.java but no work. Where somewhere else i must edit? -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
I try, no work :/ here it is all code /* * Copyright (C) 2004-2015 L2J Server * * This file is part of L2J Server. * * L2J Server is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jserver.gameserver.data.xml.impl; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import org.w3c.dom.Document; import org.w3c.dom.Node; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.model.options.EnchantOptions; import com.l2jserver.gameserver.util.Util; import com.l2jserver.util.data.xml.IXmlReader; /** * @author UnAfraid */ public class EnchantItemOptionsData implements IXmlReader { private final Map<Integer, Map<Integer, EnchantOptions>> _data = new HashMap<>(); protected EnchantItemOptionsData() { load(); } @Override public synchronized void load() { _data.clear(); parseDatapackFile("data/enchantItemOptions.xml"); } @Override public void parseDocument(Document doc) { int counter = 0; for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) { if ("list".equalsIgnoreCase(n.getNodeName())) { for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) { if ("item".equalsIgnoreCase(d.getNodeName())) { int itemId = parseInteger(d.getAttributes(), "id"); if (!_data.containsKey(itemId)) { _data.put(itemId, new HashMap<Integer, EnchantOptions>()); } for (Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling()) { if ("options".equalsIgnoreCase(cd.getNodeName())) { final EnchantOptions op = new EnchantOptions(parseInteger(cd.getAttributes(), "level")); _data.get(itemId).put(op.getLevel(), op); for (byte i = 0; i < 4; i++) { final Node att = cd.getAttributes().getNamedItem("option" + (i + 1)); if ((att != null) && Util.isDigit(att.getNodeValue())) { op.setOption(i, parseInteger(att)); } } counter++; } } } } } } LOGGER.log(Level.INFO, getClass().getSimpleName() + ": Loaded: " + _data.size() + " Items and " + counter + " Options."); } /** * @param itemId * @param enchantLevel * @return enchant effects information. */ public EnchantOptions getOptions(int itemId, int enchantLevel) { if (!_data.containsKey(itemId) || !_data.get(itemId).containsKey(enchantLevel)) { return null; } return _data.get(itemId).get(enchantLevel); } /** * @param item * @return enchant effects information. */ public EnchantOptions getOptions(L2ItemInstance item) { return item != null ? getOptions(item.getId(), item.getEnchantLevel()) : null; } /** * Gets the single instance of EnchantOptionsData. * @return single instance of EnchantOptionsData */ public static final EnchantItemOptionsData getInstance() { return SingletonHolder._instance; } private static class SingletonHolder { protected static final EnchantItemOptionsData _instance = new EnchantItemOptionsData(); } } -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
i think, here is public void parseDocument(Document doc) { int counter = 0; for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) { if ("list".equalsIgnoreCase(n.getNodeName())) { for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) { if ("item".equalsIgnoreCase(d.getNodeName())) { int itemId = parseInteger(d.getAttributes(), "id"); if (!_data.containsKey(itemId)) { _data.put(itemId, new HashMap<Integer, EnchantOptions>()); } for (Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling()) { if ("options".equalsIgnoreCase(cd.getNodeName())) { final EnchantOptions op = new EnchantOptions(parseInteger(cd.getAttributes(), "level")); _data.get(itemId).put(op.getLevel(), op); for (byte i = 0; i < 3; i++) { final Node att = cd.getAttributes().getNamedItem("option" + (i + 1)); if ((att != null) && Util.isDigit(att.getNodeValue())) { op.setOption(i, parseInteger(att)); } } counter++; } } } } } } LOGGER.log(Level.INFO, getClass().getSimpleName() + ": Loaded: " + _data.size() + " Items and " + counter + " Options."); } -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
I don't create new file, i get few options from exist options. But no wrk last option -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="list"> <xs:complexType> <xs:sequence maxOccurs="1" minOccurs="1"> <xs:element name="item" maxOccurs="unbounded" minOccurs="1"> <xs:complexType> <xs:sequence maxOccurs="1" minOccurs="1"> <xs:element name="options" maxOccurs="51" minOccurs="1"> <xs:complexType> <xs:attribute name="level" use="required"> <xs:simpleType> <xs:restriction base="xs:nonNegativeInteger"> <xs:minInclusive value="0" /> <xs:maxInclusive value="50" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="option1" use="required"> <xs:simpleType> <xs:restriction base="xs:positiveInteger"> <xs:minInclusive value="1" /> <xs:maxInclusive value="65535" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="option2"> <xs:simpleType> <xs:restriction base="xs:positiveInteger"> <xs:minInclusive value="1" /> <xs:maxInclusive value="65535" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="option3"> <xs:simpleType> <xs:restriction base="xs:positiveInteger"> <xs:minInclusive value="1" /> <xs:maxInclusive value="65535" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="option4"> <xs:simpleType> <xs:restriction base="xs:positiveInteger"> <xs:minInclusive value="1" /> <xs:maxInclusive value="65535" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" use="required"> <xs:simpleType> <xs:restriction base="xs:positiveInteger"> <xs:minInclusive value="1" /> <xs:maxInclusive value="65535" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
Option 1: <option id="24921" name="o_july_shirt_stat_23"> <!-- INT +5. STR +5. CON +5. MEN +5. --> <for> <add stat="STR" val="5" /> <add stat="INT" val="5" /> <add stat="CON" val="5" /> <add stat="DEX" val="5" /> </for> </option> Option 2: <option id="24958" name="o_s_76_85_opt_earring_drop_up4"> <!-- Passive: Item drop rate increases by 40%. --> <passive_skill id="8416" level="4" /> <!-- Earring Ability - Drop Rate Up --> </option> Option 3: <option id="24691" name="o_s_84_2u_47"> <!-- Passive: Increases the rate of critical attacks. --> <passive_skill id="3249" level="10" /> <!-- Item Skill: Focus --> </option> Option 4: <option id="24641" name="o_s_84_2r_104"> <!-- Passive: Increases one's own P. Atk. --> <passive_skill id="3240" level="10" /> <!-- Item Skill: Might --> </option> -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
So, for level +15 i put 4 options, and i get just 3, ( I edit enchantItemOptions.xsd, i edit max enchant item to +15) -
Help EnchantItemOptions.xml
InFocus replied to InFocus's question in Request Server Development Help [L2J]
Ok, i make all steps how u say, but i get on item just 3 options. <item id="21580"> <!-- Olf's T-shirt --> <options level="0" option1="24963" /> <options level="1" option1="24907" /> <options level="2" option1="24908" /> <options level="3" option1="24909" /> <options level="4" option1="24910" /> <options level="5" option1="24911" /> <options level="6" option1="24912" /> <options level="7" option1="24913" option2="24950" /> <options level="8" option1="24914" option2="24951" /> <options level="9" option1="24915" option2="24952" /> <options level="10" option1="24916" option2="24953" /> <options level="11" option1="24917" option2="24953" /> <options level="12" option1="24918" option2="24953" /> <options level="13" option1="24919" option2="24953" option3="24612" /> <options level="14" option1="24920" option2="24954" option3="24613" /> <options level="15" option1="24921" option2="24958" option3="24613" option4="24641" /> </item> and in game -
Know somebody a premium/donate system for l2jserver (high five)? i really want a good share from MxC or another site. Thank you
-
Can explain me how i can add more options in EnchantItemOptions,xml? Now it is max 3 options: <options level="1" option1="xxxx" option2="xxxx" option3="xxxx" /> Thank you
-
Morning everyone! who can tell me where and how i can enchant olf t-shirt to more then +10 and add more STR/CON/DEX...etc on each level of enchant? i search in Item/Skill but i do not find something. Thanks
-
Solved!!
-
i understand something, but i am confuse SweeTs, i can set 1 -> 0 from armor grp? or from server side in xml.
-
Look and exemple XML: <item id="485" type="EtcItem" name="Tatoo of Strenght"> <set name="etcitem_type" val="RUNE" /> <set name="immediate_effect" val="true" /> <set name="material" val="PAPER" /> <set name="weight" val="120" /> <set name="is_tradable" val="true" /> <set name="is_dropable" val="true" /> <set name="is_sellable" val="true" /> <set name="handler" val="ItemSkills" /> <set name="item_skill" val="27000-1" /> </item> So where it is Crystal_type? Picture with grade item (EtcItem) as in syntax from top and 1 485 0 3 2 5 0 dropitems.drop_sack_m00 dropitemstex.drop_sack_t00 0 0 0 0 0 1 0 0 icon.weapon_voodoo_doll_i00 -1 4200 38 0 0 0 1 21 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 1 0 255 1 1 1 0 0 LineageEffect.p_u002_a 4 MonSound.Hit_normal_3 MonSound.Hit_normal_12 MonSound.Hit_wood_1 MonSound.Hit_Shell_1 ItemSound.itemdrop_sack ItemSou armor.grp ( i move in etc item but first i want to change grade)
-
Hi all, How i can change for exemple one item from D grade to No Grade?
-
Can someone explain me something? It's 5.30 in base mul 230%? and 5.60 =260%? i get stats from
-
Help Item skill passive
InFocus replied to InFocus's question in Request Server Development Help [L2J]
And the Skill, What OperateType i need to put skill passive? -
Hi all, Today i edit a bit Tattoos, and i want to make it nice. I try to edit tattoos to keep in inventory (Without Equip) and get passive skill. I add Skill. This is XML from Tattoo <item id="486" type="Armor" name="Tattoo of Fire"> <set name="icon" val="icon.weapon_voodoo_doll_i00" /> <set name="default_action" val="EQUIP" /> <set name="armor_type" val="LIGHT" /> <set name="bodypart" val="chest" /> <set name="immediate_effect" val="true" /> <set name="crystal_count" val="276" /> <set name="crystal_type" val="D" /> <set name="material" val="DYESTUFF" /> <set name="weight" val="4050" /> <set name="price" val="117000" /> <set name="enchant_enabled" val="1" /> <for> <add order="0" stat="pDef" val="73" /> <enchant stat="pDef" val="0" /> </for> </item> and this is Skill XML <skill id="27000" levels="1" name="Tattoo Of Strenght Passive"> <table name="#maxHp">2.00 </table> <table name="#maxMp">2.00 </table> <table name="#cAtk">2.00 </table> <table name="#rCrit">2.00 </table> <table name="#pvpPhysDmg">2.00 </table> <table name="#pvpPhysDef">2.00 </table> <set name="icon" val="icon.weapon_voodoo_doll_i00" /> <set name="operateType" val="P" /> <set name="targetType" val="SELF" /> <for> <effect name="Buff"> <mul stat="pAtk" val="#maxHp"/> <mul stat="mAtk" val="#maxMp"/> <mul stat="pDef" val="#cAtk"/> <mul stat="mDef" val="#rCrit"/> <mul stat="pvpPhysDmg" val="#pvpPhysDmg"/> <mul stat="pvpPhysDef" val="#pvpPhysDef"/> </effect> </for> </skill> Now, How i can edit Items To have effect from skill and to have skill at passive? Can help me someone?
-
Solved, Can close topic
-
I have a problem. Why all skills have time effect like second when it is setted in minutes/hours? And how i can fix this?
-
<set name="abnormalTime" val="3600"/> this skill time (Buff time = how much durring one buff. That i want to say)
-
It is possible to add more times in 1 single skill? for exemple 30 min / 1 h / 2 h/ etc etc?
