Hi to everyone. i'm making this thread to find any help
Im new on the world of l2 servers, im using free source of acis (rev 382) and cannot ad this code to my project
/*
* This program 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.
*
* This program 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 net.sf.l2j.gameserver.data.xml;import java.io.File;import java.util.HashMap;import java.util.Map;import java.util.logging.Logger;import net.sf.l2j.gameserver.enums.items.CrystalType;import net.sf.l2j.gameserver.model.L2EnchantScroll;import net.sf.l2j.gameserver.model.item.instance.ItemInstance;import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory;import org.w3c.dom.Document;import org.w3c.dom.NamedNodeMap;import org.w3c.dom.Node;/**
* @author Thug
*
*/publicclassEnchantData{privatestaticLogger _log =Logger.getLogger(EnchantData.class.getName());privatestatic final Map<Integer, L2EnchantScroll> _map =newHashMap<>();publicstaticEnchantData getInstance(){returnSingletonHolder._instance;}protectedEnchantData(){try{File f =newFile("./data/xml/enchants.xml");Document doc =XMLDocumentFactory.getInstance().loadDocument(f);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("enchant".equalsIgnoreCase(d.getNodeName())){NamedNodeMap attrs = d.getAttributes();int id =Integer.valueOf(attrs.getNamedItem("id").getNodeValue());
byte grade =Byte.valueOf(attrs.getNamedItem("grade").getNodeValue());
boolean weapon =Boolean.valueOf(attrs.getNamedItem("weapon").getNodeValue());
boolean breaks =Boolean.valueOf(attrs.getNamedItem("break").getNodeValue());
boolean maintain =Boolean.valueOf(attrs.getNamedItem("maintain").getNodeValue());String[]list= attrs.getNamedItem("chance").getNodeValue().split(";");
byte[] chance =new byte[list.length];for(int i =0; i <list.length; i++)
chance[i]=Byte.valueOf(list[i]);CrystalType grade_test =CrystalType.NONE;switch(grade){case1:
grade_test =CrystalType.D;break;case2:
grade_test =CrystalType.C;break;case3:
grade_test =CrystalType.B;break;case4:
grade_test =CrystalType.A;break;case5:
grade_test =CrystalType.S;break;}
_map.put(id,new L2EnchantScroll(grade_test, weapon, breaks, maintain, chance));}}}}
_log.info("EnchantTable: Loaded "+ _map.size()+" enchants.");}catch(Exception e){
_log.warning("EnchantTable: Error while loading enchant table: "+ e);}}public L2EnchantScroll getEnchantScroll(ItemInstance item){return _map.get(item.getItemId());}privatestaticclassSingletonHolder{protectedstatic final EnchantData _instance =newEnchantData();}}
🤖 Old Telegram bots with 2024 year old
⭐️ Good for search optimization TG
⭐️ Bots without subscribers
⭐️ Bots clean, no bans, blocking and complaints
💵 Price list:
From 3 bots - 3$ for 1pc.
From 20 bots - 2.5$ for 1pc.
From 60 bots - 2.3$ for 1pc.
From 100 bots - 2.2$ for 1pc.
From 400 bots - 1.9$ for 1pc.
📌 To contact Us - t.me/smmtg6
⚡️ Fast SEO optimization in Telegram for your channel/chat/bot. TOP OF SEARCH TG🔝
✨ Effective solution for your business or blog.
🔥 Fast results within few days.
➡️ Contact us on Telegram for more details - t.me/smmtg6
🤖⭐️ TELEGRAM PREMIUM BOT START:
1201ID - Ukraine 🇺🇦 + MIX | 7 Days Premium 🤖 - 3.4$ per 1000
1198 ID - Israel 🇮🇱 + Uzbekistan 🇺🇿 | Mix Days Premium 🤖 - 3.5$ per 1000
574 ID - Uzbekistan 🇺🇿 + Russia 🇷🇺 20% | 30-90 Days Premium 🤖 - 3.8$ per 1000
1210 ID - Ukraine 🇺🇦 + MIX | 7-30 Days Premium 🤖 | 4$ per 1000
1203 ID - Uzbekistan 🇺🇿 + MIX | 20-30 Days Premium 🤖 | 4$ per 1000
1195 ID - USA 🇺🇸 + Ukraine🇺🇦 + Canada 🇨🇦 | 15 Days Premium🤖 | 4.3$ per 1000
1213 ID - Uzbekistan 🇺🇿 + USA 🇺🇸 + Canada 🇨🇦 | 30 Days Premium 🤖 | 4.4$ per 1000
1202 ID - Uzbekistan 🇺🇿 + MIX | 30 Days Premium 🤖 | 4.4$ per 1000
752 ID - USA 🇺🇸 + China 🇨🇳 + Canada 🇨🇦 | 30 Days Premium 🤖 | 5.4$ per 1000
756 ID - Uzbekistan 🇺🇿 + Israel 🇮🇱 + Austria 🇦🇹 | 14-30 Days Premium 🤖 | 5.6$ per 1000
758 ID - Canada 🇨🇦 + USA 🇺🇸 + Turkey 🇹🇷 | 30 Days Premium 🤖 | 5.6$ per 1000
755 ID - Turkey 🇹🇷 + Egypt 🇪🇬 | 30-90 Days Premium 🤖 | 6$ per 1000
374 ID - Russia 🇷🇺 + USA 🇺🇸 + Canada 🇨🇦 | Mix Days Premium 🤖 | 6.8$ per 1000
741 ID - Ukraine 🇺🇦 + USA 🇺🇸 + Canada 🇨🇦 | 15-30 Days Premium 🤖 | 6.8$ per 1000
575 ID - USA 🇺🇸 + Russia 🇷🇺 + Canada 🇨🇦 | Mix Days Premium 🤖 | 7.2$ per 1000
372 ID - USA 🇺🇸 + Canada 🇨🇦 + Russia 🇷🇺 + EU 🇪🇺 | Mix Days Premium | 7.5$ per 1000
1204 ID - Ukraine 🇺🇦 + MIX | 60-90 Days Premium | 7.6$ per 1000
Question
lyrien
Hi to everyone. i'm making this thread to find any help
Im new on the world of l2 servers, im using free source of acis (rev 382) and cannot ad this code to my project
i have errors in the lines:
i will be so grateful if someone could help me
6 answers to this question
Recommended Posts