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

Categories

  • Articles

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
    • Beyond.lt - High Five x3
    • Private Servers
    • iPlay.GG - Lineage 2 High Five x30
    • [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
  • Gaming Expiriance's Topics

Found 31 results

  1. ### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 573) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -648,6 +648,10 @@ public String _teamNameTvT, _originalTitleTvT; public int _originalNameColorTvT = 0, _countTvTkills, _countTvTdies, _originalKarmaTvT; public boolean _inEventTvT = false; /** CTF Engine parameters */ public String _teamNameCTF, @@ -666,7 +670,6 @@ _countDMkills, _originalKarmaDM; public boolean _inEventDM = false; public int _correctWord = -1; public boolean _stopKickBotTask = false; @@ -900,7 +903,18 @@ private final BlockList _blockList = new BlockList(); private int _team = 0; /** * lvl of alliance with ketra orcs or varka silenos, used in quests and aggro checks [-5,-1] varka, 0 neutral, [1,5] * ketra @@ -5632,6 +5646,8 @@ // Kill the L2PcInstance if(!super.doDie(killer)) return false; + + spreeKills = 0; Castle castle = null; if(getClan() != null) @@ -5834,6 +5850,22 @@ boolean isKillerPc = killer instanceof L2PcInstance; if(isKillerPc && ((L2PcInstance) killer).getClan() != null && getClan() != null && !isAcademyMember() && !((L2PcInstance) killer).isAcademyMember() && _clan.isAtWarWith(((L2PcInstance) killer).getClanId()) && ((L2PcInstance) killer).getClan().isAtWarWith(_clan.getClanId())) { + PlaySound _snd = new PlaySound(1, "enemydown", 0, 0, 0, 0, 0); + + Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); + for (L2PcInstance onlinePlayer : pls) + if (onlinePlayer.isOnline() == 1) + { + if (onlinePlayer.getClan() != null) + { + if (onlinePlayer.getClan() == pk.getClan() && onlinePlayer != pk) + { + onlinePlayer.sendPacket(_snd); + } + } + } + + if(getClan().getReputationScore() > 0) { ((L2PcInstance) killer).getClan().setReputationScore(((L2PcInstance) killer).getClan().getReputationScore() + 2, true); @@ -6109,11 +6141,12 @@ { // check about wars if(targetPlayer.getClan() != null && getClan() != null) - { + { if(getClan().isAtWarWith(targetPlayer.getClanId())) { if(targetPlayer.getClan().isAtWarWith(getClanId())) - { + { + // 'Both way war' -> 'PvP Kill' increasePvpKills(); if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL) @@ -6296,8 +6329,51 @@ /** * Increase the pvp kills count and send the info to the player */ + private int spreeKills = 0; public void increasePvpKills() { + spreeKills++; + + switch(spreeKills){ + + case 1: + PlaySound _snd1 = new PlaySound(1, "firstblood", 0, 0, 0, 0, 0); + sendPacket(_snd1); + break; + + case 2: + PlaySound _snd2 = new PlaySound(1, "doublekill", 0, 0, 0, 0, 0); + sendPacket(_snd2); + break; + + case 3: + PlaySound _snd3 = new PlaySound(1, "triplekill", 0, 0, 0, 0, 0); + sendPacket(_snd3); + break; + + case 4: + PlaySound _snd4 = new PlaySound(1, "megakill", 0, 0, 0, 0, 0); + sendPacket(_snd4); + break; + + case 5: + PlaySound _snd5 = new PlaySound(1, "ultrakill", 0, 0, 0, 0, 0); + sendPacket(_snd5); + break; + + case 10: + PlaySound _snd10 = new PlaySound(1, "monsterkill", 0, 0, 0, 0, 0); + sendPacket(_snd10); + break; + + case 15: + PlaySound _snd15 = new PlaySound(1, "killingspree", 0, 0, 0, 0, 0); + sendPacket(_snd15); + break; + default: + ; + } + int x,y,z; x = getX(); y = getY(); @@ -6658,6 +6734,10 @@ { newKarma = Integer.MAX_VALUE - getKarma(); } + PlaySound _snd = new PlaySound(1, "knife", 0, 0, 0, 0, 0); + sendPacket(_snd); + broadcastPacket(_snd); + // Add karma to attacker and increase its PK counter int x,y,
  2. Hello guys! I adapted the code about "Cannot Enchant near Warehouse" I found the code by Prince* I adapted this code for Frozen... Try it and tell me if it's working good because i didn't check it. Thank you :) "I know it wasn't hard to adapt it but i wanted to share it for frozen because some guys don't know how to do it... Peace :)" --- head-src/com/l2jfrozen/gameserver/clientpackets/RequestEnchantItem.java +++ head-src/com/l2jfrozen/gameserver/clientpackets/RequestEnchantItem.java @@ 20,1 @@ import com.l2jfrozen.Collection; import com.l2jfrozen.Logger; import com.l2jfrozen.gameserver.model.Inventory; +import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.L2ItemInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.gameserver.model.actor.instance.L2WarehouseInstance; import com.l2jfrozen.gameserver.network.SystemMessageId; import com.l2jfrozen.gameserver.model.L2ItemInstance; +import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.L2World; @@ -61,7 +61,15 @@ { L2PcInstance activeChar = getClient().getActiveChar(); + Collection<L2Character> knowns = activeChar.getKnownList().getKnownCharactersInRadius(400); if (activeChar == null || _objectId == 0) return; + + for (L2Object wh : knowns) + { + if (wh instanceof L2WarehouseInstance) + { + activeChar.sendMessage("You cannot enchant near warehouse."); + return; + } + } L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); L2ItemInstance scroll = activeChar.getActiveEnchantItem();
  3. You know the drill. Free time, coded something simple. Many servers have featured streamers so why not reward people for watching them. This is an auto reward system which rewards all players for watching the stream if there are more than a specific view count watching. You will need a client id key from twitch here https://dev.twitch.tv/dashboard/apps/create (You don't need a valid oauth url so fake one) All the configs are at the top of the file because i cba creating an actual config. You will need the gson library. You can download it here https://github.com/Elfocrash/L2ACP-api/raw/master/lib/gson-2.6.2.jar Pastebin line: https://pastebin.com/ff4ka830 That's all folks.
  4. +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -62,6 +63,12 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendMessage("You cannot craft while inside Multifunction zone."); + return; + } + if (!player.isInsideZone(ZoneId.NO_STORE)) { player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE); +++ java/net/sf/l2j/gameserver/network/clientpackets/Logout.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -56,6 +57,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.logout_zone) + { + player.sendMessage("You cannot Logout while inside a Multifunction zone."); + player.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + if (player.isInsideZone(ZoneId.NO_RESTART)) { player.sendPacket(SystemMessageId.NO_LOGOUT_HERE); +++java/net/sf/l2j/gameserver/model/zone/ZoneId.java DANGER_AREA(15), CAST_ON_ARTIFACT(16), NO_RESTART(17), - SCRIPT(18); + SCRIPT(18), + MULTI_FUNCTION(19); private final int _id; +++java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -83,6 +84,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendPacket(new PrivateStoreManageListBuy(player)); + player.sendMessage("You cannot start store while inside Multifunction zone."); + return; + } + if (!player.isInsideZone(ZoneId.NO_STORE)) { player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE); +++java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -71,6 +72,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendPacket(new PrivateStoreManageListSell(player, _packageSale)); + player.sendMessage("You cannot start store while inside Multifunction zone."); + return; + } + if (!player.getAccessLevel().allowTransaction()) { player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT); +++java/net/sf/l2j/gameserver/network/serverpackets/Die.java. +import net.sf.l2j.gameserver.model.zone.ZoneId; +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; public class Die extends L2GameServerPacket { private final int _charObjId; private final boolean _fake; private boolean _sweepable; + private boolean _canTeleport; private L2AccessLevel _access = AccessLevels._userAccessLevel; @@ -47,6 +50,7 @@ Player player = (Player) cha; _access = player.getAccessLevel(); _clan = player.getClan(); + _canTeleport = !(player.isInsideZone(ZoneId.MULTI_FUNCTION) && L2MultiFunctionZone.revive); @@ -86,7 +90,7 @@ } else { - writeD(0x01); // to nearest village + writeD(_canTeleport ? 0x01 : 0); // to nearest village @@ -96,7 +100,7 @@ - if (_clan != null) + if (_canTeleport && _clan != null) { ++++java/net/sf/l2j/gameserver/model/actor/instance/Player.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -4384,6 +4385,8 @@ // Add PvP point to attacker. setPvpKills(getPvpKills() + 1); + L2MultiFunctionZone.givereward(this); + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); } ++++java/net/sf/l2j/gameserver/model/itemcontainer/ItemContainer.java { protected static final Logger _log = Logger.getLogger(ItemContainer.class.getName()); - protected final List<ItemInstance> _items; + public final List<ItemInstance> _items; protected ItemContainer() { +++java/net/sf/l2j/gameserver/model/zone/type/L2MultiFunctionZone.java CREATE NEW THIS FILE DOES NOT EXIST! package net.sf.l2j.gameserver.model.zone.type; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.List; import java.util.Properties; import net.sf.l2j.commons.concurrent.ThreadPool; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Summon; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.itemcontainer.PcInventory; import net.sf.l2j.gameserver.model.zone.L2ZoneType; import net.sf.l2j.gameserver.model.zone.ZoneId; public class L2MultiFunctionZone extends L2ZoneType { public L2MultiFunctionZone(int id) { super(id); loadConfigs(); } public static boolean pvp_enabled, restart_zone, store_zone, logout_zone, revive_noblesse, revive_heal, revive, remove_buffs, remove_pets, give_noblesse; static int radius, enchant, revive_delay; static int[][] spawn_loc; L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1); private static List<String> items = new ArrayList<>(), classes = new ArrayList<>(), grades = new ArrayList<>(); public static List<int[]> rewards = new ArrayList<>(); static String[] gradeNames = { "", "D", "C", "B", "A", "S" }; @Override protected void onEnter(Creature character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); character.setInsideZone(ZoneId.MULTI_FUNCTION, true); if (character instanceof Player) { Player activeChar = ((Player) character); if (classes != null && classes.contains("" + activeChar.getClassId().getId())) { activeChar.teleToLocation(83597, 147888, -3405, 0); activeChar.sendMessage("Your class is not allowed in the MultiFunction zone."); return; } for (ItemInstance o : activeChar.getInventory()._items) { if (o.isEquipable() && o.isEquipped() && !checkItem(o)) { int slot = activeChar.getInventory().getSlotFromItem(o); activeChar.getInventory().unEquipItemInBodySlotAndRecord(slot); activeChar.sendMessage(o.getItemName() + " unequiped because is not allowed inside this zone."); } } if (give_noblesse) noblesse.getEffects(activeChar, activeChar); if (pvp_enabled) activeChar.updatePvPFlag(1); activeChar.sendMessage("You entered in a MultiFunction zone."); clear(activeChar); } } @Override protected void onExit(Creature character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); character.setInsideZone(ZoneId.MULTI_FUNCTION, false); if (character instanceof Player) { Player activeChar = ((Player) character); activeChar.sendMessage("You left from a MultiFunction zone."); if (pvp_enabled) activeChar.updatePvPFlag(0); } } @Override public void onDieInside(final Creature character) { if (character instanceof Player) { final Player activeChar = ((Player) character); if (revive) { ThreadPool.schedule(new Runnable() { @Override public void run() { activeChar.doRevive(); heal(activeChar); int[] loc = spawn_loc[Rnd.get(spawn_loc.length)]; activeChar.teleToLocation(loc[0] + Rnd.get(-radius, radius), loc[1] + Rnd.get(-radius, radius), loc[2], 0); } }, revive_delay * 1000); } } } @Override public void onReviveInside(Creature character) { if (character instanceof Player) { Player activeChar = ((Player) character); if (revive_noblesse) noblesse.getEffects(activeChar, activeChar); if (revive_heal) heal(activeChar); } } static void heal(Player activeChar) { activeChar.setCurrentHp(activeChar.getMaxHp()); activeChar.setCurrentCp(activeChar.getMaxCp()); activeChar.setCurrentMp(activeChar.getMaxMp()); } private static void clear(Player player) { if (remove_buffs) { player.stopAllEffects(); if (remove_pets) { Summon pet = player.getPet(); if (pet != null) { pet.stopAllEffects(); pet.unSummon(player); } } } else { if (remove_pets) { Summon pet = player.getPet(); if (pet != null) pet.unSummon(player); } } } public static void givereward(Player player) { if (player.isInsideZone(ZoneId.MULTI_FUNCTION)) { for (int[] reward : rewards) { PcInventory inv = player.getInventory(); inv.addItem("Custom Reward", reward[0], reward[1], player, player); } } } public static boolean checkItem(ItemInstance item) { int o = item.getItem().getCrystalType().ordinal(); int e = item.getEnchantLevel(); if (enchant != 0 && e >= enchant) return false; if (grades.contains(gradeNames[o])) return false; if (items != null && items.contains("" + item.getItemId())) return false; return true; } private static void loadConfigs() { try { Properties prop = new Properties(); prop.load(new FileInputStream(new File("./config/MultiFunctionZone.properties"))); pvp_enabled = Boolean.parseBoolean(prop.getProperty("EnablePvP", "False")); spawn_loc = parseItemsList(prop.getProperty("SpawnLoc", "150111,144740,-12248")); revive_delay = Integer.parseInt(prop.getProperty("ReviveDelay", "10")); if (revive_delay != 0) revive = true; give_noblesse = Boolean.parseBoolean(prop.getProperty("GiveNoblesse", "False")); String[] propertySplit = prop.getProperty("Items", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) items.add(i); propertySplit = prop.getProperty("Grades", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) if (i.equals("D") || i.equals("C") || i.equals("B") || i.equals("A") || i.equals("S")) grades.add(i); propertySplit = prop.getProperty("Classes", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) classes.add(i); radius = Integer.parseInt(prop.getProperty("RespawnRadius", "500")); enchant = Integer.parseInt(prop.getProperty("Enchant", "0")); remove_buffs = Boolean.parseBoolean(prop.getProperty("RemoveBuffs", "False")); remove_pets = Boolean.parseBoolean(prop.getProperty("RemovePets", "False")); restart_zone = Boolean.parseBoolean(prop.getProperty("NoRestartZone", "False")); store_zone = Boolean.parseBoolean(prop.getProperty("NoStoreZone", "False")); logout_zone = Boolean.parseBoolean(prop.getProperty("NoLogoutZone", "False")); revive_noblesse = Boolean.parseBoolean(prop.getProperty("ReviveNoblesse", "False")); revive_heal = Boolean.parseBoolean(prop.getProperty("ReviveHeal", "False")); propertySplit = prop.getProperty("Rewards", "57,100000").split(";"); for (String reward : propertySplit) { String[] rewardSplit = reward.split(","); if (rewardSplit.length == 2) { try { rewards.add(new int[] { Integer.parseInt(rewardSplit[0]), Integer.parseInt(rewardSplit[1]) }); } catch (NumberFormatException nfe) { } } } } catch (Exception e) { e.printStackTrace(); } } private static int[][] parseItemsList(String line) { final String[] propertySplit = line.split(";"); if (propertySplit.length == 0) return null; int i = 0; String[] valueSplit; final int[][] result = new int[propertySplit.length][]; for (String value : propertySplit) { valueSplit = value.split(","); if (valueSplit.length != 3) return null; result[i] = new int[3]; try { result[i][0] = Integer.parseInt(valueSplit[0]); } catch (NumberFormatException e) { return null; } try { result[i][1] = Integer.parseInt(valueSplit[1]); } catch (NumberFormatException e) { return null; } try { result[i][2] = Integer.parseInt(valueSplit[2]); } catch (NumberFormatException e) { return null; } i++; } return result; } } ++++java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java +import net.sf.l2j.gameserver.model.zone.ZoneId; +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -96,6 +98,12 @@ if (item == null) return; + if (getClient().getActiveChar().isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.checkItem(item)) + { + getClient().getActiveChar().sendMessage("You cannot use " +item.getName()+ " inside this zone."); + return; + } + +++java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -54,6 +55,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.restart_zone) + { + player.sendMessage("You cannot restart while inside a Multifunction zone."); + sendPacket(RestartResponse.valueOf(false)); + return; + } + if (player.isInsideZone(ZoneId.NO_RESTART)) { player.sendPacket(SystemMessageId.NO_RESTART_HERE); +++config/MultiFunctionZone.properties # --------------------------------------------------------------------------- # MultiFunctionZone # --------------------------------------------------------------------------- # This option will turn on PvP flag to all people when entering to the zone EnablePvP = True # If set to false, zone will be no-restart zone NoRestartZone = False # If set to false, zone will be no-logout zone NoLogoutZone = False # If set to false, zone will be no-store zone NoStoreZone = False # Give noblesse after revive? ReviveNoblesse = False # Heal after revive? ReviveHeal = False # Delay, in seconds, to wait before revive # 0 to disable ReviveDelay = 10 # Set the spawn points where players will be teleported on revive, if enabled # example:150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 SpawnLoc = 150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 # Random respawn radius RespawnRadius = 500 # If set to true, players will take noblesse blessing when entering GiveNoblesse = True # Remove buffs when entering to the zone RemoveBuffs = False # Remove pets when entering to the zone RemovePets = False # Special rewards when hunting inside this zone # example: 57,100000;14720,1 Rewards = 57,100000;14720,1 # List of Items(id's) that won't be usable inside this area and also will be unequiped when entering # (armor, weapons, scrolls, potions, etc), example: 728,7575, 6383, 1538 Items = 728,7575,6383,1538 # List of Grades that won't be usable inside this area and also will be unequiped when entering # example: D,C,B,A,S Grades = C,B,A # Items with this enchant or more won't be usable inside this area and also will be unequiped when entering # 0 to disable Enchant = 0 # Players with one of that classes won't be able to enter to the zone # example: 93,85,12 Classes = 92 \ No newline at end of file +++ data/xml/zones/MultiFunctionZone.xml <?xml version="1.0" encoding="UTF-8"?> <list> <zone type="MultiFunctionZone" shape="Cuboid" minZ="-3752" maxZ="-352"><!-- gludin_pvp --> <node X="-88411" Y="141732" /> <node X="-87429" Y="142708" /> <spawn X="-86979" Y="142402" Z="-3643" /> </zone> </list> CREDITS: ^Wyatt
  5. Hello..read the code and you will understand what is it go to net.sf.l2j.gameserver.model.actor.instance.Player.java find this find final boolean hadHero and put this private int spreeKill = 0; private int spreeKills = 0; private int KILL_STEAK = 0; it will look like that find final boolean hadHero private int spreeKill = 0; private int spreeKills = 0; private int KILL_STEAK = 0; now find this setPvpKills(getPvpKills() + 1); and put this KILL_STEAK++; switch (KILL_STEAK) { case 20: sendMessage("You are almost on a killing spree 5 more kills"); break; case 25: Broadcast.announceToOnlinePlayers(getName() + " is on a killing spree!!"); startAbnormalEffect(AbnormalEffect.SLEEP); //SLEEP = VITALITY EFFECT setHero(true); PlaySound _snd25 = new PlaySound(1, "killing spree"); sendPacket(_snd25); break; } spreeKill++; switch (spreeKill) { case 1: sendPacket(new CreatureSay(0, 0, "PvP", getName() + " just got a First Blood!!")); break; case 2: sendPacket(new CreatureSay(0, 2, "PvP", getName() + " just got a Double Kill!!")); break; case 3: sendPacket(new CreatureSay(0, 3, "PvP", getName() + " just got a Triple Kill!!")); break; case 4: sendPacket(new CreatureSay(0, 4, "PvP", getName() + " has a Quadra kill!!!")); break; case 5: sendPacket(new CreatureSay(0, 0, "PvP", getName() + " has a Penta Kill!!")); break; case 6: sendPacket(new CreatureSay(0, 2, "PvP", getName() + " just got a Legendary!!")); break; } spreeKills++; switch (spreeKills) { case 1: PlaySound _snd1 = new PlaySound(1, "firstblood"); sendPacket(_snd1); break; case 2: PlaySound _snd2 = new PlaySound(1, "doublekill"); sendPacket(_snd2); break; case 3: PlaySound _snd3 = new PlaySound(1, "triplekill"); sendPacket(_snd3); break; case 4: PlaySound _snd4 = new PlaySound(1, "quadrakill"); sendPacket(_snd4); break; case 5: PlaySound _snd5 = new PlaySound(1, "pentakill"); sendPacket(_snd5); break; case 6: PlaySound _snd6 = new PlaySound(1, "legendary"); sendPacket(_snd6); break; default: } find this public boolean doDie(Creature killer) and put this if (KILL_STEAK > 0) { if (KILL_STEAK > 24) Broadcast.announceToOnlinePlayers(killer.getName() + " has stopped " + getName() + "'s killing spree of " + KILL_STEAK + " kills!!"); if (!hadHero) setHero(false); stopAbnormalEffect(AbnormalEffect.SLEEP); spreeKill = 0; spreeKills = 0; KILL_STEAK = 0; } Download this file Vitality Effect Interlude Download this file League of Legends Sounds (PUT THEM IN THE Music folder in you Lineage II) And you are done.
  6. Hello here is a pvp auto enchant code for acis when you kill some you have a chance to get a random item from yours by +1 http://prntscr.com/i451wk go to net/sf/l2j/gameserver/model/actor/instance/player.java find this protected int _classIndex; and put this /** Pvp enchant System **/ private int rewardConsecutiveKillCount = 0; like that protected int _classIndex; /** Pvp enchant System **/ private int rewardConsecutiveKillCount = 0; next find this // Add PvP point to attacker. setPvpKills(getPvpKills() + 1); and paste this rewardConsecutiveKillCount++; like that // Add PvP point to attacker. setPvpKills(getPvpKills() + 1); rewardConsecutiveKillCount++; and under this rewardConsecutiveKillCount++; paste all this final ItemInstance pvpwep = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); final ItemInstance pvphead = getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD); final ItemInstance pvpgloves = getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES); final ItemInstance pvpchest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST); final ItemInstance pvplegs = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS); final ItemInstance pvpfeet = getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET); final ItemInstance pvpneck = getInventory().getPaperdollItem(Inventory.PAPERDOLL_NECK); final ItemInstance pvplf = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LFINGER); final ItemInstance pvprf = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RFINGER); if (rewardConsecutiveKillCount >= Config.PVP_COUNT_TILL_ENCHANTMENT && Config.ENABLE_PVP_ENCHANTMENT) { switch (Rnd.get(9)) { case 0: { pvpwep.setEnchantLevel(pvpwep.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 1: { pvphead.setEnchantLevel(pvphead.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_HEAD) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 2: { pvpgloves.setEnchantLevel(pvpgloves.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 3: { pvpchest.setEnchantLevel(pvpchest.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 4: { pvplegs.setEnchantLevel(pvplegs.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 5: { pvpfeet.setEnchantLevel(pvpfeet.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 6: { pvpneck.setEnchantLevel(pvpneck.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_NECK) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 7: { pvplf.setEnchantLevel(pvplf.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_LFINGER) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } case 8: { pvprf.setEnchantLevel(pvprf.getEnchantLevel() + 1); sendMessage("Your " + getInventory().getPaperdollItem(Inventory.PAPERDOLL_RFINGER) + "has been enchanted by +1 due to your pvp kills"); rewardConsecutiveKillCount = 0; break; } } } go to net/sf/l2j find this public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; and paste this like that public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS; /** PvP auto enchant system */ public static boolean ENABLE_PVP_ENCHANTMENT; public static int PVP_COUNT_TILL_ENCHANTMENT; find this ALT_GAME_SUBCLASS_WITHOUT_QUESTS = players.getProperty("AltSubClassWithoutQuests", false); and put this like that ALT_GAME_SUBCLASS_WITHOUT_QUESTS = players.getProperty("AltSubClassWithoutQuests", false); ENABLE_PVP_ENCHANTMENT = players.getProperty("EnablePvpEnchantSystem", false); PVP_COUNT_TILL_ENCHANTMENT = players.getProperty("PvpCountTillEnchanment", 20); go to config/players.properties #=================================# #== by thelwhelprepaidia ==# #== Pvp Enchant System ==# #=================================# #By enabling this then every X pvp #in a row the player will get randomly #a part of his armor,weapon or jewel that #is currently equiped automatically enchanted #To enable the system set True below EnablePvpEnchantSystem = True #Every how many kills you want the chars to be #awared with +1? PvpCountTillEnchanment = 20 And you are done. credits Elfocrash
  7. ### Eclipse Workspace Patch 1.0 #P aCis_Gameserver Index: java/net/sf/l2j/gameserver/model/multisell/Ingredient.java =================================================================== --- java/net/sf/l2j/gameserver/model/multisell/Ingredient.java (revision 15) +++ java/net/sf/l2j/gameserver/model/multisell/Ingredient.java (working copy) @@ -22,14 +22,14 @@ public Ingredient(StatsSet set) { + this(set.getInteger("id"), set.getInteger("count"), set.getInteger("enchantmentLevel", 0), set.getBool("isTaxIngredient", false), set.getBool("maintainIngredient", false)); - this(set.getInteger("id"), set.getInteger("count"), set.getBool("isTaxIngredient", false), set.getBool("maintainIngredient", false)); } + public Ingredient(int itemId, int itemCount, int enchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient) - public Ingredient(int itemId, int itemCount, boolean isTaxIngredient, boolean maintainIngredient) { _itemId = itemId; _itemCount = itemCount; + _enchantmentLevel = enchantmentLevel; - _isTaxIngredient = isTaxIngredient; _maintainIngredient = maintainIngredient; @@ -42,7 +42,7 @@ */ public Ingredient getCopy() { + return new Ingredient(_itemId, _itemCount, _enchantmentLevel, _isTaxIngredient, _maintainIngredient); - return new Ingredient(_itemId, _itemCount, _isTaxIngredient, _maintainIngredient); } public final int getItemId() Index: java/net/sf/l2j/gameserver/model/multisell/PreparedEntry.java =================================================================== --- java/net/sf/l2j/gameserver/model/multisell/PreparedEntry.java (revision 15) +++ java/net/sf/l2j/gameserver/model/multisell/PreparedEntry.java (working copy) @@ -48,7 +48,7 @@ // now add the adena, if any. adenaAmount += _taxAmount; // do not forget tax if (adenaAmount > 0) + _ingredients.add(new Ingredient(57, adenaAmount, 0, false, false)); - _ingredients.add(new Ingredient(57, adenaAmount, false, false)); // now copy products _products = new ArrayList<>(template.getProducts().size());
  8. hello i find a code. this is for admin can see clan chat ingame so take it https://pastebin.com/w3Ua5ivW
  9. i adapt this... http://www.l2jserver.com/forum/viewtopic.php?f=69&t=31892&p=193413&hilit=pailaka#p193413 but need some fix if you can help and share....TODO: AGGRO IN GROUP FIX LATANA ANIMATION FIX LATANA RANGED SKILLS FIX BUFFS COUNTS TO 0 WHEN PLAYER DIE MOVIE WHEN YOU REACH TO LATANA Download
  10. I once worked on my project and stopped it. Yesterday i was browsing through the backup of my old project and found this buffer. I think it could be useful for someone. Thanks to @Trance for coding. I modified abit and adapted to l2jfrozen. Unfortunately i can't find the HTML anymore, so you have to create your own. Here you go. What it does? Watch here. Create a file in gameserver/model/actor/instance called L2NpcBufferInstance.java Code: https://pastebin.com/Wca90uMC
  11. [ES] En la vista de lo popular de Acis y de lo mucho que se complica la gente en adaptar y meter nuevos códigos me dispuse a hacer este engine. Este engine contará con un sistema de listeners y codigos que nos permitirá diseñar de forma sencilla todos nuestros mods prácticamente sin modificar el core de nuestro proyecto, esto hará más fácil actualizar nuestro pack y evitar errores de programación. [EN] In the view of popular Acis and how much people complicate in adapting and putting new codes I was prepared to do this engine. This engine will have a system of listeners and codes that will allow us to easily design all our mods practically without modifying the core of our project, this will make it easier to update our pack and avoid programming errors. REPOSITORIO/ REPOSITORY * https://svn.code.sf.net/p/l2j-engine-mods/code/L2J_EngineMods/ CAMBIOS / TIMELINE * https://sourceforge.net/p/l2j-engine-mods/code/commit_browser SUPPORT * https://l2devsadmins.net/fissban/index.php DESCARGAR E INSTALAR / DOWNLOAD AND INSTALL https://l2devsadmins.net/fissban/index.php?topic=23.0 [ES] Ire agregando mas mods a medida que me lo vayan pidiendo y vea que tenga tiempo en crearlos....el test queda por parte de ustedes ya que esto es para ustedes, or ahora solo cuenta con estos mods. [EN] I will add more mods as they ask me and see that I have time to create them .... the test remains on you as this is for you, for now you only have these mods.. -> MODS -> AnnounceKillBoss -> AntiBot -> ColorAccordingAmountPvPorPk -> EnchantAbnormalEffectArmor -> FakePlayer -> NewCharacterCreated -> OfflineShop -> PvpReward -> SellBuffs -> SpreeKills -> SubClassAcumulatives -> SystemAio -> SystemVip -> VoteReward -> EVENTS -> BonusWeekend -> Champions -> CityElpys -> RandomBossSpawn -> NPC -> NpcBufferScheme. -> NpcClassMaster. -> NpcRanking. -> NpcTeleporter. -> NpcVoteRewardHopzone. -> NpcVoteRewardNetwork. -> NpcVoteRewardTopzone.
  12. Hello members, I made an event because Christmas is coming I made it with xml version ( i like it more..) Here's the video: Source Files Npc's Credits for the awesome htmls : @Sinister Smile What is this event? When a mob dies there is a chance to spawn santa boy/girl and get some rewards. I do not think you need more explainations... Check the xml and set it as you wish! (Rewards are unlimited but one of them will be chosen) Edit: Coded in acis 372 Updates: ConcurrentHashMap replace by ArrayList ty @Tryskell Override onSpawn method removed in SantaClaus instance ty @Tryskell Xml reworked (removed id) Fixed html path Fixed 1 bug while storing rewards. Added npc's link
  13. The following codes are just some tools i made years ago on the go to help me deal with time consuming shits faster. Code is not perfect, its crap and stupid but still will help you work faster instead of wasting time doing things by hand. 1. Add new zones while in game. Just hit //addzone (ID) and put the first zone_id which is going to be put in ur zone_vertice in DB. Once you u hit the command, all the next calls will continue adding routes for the previous ID. If you wanna go for another ID just call the first command again. public class AdminZone implements IAdminCommandHandler { static int _zoneId = -1; private static final String[] ADMIN_COMMANDS = { . . "admin_addzone" }; . . . @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { . . . else if (actualCommand.equalsIgnoreCase("admin_addzone")) { if (st.hasMoreTokens()) { try { int zoneId = Integer.parseInt(st.nextToken()); if (!checkIfZoneExists(zoneId)) { // add new field in db addNewZone(zoneId, activeChar.getLoc()); activeChar.sendMessage("New zoneId added!! new zoneId: " + zoneId + "."); activeChar.sendMessage("Added new route point. zoneId: " + zoneId + " X: " + activeChar.getLoc().getX() + " Y: " + activeChar.getLoc().getY()); _zoneId = zoneId; } else { // already exists, find last route and add next with route ++ addNextRoute(zoneId, activeChar.getLoc()); _zoneId = zoneId; activeChar.sendMessage("Next route added for zoneId: " + zoneId + " X: " + activeChar.getLoc().getX() + " Y: " + activeChar.getLoc().getY()); } } catch (Exception e) { activeChar.sendMessage("Incorrect zoneId specified"); e.printStackTrace(); } } else { try { if (_zoneId < 0) { activeChar.sendMessage("ZoneId is negative."); return false; } // already exists, find last route and add next with route ++ addNextRoute(_zoneId, activeChar.getLoc()); activeChar.sendMessage("Next route added for zoneId: " + _zoneId + " X: " + activeChar.getLoc().getX() + " Y: " + activeChar.getLoc().getY()); } catch (Exception e) { activeChar.sendMessage("Incorrect zoneId specified"); e.printStackTrace(); } } } 2. Add automatically drops to more than 1 monster. (same droplist). Edit the first sql u can select all the monsters/raids you wanna add the same droplists, fill the drops void method with the drops and THE STRUCTURE that ur droplist table follows. Execute the file and get the output(sql code which u can call from an sql query to apply those changes in ur table. package test; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.datatables.FakePcsTable; class AddDropRaids { public static void main(String args[]) { ArrayList<Integer> raids = new ArrayList<>(); String RAIDBOSSES = "SELECT boss_id FROM raidboss_spawnlist WHERE `boss_id` IN (SELECT id from npc where `type`='L2RaidBoss' AND `level`>84 AND `level`<90);"; try (Connection con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement st = con.prepareStatement(RAIDBOSSES); ResultSet rs = st.executeQuery();) { if (rs.next()) { raids.add(rs.getInt("id")); } } catch (Exception e) { e.printStackTrace(); } droplist89(raids); } public static void droplist89(ArrayList<Integer> raids) { for (int raid : raids) { try { if (FakePcsTable.getInstance().getFakePc(raid) == null) { PrintStream myconsole = new PrintStream(new File("E://output.txt")); System.setOut(myconsole); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '1000002', '1', '1', '17', '100000', '9', '0');"); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '1000075', '1', '1', '18', '5000', '0', '0');"); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '1000031', '1', '1', '19', '1000', '0', '0');"); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '60081', '1', '1', '20', '5000', '0', '0');"); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '1000076', '1', '1', '21', '80000', '0', '0');"); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '1000070', '1', '1', '22', '150000', '0', '0');"); myconsole.println("INSERT INTO `droplist` VALUES ('" + raid + "', '98020', '25', '25', '23', '1000000', '10', '0');"); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } Im sure i got more of such tools. Gunna share with u more in case i discover them.
  14. Hello if you need any code/help about your server you can request here.
  15. As title say.. Source 4Shared Direct Link for DP Direct Link for Core Enjoy fuckers..
  16. Hello members, Since this section is rly dead and i always like to share things here is another one.. How is this working? First of all you have to create your personal l2 page in facebook. After that search in facebook settings to change the url-name of your page to www.facebook.com/L2Tests and not www.facebook.com/HAW#$A#@ Create your personal Access Token here It will be generated as short-lived token (means that it will expire in about an hour). change it to long-lived here (means that it will expire after 2 months ,maybe more) Download facebook api restfb-1.46.0 Add it in your sources (i will not provide how to...) Implement the code i'm giving Source / Files Source Code Htmls/Database Config Dont forget to add the new admin commands in adminCommands.xml <aCar name="admin_fbreload" accessLevel="7"/> <aCar name="admin_facebook" accessLevel="7"/> <aCar name="admin_showPosts" accessLevel="7"/> <aCar name="admin_delPost" accessLevel="7"/> <aCar name="admin_addPost" accessLevel="7"/> <aCar name="admin_turnFb" accessLevel="7"/> <aCar name="admin_clean_facebook_database" accessLevel="7"/> <aCar name="admin_fb_auto_announce" accessLevel="7"/> (these commands are used for all actions , you can use these actions direcly by writing the command with the necessary tokens) Videos Admin view User view More explaination? If you successfully passed all the above moves: Set your facebook page name in FacebookPageName in facebook.properties Set your Access Token in FacebookApiToken //facebook command will display the panel you just saw /facebook command for users You can add/remove any of the posts that are inside of your page. You can set an automatic reward: You set the number of likes you want to collect from the sum of all the pages you have set, item id, item count. When the likes will be >= the num you set, then all the online players will get the reward you set. The players have to like All the posts you added to take the reward. I am mostly using usercommand handlers , if you will too, then don't forget to add one more line in your commandname-e.dat and edit the id of the command (in FaceBook.java) to your id if you have voiced you can add it there. ================================================================================== This code is made for aCis 371 rev. Note: I havent check it in live server , i just made it in localhost so you have to give a try in my shitty code and check if any bug will appear. If anyone wants the buttons (the blue ones) you can get the utx from here (Thanks Sinister Smile) If someone finds any bug please let me know, i can help. Thank you!
  17. 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 :)
  18. ExGuard team this is one patch for you see how work hwid , open url , Exception ip system ( for internet cafe ) i have change only protocol version so is very easy to bypass it ( is only for test servers ) Interlude Client java code and dll virustotal if don't work with your system can you download this
  19. hello guys i share a good panel for low rate or pvp server is working in all project Update Link: https://pastebin.com/kpQ3rT7k Sql icons + code : here Update 28/11/2017 Some Photo Update link for any problem send me PM tnx!
  20. Hey members. VIP System Activate by Item Activate by admin command << //vipon [] //vipoff [] //vipon [name] [days] >> Set exp/sp rates Set Adena drop Set Drop/Rb Drop Set spoil rates Set enchant chance [Armor/weapon] VIP Manager [NPC] Only VIP Players can use those services. Get Noblesse Get full rec Change Sex Clean your pk kills Teleport to your party member Teleport to your clan member. Teleport Restrictions: Sieges, Olympiad, Events, Party Rift, Jail, Duel, ObserverMode(oly), Non-Party members. Watch Video: Config Preview: # Do not forget to add the item handler on xml/items 3481. # <set name="handler" val="VipStatusItem" /> aCis 350 DOWNLOAD PATCH INFO: Go to your eclipse, select aCis_datapack & aCis_gameserver (the same time), right click -> Team --> Apply Patch, select <Files> and find the location of Patch in your computer. Code review: http://pastebin.com/j5GEqr8Y aCis 367 http://pastebin.com/fHPWTrq3 || Thanks to AnotherPerson. He gave me this Diff.
  21. Since i see many people request some npcs etc and noone gives the required info or help,i would like to make this guide for them so they can develop and improve their skills on creating these by themselves.It's a very usefull guide for people to learn how to make them. In this guide/tutorial we will learn how to do the Teleporter(gk),Gmshop,Buffer and you can start with opening the scripts.I wish my guide to be understandable to you and wish you the best results following it Teleporter/Gatekeeper: AI.obj, You must look for class teleporter_multi_list. class 1 clavier : teleporter_multi_list property_define_begin telposlist_begin Position1 {"Aden"; 146705; 25840; -2000; 1500; 5 } {"Coliseum"; 146440; 46723; -3400; 1500; 0 } {"Dark Elven Village"; 9716; 15502; -4500; 1500; 0 } {"Dion"; 15744; 142928; -2704; 1500; 2 } {"Dwarven Village"; 115120; -178112; -916; 1500; 0 } {"Elven Village"; 46890; 51531; -2976; 1500; 0 } {"Floran Village"; 17953; 170234; -3504; 1500; 2 } {"Giran"; 83458; 148012; -3400; 1500; 3 } {"Giran Harbor"; 47935; 186810; -3420; 1500; 0 } {"Gludin"; -80826; 149775; -3043; 1500; 0 } {"Gludio"; -12694; 122776; -3114; 1500; 1 } {"Goddard"; 148024; -55281; -2728; 1500; 7 } {"Hardins Academy"; 105846; 109762; -3170; 1500; 3 } {"Heine"; 111333; 219345; -3546; 1500; 6 } {"Hunter Village"; 117156; 76878; -2670; 1500; 0 } {"Ivory Tower"; 85343; 16267; -3640; 1500; 4 } {"Orc Village"; -45186; -112459; -236; 1500; 0 } {"Oren"; 82956; 53162; -1470; 1500; 4 } {"Rune Town"; 43835; -47749; -792; 1500; 0 } {"Talking Island"; -84141; 244623; -3729; 1500; 0 } telposlist_end telposlist_begin Position2 {"Elven Fortress (10-25)"; 29280; 74942; -3776; 1500; 0 } {"Elven Ruins (10-20)"; -112802; 234963; -3688; 1500; 0 } {"Ruins of Despair (20-25)"; -20152; 137254; -3896; 1500; 0 } {"Wastelands (25-35)"; -16510; 209226; -3664; 1500; 0 } {"Execution Grounds (30-40)"; 44691; 148454; -3696; 1500; 0 } {"Cruma Tower (40-52)"; 16580; 114178; -3480; 1500; 0 } {"Death Pass (35-52)"; 71521; 118056; -3672; 1500; 0 } {"Dragon Valley (55-62)"; 122589; 111117; -3760; 1500; 0 } {"Dragon Valley Caves (60-78)"; 130816; 114429; -3720; 1500; 0 } {"Enchanted Valley (45-55)"; 124798; 61741; -3992; 1500; 0 } {"Cemetery (45-58)"; 166612; 20315; -3328; 1500; 0 } {"Forbidden GateWay (58-67)"; 185326; 20299; -3272; 1500; 0 } {"The Front of Anghel Waterfall (50-60)"; 163341; 91374; -3320; 1500; 0 } {"Giants Cave (55-67)"; 174465; 52672; -4368; 1500; 0 } {"Forsaken Plains (55-65)"; 167285; 37109; -4008; 1500; 0 } {"Toi Enterance (58-78)"; 114645; 21491; -5128; 1500; 0 } {"Blazing Swamp (65-77)"; 159546; -13085; -2872; 1500; 0 } {"Rune Town Hunting Grounds (58-74)"; 59106; -67593; -3384; 1500; 0 } {"Hot Springs (70-78)"; 153889; -101027; -2936; 1500; 0 } {"Ketra Orc Outpost (76-87)"; 146600; -68003; -3688; 1500; 0 } {"Imperial Tomb (76-82+)"; 186896; -75557; -2832; 1500; 0 } {"Forge Of God (78-82+)"; 169453; -116244; -2360; 1500; 0 } {"Varka Silenos Outpost (76-87)"; 125809; -40781; -3744; 1500; 0 } {"Patriots Necropolis"; -25472; 77728; -3446; 15500; 0 } {"Ascetics Necropolis"; -56064; 78720; -3011; 18600; 0 } {"Saints Necropolis"; 79296; 209584; -3709; 9800; 0 } {"Catacomb of Dark Omens"; -22480; 13872; -3174; 20400; 0 } telposlist_end telposlist_begin PositionNoblessNeedItemTown {"Talking Island Village"; -84141; 244623; -3729; 1; 0 } {"The Elven Village"; 46951; 51550; -2976; 1; 0 } {"The Dark Elven Village"; 9709; 15566; -4500; 1; 0 } {"Orc Village"; -45158; -112583; -236; 1; 0 } {"Dwarven Village"; 115120; -178224; -917; 1; 0 } {"The Village of Gludin"; -80826; 149775; -3043; 1; 0 } {"The Town of Gludio"; -12694; 122776; -3114; 1; 0 } {"The Town of Dion"; 15671; 142994; -2704; 1; 0 } {"Heine"; 111455; 219400; -3546; 1; 0 } {"Town of Oren"; 83011; 53207; -1470; 1; 0 } {"Hunters Village"; 117088; 76931; -2670; 1; 0 } {"Town of Aden"; 146783; 25808; -2000; 1; 0 } {"Rune Castle Town"; 43826; -47688; -792; 1; 0 } {"Goddard Castle Town"; 147978; -55408; -2728; 1; 0 } {"Hardin's Academy"; 105918; 109759; -3170; 1; 0 } {"Giran Harbor"; 47935; 186810; -3420; 1; 0 } {"Arena (Gludin Harbor)"; -87328; 142266; -3640; 1; 0 } {"Arena (Giran Castle Town)"; 73579; 142709; -3768; 1; 0 } {"Coliseum"; 146440; 46723; -3400; 1; 0 } telposlist_end telposlist_begin PositionNoblessNeedItemField {"Dragon Valley"; 122824; 110836; -3727; 1; 0 } {"Dragon Valley Death Pass"; 73024; 118485; -3720; 1; 0 } {"Brekas Stronghold"; 85389; 131366; -3707; 1; 0 } {"Gorgons Flower Garden"; 113553; 134813; -3668; 1; 0 } {"Tanor Canyon"; 69373; 155208; -3746; 1; 0 } {"Devils Isle Entrance"; 43408; 206881; -3752; 1; 0 } {"Lairs of Antharas Entrance"; 131131; 114597; -3720; 1; 0 } {"Lairs of Antharas 1"; 147071; 120156; -4520; 1; 0 } {"Lairs of Antharas 2"; 151689; 112615; -5520; 1; 0 } {"Lairs of Antharas Bridge"; 146425; 109898; -3424; 1; 0 } {"Lairs of Antharas Heart"; 154396; 121235; -3808; 1; 0 } telposlist_end telposlist_begin PositionNoblessNeedItemSSQ {"Necropolis Of Sacrifice"; -41184; 206752; -3357; 1; 0 } {"Heretics Catacomb"; 39232; 143568; -3651; 1; 0 } {"Pilgrims Necropolis"; 45600; 126944; -3686; 1; 0 } {"Catacomb Of The Branded"; 43200; 170688; -3251; 1; 0 } {"Worshipers Necropolis"; 107514; 174329; -3704; 1; 0 } {"Catacomb Of The Apostate"; 74672; 78032; -3398; 1; 0 } {"Patriots Necropolis"; -25472; 77728; -3446; 1; 0 } {"Catacomb Of The Witch"; 136672; 79328; -3702; 1; 0 } {"Ascetics Necropolis"; -56064; 78720; -3011; 1; 0 } {"Martyr's Necropolis"; 114496; 132416; -3101; 1; 0 } {"Disciples Necropolis"; 168560; -17968; -3174; 1; 0 } {"Saints Necropolis"; 79296; 209584; -3709; 1; 0 } {"Catacomb of Dark Omens"; -22480; 13872; -3174; 1; 0 } {"Catacomb of the Forbidden Path"; 110912; 84912; -4816; 1; 0 } telposlist_end telposlist_begin PositionNoblessNoItemTown {"Talking Island Village"; -84141; 244623; -3729; 1000; 0 } {"The Elven Village"; 46951; 51550; -2976; 1000; 0 } {"The Dark Elven Village"; 9709; 15566; -4500; 1000; 0 } {"Orc Village"; -45158; -112583; -236; 1000; 0 } {"Dwarven Village"; 115120; -178224; -917; 1000; 0 } {"The Village of Gludin"; -80826; 149775; -3043; 1000; 0 } {"The Town of Gludio"; -12694; 122776; -3114; 1000; 0 } {"The Town of Dion"; 15671; 142994; -2704; 1000; 0 } {"Heine"; 111455; 219400; -3546; 1000; 0 } {"Town of Oren"; 83011; 53207; -1470; 1000; 0 } {"Hunters Village"; 117088; 76931; -2670; 1000; 0 } {"Town of Aden"; 146783; 25808; -2000; 1000; 0 } {"Rune Castle Town"; 43826; -47688; -792; 1000; 0 } {"Goddard Castle Town"; 147978; -55408; -2728; 1000; 0 } {"Hardin's Academy"; 105918; 109759; -3170; 1000; 0 } {"Giran Harbor"; 47935; 186810; -3420; 1000; 0 } {"Arena (Gludin Harbor)"; -87328; 142266; -3640; 1000; 0 } {"Arena (Giran Castle Town)"; 73579; 142709; -3768; 1000; 0 } {"Coliseum"; 146440; 46723; -3400; 1000; 0 } telposlist_end telposlist_begin PositionNoblessNoItemField {"Dragon Valley"; 122824; 110836; -3727; 1000; 0 } {"Dragon Valley Death Pass"; 73024; 118485; -3720; 1000; 0 } {"Brekas Stronghold"; 85389; 131366; -3707; 1000; 0 } {"Gorgons Flower Garden"; 113553; 134813; -3668; 1000; 0 } {"Tanor Canyon"; 69373; 155208; -3746; 1000; 0 } {"Devils Isle Entrance"; 43408; 206881; -3752; 1000; 0 } {"Lairs of Antharas Entrance"; 131131; 114597; -3720; 1000; 0 } {"Lairs of Antharas 1"; 147071; 120156; -4520; 1000; 0 } {"Lairs of Antharas 2"; 151689; 112615; -5520; 1000; 0 } {"Lairs of Antharas Bridge"; 146425; 109898; -3424; 1000; 0 } {"Lairs of Antharas Heart"; 154396; 121235; -3808; 1000; 0 } telposlist_end telposlist_begin PositionNoblessNoItemSSQ {"Necropolis Of Sacrifice"; -41184; 206752; -3357; 1000; 0 } {"Heretics Catacomb"; 39232; 143568; -3651; 1000; 0 } {"Pilgrims Necropolis"; 45600; 126944; -3686; 1000; 0 } {"Catacomb Of The Branded"; 43200; 170688; -3251; 1000; 0 } {"Worshipers Necropolis"; 107514; 174329; -3704; 1000; 0 } {"Catacomb Of The Apostate"; 74672; 78032; -3398; 1000; 0 } {"Patriots Necropolis"; -25472; 77728; -3446; 1000; 0 } {"Catacomb Of The Witch"; 136672; 79328; -3702; 1000; 0 } {"Ascetics Necropolis"; -56064; 78720; -3011; 1000; 0 } {"Martyr's Necropolis"; 114496; 132416; -3101; 1000; 0 } {"Disciples Necropolis"; 168560; -17968; -3174; 1000; 0 } {"Saints Necropolis"; 79296; 209584; -3709; 1000; 0 } {"Catacomb of Dark Omens"; -22480; 13872; -3174; 1000; 0 } {"Catacomb of the Forbidden Path"; 110912; 84912; -4816; 1000; 0 } telposlist_end property_define_end class_end Where {"Catacomb of Dark Omens"; -22480; 13872; -3174; 1000; 0 } {"name positioning"; X; Y; Z; value; 0 (Tax)} Html Gatekeeper: <html> <head> <body> Gatekeeper Clarissa: <br> We Gatekeepers use the will of the Gods to open the doors to time and space and teleport others. Which door would you like to open? <br><a action="bypass -h menu_select?ask=-8&reply=1"> Teleport </a> <br><a action="bypass -h menu_select?ask=-8&reply=2"> Hunting Grounds </a> <br><a action="bypass -h menu_select?ask=-303&reply=518"> Exchange with the Dimension Diamond</a> <br><a action="bypass -h menu_select?ask=-19&reply=0"> [Noblesse Only] teleport</a> <br><a action="bypass -h menu_select?ask=255&reply=4" msg="811;Monster Derby Track"> Move to Monster Derby Track (Free of Charge)</a> <br><a action="bypass -h talk_select">Quest </a> </body> </html> Where the reply=1 - this sheet mod contains in AI, which will show you the HK. In this case telposlist_begin Position1, that is: {"Aden"; 146705; 25840; -2000; 1500; 5 } {"Coliseum"; 146440; 46723; -3400; 1500; 0 } {"Dark Elven Village"; 9716; 15502; -4500; 1500; 0 } {"Dion"; 15744; 142928; -2704; 1500; 2 } {"Dwarven Village"; 115120; -178112; -916; 1500; 0 } {"Elven Village"; 46890; 51531; -2976; 1500; 0 } {"Floran Village"; 17953; 170234; -3504; 1500; 2 } {"Giran"; 83458; 148012; -3400; 1500; 3 } {"Giran Harbor"; 47935; 186810; -3420; 1500; 0 } {"Gludin"; -80826; 149775; -3043; 1500; 0 } {"Gludio"; -12694; 122776; -3114; 1500; 1 } {"Goddard"; 148024; -55281; -2728; 1500; 7 } {"Hardins Academy"; 105846; 109762; -3170; 1500; 3 } {"Heine"; 111333; 219345; -3546; 1500; 6 } {"Hunter Village"; 117156; 76878; -2670; 1500; 0 } {"Ivory Tower"; 85343; 16267; -3640; 1500; 4 } {"Orc Village"; -45186; -112459; -236; 1500; 0 } {"Oren"; 82956; 53162; -1470; 1500; 4 } {"Rune Town"; 43835; -47749; -792; 1500; 0 } {"Talking Island"; -84141; 244623; -3729; 1500; 0 } That's it,in any field you can add the desired location,with patience and time you can make a completegk in just a few hours. Gm-Shop: Open multisell.txt (folder scripts), see the following: MultiSell_begin [blackmerchant_weapon] 1is_dutyfree = 1 selllist={ {{{[flamberge];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[stormbringer];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[sword_of_delusion];1}};{{[crystal_c];1075};{[crystal_d];5375}}}; {{{[war_pick];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[war_axe];1}};{{[crystal_c];1075};{[crystal_d];5375}}}; {{{[crystal_staff];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[sage's_staff];1}};{{[crystal_c];1075};{[crystal_d];5375}}}; {{{[cursed_dagger];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[dark_screamer];1}};{{[crystal_c];1075};{[crystal_d];5375}}}; {{{[chakram];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[fist_blade];1}};{{[crystal_c];1075};{[crystal_d];5375}}}; {{{[crystallized_ice_bow];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[akat_long_bow];1}};{{[crystal_c];1075};{[crystal_d];5375}}}; {{{[orcish_glaive];1}};{{[crystal_c];573};{[crystal_d];2865}}}; {{{[poleaxe];1}};{{[crystal_c];1075};{[crystal_d];5375}}} } MultiSell_end Open the end of multisell, skip 2 lines and write the following: MultiSell_begin [Пишем тут любое не использованное название] 575 (любое чило, главное, что бы второго такого не было в мультиселле)is_dutyfree = 1 is_show_all = 1 selllist={ {{{[ring_of_aurakyria];1}};{{[coin_of_luck];5325000}}}; {{{[ring_of_baium];1}};{{[coin_of_luck];6450000}}}; {{{[sanddragon's_earing];1}};{{[coin_of_luck];5950000}}}; {{{[earring_of_antaras];1}};{{[coin_of_luck];8200000}}}; {{{[earring_of_zaken];1}};{{[coin_of_luck];7520000}}}; {{{[dragon_necklace];1}};{{[coin_of_luck];8150000}}}; {{{[necklace_of_valakas];1}};{{[coin_of_luck];12600000}}} } MultiSell_end Where instead of the ring_of_aurakyria any object, the full prescribed in the itemdata.txt, after the name of the item is the number of,then we see the coin_of_luck. Instead of coin may again be the same any objects from the itemdata.txt, adena, for example. It is the number of things to which communicates our item. I would like to caution against the common error: after the last line should not be ;. That is, all lines we look like this: {{{[dragon_necklace];1}};{{[coin_of_luck];8150000}}};Последняя должна быть такой: {{{[dragon_necklace];1}};{{[coin_of_luck];8150000}}} <a action="bypass -h menu_select?ask=-303&reply=1">Buy weapon</a> Buffer: Ai.Obj class 1 buffer_npc : default_npcparameter_define_begin string fnHi "buffer_npc001.htm" string fnYouAreChaotic "buffer_npc002.htm" string fnNotEnoughAdena "buffer_npc003.htm" string fnWait "buffer_npc004.htm" int ItemBuff 57 int Amount 1000 int Delay 500 parameter_define_end handler 13 11 // CREATED variable_begin "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // myself push_const 704 add fetch_i // i_ai0 push_const 308 add push_reg_sp fetch_i push_const 0 assign4 shift_sp -1 handler_end handler 3 38 // TALKED variable_begin "talker" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // talker push_const 40 add fetch_i // karma push_const 468 add fetch_i4 push_const 0 greater branch_false L2 L1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnYouAreChaotic func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 jump L3 L2 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnHi func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 L3 handler_end handler 32 134 // MENU_SELECTED variable_begin "talker" "ask" "reply" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // ask push_const 160 add fetch_i4 push_const 201 negate equal push_reg_sp fetch_i branch_false L4 shift_sp 1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter ItemBuff func_call 184680579 // func[OwnItemCount] shift_sp -2 push_parameter Amount greater_equal and L4 branch_false L5 L6 push_event // myself push_const 704 add fetch_i // i_ai0 push_const 308 add fetch_i4 push_const 0 equal branch_false L8 L7 push_event // myself push_const 704 add fetch_i // i_ai0 push_const 308 add push_reg_sp fetch_i push_const 1 assign4 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter ItemBuff push_parameter Amount func_call 184746114 // func[DeleteItem1] shift_sp -3 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_event // reply push_const 164 add fetch_i push_const 1 push_const 1 push_const 1000000 func_call 184877074 // func[AddUseSkillDesire] shift_sp -5 shift_sp -1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnHi func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 push_event // myself push_const 704 add fetch_i push_const 1 push_parameter Delay func_call 184680487 // func[AddTimerEx] shift_sp -2 shift_sp -1 jump L9 L8 shift_sp 1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnWait func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 L9 jump L10 L5 shift_sp 1 push_event // myself push_const 704 add fetch_i push_event // talker push_const 40 add fetch_i push_parameter fnNotEnoughAdena func_call 184680516 // func[ShowPage] shift_sp -2 shift_sp -1 L10 handler_end handler 12 20 // TIMER_FIRED_EX variable_begin "timer_id" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // timer_id push_const 236 add fetch_i4 push_const 1 equal branch_false L12 L11 push_event // myself push_const 704 add fetch_i // i_ai0 push_const 308 add push_reg_sp fetch_i push_const 0 assign4 shift_sp -1 L12 handler_end class_end Further opening npcdata, there straight npc_begin citizen 14003 [buffer_npc] level=70 acquire_exp_rate=0 acquire_sp=0 unsowing=1 clan={} ignore_clan_list={} clan_help_range=300 slot_chest=[] slot_rhand=[] slot_lhand=[] shield_defense_rate=0 shield_defense=0 skill_list={@s_race_undead;@s_npc_weakness_holy3;@ s_evil_attack;@s_npc_weakness_fire1} npc_ai={[buffer_npc];{[fnHi]=[buffer_npc001.htm]}} category={} race=human sex=female undying=1 can_be_attacked=0 corpse_time=1 no_sleep_mode=0 agro_range=0 ground_high={120;0;0} ground_low={50;0;0} exp=429634528 org_hp=2444.5 org_hp_regen=7.5 org_mp=10000 org_mp_regen=200 collision_radius={8;8} collision_height={24;24} str=60 int=90 dex=50 wit=90 con=60 men=40 base_attack_type=sword base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 base_physical_attack=688.86373 base_critical=4 physical_hit_modify=4.75 base_attack_speed=253 base_reuse_delay=0 base_magic_attack=470.4 base_defend=295.91 base_magic_defend=216.53 physical_avoid_modify=0 soulshot_count=0 spiritshot_count=0 hit_time_factor=0.6 item_make_list={} corpse_make_list={} additional_make_list={} additional_make_multi_list={} hp_increase=0 mp_increase=0 safe_height=100 npc_end NPC_PCH: [buffer_npc] = 1014003 Html: <html><body>Buffer NPC:<br> Por solo <font color="LEVEL">1000 adenas</font> te podemos dar auras! Elije aquellas que prefieras!<br> <table><tr><td width=80> <a action="bypass -h menu_select?ask=-201&reply=273411">[Might]</a><br> <a action="bypass -h menu_select?ask=-201&reply=266243">[Shield]</a><br> <a action="bypass -h menu_select?ask=-201&reply=275715">[Focus]</a><br> <a action="bypass -h menu_select?ask=-201&reply=308226">[Windwalk]</a><br> <a action="bypass -h menu_select?ask=-201&reply=317443">[Guidance]</a><br> <a action="bypass -h menu_select?ask=-201&reply=278275">[Agility]</a><br> <a action="bypass -h menu_select?ask=-201&reply=265218">[Magic Barrier]</a> </td><td width=100> <a action="bypass -h menu_select?ask=-201&reply=277763">[Acumen]</a><br> <a action="bypass -h menu_select?ask=-201&reply=271107">[Empower]</a><br> <a action="bypass -h menu_select?ask=-201&reply=268294">[Bless the Soul]</a><br> <a action="bypass -h menu_select?ask=-201&reply=271874">[Berserker Spirit]</a><br> <a action="bypass -h menu_select?ask=-201&reply=267009">[Holy Weapon]</a><br> <a action="bypass -h menu_select?ask=-201&reply=264964">[Mental Shield]</a><br> <a action="bypass -h menu_select?ask=-201&reply=275974">[Concrentrarion]</a> </td><td width=100> <a action="bypass -h menu_select?ask=-201&reply=267267">[Regeneration]</a><br> <a action="bypass -h menu_select?ask=-201&reply=316931">[Freezing Skin]</a><br> <a action="bypass -h menu_select?ask=-201&reply=267526">[Bless the Body]</a><br> <a action="bypass -h menu_select?ask=-201&reply=318214">[Bless the Shield]</a><br> <a action="bypass -h menu_select?ask=-201&reply=278018">[Haste]</a><br> <a action="bypass -h menu_select?ask=-201&reply=317955">[Death Wisper]</a><br> <a action="bypass -h menu_select?ask=-201&reply=274690">[Kiss Of Eva]</a> </td></tr></table> </body></html> You will write only hml for functions and add the NPC in to the client. string fnYouAreChaotic "buffer_npc002.htm" string fnNotEnoughAdena "buffer_npc003.htm" Be carefull,be patient and spend some time on it so you can alone develop and imrove your personal skills on the issue.Wish you the best possible results.Best Of Luck! Do not forget to leave me your feedback.
  22. Hello guys! I use this TvT Event and I have add/fix/remove some things. If you have already this event you will understand what I mean. Removed useless lines/methods. Isn't something special but I wanted to share with you. Mana potions/Escape scrolls,skills fixed. Problems with NPC respawn/spawn. Added Respawn delay on die, Noblesse on die, Do not lose buffs (with config), Reward after 5/8/12/15/20 kills without die & announce the name of player with the count of kills without die. (if you die, kills goes 0 again). You can find the option of the kills count on TvTEvent.java [Watch the lines]. Players can't be healed on event (with config). .tvtjoin / .tvtleave / .tvtstatus Config/Npc [http://pastebin.com/xUd4bJhN] Core [http://pastebin.com/vkGuh57i] Core FOR 360+ rev [http://pastebin.com/ZF85SVBk] Systextures-html [https://dir50.com/6kww37s9u3dy/Systextures-html.rar.html] LINK 2 [if you find problem]
  23. 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
  24. Hello i Create one Easy code for your server's this is code for Fake player real time is have items and clan crest. He got the idea from the L2mafia, L2reality Soory for bad English Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 4) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -99,6 +99,7 @@ import net.sf.l2j.gameserver.instancemanager.games.MonsterRace; import net.sf.l2j.gameserver.model.L2Manor; import net.sf.l2j.gameserver.model.L2World; +import net.sf.l2j.gameserver.model.entity.FakeOnline; import net.sf.l2j.gameserver.model.entity.Hero; import net.sf.l2j.gameserver.model.olympiad.Olympiad; import net.sf.l2j.gameserver.model.olympiad.OlympiadGameManager; @@ -300,7 +301,7 @@ if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED) FishingChampionshipManager.getInstance(); - + FakeOnline.restoreFakePlayers(); Util.printSection("System"); TaskManager.getInstance(); Runtime.getRuntime().addShutdownHook(Shutdown.getInstance()); Index: java/net/sf/l2j/gameserver/model/L2Clan.java =================================================================== --- java/net/sf/l2j/gameserver/model/L2Clan.java (revision 4) +++ java/net/sf/l2j/gameserver/model/L2Clan.java (working copy) @@ -2186,7 +2186,7 @@ member.broadcastUserInfo(); } - private void checkCrests() + public void checkCrests() { if (_crestId != 0) { Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 4) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -3118,7 +3118,7 @@ L2GameClient client = _client; if (client != null) { - if (client.isDetached()) + if (client.isDetached()|| client.isFakePlayer()) client.cleanMe(true); else { @@ -8890,6 +8890,17 @@ _validBypass2.add(bypass); } + public boolean fakeplayer = false; + + public boolean getfakeplayer() + { + return fakeplayer; + } + public void setfakeplayer(boolean fake) + { + fakeplayer = fake; + } + public synchronized boolean validateBypass(String cmd) { for (String bp : _validBypass) Index: java/net/sf/l2j/gameserver/model/entity/FakeOnline.java =================================================================== --- java/net/sf/l2j/gameserver/model/entity/FakeOnline.java (revision 0) +++ java/net/sf/l2j/gameserver/model/entity/FakeOnline.java (revision 0) @@ -0,0 +1,92 @@ +package net.sf.l2j.gameserver.model.entity; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.logging.Level; +import java.util.logging.Logger; + +import net.sf.l2j.L2DatabaseFactory; +import net.sf.l2j.gameserver.LoginServerThread; +import net.sf.l2j.gameserver.model.L2Clan; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.itemcontainer.ItemContainer; +import net.sf.l2j.gameserver.network.L2GameClient; +import net.sf.l2j.gameserver.network.L2GameClient.GameClientState; + +/** + * @author FOFAS + * + */ +public class FakeOnline +{ + private static Logger _log = Logger.getLogger(FakeOnline.class.getName()); + //select fake player + private static final String LOAD_OFFLINE_STATUS = "SELECT * FROM fakeplayer"; + //insert fake player + private static final String SET_OFFLINE_STATUS = "INSERT INTO fakeplayer (charId) VALUES (?)"; + + public static void restoreFakePlayers() + { + int nfakeplayer = 0; + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + PreparedStatement stm = con.prepareStatement(LOAD_OFFLINE_STATUS); + ResultSet rs = stm.executeQuery(); + while (rs.next()) + { + L2PcInstance player = null; + try + { + L2GameClient client = new L2GameClient(null); + client.setFakePlayer(true); + player = L2PcInstance.restore(rs.getInt("charId")); + client.setActiveChar(player); + player.setOnlineStatus(true, false); + client.setAccountName(player.getAccountName()); + client.setState(GameClientState.IN_GAME); + player.setClient(client); + player.spawnMe(player.getX(), player.getY(), player.getZ()); + LoginServerThread.getInstance().addGameServerLogin(player.getAccountName(), client); + ItemContainer items = player.getInventory(); + items.restore(); + L2Clan clan = player.getClan(); + clan.checkCrests(); + player.setfakeplayer(true); + player.setOnlineStatus(true, true); + player.restoreEffects(); + player.broadcastUserInfo(); + nfakeplayer++; + } + catch (Exception e) + { + _log.log(Level.WARNING, "FakePlayer: Error loading trader: "+player,e); + if (player != null) + { + player.deleteMe(); + } + } + } + rs.close(); + stm.close(); + _log.info("Loaded: " +nfakeplayer+ " Fake player(s)"); + } + catch (Exception e) + { + _log.log(Level.WARNING, "FakePlayer: Error while loading FakePlayer: ",e); + } + } + + public static void setfakeplayers(L2PcInstance player) + { + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + PreparedStatement statement = con.prepareStatement(SET_OFFLINE_STATUS); + statement.setInt(1, player.getObjectId()); + statement.execute(); + statement.close(); + } + catch (Exception e) + {} + } +} Index: java/net/sf/l2j/gameserver/network/L2GameClient.java =================================================================== --- java/net/sf/l2j/gameserver/network/L2GameClient.java (revision 4) +++ java/net/sf/l2j/gameserver/network/L2GameClient.java (working copy) @@ -194,7 +194,7 @@ public void sendPacket(L2GameServerPacket gsp) { - if (_isDetached) + if (_isDetached || _isfakeplayer) return; getConnection().sendPacket(gsp); @@ -291,6 +291,18 @@ } } + private boolean _isfakeplayer = false; + + public boolean isFakePlayer() + { + return _isfakeplayer; + } + + public void setFakePlayer(boolean b) + { + _isfakeplayer = b; + } + public static void deleteCharByObjId(int objid) { if (objid < 0) @@ -489,6 +501,9 @@ public void closeNow() { _isDetached = true; // prevents more packets execution + + _isfakeplayer = true; + close(ServerClose.STATIC_PACKET); synchronized (this) { @@ -538,7 +553,7 @@ try { - if (getActiveChar() != null && !isDetached()) + if (getActiveChar() != null && !isDetached() || !isFakePlayer()) { setDetached(true); fast = !getActiveChar().isInCombat() && !getActiveChar().isLocked(); @@ -633,7 +648,7 @@ */ public boolean dropPacket() { - if (_isDetached) // detached clients can't receive any packets + if (_isDetached || _isfakeplayer) // detached clients can't receive any packets return true; // flood protection @@ -756,7 +771,7 @@ if (packet == null) // queue is empty return; - if (_isDetached) // clear queue immediately after detach + if (_isDetached || _isfakeplayer) // clear queue immediately after detach { _packetQueue.clear(); return; Index: Roar_gameserver/java/com/l2jfresh/gameserver/handler/VoicedCommandHandler.java =================================================================== --- Roar_gameserver/java/com/l2jfresh/gameserver/handler/VoicedCommandHandler.java (revision 62) +++ Roar_gameserver/java/com/l2jfresh/gameserver/handler/VoicedCommandHandler.java (working copy) @@ -22,6 +22,7 @@ import com.l2jfresh.gameserver.handler.voicedcommandhandlers.BankingCmd; import com.l2jfresh.gameserver.handler.voicedcommandhandlers.DMVoicedInfo; import com.l2jfresh.gameserver.handler.voicedcommandhandlers.Donator; +import com.l2jfresh.gameserver.handler.voicedcommandhandlers.FakePlayerOnline; import com.l2jfresh.gameserver.handler.voicedcommandhandlers.Leave; import com.l2jfresh.gameserver.handler.voicedcommandhandlers.OnlinePlayers; import com.l2jfresh.gameserver.handler.voicedcommandhandlers.Pin; @@ -67,6 +68,7 @@ + registerHandler(new FakePlayerOnline()); } public void registerHandler(IVoicedCommandHandler handler) Index: Roar_gameserver/java/com/l2jfresh/gameserver/handler/voicedcommandhandlers/FakePlayerOnline.java =================================================================== --- Roar_gameserver/java/com/l2jfresh/gameserver/handler/voicedcommandhandlers/FakePlayerOnline.java (revision 0) +++ Roar_gameserver/java/com/l2jfresh/gameserver/handler/voicedcommandhandlers/FakePlayerOnline.java (revision 0) @@ -0,0 +1,35 @@ +package com.l2jfresh.gameserver.handler.voicedcommandhandlers; + +import com.l2jfresh.gameserver.handler.IVoicedCommandHandler; +import com.l2jfresh.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfresh.gameserver.model.custom.FakeOnline; + +/** + * @author FOFAS + * + */ +public class FakePlayerOnline implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = {"fakeplayer"}; + + @Override + public boolean useVoicedCommand(String command, L2PcInstance player, String target) + { + if (command.equalsIgnoreCase("fakeplayer")) + { + if (player != null) + { + FakeOnline.setfakeplayers(player); + player.setfakeplayer(true); + player.deleteMe(); + player.logout(); + } + } + return true; + } + @Override + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} Index: Roar_gameserver/java/com/l2jfresh/gameserver/handler/voicedcommandhandlers/FakePlayerOnline.java =================================================================== --- Roar_gameserver/java/com/l2jfresh/gameserver/handler/voicedcommandhandlers/FakePlayerOnline.java (revision 0) +++ Roar_gameserver/java/com/l2jfresh/gameserver/handler/voicedcommandhandlers/FakePlayerOnline.java (revision 0) @@ -0,0 +1,35 @@ +package com.l2jfresh.gameserver.handler.voicedcommandhandlers; + +import com.l2jfresh.gameserver.handler.IVoicedCommandHandler; +import com.l2jfresh.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfresh.gameserver.model.custom.FakeOnline; + +/** + * @author FOFAS + * + */ +public class FakePlayerOnline implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = {"fakeplayer"}; + + @Override + public boolean useVoicedCommand(String command, L2PcInstance player, String target) + { + if (command.equalsIgnoreCase("fakeplayer")) + { + if (player != null) + { + FakeOnline.setfakeplayers(player); + player.setfakeplayer(true); + player.deleteMe(); + player.logout(); + } + } + return true; + } + @Override + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +}