Jump to content

Search the Community

Showing results for tags 'code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Lineage II Server Packs [Java]
  • Lineage II Server Packs [PTS]
  • Lineage II Server Scripts
  • Lineage II Client Scripts
  • Lineage II Items & Chars
  • Website Templates

Forums

  • General Zone
    • Announcements and News
    • Newbies Introduce Urself
    • Maxcheaters Competitions & Events
    • Votes/Polls Area
    • Report Section
    • Downloads Section
  • Lineage II General Section
    • General Discussion [English]
    • Request Support [English]
  • Lineage II Hacks,Cheats and Bots
    • Hacks & Cheats [English]
    • Request Hacks & Cheats [English]
    • Botting [English]
    • Request Botting [English]
  • Lineage II Private Servers
    • Buy Advertising Link #1
    • Private Servers
    • Buy Advertising Link #2
    • [Previews] L2 Private Servers
    • Clans and Alliances
  • Lineage II Marketplace
    • Marketplace [Items & Chars]
    • Marketplace [L2Packs & Files]
    • Marketplace [Powerlvl & Support]
  • Lineage II OFF Server Development
    • Server Development Discussion [L2OFF]
    • Request Server Development Help [L2OFF]
    • Server Shares & Files [L2OFF]
  • Lineage II Java Server Development
    • Server Development Discussion [L2J]
    • Request Server Development Help [L2J]
    • Server Shares & Files [L2J]
    • Private Projects [L2J]
  • Lineage II Client Development
    • Client Development Discussion
  • MMO Games
    • League of Legends
    • World Of Warcraft Area
    • Other Multiplayer Games
  • General Section
    • General Marketplace
    • Consoles/Mobiles/PDA Gaming Zone
    • Webmasters Zone
    • Hacking/Coding Zone
  • Graphics/GFX Zone
    • Graphics/GFX General Discussion
    • Graphics/GFX Showcase
    • Graphics/GFX Resources/Tools
  • VIP/SVIP/Donators Zone
    • VIPs/Donators Discussion
    • VIPs Lineage II
    • VIPs [GFX] Zone
    • VIPs Download Area
  • MaxCheaters Corner
    • Tech/World News
    • Off-Topics
    • Spam Topics
  • TEST's Topics
  • L2Classic Club's Just trying this thing out
  • Lineage 2 Revolution Club's Discussions
  • Lineage 2 Revolution Club's Tutorials
  • Lineage 2 Revolution Club's Request Help

Product Groups

  • Paid Subscriptions
  • Advertisements

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 35 results

  1. Hello there.. Here is my buffer from my old server.. (Main html made by prwtoftw) What's inside? Mage | Fighter set [config] Buffs/Dance/Song/Extra etc one by one Special buffs + Malaria Vote buff [If you want it, you can enable it, config] Scheme Buffer Code Preview > [Hidden Content] Code/HTML/XML > [Hidden Content]
  2. one more smile code i make l2jroboto eflocrash code the fake players play pvp.. but the problem is for have all time pvp you need make a zone with respawn teleport like primeval isle i think you like it. enjoy com/elfocrash/roboto/ai/FakePlayerAI.java find this - protected void tryTargetRandomCreatureByTypeInRadius(Class<? extends Creature> creatureClass, int radius) - { - if(_fakePlayer.getTarget() == null) { - List<Creature> targets = _fakePlayer.getKnownTypeInRadius(creatureClass, radius).stream().filter(x->!x.isDead()).collect(Collectors.toList()); - if(!targets.isEmpty()) { - Creature target = targets.get(Rnd.get(0, targets.size() -1 )); - _fakePlayer.setTarget(target); - } - }else { - if(((Creature)_fakePlayer.getTarget()).isDead()) - _fakePlayer.setTarget(null); - } - } change wtih this + protected void tryTargetRandomCreatureByTypeInRadius(Class<? extends L2Character> creatureClass, int radius) + { + if (_fakePlayer.getTarget() == null) + { + if(_fakePlayer.isInsideZone(ZoneId.PEACE) || _fakePlayer.isInsideZone(ZoneId.TOWN)) + return; + + List<L2Character> targets = _fakePlayer.getKnownTypeInRadius(creatureClass, radius).stream().filter(x -> !x.isDead()).collect(Collectors.toList()); + if (!targets.isEmpty()) + { + L2Character target = targets.get(Rnd.get(0, targets.size() - 1)); + + if (_fakePlayer.getPvpFlag() == 0 && target.getActingPlayer().getPvpFlag() == 0 || _fakePlayer.getPvpFlag() != 0 && target.getActingPlayer().getPvpFlag() == 0 || _fakePlayer.getPvpFlag() == 0 && target.getActingPlayer().getPvpFlag() != 0 || _fakePlayer.getPvpFlag() != 0 && target.getActingPlayer().getPvpFlag() != 0) + _fakePlayer.setTarget(target); + + else if (_fakePlayer.getKarma() > 0 && target.getActingPlayer().getKarma() == 0 || _fakePlayer.getPvpFlag() == 0 && target.getActingPlayer().getKarma() > 0 || _fakePlayer.getPvpFlag() > 0 && target.getActingPlayer().getKarma() > 0) + _fakePlayer.setTarget(target); + + } + } + else + { + if (((L2Character) _fakePlayer.getTarget()).isDead()) + _fakePlayer.setTarget(null); + } + } and from all class name AI with name this *** public void thinkAndAct() *** find all this - tryTargetRandomCreatureByTypeInRadius(FakeHelpers.getTestTargetClass(), FakeHelpers.getTestTargetRange()); and change with this + if (_fakePlayer.getKnownTypeInRadius(FakePlayer.class, FakeHelpers.getTestTargetRange()) != null) + { + tryTargetRandomCreatureByTypeInRadius(FakeHelpers.getTargetPvPClass(), FakeHelpers.getTestTargetRange()); + } + + else if (_fakePlayer.getKnownTypeInRadius(Monster.class, FakeHelpers.getTestTargetRange()) != null) + { + tryTargetRandomCreatureByTypeInRadius(FakeHelpers.getTargetMobClass(), FakeHelpers.getTestTargetRange()); + } on FakeHelpers.java after this public static Class<? extends L2Character> getTargetMobClass() { return Monster.class; } put this + //target fakeplayers instance only... + public static Class<? extends L2Character> getTargetPvPClass() + { + return FakePlayer.class; + } if any have problem post error only... tnx.
  3. https://pastebin.com/epSa6FQw credits : Williams
  4. Hello i want to share this ingame balancer its for acis 372 its useless for me now. Files/Code: https://www101.zippyshare.com/v/nMPZpOej/file.html
  5. http://www.4shared.com/img/PnpeKHRNce/s25/157e7930310/image http://www.4shared.com/rar/WiimsNndba/antibot.html Download data files ACIS: ### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: java/net/sf/l2j/gameserver/datatables/AntiBotTable.java =================================================================== --- java/net/sf/l2j/gameserver/datatables/AntiBotTable.java (revision 0) +++ java/net/sf/l2j/gameserver/datatables/AntiBotTable.java (revision 0) @@ -0,0 +1,183 @@ +/* + * 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.datatables; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.logging.Level; +import java.util.logging.Logger; + +import net.sf.l2j.gameserver.ThreadPoolManager; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.network.serverpackets.PledgeImage; +import net.sf.l2j.util.Rnd; + +/** + * + * @author Fissban + * + */ +public class AntiBotTable +{ + public static Logger _log = Logger.getLogger(AntiBotTable.class.getName()); + + public static Map<Integer, antiBotData> _imageAntiBotOri = new HashMap<>(); + public static Map<Integer, antiBotData> _imageAntiBotClient = new HashMap<>(); + + public final static int[] img_antibot_id = + { + 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009 + }; + + public void loadImage() + { + LoadImgAntiBot(); + _log.log(Level.INFO, "loading " + _imageAntiBotOri.size() + " images of AntiBot"); + } + + private static void LoadImgAntiBot() + { + _imageAntiBotOri.clear(); + int cont = 0; + + for (int imgId : img_antibot_id) + { + File image = new File("data/images/antibot/" + imgId + ".dds"); + _imageAntiBotOri.put(cont, new antiBotData(cont, ConverterImgBytes(image))); + cont++; + } + + ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new startEncriptCaptcha(), 100, 600000); // 10 Minutes + } + + public void sendImage(L2PcInstance player, int imgId) + { + PledgeImage packet = null; + + if ((imgId >= 50000) && (imgId <= 800000)) + { + for (Entry<Integer, antiBotData> entrySet : _imageAntiBotClient.entrySet()) + { + antiBotData imgCoding = entrySet.getValue(); + + if (imgId == imgCoding.getCodificacion()) + { + packet = new PledgeImage(imgId, imgCoding.getImagen()); + } + } + } + + player.sendPacket(packet); + } + + public static class startEncriptCaptcha implements Runnable + { + public startEncriptCaptcha() + { + + } + + @Override + public void run() + { + _imageAntiBotClient.clear(); + + for (Entry<Integer, antiBotData> entrySet : _imageAntiBotOri.entrySet()) + { + entrySet.getValue().getImagen(); + _imageAntiBotClient.put(entrySet.getKey(), new antiBotData(Rnd.get(50000, 800000), entrySet.getValue().getImagen())); + } + } + } + + public int getAntiBotClientID(int pos) + { + int returnCoding = 0; + + for (Entry<Integer, antiBotData> entrySet : _imageAntiBotClient.entrySet()) + { + int numeroImage = entrySet.getKey().intValue(); + + if (pos == numeroImage) + { + antiBotData imgCoding = entrySet.getValue(); + returnCoding = imgCoding.getCodificacion(); + } + + if (pos > 9) + { + _log.log(Level.SEVERE, "error in getAntiBotClientID...number dont exist"); + } + } + return returnCoding; + } + + public static class antiBotData + { + int _codificacion; + byte[] _data; + + public antiBotData(int codificacion, byte[] data) + { + _codificacion = codificacion; + _data = data; + } + + public int getCodificacion() + { + return _codificacion; + } + + public byte[] getImagen() + { + return _data; + } + } + + private static byte[] ConverterImgBytes(File imagen) + { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + + byte[] buffer = new byte[1024]; + try (FileInputStream fis = new FileInputStream(imagen)) + { + for (int readNum; (readNum = fis.read(buffer)) != -1;) + { + bos.write(buffer, 0, readNum); + } + } + catch (IOException e) + { + _log.log(Level.SEVERE, "Error when converter image to byte[]"); + } + + return bos.toByteArray(); + } + + public static AntiBotTable getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final AntiBotTable _instance = new AntiBotTable(); + } +} Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 13) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -35,6 +35,7 @@ import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager; import net.sf.l2j.gameserver.datatables.AccessLevels; import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights; +import net.sf.l2j.gameserver.datatables.AntiBotTable; import net.sf.l2j.gameserver.datatables.ArmorSetsTable; import net.sf.l2j.gameserver.datatables.AugmentationData; import net.sf.l2j.gameserver.datatables.BookmarkTable; @@ -309,6 +310,8 @@ MovieMakerManager.getInstance(); + AntiBotTable.getInstance().loadImage(); + if (Config.DEADLOCK_DETECTOR) { _log.info("Deadlock detector is enabled. Timer: " + Config.DEADLOCK_CHECK_INTERVAL + "s."); Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 13) +++ java/net/sf/l2j/Config.java (working copy) @@ -513,6 +513,13 @@ public static boolean STORE_SKILL_COOLTIME; public static int BUFFS_MAX_AMOUNT; + /** AntiBot */ + public static boolean ANTIBOT_ENABLE; + public static int ANTIBOT_TIME_JAIL; + public static int ANTIBOT_TIME_VOTE; + public static int ANTIBOT_KILL_MOBS; + public static int ANTIBOT_MIN_LEVEL; + // -------------------------------------------------- // Server // -------------------------------------------------- @@ -1110,6 +1117,12 @@ BUFFS_MAX_AMOUNT = players.getProperty("MaxBuffsAmount", 20); STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true); + ANTIBOT_ENABLE = players.getProperty("AntiBotEnable", true); + ANTIBOT_TIME_JAIL = players.getProperty("AntiBotTimeJail", 1); + ANTIBOT_TIME_VOTE = players.getProperty("AntiBotTimeVote", 30); + ANTIBOT_KILL_MOBS = players.getProperty("AntiBotKillMobs", 1); + ANTIBOT_MIN_LEVEL = players.getProperty("AntiBotMinLevel", 1); + // server ExProperties server = load(SERVER_FILE); Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 13) +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -179,6 +179,18 @@ final int arenaId = Integer.parseInt(_command.substring(12).trim()); activeChar.enterOlympiadObserverMode(arenaId); } + else if (_command.startsWith("antibot")) + { + StringTokenizer st = new StringTokenizer(_command); + st.nextToken(); + + if (st.hasMoreTokens()) + { + activeChar.checkCode(st.nextToken()); + return; + } + activeChar.checkCode("Fail"); + } } catch (Exception e) { Index: java/net/sf/l2j/gameserver/network/clientpackets/Say2.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/Say2.java (revision 13) +++ java/net/sf/l2j/gameserver/network/clientpackets/Say2.java (working copy) @@ -49,6 +49,7 @@ public final static int PARTYROOM_COMMANDER = 15; // (Yellow) public final static int PARTYROOM_ALL = 16; // (Red) public final static int HERO_VOICE = 17; + public final static int CRITICAL_ANNOUNCE = 18; private final static String[] CHAT_NAMES = { @@ -69,7 +70,8 @@ "PARTYMATCH_ROOM", "PARTYROOM_COMMANDER", "PARTYROOM_ALL", - "HERO_VOICE" + "HERO_VOICE", + "CRITICAL_ANNOUNCE" }; private static final String[] WALKER_COMMAND_LIST = Index: java/net/sf/l2j/gameserver/network/serverpackets/PledgeImage.java =================================================================== --- java/net/sf/l2j/gameserver/network/serverpackets/PledgeImage.java (revision 0) +++ java/net/sf/l2j/gameserver/network/serverpackets/PledgeImage.java (revision 0) @@ -0,0 +1,44 @@ +/* + * 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.network.serverpackets; + +public class PledgeImage extends L2GameServerPacket +{ + private final int _crestId; + private final byte[] _data; + + public PledgeImage(int crestId, byte[] data) + { + _crestId = crestId; + _data = data; + } + + @Override + protected final void writeImpl() + { + writeC(0x6c); + writeD(_crestId); + + if (_data != null) + { + writeD(_data.length); + writeB(_data); + } + else + { + writeD(0); + } + } +} \ No newline at end of file Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 13) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -48,6 +48,7 @@ import net.sf.l2j.gameserver.communitybbs.BB.Forum; import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager; import net.sf.l2j.gameserver.datatables.AccessLevels; +import net.sf.l2j.gameserver.datatables.AntiBotTable; import net.sf.l2j.gameserver.datatables.CharNameTable; import net.sf.l2j.gameserver.datatables.CharTemplateTable; import net.sf.l2j.gameserver.datatables.ClanTable; @@ -157,12 +158,14 @@ import net.sf.l2j.gameserver.model.zone.type.L2BossZone; import net.sf.l2j.gameserver.network.L2GameClient; import net.sf.l2j.gameserver.network.SystemMessageId; +import net.sf.l2j.gameserver.network.clientpackets.Say2; import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.ChairSit; import net.sf.l2j.gameserver.network.serverpackets.ChangeWaitType; import net.sf.l2j.gameserver.network.serverpackets.CharInfo; import net.sf.l2j.gameserver.network.serverpackets.ConfirmDlg; +import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; import net.sf.l2j.gameserver.network.serverpackets.EtcStatusUpdate; import net.sf.l2j.gameserver.network.serverpackets.ExAutoSoulShot; import net.sf.l2j.gameserver.network.serverpackets.ExDuelUpdateUserInfo; @@ -170,6 +173,7 @@ import net.sf.l2j.gameserver.network.serverpackets.ExFishingStart; import net.sf.l2j.gameserver.network.serverpackets.ExOlympiadMode; import net.sf.l2j.gameserver.network.serverpackets.ExSetCompassZoneCode; +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage; import net.sf.l2j.gameserver.network.serverpackets.ExStorageMaxCount; import net.sf.l2j.gameserver.network.serverpackets.FriendList; import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle; @@ -219,6 +223,7 @@ import net.sf.l2j.gameserver.network.serverpackets.TradePressOwnOk; import net.sf.l2j.gameserver.network.serverpackets.TradeStart; import net.sf.l2j.gameserver.network.serverpackets.UserInfo; +import net.sf.l2j.gameserver.skills.AbnormalEffect; import net.sf.l2j.gameserver.skills.Env; import net.sf.l2j.gameserver.skills.Formulas; import net.sf.l2j.gameserver.skills.Stats; @@ -364,6 +369,11 @@ } } + private String _code = ""; + private int _attempt = 0; + private int _mobs_dead = 0; + public static ScheduledFuture<?> _antiBotTask; + private L2GameClient _client; private String _accountName; @@ -10647,4 +10657,183 @@ } } } + + // AntiBoot + public void antibot() + { + increaseMobsDead(); + + if (getMobsDead() >= Config.ANTIBOT_KILL_MOBS) + { + resetMobsDead(); + _antiBotTask = ThreadPoolManager.getInstance().scheduleGeneral(new startAntiBotTask(), Config.ANTIBOT_TIME_VOTE * 1000); + } + } + + private static void stopAntiBotTask() + { + if (_antiBotTask != null) + { + _antiBotTask.cancel(false); + _antiBotTask = null; + } + } + + private class startAntiBotTask implements Runnable + { + public startAntiBotTask() + { + setIsParalyzed(true); + setIsInvul(true); + startAbnormalEffect(AbnormalEffect.FLOATING_ROOT); + sendPacket(new ExShowScreenMessage("[AntiBot]: You have " + Config.ANTIBOT_TIME_VOTE + " to confirm the Captcha!", 10000)); + getActingPlayer().sendPacket(new CreatureSay(0, Say2.CRITICAL_ANNOUNCE, "[AntiBot]:", "You have " + Config.ANTIBOT_TIME_VOTE + " to confirm the Catpcha.")); + showHtml_Start(); + } + + @Override + public void run() + { + if (!isInJail()) + { + sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Your time limit has elapsed.")); + increaseAttempt(); + + if (getAttempt() >= 3) + { + setIsParalyzed(false); + setIsInvul(false); + startAbnormalEffect(AbnormalEffect.FLOATING_ROOT); + getActingPlayer().setPunishLevel(L2PcInstance.PunishLevel.JAIL, Config.ANTIBOT_TIME_JAIL); + getActingPlayer().sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes.")); + _log.warning("[AntiBot]: Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes."); + } + else + { + _antiBotTask = ThreadPoolManager.getInstance().scheduleGeneral(new startAntiBotTask(), Config.ANTIBOT_TIME_VOTE * 1000); + } + } + } + } + + public String num2img(int numero) + { + String num = Integer.toString(numero); + char[] digitos = num.toCharArray(); + + String tmp = ""; + for(int x=0;x<num.length();x++) + { + int dig = Integer.parseInt(Character.toString(digitos[x])); + final int it = AntiBotTable.getInstance().getAntiBotClientID(dig); + AntiBotTable.getInstance().sendImage(this, it); + tmp += "<img src=Crest.crest_" + Config.SERVER_ID + "_" + it + " width=38 height=33 align=left>"; + } + + return tmp; + } + + public void showHtml_Start() + { + NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile("data/html/antiBot/start.htm"); + + html.replace("%playerName%", getName()); + html.replace("%attemp%", String.valueOf(3 - getAttempt())); + int maxR = 3; + + String random = new String(); + + for(int x = 0; x<maxR; x++) + random += Integer.toString(Rnd.get(0,9)); + + html.replace("%code1%",num2img(Integer.parseInt(random))); + + this.sendPacket(html); + setCode(String.valueOf(Integer.parseInt(random))); + } + + public void showHtml_End() + { + NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile("data/html/antiBot/end.htm"); + html.replace("%playerName%", getName()); + + this.sendPacket(html); + } + + public void checkCode(String code) + { + if (code.equals(getCode())) + { + stopAntiBotTask(); + resetAttempt(); + + sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Congratulations, has passed control.")); + setIsParalyzed(false); + setIsInvul(false); + stopAbnormalEffect(AbnormalEffect.FLOATING_ROOT); + } + else + { + stopAntiBotTask(); + increaseAttempt(); + + _antiBotTask = ThreadPoolManager.getInstance().scheduleGeneral(new startAntiBotTask(), Config.ANTIBOT_TIME_VOTE * 1000); + } + + if (getAttempt() >= 3) + { + stopAntiBotTask(); + resetAttempt(); + + setIsParalyzed(false); + setIsInvul(false); + startAbnormalEffect(AbnormalEffect.FLOATING_ROOT); + + setPunishLevel(PunishLevel.JAIL, Config.ANTIBOT_TIME_JAIL); + sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes.")); + _log.warning("[AntiBot]: Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes."); + } + } + + private int getMobsDead() + { + return _mobs_dead; + } + + private void increaseMobsDead() + { + _mobs_dead++; + } + + private void resetMobsDead() + { + _mobs_dead = 0; + } + + private void setCode(String code) + { + _code = code; + } + + private String getCode() + { + return _code; + } + + public void increaseAttempt() + { + _attempt += 1; + } + + public int getAttempt() + { + return _attempt; + } + + public void resetAttempt() + { + _attempt = 0; + } } \ No newline at end of file Index: java/net/sf/l2j/gameserver/model/actor/L2Attackable.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (revision 13) +++ java/net/sf/l2j/gameserver/model/actor/L2Attackable.java (working copy) @@ -450,6 +450,12 @@ if (!super.doDie(killer)) return false; + // AntiBot + if (Config.ANTIBOT_ENABLE && (killer != null) && killer instanceof L2PcInstance && (killer.getLevel() >= Config.ANTIBOT_MIN_LEVEL)) + { + killer.getActingPlayer().antibot(); + } + // Notify the Quest Engine of the L2Attackable death if necessary try { Index: config/players.properties =================================================================== --- config/players.properties (revision 13) +++ config/players.properties (working copy) @@ -294,4 +294,23 @@ MaxBuffsAmount = 20 # Store buffs/debuffs on user logout? -StoreSkillCooltime = True \ No newline at end of file +StoreSkillCooltime = True + +#============================================================= +# AntiBot +#============================================================= + +# AntiBot. True to enable, False to disable. +AntiBotEnable = True + +# Time the user will be in jail in minutes. +AntiBotTimeJail = 10 + +# Time that the user will have to control captcha in seconds. +AntiBotTimeVote = 40 + +# Dead mobs needed for captcha. +AntiBotKillMobs = 100 + +# Level min need for captcha. +AntiBotMinLevel = 1 \ No newline at end of file Frozen: ### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/model/L2Attackable.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/L2Attackable.java (revision 1118) +++ head-src/com/l2jfrozen/gameserver/model/L2Attackable.java (working copy) @@ -542,6 +542,12 @@ LOGGER.error("", e); } + // AntiBot + if (Config.ANTIBOT_ENABLE && (killer != null) && killer instanceof L2PcInstance && (killer.getLevel() >= Config.ANTIBOT_MIN_LEVEL)) + { + killer.getActingPlayer().antibot(); + } + // Notify the Quest Engine of the L2Attackable death if necessary try { Index: head-src/com/l2jfrozen/gameserver/datatables/AntiBotTable.java =================================================================== --- head-src/com/l2jfrozen/gameserver/datatables/AntiBotTable.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/datatables/AntiBotTable.java (revision 0) @@ -0,0 +1,183 @@ +/* + * 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 com.l2jfrozen.gameserver.datatables; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.logging.Level; +import java.util.logging.Logger; + +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.gameserver.network.serverpackets.PledgeImage; +import com.l2jfrozen.gameserver.thread.ThreadPoolManager; +import com.l2jfrozen.util.random.Rnd; + +/** + * + * @author Fissban + * + */ +public class AntiBotTable +{ + public static Logger _log = Logger.getLogger(AntiBotTable.class.getName()); + + public static Map<Integer, antiBotData> _imageAntiBotOri = new HashMap<>(); + public static Map<Integer, antiBotData> _imageAntiBotClient = new HashMap<>(); + + public final static int[] img_antibot_id = + { + 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009 + }; + + public void loadImage() + { + LoadImgAntiBot(); + _log.log(Level.INFO, "loading " + _imageAntiBotOri.size() + " images of AntiBot"); + } + + private static void LoadImgAntiBot() + { + _imageAntiBotOri.clear(); + int cont = 0; + + for (int imgId : img_antibot_id) + { + File image = new File("data/images/antibot/" + imgId + ".dds"); + _imageAntiBotOri.put(cont, new antiBotData(cont, ConverterImgBytes(image))); + cont++; + } + + ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new startEncriptCaptcha(), 100, 600000); // 10 Minutes + } + + public void sendImage(L2PcInstance player, int imgId) + { + PledgeImage packet = null; + + if ((imgId >= 50000) && (imgId <= 800000)) + { + for (Entry<Integer, antiBotData> entrySet : _imageAntiBotClient.entrySet()) + { + antiBotData imgCoding = entrySet.getValue(); + + if (imgId == imgCoding.getCodificacion()) + { + packet = new PledgeImage(imgId, imgCoding.getImagen()); + } + } + } + + player.sendPacket(packet); + } + + public static class startEncriptCaptcha implements Runnable + { + public startEncriptCaptcha() + { + + } + + @Override + public void run() + { + _imageAntiBotClient.clear(); + + for (Entry<Integer, antiBotData> entrySet : _imageAntiBotOri.entrySet()) + { + entrySet.getValue().getImagen(); + _imageAntiBotClient.put(entrySet.getKey(), new antiBotData(Rnd.get(50000, 800000), entrySet.getValue().getImagen())); + } + } + } + + public int getAntiBotClientID(int pos) + { + int returnCoding = 0; + + for (Entry<Integer, antiBotData> entrySet : _imageAntiBotClient.entrySet()) + { + int numeroImage = entrySet.getKey().intValue(); + + if (pos == numeroImage) + { + antiBotData imgCoding = entrySet.getValue(); + returnCoding = imgCoding.getCodificacion(); + } + + if (pos > 9) + { + _log.log(Level.SEVERE, "error in getAntiBotClientID...number dont exist"); + } + } + return returnCoding; + } + + public static class antiBotData + { + int _codificacion; + byte[] _data; + + public antiBotData(int codificacion, byte[] data) + { + _codificacion = codificacion; + _data = data; + } + + public int getCodificacion() + { + return _codificacion; + } + + public byte[] getImagen() + { + return _data; + } + } + + private static byte[] ConverterImgBytes(File imagen) + { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + + byte[] buffer = new byte[1024]; + try (FileInputStream fis = new FileInputStream(imagen)) + { + for (int readNum; (readNum = fis.read(buffer)) != -1;) + { + bos.write(buffer, 0, readNum); + } + } + catch (IOException e) + { + _log.log(Level.SEVERE, "Error when converter image to byte[]"); + } + + return bos.toByteArray(); + } + + public static AntiBotTable getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final AntiBotTable _instance = new AntiBotTable(); + } +} \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/network/serverpackets/PledgeImage.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/serverpackets/PledgeImage.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/network/serverpackets/PledgeImage.java (revision 0) @@ -0,0 +1,50 @@ +/* + * 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 com.l2jfrozen.gameserver.network.serverpackets; + +public class PledgeImage extends L2GameServerPacket +{ + private final int _crestId; + private final byte[] _data; + + public PledgeImage(int crestId, byte[] data) + { + _crestId = crestId; + _data = data; + } + + @Override + protected final void writeImpl() + { + writeC(0x6c); + writeD(_crestId); + + if (_data != null) + { + writeD(_data.length); + writeB(_data); + } + else + { + writeD(0); + } + } + + @Override + public String getType() + { + return null; + } +} Index: head-src/com/l2jfrozen/gameserver/GameServer.java =================================================================== --- head-src/com/l2jfrozen/gameserver/GameServer.java (revision 1118) +++ head-src/com/l2jfrozen/gameserver/GameServer.java (working copy) @@ -44,6 +44,7 @@ import com.l2jfrozen.gameserver.controllers.GameTimeController; import com.l2jfrozen.gameserver.controllers.RecipeController; import com.l2jfrozen.gameserver.controllers.TradeController; +import com.l2jfrozen.gameserver.datatables.AntiBotTable; import com.l2jfrozen.gameserver.datatables.GmListTable; import com.l2jfrozen.gameserver.datatables.HeroSkillTable; import com.l2jfrozen.gameserver.datatables.NobleSkillTable; @@ -423,6 +424,9 @@ AdminCommandAccessRights.getInstance(); GmListTable.getInstance(); + Util.printSection("AntiBot"); + AntiBotTable.getInstance().loadImage(); + Util.printSection("Handlers"); ItemHandler.getInstance(); SkillHandler.getInstance(); Index: config/head/other.properties =================================================================== --- config/head/other.properties (revision 1118) +++ config/head/other.properties (working copy) @@ -239,4 +239,23 @@ ClickTask = 50 # Crit announce -GMShowCritAnnouncerName = False \ No newline at end of file +GMShowCritAnnouncerName = False + +#============================================================= +# AntiBot +#============================================================= + +# AntiBot. True to enable, False to disable. +AntiBotEnable = True + +# Time the user will be in jail in minutes. +AntiBotTimeJail = 10 + +# Time that the user will have to control captcha in seconds. +AntiBotTimeVote = 40 + +# Dead mobs needed for captcha. +AntiBotKillMobs = 100 + +# Level min need for captcha. +AntiBotMinLevel = 1 \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 1118) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -61,6 +61,7 @@ import com.l2jfrozen.gameserver.controllers.GameTimeController; import com.l2jfrozen.gameserver.controllers.RecipeController; import com.l2jfrozen.gameserver.datatables.AccessLevel; +import com.l2jfrozen.gameserver.datatables.AntiBotTable; import com.l2jfrozen.gameserver.datatables.GmListTable; import com.l2jfrozen.gameserver.datatables.HeroSkillTable; import com.l2jfrozen.gameserver.datatables.NobleSkillTable; @@ -175,6 +176,7 @@ import com.l2jfrozen.gameserver.network.serverpackets.ExOlympiadUserInfo; import com.l2jfrozen.gameserver.network.serverpackets.ExPCCafePointInfo; import com.l2jfrozen.gameserver.network.serverpackets.ExSetCompassZoneCode; +import com.l2jfrozen.gameserver.network.serverpackets.ExShowScreenMessage; import com.l2jfrozen.gameserver.network.serverpackets.FriendList; import com.l2jfrozen.gameserver.network.serverpackets.HennaInfo; import com.l2jfrozen.gameserver.network.serverpackets.InventoryUpdate; @@ -712,6 +714,12 @@ } } + /** AntiBot. */ + private String _code = ""; + private int _attempt = 0; + private int _mobs_dead = 0; + public static ScheduledFuture<?> _antiBotTask; + /** The _client. */ private L2GameClient _client; @@ -18740,6 +18748,8 @@ // during fall validations will be disabled for 10 ms. /** The Constant FALLING_VALIDATION_DELAY. */ private static final int FALLING_VALIDATION_DELAY = 10000; + + public static final String Say2 = null; /** The _falling timestamp. */ private long _fallingTimestamp = 0; @@ -19644,4 +19654,182 @@ _currentPetSkill = new SkillDat(currentSkill, ctrlPressed, shiftPressed); } + // AntiBot + public void antibot() + { + increaseMobsDead(); + + if (getMobsDead() >= Config.ANTIBOT_KILL_MOBS) + { + resetMobsDead(); + _antiBotTask = ThreadPoolManager.getInstance().scheduleGeneral(new startAntiBotTask(), Config.ANTIBOT_TIME_VOTE * 1000); + } + } + + private static void stopAntiBotTask() + { + if (_antiBotTask != null) + { + _antiBotTask.cancel(false); + _antiBotTask = null; + } + } + + private class startAntiBotTask implements Runnable + { + public startAntiBotTask() + { + setIsParalyzed(true); + setIsInvul(true); + startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLOATING_ROOT); + sendPacket(new ExShowScreenMessage("[AntiBot]: You have " + Config.ANTIBOT_TIME_VOTE + " to confirm the Captcha!", 10000)); + getActingPlayer().sendPacket(new CreatureSay(0, Say2.CRITICAL_ANNOUNCE, "[AntiBot]:", "You have " + Config.ANTIBOT_TIME_VOTE + " to confirm the Catpcha.")); + showHtml_Start(); + } + + @Override + public void run() + { + if (!isInJail()) + { + sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Your time limit has elapsed.")); + increaseAttempt(); + + if (getAttempt() >= 3) + { + setIsParalyzed(false); + setIsInvul(false); + startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLOATING_ROOT); + getActingPlayer().setPunishLevel(L2PcInstance.PunishLevel.JAIL, Config.ANTIBOT_TIME_JAIL); + getActingPlayer().sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes.")); + LOGGER.warn("[AntiBot]: Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes."); + } + else + { + _antiBotTask = ThreadPoolManager.getInstance().scheduleGeneral(new startAntiBotTask(), Config.ANTIBOT_TIME_VOTE * 1000); + } + } + } + } + + public String num2img(int numero) + { + String num = Integer.toString(numero); + char[] digitos = num.toCharArray(); + + String tmp = ""; + for(int x=0;x<num.length();x++) + { + int dig = Integer.parseInt(Character.toString(digitos[x])); + final int it = AntiBotTable.getInstance().getAntiBotClientID(dig); + AntiBotTable.getInstance().sendImage(this, it); + tmp += "<img src=Crest.crest_" + Config.SERVER_ID + "_" + it + " width=38 height=33 align=left>"; + } + + return tmp; + } + + public void showHtml_Start() + { + NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile("data/html/antiBot/start.htm"); + + html.replace("%playerName%", getName()); + html.replace("%attemp%", String.valueOf(3 - getAttempt())); + int maxR = 3; + + String random = new String(); + + for(int x = 0; x<maxR; x++) + random += Integer.toString(Rnd.get(0,9)); + + html.replace("%code1%",num2img(Integer.parseInt(random))); + + this.sendPacket(html); + setCode(String.valueOf(Integer.parseInt(random))); + } + + public void showHtml_End() + { + NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile("data/html/antiBot/end.htm"); + html.replace("%playerName%", getName()); + + this.sendPacket(html); + } + + public void checkCode(String code) + { + if (code.equals(getCode())) + { + stopAntiBotTask(); + resetAttempt(); + + sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Congratulations, has passed control.")); + setIsParalyzed(false); + setIsInvul(false); + stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLOATING_ROOT); + } + else + { + stopAntiBotTask(); + increaseAttempt(); + + _antiBotTask = ThreadPoolManager.getInstance().scheduleGeneral(new startAntiBotTask(), Config.ANTIBOT_TIME_VOTE * 1000); + } + + if (getAttempt() >= 3) + { + stopAntiBotTask(); + resetAttempt(); + + setIsParalyzed(false); + setIsInvul(false); + startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FLOATING_ROOT); + + setPunishLevel(PunishLevel.JAIL, Config.ANTIBOT_TIME_JAIL); + sendPacket(new CreatureSay(0, Say2.HERO_VOICE, "[AntiBot]:", "Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes.")); + LOGGER.warn("[AntiBot]: Character " + getName() + " jailed for " + Config.ANTIBOT_TIME_JAIL + " minutes."); + } + } + + private int getMobsDead() + { + return _mobs_dead; + } + + private void increaseMobsDead() + { + _mobs_dead++; + } + + private void resetMobsDead() + { + _mobs_dead = 0; + } + + private void setCode(String code) + { + _code = code; + } + + private String getCode() + { + return _code; + } + + public void increaseAttempt() + { + _attempt += 1; + } + + public int getAttempt() + { + return _attempt; + } + + public void resetAttempt() + { + _attempt = 0; + } } \ No newline at end of file Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 1118) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -579,6 +579,13 @@ public static boolean ALLOW_AIO_IN_EVENTS; public static boolean ANNOUNCE_CASTLE_LORDS; + /** AntiBot */ + public static boolean ANTIBOT_ENABLE; + public static int ANTIBOT_TIME_JAIL; + public static int ANTIBOT_TIME_VOTE; + public static int ANTIBOT_KILL_MOBS; + public static int ANTIBOT_MIN_LEVEL; + /** Configuration to allow custom items to be given on character creation */ public static boolean CUSTOM_STARTER_ITEMS_ENABLED; public static List<int[]> STARTING_CUSTOM_ITEMS_F = new ArrayList<>(); @@ -683,6 +690,11 @@ ALLOW_AIO_USE_CM = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseClassMaster", "False")); ALLOW_AIO_IN_EVENTS = Boolean.parseBoolean(otherSettings.getProperty("AllowAioInEvents", "False")); ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(otherSettings.getProperty("AnnounceCastleLords", "False")); + ANTIBOT_ENABLE = Boolean.parseBoolean(otherSettings.getProperty("AntiBotEnable", "true")); + ANTIBOT_TIME_JAIL = Integer.parseInt(otherSettings.getProperty("AntiBotTimeJail", "1")); + ANTIBOT_TIME_VOTE = Integer.parseInt(otherSettings.getProperty("AntiBotTimeVote", "30")); + ANTIBOT_KILL_MOBS = Integer.parseInt(otherSettings.getProperty("AntiBotKillMobs", "1")); + ANTIBOT_MIN_LEVEL = Integer.parseInt(otherSettings.getProperty("AntiBotMinLevel", "1")); if (ENABLE_AIO_SYSTEM) // create map if system is enabled { final String[] AioSkillsSplit = otherSettings.getProperty("AioSkills", "").split(";"); Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (revision 1118) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -20,6 +20,8 @@ */ package com.l2jfrozen.gameserver.network.clientpackets; +import java.util.StringTokenizer; + import org.apache.log4j.Logger; import com.l2jfrozen.Config; @@ -317,6 +319,18 @@ else if (_command.startsWith("OlympiadArenaChange")) { Olympiad.bypassChangeArena(_command, activeChar); + } + else if (_command.startsWith("antibot")) + { + StringTokenizer st = new StringTokenizer(_command); + st.nextToken(); + + if (st.hasMoreTokens()) + { + activeChar.checkCode(st.nextToken()); + return; + } + activeChar.checkCode("Fail"); } } catch (final Exception e)
  6. Hello guys, I had a request to make a donation manager but when i finished the guy decided to not open his server (wtf?) so the npc is now useless to me. What is this? A donation manager that selling packages with items and stats like nobl,rec etc. Categories can be added easily i will explain later Current added categories: Bronze,Silver,Gold,Platinum,Diamond,Master,Grandmaster How to configure it? Its configurable via xml How i can add items? <Package item="57,500"/> Will have as a reward 500 adena. How i can add enchanted item? <Package item="7575,1" enchant ="15"/> Will have as reward draconic bow +15 How to add stats like nobl? <Package noblesse="true"/> <Package autoDyes="true"/> <Package rec="50"/> It is can handle noblesse,auto dyes (depends on the current class of the player) and recommends. Some photos: I wont upload video ... I'm not sure about in which aCis rev is coded but it does not matter. Also i'm not friend with html designs, so don't hit me :D P.s Auto dyes system is setted up by my opinion about dyes. You can easily edit it in DonationDyes.java code data/html/mods/donate/ data/xml
  7. This share is gold for those who know how to use it, it basically unhard-codes all enchant scrolls and gives you the ability to create any scroll with a simple //reload items. Tested on L2AEPvP (Beta), more details: L2EnchantScroll class https://pastebin.com/0cg2tU4s sample XML (very basic) <item id="45000" type="EnchantScroll" name="Scroll: Enchant Weapon"> <set name="default_action" val="skill_reduce" /> <set name="etcitem_type" val="scrl_enchant_wp" /> <set name="is_oly_restricted" val="true" /> <set name="is_stackable" val="true" /> <set name="handler" val="EnchantScrolls" /> <set name="scroll_binds" val="WEAPON" /> <rates rate="0"> <tiertarget tier="ANY" rate="0" disprate="80"> <enchtarget enchants="0-3" rate="100" /> <!-- SAFE --> <enchtarget enchants="4-8" rate="80" /> <enchtarget enchants="9-11" rate="75" /> <enchtarget enchants="12-15" rate="70" /> <enchtarget enchants="15" rate="45" disprate="60"/> <enchtarget enchants="16,17" rate="60" /> <enchtarget enchants="18" rate="40" /> <enchtarget enchants="19" rate="20" /> </tiertarget> <tiertarget tier="COMMON" rate="90" maxench="25" > <enchtarget enchants="0,1,2,3,4" rate="100" maxench="25" /> <!-- SAFE --> </tiertarget> </rates> <fails penalty="CRYSTALLIZE" > <tiertarget tier="UNCOMMON" penalty="NONE" basevalue="0" >  <enchtarget enchants="7,8,9,10,11,12" penalty="NONE" value="4"/> <enchtarget enchants="13,14,15" penalty="DEC" value="1"/> </tiertarget> </fails> </item> Features: The possibilities are hundreds, you can create enchant scrolls that can enchant a very specific tier, enchant scrolls that have their own max enchant and so on You can calculate the enchant rates and inform the player before the enchant Item Grades are obviously ignored Things you have to do to get this working: 1) Create TIERS (enum) and assign it to items 2) Create EnchantFailed (enum) and implement the penalty code 3) Create ScrollBinds (enum) and assign it to each paperdoll Additional things you will need public static <V extends Enum<V>> EnumSet<V> toEnumSet(String enumStr, Class<V> enumClass) { if (enumStr == null) return EnumSet.noneOf(enumClass); final String[] enumStrings = enumStr.replace(" ", "").split(","); final EnumSet<V> enums = EnumSet.noneOf(enumClass); for (String e : enumStrings) enums.add(Enum.valueOf(enumClass, e)); return enums; } public static int[] toIntArrayEx(String[] strArray) { final ArrayList<Integer> intList = new ArrayList<>(strArray.length); for (int i=0;i<strArray.length;i++) { try { final String strNum = strArray[i]; if (strNum.contains("-")) { final String[] explode = strNum.split("-"); final int min = Integer.parseInt(explode[0]); final int max = Integer.parseInt(explode[1]); if (min < max) for (int j = min; j <= max; j++) intList.add(j); } else intList.add(Integer.parseInt(strNum)); } catch (Exception e) { e.printStackTrace(); } } return intList.stream().mapToInt(i->i).toArray(); } Good luck
  8. Hello guys, Before 4-5 months i created a script for a new raid in order to avoid all classic raids that are really boring... It isn't something special, but i always like different and unusual things... Plagueseeker Raid Starting with some special cameras while all players are paralyzed. When the broadcast end, the following features stands there: action task every 2 seconds: There is 20% chance to 'debuff' a random player if is healer class Debuffs: 20% chance for 15% chance for 10% chance for 50% chance for There is 5% chance to 1) Spawn some minions when the hp of the raid is lower than 40% in order to protect the raid boss (can be happened unlimited times with chance 5%). Minions will suicide after 10 seconds after the spawn time if not get killed. 2) Pick a random target and kill him instant. When the hp of the raid is lower than 50% Broadcast again some special cameras (while players are paralyzed again), an earthquake for 5 seconds and instant kill 10 random players around the raid in 700 radius (can be happened only 1 time). inactivity task If the raid boss not attacked for more than 15 minutes, all players are going back and raid will be deleted. * All the above features are meant to be used in a boss zone ( i used 150000 as a custom one in my pack). Any feature wont work outside of the zone, I wont share any thing like that since its just c/p. * Its your responsibility to use the necessary checks in order to avoid bugs like move the raid out of zone. I coded for me at coliseum with doors closed. Also you have to set by urself how the raid will be spawned (i was about to code the spawn thing but i dont remember why i didnt). I used //spawn just for the video . Code: [Hidden Content] Coded (if i remember well) in acis 370. Note: If you want to expand it or understand how a script can be coded, check this topic (if any other post is related to scripts and have informations post it)
  9. hello is nathing special just one smile fix i find this problem from enterworld.java so.. if player is create clan or register siege or any else about clan he show to much member like this video so the fix is this find all this - activeChar.sendPacket(new PledgeShowMemberListAll(clan, 0)); - - for (SubPledge sp : clan.getAllSubPledges()) - activeChar.sendPacket(new PledgeShowMemberListAll(clan, sp.getId())); - - activeChar.sendPacket(new UserInfo(activeChar)); - activeChar.sendPacket(new PledgeStatusChanged(clan)); and change with this + activeChar.sendPacket(new UserInfo(activeChar)); + activeChar.sendPacket(new PledgeStatusChanged(clan)); + // fixed bug multi show clan member's + clan.broadcastClanStatus(); i try much time to find the problem and after 1h i find bug here and i fix it. enjoy
  10. Updates:Removed all shit messages... (ConfigAdded)Npc:Enable/disable (ConfigAdded)Vote Time To Vote (ConfigAdded)Reward Id for vote reward (ConfigAdded)Reward Count For Vote Reward Reworked the GetVote Method And Connections Updated Too Added Who Is Voting Now method(that show you who is voting now And Your Chars Name When You Click The npc) Html Added And One Shit Logo :P Coded On Acis Latest Rev.. Screen: PASS:Reborn12 DOWNLOAD L2JaCis : DOWNLOAD DOWNLOAD L2JFrozen : DOWNLOAD
  11. Well, one friend asked to me to help him coding a simple "pvp zone" and then asked to me to add an item checker... etc So I coded a "MultiFunction", "AIO"... whatever... zone. Easy to modify, with configs... and I wanted to share it with you. Simply if you don't like it or you don't like me, don't spam here. We know that some of this features could be already shared over the net... blabla... But here are all together, are configurable and I think that it's 90% without bugs. Note: Default zone: Crystal Caverns Quickly enumeration of which configs it has: -Enable/Disable pvp flag on enter -Enable/Disable revive delay & set the time -Specify (unlimited) random respawns if revive enabled -Specify random respawn radius -Enable/Disable noblesse blessing on enter -Enable/Disable remove buffs on enter -Enable/Disable remove pets on enter -Specify special reward when hunting inside -Specify items that will be unequiped & blocked to use inside the zone -Specify items by grades that will be unequiped & blocked to use inside the zone -Specify an enchant level. Items with that level or more, will be unequiped & blocked to use inside the zone -Specify classes id's that won't be able to enter to this zone V.1.3 - 14/02/2013 Coded for l2jserver Freya. - Wyatt L2jServer Freya patch Addapted to l2jfrozen Interlude. - Wyatt L2jFrozen Interlude patch. Addapted to l2jserver H5 Beta, rev core:5639 datapack:9185. - Valanths L2jServer H5 Beta patch Addapted to l2jserver H5 Beta, rev core:6165 datapack:9909. - Valanths L2jServer H5 Beta patch Addapted to Acis, Changeset 309. - Tяαnce Acis patch Addapted to Acis, rev:299. - Dεbian Acis patch Credits: Wyatt
  12. Hello, i wanna ask someone got this captcha code?
  13. Hello mates, here we back again with a new guide, in this tutorial we will go beyond the rules (not forums rules lol), it could be useful for someone, useless for someone else, but .. i like to share things with you mates xD. Oh God someone shut me up to cut this off and get started …. It’s Really boring, don’t you think so ? Well Lineage is getting old, same play style, same aspects, it needs a little refreshment, or maybe a rebirth, people keeps changing servers wishing for something to entertain them, so why not adapt few things from other games ?, actually let’s be more straight and honest LETS STEAL SOME IDEAS :D, but hold on for a second … there are some talented people already adapted some styles and armors and weapons …. etc, and some adapted some events or stuff…. why not you ? you can also adapt things it’s not that hard or impossible if we just thought out of the box . In my opinion i’ll categorize adapting into two categories : 1. Client Adaption : Armors, Effects, Weapons, Interfaces …. etc . and i will not talk about this since it needs a good modeler and designer and i’m not 2. Features Adaption : Like Events, Items, Play style …. etc. and this is what we will be learning, it’s just needs few things to get familiar with. ------------------------------------------------------------------------------------------------------------- How to Get Started : Well it’s Simple, but to get better understanding we need an example to apply what we learn on . so we gonna adapt an idea from another game in this guide. There is a game called “Continent of Ninth Seal” , they keeps updating and adding new items and weapons every time , and one day they added a very good weapons, but some people was complaining about this, since after they got their weapons well enchanted and this is really hard to get, now they need to start over and enchant the new weapons from beginning ….. so they made a new feature which is Enchant Extraction. here is the link for the feature we gonna adapt : Transfer the Enhancement How the Feature Works : For example you have a weapon +16, and you need to change weapons, all you need to do is take your old weapon along with an item called “Weapon Enhancement Extraction Scroll” then go to blacksmith and put your old enhanced weapon with the scroll and you press a button, then your enhanced item will be destroyed and you will get what called “Transcendent Stone +16”, then u enhance the other weapon with this stone which will make it instantly +16 without fail. Note : later they added update to lower the stone with 2 levels means +16 items will make +14 stone. because people started to enhance low items and when get ++++ then extract and add it to high item. also this feature made them sell very well since the Extraction Scroll is for about 7 Dollars. ------------------------------------------------------------------------------------------------------------- The Game : Adapting such a feature is just a game that we gonna play together now,The Game of Thieves, we will play as thieves, oh you laughing at me now …. come on and trust me i’ll tell you how to be a good thief. First let’s make a party and go in our mission….. ------------------------------------------------------------------------------------------------------------- The Mission ( Prove Yourself ) : Hello new thief .. in order to join the Adaption Mafia you have to prove yourself by Proving yourself as a skilled thief . Your first mission is : Our Gaming Spies confirmed that the developers of C9 is working on a new technology which will allow their players to extract their enhancements and contain the enhancement power into some kind of magic stone called “Transcendent Stone” , and with this stone they will be able to put this contained power on another weapon .. we don’t have much info about this technology .. and it is your mission to steal their papers and implement this feature to the mother of games “Lineage” .. Our Spies was able to get into their game and was able to take 2 screenshot regarding the feature… use them wisely. ----------------------------------------------------------------------------------------------------------------------- Oh , what we gonna do ? “Start Small, Progress More” It looks like tough mission, but let’s calm down and break this down into simpler steps, what this feature is about or what things that makes it : – Enhancement Panel : we already got this in our game – Extraction Panel or window : well we don’t have this too, and if we made it like an html with some bypasses it will looks so static, no real on screen interactions …. – Transcendent Stone : well we can easily create an Etc Item, but if it’s done this way we’ll have to create many of this since one for +1, another for +2, +3 …… etc . and this will so much we need a smarter way. well what about create one Etc item and save it’s enhancement level somewhere in server or database … pfff but how players will know if it’s +12 or +10, it will has same name showing on the screen they can fool each others and sell a +1 stone as if it’s +100 stone, oh no we need another way. – Extraction Scroll : this could be the easier part all we need is to create an Etc Item – Being able to move the enhancement from the Transcendent Stone to another weapon . What about quit and say we can’t do this ? ----------------------------------------------------------------------------------------------------------------------- Investigation : “Use what you already have” Before we start we need to make some investigation and see what tools we have and what we can make use of. What things in lineage that “look like” this, this is the first thing you need to think about when you adapting anything to anything, not only Lineage but any software or system you develop, it’s like one of the basic rules in Software Development career is to use what you already have. – Extraction Panel : we need some kind of panel where player put two things, the weapon and the extraction scroll …. think, think, think ….. oh we have two things like this , Enchant panel and augment panel … i think we can use one of them – Transcendent Stone : we need an item with dynamic name to be like ” +6 Transcendent Stone or +10 Transcendent Stone”, hmmmmmmmmmm …. let’s do some brain storming … what items that part of it’s name controlled by server not the client …. why we didn’t thought about this ???? all armors, weapons and jewels has this feature they all can have the +xx thing – Extraction Scroll : it’s just an item man, nothing easier than this … wait wait wait .. i think about something, what about making this as a special enchant scroll, so when user click on it it will automatically pop up a window to select a weapon. – Enhance Back with Transcendent Stone : well we can just make it as enhancement scroll, but ….. we said we gonna make it like armors and weapon, how it can be for example a weapon and scroll in same time . well we need a bit of analyzing , weapon when used they get equipped, scrolls when used they get an enhancement panel …. can’t we check on Equip Request that if it’s our stone then it override the equipping procedure and instead run the enhancement procedure ?? i think we can find a way around. ----------------------------------------------------------------------------------------------------------------------- The Plan : “Going random is the best way to fail” Our plan will split on multi tasks so we can work on one by one as follow Stage .1 : (Preparation) – Create a new UTX File containing the icons for our two items (Transcendent Stone and Extraction Scroll) – Add Items to Itemname-e.dat file with proper names – Add Transcendent Stone to Armorgrp.dat as accessory or something – Add Extraction Scroll to EtcItemgrp.dat – Add both Items to proper XML file in server data files – Estimate current Stage Progress and Check if all work as expected Stage .2 : (Think out of the Box) – Handle player’s Equip action with Transcendent Stone to be forbidden and instead open Enhancement Panel – Handle Enhance panel acceptance for our Transcendent Stone as Enhancement Scroll instead of Armor Part – Handle Player’s Request of Confirming Enhance Process with Transcendent Stone – Handle Usage of Extraction item differently than enhance scroll to extract Enhancement instead of Enhancing – Clean up and Estimate current Stage Progress to Check if all work as expected ----------------------------------------------------------------------------------------------------------------------- ~*- Challenge Accepted -*~ ----------------------------------------------------------------------------------------------------------------------- Stage .1 : – Create a new UTX File containing the icons for our two items (Transcendent Stone and Extraction Scroll) Note : there are many tutorial on this forum about this thing so we will cover it fast. Okay boss we’re on it … at this point we will need to use the screen shots from our spies to get the icons of both and crop them on any image processor, i’ll use Photoshop, also we will need to resize them to 32 by 32 pixels, and i’ll set my crop aspects on Photoshop to be 1×1 to avoid any ratio problems After that we do same for the other one then we resize, in Photoshop i use shortcut CTRL+ALT+I Now we will save both of them as TGA files, i don’t have the DDS plugin installed so i’ll save as TGA, and will name them as transcendent_stone_icon.tga and enhancement_extract_scroll.tga then will close photoshop and go to open Unreal Editor and create new UTX File, will name MxCMission, then import the two TGA files we made (Take care of what highlighted Thanks to @Sinister Smile for helping with this) Let’s Save this file and encrypt it. I’ll use L2Ninja to Encrypt as L2 UTX file Now we add this file to our SysTextures Folder and Task Completed ----------------------------------------------------------------------------------------------------------- – Add Items to Itemname-e.dat file with proper names I’ll use L2Ninja Again to edit this file (you can use any editor) and add both items with ids 85850 and 85851, just any the id you want but be unique and make sure you remember them ----------------------------------------------------------------------------------------------------------- – Add Transcendent Stone to Armorgrp.dat as accessory or something After some investigations i found most armor items express their type for example Baium under it’s name you will see the word “Ring” and same for most armor items except ….. Belts, so because i’m a lazy coder i’ll copy any armorgrp belt code and modify it then add it again to armorgrp.dat, i wont write it from scratch it’s so dam long mate xD So here is the code i copied and modified with our new item id and icon, so i used id of 85851 and icon MxCMission.transcendent_stone_icon ----------------------------------------------------------------------------------------------------------- – Add Extraction Scroll to EtcItemgrp.dat What about doing the same, i’ll just copy anything from that file and change id and icon xD , we can adjust this later . ----------------------------------------------------------------------------------------------------------- – Add both Items to proper XML file in server data files Now we need to add this items to Server XML files, so i’ll create an xml in data/stats/item and will name it mission.xml, then will add the proper code of both item <?xml version="1.0" encoding="UTF-8"?> <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/items.xsd"> <item id="85851" type="Armor" name="Transcendent Stone"> <set name="icon" val="MxCMission.transcendent_stone_icon" /> <set name="default_action" val="EQUIP" /> <set name="armor_type" val="LIGHT" /> <set name="bodypart" val="waist" /> <set name="immediate_effect" val="true" /> <set name="crystal_count" val="30" /> <set name="crystal_type" val="A" /> <set name="material" val="CLOTH" /> <set name="weight" val="440" /> <set name="price" val="371300" /> <set name="enchant_enabled" val="1" /> </item> <item id="85850" type="EtcItem" name="Enhancement Extraction Scroll"> <set name="icon" val="MxCMission.enhancement_extract_scoll" /> <set name="default_action" val="SKILL_REDUCE" /> <set name="immediate_effect" val="true" /> <set name="material" val="PAPER" /> <set name="weight" val="120" /> <set name="is_oly_restricted" val="true" /> <set name="handler" val="EnchantScrolls" /> </item> </list> ----------------------------------------------------------------------------------------------------------- – Estimate current Stage Progress and Check if all work as expected Let’s Start our server and check the items we created …. Yeaaah it’s working and even when we use the Extraction scroll it opens the Enhancement Panel … this is a great start ----------------------------------------------------------------------------------------------------------------------- ~*- Stage 1 Completed with Pleasure -*~ ----------------------------------------------------------------------------------------------------------------------- Stage .2 : (Think out of the Box) JAVA TIME ….. this where things get more exciting but it can be messy so let me tell how things working in L2J so we can have better understanding about the process. I’ll give you a little Hint about how to be on the right path without keep looking on internet or asking … Please Focus on this Part … Everything in Lineage is based on something called Packets. Consider a Packet as an Envelop that contain a letter being send from your Game Client as player to the Game Server and vice versa From Game Server to Game Client, this letters or packets can contain a request or information like for example You wanna Equip a Weapon so you double click on it : Game Client > Game Server : Oh ! Hey Server i want to equip a weapon that has id 9999 Game Server > Game Client : Well, it’s looks fine and allowed for me, Okay No Problem Equip It. Game Client > Game Server : Thank you mate, i have Equiped it, can you tell me my stats after Equip Game Server > Game Client : Yes, Sure thing . Here is your stats ……………. This Sentences between client and server is pack , and we will talk about Two Types of Packets in L2J ServerPackets and ClientPackets. Client Packets : Are the Packets that sent from Client to Server, which located at java/com/l2jserver/gameserver/network/clientpackets Server Packets : Are the Packets that sent from Server to Client, which located at java/com/l2jserver/gameserver/network/serverpackets At This two locations all the magic starts to happen, you can really explore them and see where the code starts at every in-game action for example when we right clicked on “Enhancement Extraction Scroll” it sends a Client Packets called UseItem, so server will try to process this packets and see if it’s allowed or not and what this item about, it will say “Oh i see in my XML files that this items is EnchantScroll so let’s Open Enchant Panel” , this response from server is also a packet which is ChooseInventoryItem Packet, Then Player try to put his weapon into enchant item slot but it needs a permission so it send to server a Client Packet called RequestExTryToPutEnchantTargetItem, saying “Hello i wanna select this weapon as the Target item to Enchant, is this allowed ?” , At this point we can think of this Packet Java file maybe is the one responsible for accepting or refusing , Let’s take a look and see if something useful , yes i found something interesting in this file : Looks like the Yellow Area is just a normal checks, Red Area is where Server Refuse an Item, Green Area is where Server Accept an Item … Try also to Explore more in the Packets Packages that i have mentioned their locations before, at least read files names, it’s very useful to know what in there. So Let’s Start ----------------------------------------------------------------------------------------------------------- – Handle Usage of Extraction item differently than enhance scroll to extract Enhancement instead of Enhancing I Guess you know where we can go .. Yes RequestExTryToPutEnchantTargetItem.java and we need to make it not refuse our Extraction Scroll since if we try now to add any item to enhance with this scroll it will just refuse it, since it’s refusing the scroll it self . so here is the modifications i made, replace : if ( (scrollTemplate == null) || !scrollTemplate.isValid(item, null)) with this : if ( ((scrollTemplate == null) || !scrollTemplate.isValid(item, null)) && scroll.getId() != 85850 ) and then we need to add this after the if statement block to check if the target item is good : //Extraction Scroll else if (scroll.getId() == 85850) { boolean validProcess = true; if(!item.isWeapon()) { activeChar.sendMessage("You Can only Extract Enhancement From a Weapon"); validProcess = false; } else if (item.getEnchantLevel() <= 0) { activeChar.sendMessage("There is no Enhancement on this Item to Extract."); validProcess = false; } //Finally if it's not valid for any Reason then Fail the process if(!validProcess) { activeChar.sendPacket(SystemMessageId.DOES_NOT_FIT_SCROLL_CONDITIONS); activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); activeChar.sendPacket(new ExPutEnchantTargetItemResult(0)); return; } } So here what we have done : --------------------------------------------------------------------------------------------------- – Handle player’s Equip action with Transcendent Stone to be forbidden and instead open Enhancement Panel – Handle Enhance panel acceptance for our Transcendent Stone as Enhancement Scroll instead of Armor Part We will do those steps together so instead of equip we will send a different packet and to do this we gonna modify UseItem.java Client Packet, so after if (item == null) { return; } We gonna add this check if it’s our Transcendent Stone, then don’t Equip and instead start enchanting with it : //Forbidden to Equip Transcedent Stone if(item.getId() == 85851) { if (activeChar.isCastingNow()) { return; } if (activeChar.isEnchanting()) { activeChar.sendPacket(SystemMessageId.ENCHANTMENT_ALREADY_IN_PROGRESS); return; } activeChar.setActiveEnchantItemId(item.getObjectId()); activeChar.sendPacket(new ChooseInventoryItem(item.getId())); return; } Well it’s should pop up the Enchant Window, but it wont accept any item since it’s not an instance of EnchantScroll so we will need to make it able to accept weapons as target items like what we did with Extraction Scroll, so let’s Modify the code of RequestExTryToPutEnchantTargetItem Packet again and do another else if, and add the item id to the main if as we did before, so again we replace : if ( ((scrollTemplate == null) || !scrollTemplate.isValid(item, null)) && scroll.getId() != 85850 ) with if ( ((scrollTemplate == null) || !scrollTemplate.isValid(item, null)) && scroll.getId() != 85850 && scroll.getId() != 85851) now we need to add another Else if after the one we added before : //Transcendent Stone else if(scroll.getId() == 85851) { if(!item.isWeapon()) { activeChar.sendMessage("Transcendent Stones are available only to be used with Weapons"); activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); activeChar.sendPacket(new ExPutEnchantTargetItemResult(0)); return; } } --------------------------------------------------------------------------------------- – Handle Player’s Request of Confirming Enhance Process with Transcendent Stone When a player use an Enchant item and then he add the Target item it’s time to press Start which will send the packet RequestEnchantItem, and since it’s sent by Client then it’s in ClientPackets , so let’s look at it’s code and see what trouble we can get through when we use this fake belt Transcendent Stone as Enchant Scroll : 1st : in this part it wont work since it’s not real scroll so wont have Template : // template for scroll final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); // scroll not found in list if (scrollTemplate == null) { return; } So we need to modify the if statement to be : if (scrollTemplate == null && scroll.getId() != 85851) Also later down we will find this code which will make our fake scroll not work, and will cause an Null Pointer Exception Error since it will try to validate the target item against the scrollTemplate, and actually scrollTemplate is null since this is not a scroll and we skipped this check for being null before : // first validation check if (!scrollTemplate.isValid(item, supportTemplate)) So we need here to do this check only if it’s not Null, since it’s not null then it’s not our fake scroll, logically, so we replace it with : if (scrollTemplate != null &&!scrollTemplate.isValid(item, supportTemplate)) Later if we scroll down, we will see something like this : final EnchantResultType resultType = scrollTemplate.calculateSuccess(activeChar, item, supportTemplate); switch (resultType) Here we will notice few things as follow : – First it lands EnchantResultType into resultType, so we need to land something of same type incase it’s our scroll and if you Right Click on EnchantResultType and choose Go To Definition (i guess this is it in Eclipse) or as i use NetBeans it’s CTRL+B, you will find that EnchantResultType has possible 3 values as enum (ERROR, SUCCESS, FAILURE), so maybe we will need to add another value to that enum for example TRANSCENDENT to be like this : – Second it uses scrollTemplate and it maybe null so it will cause error so we need to check if it’s null or it’s our fake enchant item, and if it’s not null we do the regular procedure and if null and it’s our fake stone then we return TRANSCENDET value that we added , in this case i’ll use Ternary Operator : final EnchantResultType resultType = (scrollTemplate == null) ? EnchantResultType.TRANSCENDENT : scrollTemplate.calculateSuccess(activeChar, item, supportTemplate); – Thirdly there is a switch statement which iterate through possible EnchantResultType values and we just add our new one so we need to add at the begging of the switch the case of TRANSCENDENT , which in this part the magic happens and where we will move enchant from stone to the item , but Oops we forgot a little thing, by reaching this line it means that our stone already destroyed, so we dunno about the enchant level of it, so we need to save it anywhere before this line // attempting to destroy scroll scroll = activeChar.getInventory().destroyItem("Enchant", scroll.getObjectId(), 1, activeChar, item); we will add : int transcendentLevel = scroll.getEnchantLevel(); then we back to our switch statement and implement the enchant level replacement by adding another case at the beginning like this : case TRANSCENDENT: { if(transcendentLevel > 1 ) { item.setEnchantLevel(transcendentLevel); item.updateDatabase(); activeChar.sendMessage("Transcendent Stone Power can be felt now on your " + item.getName()); activeChar.sendPacket(new EnchantResult(0, 0, 0)); } else {activeChar.sendMessage("This is an Empty Stone, it's just useless to have it.");} break; } ----------------------------------------------------------------------------------------------- – Handle Usage of Extraction item differently than enhance scroll to extract Enhancement instead of Enhancing In this case we gonna do same of what we did with Transcendent Stone, so again we replace this : // scroll not found in list if (scrollTemplate == null && scroll.getId() != 85851) with this : if (scrollTemplate == null && scroll.getId() != 85851 && scroll.getId() != 85850) And we add another EnchantResultType to be like this : Then we gonna replace the resultType Ternary operator we made before with a nested ternary operator : final EnchantResultType resultType = (scrollTemplate == null) ? (scroll.getId() == 85850) ? EnchantResultType.EXTRACTION : EnchantResultType.TRANSCENDENT : scrollTemplate.calculateSuccess(activeChar, item, supportTemplate); Now we need EXTRACTION case into the Switch Statement : case EXTRACTION : { L2ItemInstance stone = new L2ItemInstance(85851); stone.setEnchantLevel(item.getEnchantLevel()); activeChar.getInventory().destroyItem("Extraction", item, activeChar, activeChar); activeChar.getInventory().addItem("Extraction", stone, activeChar, activeChar); activeChar.sendPacket(new EnchantResult(1, 85851, 1)); break; } ------------------------------------------------------------------------------------------------------ – Clean up and Estimate current Stage Progress to Check if all work as expected Let’s Build our Server and restart it and check if it’s working Oh it’s working !!!!!!!! ----------------------------------------------------------------------------------------------------------- Notes : - You can do it better by implementing a new Item Type, but as you can see the guide is already long so i tried to make it as simple as possible - With same Concept of Investigation and Planning you can implement almost any feature ------------------------------------------------------------------------------------------------------------ Conclusion : - Investigate more and more into sources - Have a Good Plan, never go Random - Start small and progress more - Don't Seek Perfection at the first time, make it work then make it work better ------------------------------------------------------------------------------------------------------------ I hope you like it and i wish it's useful to anyone, and if you have any questions or need help just let me know :)
  14. Hello there.. Here is my Epic Boss Manager from my old server. Nothing special, but some of you may need it. What's inside? Works only with retail Grandbosses. [No retail zaken id] Inform you about the status of Grandboss. Inform you about respawn time. Date/Time. Enable/Disable it on configs. # Announce Grandboss status. # Ex: If status for Antharas/Valakas/Frintezza change to 2 player get announce: # Grandboss>name is engaged in battle. # If status changed to 3: Grandbossname has been killed. Type .epic for details! # For Baium if status change to 1 - Baium is awake and fighting. # All Grandboses respawned - Grandbossname is spawned in the world! AnnounceGrandBossStatus = True [Hidden Content]
  15. .makeaa / .aa These commands convert all your seal stones ( green, red, blue ) in Ancient Adena. Nothing special at all, but it might be useful for someone. Tested and working in L2J High Five Chronicle.
  16. .7rb This command shows you up which Raid Bosses you have killed in Dragon Valley Area and which you haven't. The quest is called ''Legendary Tales'' .It looks like the pictures below. Tested and Working L2j High Five Chronicle!
  17. package net.sf.l2j.gameserver.scripting.scripts.ai.group; import net.sf.l2j.gameserver.model.actor.Attackable; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.scripting.EventType; import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript; /** * @author Reborn12 * */ public class PartyZonePolymorph extends L2AttackableAIScript { private static final int[] MONSTER_IDS = { 1009, //Stage 1 spawn 1010, //Stage 2 spawn 1011, //Stage 3 spawn }; public PartyZonePolymorph() { super("ai/group"); } @Override protected void registerNpcs() { addEventIds(MONSTER_IDS, EventType.ON_KILL); } @Override public String onKill(Npc npc, Player killer, boolean isPet) { switch (npc.getNpcId()) { case 1009: { final Attackable newNpc = (Attackable) addSpawn(1010, npc, true, 0, false); attack(newNpc, killer); break; } case 1010: { final Attackable newNpc = (Attackable) addSpawn(1011, npc, true, 0, false); attack(newNpc, killer); break; } } return super.onKill(npc, killer, isPet); } }
  18. Dunno if that one is shared its for acis 370 i found that on a br ? website its antifeed pvp protection unfortunately it works exept this part +# If character died faster than timeout - pvp/pk points for killer will not increase+# and clan reputation will not be transferred+AntiFeedInterval = 120 any thoughts ? *code inside Spoiler*
  19. Hello i found this website vote system on my files and i would like to share it. You can see how it works here: Code: https://pastebin.com/sKhsKfbh Site: https://www110.zippyshare.com/v/nl2ghgap/file.htm The last time I checked it was working properly. (Ι don't remember who made it i think Atlas or something like that)
  20. Nothing special, just some small trivia engine I wrote back in 2012 for my server that I haven't been using since then because I dropped out this feature, so I leave it here if someone finds use for it package drake.aepvp.l2event; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.text.DecimalFormat; import java.util.ArrayList; import l2.ae.pvp.gameserver.ThreadPoolManager; import l2.ae.pvp.gameserver.model.actor.instance.L2PcInstance; import l2.ae.pvp.gameserver.network.serverpackets.CreatureSay; import l2.ae.pvp.gameserver.util.Broadcast; import l2.ae.pvp.gameserver.util.Util; import l2.ae.pvp.util.Rnd; public class TriviaEngine { private static final ArrayList<TriviaTemplate> _trivias = new ArrayList<>(); public TriviaEngine() { final File file = new File("./data/trivia.txt"); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { String line; while ((line = reader.readLine()) != null) { final String[] explode = line.split(" - "); _trivias.add(new TriviaTemplate(explode[0], explode[1])); } System.out.println("Succesfully loaded " + _trivias.size() + " Trivia Quizes!"); } catch (final Exception e) { e.printStackTrace(); System.out.println("Unsuccesfully loaded " + _trivias.size() + " Trivia Quizes!"); } if (_trivias.size() > 10) ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(() -> { TriviaEvent.currentTrivia = new TriviaEvent(); }, 1800000, 1600000 + Rnd.get(400000)); } public static class TriviaEvent { private static TriviaEvent currentTrivia; private static DecimalFormat df = new DecimalFormat("###.##"); private final long startTime = System.currentTimeMillis(); private L2PcInstance closeAnswer; private final TriviaTemplate trivia; public TriviaEvent() { trivia = Util.getRandomItem(_trivias); Broadcast(trivia.getQuestion()); Broadcast("PM \"trivia with the answer."); ThreadPoolManager.getInstance().scheduleGeneral(() -> { if (currentTrivia == this) { Broadcast("The correct answer was " + trivia.getAnswer() + ", unfortunately nobody found the answer before the deadline."); if (closeAnswer != null) { Broadcast(closeAnswer.getName() + " wins a small reward for being close enough!"); reward(closeAnswer, 0); } currentTrivia = null; } }, 90000); } private long getTimePassedMillis() { return System.currentTimeMillis() - startTime; } public void check(final L2PcInstance player, String answer) { final long timePassed = getTimePassedMillis(); toTrivia(player, answer, timePassed); answer = answer.toLowerCase(); final String correct = trivia.getAnswer().toLowerCase(); if (answer.equals(correct)) { fromTrivia(player, "That is the correct answer!"); reward(player, timePassed); Broadcast(player.getName() + " found the answer in " + format(timePassed) + " seconds!"); Broadcast("The correct answer was " + trivia.getAnswer() + "."); currentTrivia = null; } else if (answer.length() > 1 && (correct.indexOf(answer) != -1 || correct.startsWith(answer) || correct.endsWith(answer))) { fromTrivia(player, "You are close!"); if (closeAnswer == null) closeAnswer = player; } else fromTrivia(player, "Thats the incorrect answer."); } private void reward(final L2PcInstance player, final long time) { if (time == 0) player.addItem("Trivia", 6320, 1, player, true); else if (time < 4333) player.addItem("Trivia", 6320, 4, player, true); else if (time < 8666) player.addItem("Trivia", 6320, 3, player, true); else if (time < 91000) player.addItem("Trivia", 6320, 2, player, true); } private static void toTrivia(final L2PcInstance player, final String msg, final long timePassed) { final CreatureSay cs = new CreatureSay(0, 2, "->Trivia", "you answered \"" + msg + "\" in " + format(timePassed) + " seconds."); player.sendPacket(cs); } private static void fromTrivia(final L2PcInstance player, final String msg) { final CreatureSay cs = new CreatureSay(0, 2, "Trivia", msg); player.sendPacket(cs); } public void Broadcast(final String msg) { Broadcast.toAllOnlinePlayers(new CreatureSay(0, 18, "", "Trivia: " + msg)); } private static String format(final long time) { return df.format((double) time / 1000); } public static TriviaEvent getCurrentTrivia() { return currentTrivia; } } public static class TriviaTemplate { private final String _question; private final String _answer; public TriviaTemplate(final String question, final String answer) { _question = question; _answer = answer; } public String getQuestion() { return _question; } public String getAnswer() { return _answer; } } public static class InstanceHolder { protected static TriviaEngine instance = new TriviaEngine(); } public static TriviaEngine getInstance() { return InstanceHolder.instance; } } To connect it to your gameserver just put this somewhere in Say2.java if (_type == TELL && "trivia".equalsIgnoreCase(_target)) { final TriviaEvent trivia = TriviaEngine.TriviaEvent.getCurrentTrivia(); if (trivia == null) activeChar.sendMessage("Could not find an active Trivia Event."); else trivia.check(activeChar, _text); return; } Trivia data I was using (I generated this with a java program that was leeching QAs from various sites) https://pastebin.com/Bgei8Tpa Things you have to do by urself: Don't ask the same question within a time period Create your own QA data on trivias.txt Unhardcode the rewards or just edit them impelement a //reload feature The code is tested on live server and worked great, but it is not unit tested and I don't remember if these functions are regex vulnerable
  21. java/net/sf/l2j/gameserver/model/base/Experience.java public class Experience { public final static long LEVEL[] = { -1L, // level 0 (unreachable) 0L, 68L, 363L, 1168L, 2884L, 6038L, 11287L, 19423L, 31378L, 48229L, // level 10 71201L, 101676L, 141192L, 191452L, 254327L, 331864L, 426284L, 539995L, 675590L, 835854L, // level 20 1023775L, 1242536L, 1495531L, 1786365L, 2118860L, 2497059L, 2925229L, 3407873L, 3949727L, 4555766L, // level 30 5231213L, 5981539L, 6812472L, 7729999L, 8740372L, 9850111L, 11066012L, 12395149L, 13844879L, 15422851L, // level 40 17137002L, 18995573L, 21007103L, 23180442L, 25524751L, 28049509L, 30764519L, 33679907L, 36806133L, 40153995L, // level 50 45524865L, 51262204L, 57383682L, 63907585L, 70852742L, 80700339L, 91162131L, 102265326L, 114038008L, 126509030L, // level 60 146307211L, 167243291L, 189363788L, 212716741L, 237351413L, 271973532L, 308441375L, 346825235L, 387197529L, 429632402L, // level 70 474205751L, 532692055L, 606319094L, 696376867L, 804219972L, 931275828L, 1151275834L, 1511275834L, 2099275834L, 4200000000L, // level 80 6299994999L, 10499905559L, 16800005559L, 27299995559L, 44100005559L, //level 85 71400000000L }; /** * This is the first UNREACHABLE level.<BR> * ex: If you want a max at 85 & 99.99%, you have to put 86.<BR> * <BR> */ public final static byte MAX_LEVEL = 86; public final static byte MIN_NEWBIE_LEVEL = 6; public final static byte MAX_NEWBIE_LEVEL = 25; } com/l2jserver/gameserver/model/base/Experience.java public class Experience { public final static long LEVEL[] = { -1L, // level 0 (unreachable) 0L, 68L, 363L, 1168L, 2884L, 6038L, 11287L, 19423L, 31378L, 48229L, //level 10 71201L, 101676L, 141192L, 191452L, 254327L, 331864L, 426284L, 539995L, 675590L, 835854L, //level 20 1023775L, 1242536L, 1495531L, 1786365L, 2118860L, 2497059L, 2925229L, 3407873L, 3949727L, 4555766L, //level 30 5231213L, 5981539L, 6812472L, 7729999L, 8740372L, 9850111L, 11066012L, 12395149L, 13844879L, 15422851L, //level 40 17137002L, 18995573L, 21007103L, 23180442L, 25524751L, 28049509L, 30764519L, 33679907L, 36806133L, 40153995L, //level 50 45524865L, 51262204L, 57383682L, 63907585L, 70852742L, 80700339L, 91162131L, 102265326L, 114038008L, 126509030L, //level 60 146307211L, 167243291L, 189363788L, 212716741L, 237351413L, 271973532L, 308441375L, 346825235L, 387197529L, 429632402L, //level 70 474205751L, 532692055L, 606319094L, 696376867L, 804219972L, 931275828L, 1151275834L, 1511275834L, 2099275834L, 4200000000L, //level 80 6299994999L, 10499905559L, 16800005559L, 27299995559L, 44100005559L, //level 85 71400000000L }; /** * This is the first UNREACHABLE level.<BR> * ex: If you want a max at 85 & 99.99%, you have to put 86.<BR><BR> */ public final static byte MAX_LEVEL = 86; public final static byte MIN_NEWBIE_LEVEL = 6; public final static byte MAX_NEWBIE_LEVEL = 25; L2JFrozen: data/stats/experience.xml <?xml version="1.0" encoding="UTF-8"?> <table maxLevel="85" maxPetLevel="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/experience.xsd"> <experience level="1" tolevel="0" /> <experience level="2" tolevel="68" /> <experience level="3" tolevel="363" /> <experience level="4" tolevel="1168" /> <experience level="5" tolevel="2884" /> <experience level="6" tolevel="6038" /> <experience level="7" tolevel="11287" /> <experience level="8" tolevel="19423" /> <experience level="9" tolevel="31378" /> <experience level="10" tolevel="48229" /> <experience level="11" tolevel="71201" /> <experience level="12" tolevel="101676" /> <experience level="13" tolevel="141192" /> <experience level="14" tolevel="191452" /> <experience level="15" tolevel="254327" /> <experience level="16" tolevel="331864" /> <experience level="17" tolevel="426284" /> <experience level="18" tolevel="539995" /> <experience level="19" tolevel="675590" /> <experience level="20" tolevel="835854" /> <experience level="21" tolevel="1023775" /> <experience level="22" tolevel="1242536" /> <experience level="23" tolevel="1495531" /> <experience level="24" tolevel="1786365" /> <experience level="25" tolevel="2118860" /> <experience level="26" tolevel="2497059" /> <experience level="27" tolevel="2925229" /> <experience level="28" tolevel="3407873" /> <experience level="29" tolevel="3949727" /> <experience level="30" tolevel="4555766" /> <experience level="31" tolevel="5231213" /> <experience level="32" tolevel="5981539" /> <experience level="33" tolevel="6812472" /> <experience level="34" tolevel="7729999" /> <experience level="35" tolevel="8740372" /> <experience level="36" tolevel="9850111" /> <experience level="37" tolevel="11066012" /> <experience level="38" tolevel="12395149" /> <experience level="39" tolevel="13844879" /> <experience level="40" tolevel="15422851" /> <experience level="41" tolevel="17137002" /> <experience level="42" tolevel="18995573" /> <experience level="43" tolevel="21007103" /> <experience level="44" tolevel="23180442" /> <experience level="45" tolevel="25524751" /> <experience level="46" tolevel="28049509" /> <experience level="47" tolevel="30764519" /> <experience level="48" tolevel="33679907" /> <experience level="49" tolevel="36806133" /> <experience level="50" tolevel="40153995" /> <experience level="51" tolevel="45524865" /> <experience level="52" tolevel="51262204" /> <experience level="53" tolevel="57383682" /> <experience level="54" tolevel="63907585" /> <experience level="55" tolevel="70852742" /> <experience level="56" tolevel="80700339" /> <experience level="57" tolevel="91162131" /> <experience level="58" tolevel="102265326" /> <experience level="59" tolevel="114038008" /> <experience level="60" tolevel="126509030" /> <experience level="61" tolevel="146307211" /> <experience level="62" tolevel="167243291" /> <experience level="63" tolevel="189363788" /> <experience level="64" tolevel="212716741" /> <experience level="65" tolevel="237351413" /> <experience level="66" tolevel="271973532" /> <experience level="67" tolevel="308441375" /> <experience level="68" tolevel="346825235" /> <experience level="69" tolevel="387197529" /> <experience level="70" tolevel="429632402" /> <experience level="71" tolevel="474205751" /> <experience level="72" tolevel="532692055" /> <experience level="73" tolevel="606319094" /> <experience level="74" tolevel="696376867" /> <experience level="75" tolevel="804219972" /> <experience level="76" tolevel="931275828" /> <experience level="77" tolevel="1151275834" /> <experience level="78" tolevel="1511275834" /> <experience level="79" tolevel="2099275834" /> <experience level="80" tolevel="4200000000" /> <experience level="81" tolevel="6299994999" /> <experience level="82" tolevel="10499905559" /> <experience level="83" tolevel="16800005559" /> <experience level="84" tolevel="27299995559" /> <experience level="85" tolevel="44100005559" /> </table> L2JFrozen: data/xsd/experience.xsd <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <element name="table"> <complexType> <sequence minOccurs="1" maxOccurs="1"> <element name="experience" minOccurs="1" maxOccurs="80"> <complexType> <attribute name="level" use="required"> <simpleType> <restriction base="positiveInteger"> <minInclusive value="1" /> <maxInclusive value="85" /> </restriction> </simpleType> </attribute> <attribute name="tolevel" type="nonNegativeInteger" use="required" /> </complexType> </element> </sequence> <attribute name="maxLevel" use="required"> <simpleType> <restriction base="positiveInteger"> <minInclusive value="1" /> <maxInclusive value="85" /> </restriction> </simpleType> </attribute> <attribute name="maxPetLevel" use="required"> <simpleType> <restriction base="positiveInteger"> <minInclusive value="1" /> <maxInclusive value="85" /> </restriction> </simpleType> </attribute> </complexType> </element> </schema> pistevo 8a sas aresi ;)
  22. Hi there for one more time, i made this npc today because i can see there are lots of npc like this but there is not any like this i made today. It is just an NPC where player can choose what level would like to be. Price is being regulated automatically like that: Number_of_levels_decreased * Configurable_price. E.g: Player is 85 level, he chooses to be 70. His payment would be 15(levels) * code_price. Preview (HTM Dialog): How to install: 1. Create a new java file on data/scripts/custom/DeLevelManager/DeLevelManager.java Paste this code: package custom.DeLevelManager; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.model.L2Skill; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.UserInfo; /** * @author `Heroin * Made For Maxcheaters.com */ public class DeLevelManager extends Quest { private static final int npcid = 36650; // npc id private static final int MinLevel = 10; // Minimum Level, (e.g if you set 10, players wont be able to be level 9). private static final int ItemConsumeId = 57; // Item Consume id private int levels ; // Item Consume id private static final int ItemConsumeNumEveryLevel = 100; // Item ItemConsumeNumEveryLevel private static String htm = "data/scripts/custom/DeLevelManager/1.htm"; //html location private static String ItemName = ItemTable.getInstance().createDummyItem(ItemConsumeId).getItemName(); public DeLevelManager(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(npcid); addTalkId(npcid); addStartNpc(npcid); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { if (event.startsWith("dlvl")) { Dlvl(event, npc, player, event); } return ""; } private void Dlvl(String event, L2Npc npc, L2PcInstance player, String command) { try { String val = command.substring(5); int pointer = Integer.parseInt(val); int k = player.getLevel(); levels = k - pointer; if (player.getInventory().getItemByItemId(ItemConsumeId) == null) { player.sendMessage("You don't have enough items!"); return; } if (val == null) { player.sendMessage("Something went wrong!"); return; } if (pointer < 10) { player.sendMessage("Incorrect Level Number!"); return; } if (pointer < MinLevel) { player.sendMessage("Incorrect Level Number!"); return; } if (player.getLevel() <= pointer) { player.sendMessage("Your level is already lower."); return; } if (player.getInventory().getItemByItemId(ItemConsumeId).getCount() < ItemConsumeNumEveryLevel*levels) { player.sendMessage("You don't have enough items!"); return; } if (player.getInventory().getItemByItemId(ItemConsumeId).getCount() >= ItemConsumeNumEveryLevel) { k = player.getLevel(); final byte lvl = Byte.parseByte(pointer + ""); player.getStat().setLevel(lvl); player.sendMessage("Congratulations! You are now "+pointer+" level."); for(L2Skill sk : player.getAllSkills()) { player.removeSkill(sk); } player.broadcastStatusUpdate(); player.broadcastUserInfo(); player.sendPacket(new UserInfo(player)); player.sendPacket(new ExBrExtraUserInfo(player)); player.giveAvailableAutoGetSkills(); player.giveAvailableSkills(true, true); player.sendSkillList(); levels = k - pointer; player.destroyItemByItemId("DlvlManager", ItemConsumeId, ItemConsumeNumEveryLevel*levels, player, true); } } catch (Exception e) { player.sendMessage("Something went wrong try again."); } } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { final int npcId = npc.getNpcId(); if (player.getQuestState(getName()) == null) { newQuestState(player); } if (npcId == npcid) { String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htm); html = html.replaceAll("%player%", player.getName()); html = html.replaceAll("%itemname%", ItemName); html = html.replaceAll("%price%", ""+ItemConsumeNumEveryLevel+""); NpcHtmlMessage npcHtml = new NpcHtmlMessage(0); npcHtml.setHtml(html); player.sendPacket(npcHtml); } return ""; } public static void main(final String[] args) { new DeLevelManager(-1, DeLevelManager.class.getSimpleName(), "custom"); System.out.println("De Level Manager by `Heroin has been loaded successfully!"); } } 2.Create a new htm file on data/scripts/custom/HeroManager/1.htm Paste this code on it. <html> <title>%player%</title> <body><center> <img src="L2UI_CH3.herotower_deco" width=256 height=32></center><br> Hello there, if you want to low your current level, you came to right place!<br> You have just to choose the <font color=FF0000>number</font> of level you would like to be.<br> In exchange, i am going to take you <font color=LEVEL>%price% %itemname%</font> for <font color=LEVEL>each level </font> you decrease.<br> Remember: You can't choose a number higher than your current level.<br> <table width=270><tr> <td><button value="Change my level to: " action="bypass -h Quest DeLevelManager dlvl $lv" width=180 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td><edit var="lv" width=50></td> </tr></table> <br><br><br><br> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32></center> </body></html> 3. Add script on scripts.cfg file: custom/DeLevelManager/DeLevelManager.java 4. Run this query on your database or install the NPC by yourself. INSERT INTO `custom_npc` VALUES ('36650', '13173', 'DeLevelManager', '1', 'MaxCheaters.com', '1', 'LineageNPC.clear_npc', '8.00', '19.00', '85', 'male', 'L2Npc', null, null, null, null, null, '40', '43', '30', '21', '20', '20', '0', '0', null, null, null, null, '230', '1', '0', '333', '0', '0', '0', '60.00000', '120.00000', '1', '1', '0', '0'); How to Modify: Check Variables on code: private static final int npcid = 36650; // npc id private static final int MinLevel = 10; // Minimum Level, (e.g if you set 10, players wont be able to be level 9). private static final int ItemConsumeId = 57; // Item Consume id private int levels ; // Item Consume id private static final int ItemConsumeNumEveryLevel = 100; // Item ItemConsumeNumEveryLevel private static String htm = "data/scripts/custom/DeLevelManager/1.htm"; //html location Credits & Idea: `Heroin Adapted to l2jserver high five by Solomun:
  23. Kalhspera. edw pera ine 1 donate manager. apo ton l2sayn to exw vgalei kai to dinw se esas. parakalw mhn krazete. :D Code: http://pastebin.com/tuWcQAXQ EDIT: 3exasa na valw to name sto Instance. valte L2DonateShopInstance (ADAPTED FOR L2JACIS http://pastebin.com/6d9P4wm1 ) by member l2jkain SCREENSHOTS Download: Gia na doulepsi to code prepei na valete auta ta arxia. Click Me Diavaste to ReadMe.txt To sql uparxi sto arxio. To Donate Coin exei id 1704 Ean vgalei kapoio provlima kalo einai na kanete 1 post se auto to topic gia na to checkarw. :) Doulevei sto l2jfrozen last rev. twra gia prohgoumena den 3erw. :D UPDATED** //augment command http://www.maxcheaters.com/topic/207755-l2jfrozen-augment-command/ CREDITS: fofas
  24. Hello, i was searching for this command but i didnt found it in our forum so i decided to share it, below you can preview the html's How to install it? EASY: 1. GameServer\data\html\mods (add here the repair FOLDER not only the files) 2. GameServer\data\scripts\handlers\voicedcommandhandlers (only the file Repair.java) (dont forget to edit your masterhandler.java script) [Hidden Content] Credits: Szponiasty
×