Jump to content

Search the Community

Showing results for tags 'help'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

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

Forums

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

Product Groups

  • Paid Subscriptions
  • Advertisements

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 186 results

  1. Someone can help me i want to fix soulshot effect on Enchant anyone know how i can eddit or whats i can move thx
  2. Hello i use this Community Auction house. When add (to auction) 100x Soul Shots and give server restart, after server restart Soul shots missing. If add any weapons or armor Auction house working fine. Where can be a problem ? How can Fix them ? I thing is problem with "quantity" package l2ro.gameserver.model.entity.auction; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import javolution.util.FastMap; import l2ro.commons.dao.JdbcEntityState; import l2ro.gameserver.Config; import l2ro.gameserver.dao.ItemsDAO; import l2ro.gameserver.data.xml.holder.HennaHolder; import l2ro.gameserver.data.xml.holder.SoulCrystalHolder; import l2ro.gameserver.database.DatabaseFactory; import l2ro.gameserver.idfactory.IdFactory; import l2ro.gameserver.model.GameObjectsStorage; import l2ro.gameserver.model.Player; import l2ro.gameserver.model.items.AuctionStorage; import l2ro.gameserver.model.items.ItemAttributes; import l2ro.gameserver.model.items.ItemInstance; import l2ro.gameserver.model.items.ItemInstance.ItemLocation; import l2ro.gameserver.model.items.PcInventory; import l2ro.gameserver.templates.item.ArmorTemplate.ArmorType; import l2ro.gameserver.templates.item.EtcItemTemplate.EtcItemType; import l2ro.gameserver.templates.item.ItemTemplate; import l2ro.gameserver.templates.item.WeaponTemplate.WeaponType; import l2ro.gameserver.utils.ItemFunctions; import l2ro.gameserver.utils.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class AuctionManager { private static AuctionManager _instance; private static final Logger _log = LoggerFactory.getLogger(AuctionManager.class); private Map<Integer, Auction> _auctions = new FastMap<>(); private Map<Integer, Long> _lastMadeAuction = new FastMap<>(); private List<Integer> _deadAuctions = new ArrayList<>(); private int _lastId = -1; private AuctionManager() { loadAuctions(); checkTooOldAuctions(); } public Auction getAuction(int auctionId) { return _auctions.get(auctionId); } public Auction getAuction(ItemInstance item) { for (Auction auction : getAllAuctions()) { if (auction.getItem().equals(item)) return auction; } return null; } public Collection<Auction> getAllAuctions() { return _auctions.values(); } public Collection<Auction> getMyAuctions(Player player) { return getMyAuctions(player.getObjectId()); } public Collection<Auction> getMyAuctions(int playerObjectId) { Collection<Auction> coll = new ArrayList<>(); for (Auction auction : getAllAuctions()) { if (auction.getSellerObjectId() == playerObjectId) coll.add(auction); } return coll; } private void loadAuctions() { AuctionStorage.getInstance(); try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT * FROM auctions"); ResultSet rset = statement.executeQuery()) { while (rset.next()) { int id = rset.getInt("auction_id"); int sellerObjectId = rset.getInt("seller_object_id"); String sellerName = rset.getString("seller_name"); int itemObjectId = rset.getInt("item_object_id"); long pricePerItem = rset.getLong("price_per_item"); ItemInstance item = AuctionStorage.getInstance().getItemByObjectId(itemObjectId); //Saving last Id if (id > _lastId) _lastId = id; if (item != null) { Auction auction = new Auction(id, sellerObjectId, sellerName, item, pricePerItem, item.getCount(), getItemGroup(item)); _auctions.put(id, auction); _log.info("Loaded Auction: ID " +id+ "SellerName: " +sellerName+ "item Id: " + item.getItemId() + "count: " + item.getCount()); } else { _deadAuctions.add(id); } } } catch (SQLException e) { _log.error("Error while loading Auctions", e); } } public void addAuctionToDatabase(Auction auction) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("INSERT INTO auctions VALUES(?,?,?,?,?)")) { statement.setInt(1, auction.getAuctionId()); statement.setInt(2, auction.getSellerObjectId()); statement.setString(3, auction.getSellerName()); statement.setInt(4, auction.getItem().getObjectId()); statement.setLong(5, auction.getPricePerItem()); statement.execute(); } catch(Exception e) { _log.error("Error while adding auction to database:", e); } } private void checkTooOldAuctions() //TODO maybe make it in one statement? { List<Integer> auctionOwners = new ArrayList<>(); for (Auction auction : getAllAuctions()) { if (!auctionOwners.contains(auction.getSellerObjectId())) auctionOwners.add(auction.getSellerObjectId()); } List<Auction> auctionsToRemove = new ArrayList<>(); try (Connection con = DatabaseFactory.getInstance().getConnection()) { for (Integer obj_Id : auctionOwners) { try (PreparedStatement statement = con.prepareStatement("SELECT lastAccess FROM characters WHERE obj_Id=?")) { statement.setInt(1, obj_Id); try (ResultSet rset = statement.executeQuery()) { if (rset.next()) { long lastAccess = rset.getInt("lastAccess"); if ((lastAccess * 1000 + Config.AUCTION_INACTIVITY_DAYS_TO_DELETE * 86400000) < System.currentTimeMillis()) // If his last logged date was at least 7 days ago { for (Auction auction : getMyAuctions(obj_Id)) auctionsToRemove.add(auction); Log.LogAuctionHauseDelete(" after " + Config.AUCTION_INACTIVITY_DAYS_TO_DELETE + "day has bean deleted :", "AUCTION DELETE: ", getAuction(0));; } } } } } } catch (Exception e) { _log.error("", e); } for (Auction auction : auctionsToRemove) { deleteAuctionFromDatabase(auction); _auctions.remove(auction.getAuctionId()); ItemInstance item = auction.getItem(); item.setLocation(ItemLocation.INVENTORY); item.setOwnerId(auction.getSellerObjectId()); item.setJdbcState(JdbcEntityState.UPDATED); item.update(); AuctionStorage.getInstance().deleteItemFromList(item); } } /** * Adding adena by database */ public void addAdenaToSeller(int sellerObjectId, long adena) { ItemInstance item = ItemFunctions.createItem(57); item.setCount(adena); item.setOwnerId(sellerObjectId); item.setLocation(ItemLocation.INVENTORY); ItemsDAO.getInstance().save(item); } public void deleteAuctionFromDatabase(Auction auction) { try (Connection con = DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("DELETE FROM auctions WHERE auction_id = ?")) { statement.setInt(1, auction.getAuctionId()); statement.execute(); } catch (SQLException e) { _log.error("Error while deleting auction from database:", e); } } public void deleteAuction(Player seller, ItemInstance item) { Auction auction = null; for (Auction anyAuction : getMyAuctions(seller)) { if (anyAuction.getItem().equals(item)) { auction = anyAuction; break; } } if (auction == null) { sendMessage(seller, "This auction doesn't exist anymore!"); return; } if (!Config.ALLOW_AUCTION_OUTSIDE_TOWN && !seller.isInPeaceZone()) { sendMessage(seller, "You cannot delete auction outside town!"); } _auctions.remove(auction.getAuctionId()); PcInventory inventory = seller.getInventory(); AuctionStorage storage = AuctionStorage.getInstance(); inventory.writeLock(); storage.writeLock(); try { inventory.addItem(item); storage.removeItem(item); } finally { storage.writeUnlock(); inventory.writeUnlock(); } seller.sendChanges(); deleteAuctionFromDatabase(auction); sendMessage(seller, "Auction has been removed!"); Log.LogAction(seller, "Auction", "Deleted Auction. Item:" + item.getName() + " Count:" + item.getCount()); Log.LogAuctionHause(" Deleted Auction. Item: " + item.getName() + " Aution ID - " + auction.getAuctionId() + "", "AUCTION: ", seller); } public void buyItem(Player buyer, ItemInstance item, int quantity) { Auction auction = getAuction(item); if (auction == null) { sendMessage(buyer, "This auction doesn't exist anymore!"); return; } if (auction.getSellerObjectId() == buyer.getObjectId()) { sendMessage(buyer, "You cannot win your own auction!"); return; } if (item.getCount() < quantity) { sendMessage(buyer, "You are trying to buy too many items!"); return; } if (auction.getPricePerItem() * quantity > buyer.getAdena()) { sendMessage(buyer, "You don't have enough adena!"); return; } if (!Config.ALLOW_AUCTION_OUTSIDE_TOWN && !buyer.isInPeaceZone()) { sendMessage(buyer, "You cannot use buy that item outside town!"); return; } buyer.getInventory().reduceAdena(auction.getPricePerItem() * quantity); boolean wholeItemBought = false; PcInventory inventory = buyer.getInventory(); AuctionStorage storage = AuctionStorage.getInstance(); inventory.writeLock(); storage.writeLock(); try { if (item.getCount() == quantity) { item.setOwnerId(buyer.getObjectId()); storage.removeItem(item); inventory.addItem(item); deleteAuctionFromDatabase(auction); _auctions.remove(auction.getAuctionId()); wholeItemBought = true; } else { ItemInstance newItem = copyItem(item, quantity); newItem.setOwnerId(buyer.getObjectId()); storage.removeItem(item, quantity); inventory.addItem(newItem); inventory.refreshEquip(); auction.setCount(auction.getCountToSell()-quantity); } } finally { storage.writeUnlock(); inventory.writeUnlock(); } buyer.sendChanges(); Player seller = GameObjectsStorage.getPlayer(auction.getSellerObjectId()); if (seller != null) { if (wholeItemBought) seller.sendMessage(item.getName() + " has been bought by " + buyer.getName() + "!"); else seller.sendMessage(quantity + " " + item.getName() + (quantity > 1 ? "s" : "") + " has been bought by " + buyer.getName() + "!"); seller.addAdena(auction.getPricePerItem()*quantity, true); Log.LogAction(seller, "Auction", "Sold Item:"+item.getName()+" Count:"+item.getCount()); Log.LogAuctionHause(" Sold Item: " + item.getName() + " Aution ID - " + auction.getAuctionId() + " Count: " + quantity + "buy by" + buyer.getName() + "", "AUCTION: ", seller); } else { addAdenaToSeller(auction.getSellerObjectId(), auction.getPricePerItem() * quantity); } Log.LogAction(buyer, "Auction", "Bought Item:" + item.getName() + " Count:" + item.getCount() + " Cost:" + auction.getPricePerItem() * quantity); buyer.sendMessage("You have bought " + item.getName()); Log.LogAuctionHause(" obtain " + item.getName() + " Count: " + quantity + " auction id " + auction.getAuctionId() + "" , "AUCTION: ", buyer); } public void checkAndAddNewAuction(Player seller, ItemInstance item, long quantity, long salePrice) { if (!checkIfItsOk(seller, item, quantity, salePrice)) return; int id = getNewId(); if (id < 0) { sendMessage(seller, "There are currently too many auctions!"); return; } AuctionItemTypes type = getItemGroup(item); PcInventory inventory = seller.getInventory(); AuctionStorage storage = AuctionStorage.getInstance(); Auction auction = null; inventory.writeLock(); storage.writeLock(); try { if (item.getCount() > quantity) { ItemInstance newItem = copyItem(item, quantity); seller.getInventory().removeItem(item, quantity); inventory.refreshEquip(); storage.addItem(newItem); auction = addAuction(seller, id, newItem, salePrice, quantity, type); Log.LogAuctionHause("AuctionStorage 1: " + item.getName() + " Aution ID - " + item.getItemId() + " Count: " + item.getCount(), "AUCTION: ", seller); } else { inventory.removeItem(item); item.setCount(quantity); storage.addFullItem(item); auction = addAuction(seller, id, item, salePrice, quantity, type); Log.LogAuctionHause("AuctionStorage 2: " + item.getName() + " Aution ID - " + item.getItemId() + " Count: " + item.getCount(), "AUCTION: ", seller); } } finally { storage.writeUnlock(); inventory.writeUnlock(); } seller.sendChanges(); _lastMadeAuction.put(seller.getObjectId(), System.currentTimeMillis() + Config.SECONDS_BETWEEN_ADDING_AUCTIONS * 1000); seller.getInventory().reduceAdena(Config.AUCTION_FEE); addAuctionToDatabase(auction); sendMessage(seller, "Auction has been created!"); Log.LogAction(seller, "Auction", "Added Auction. Item:" + item.getName() + " Count:" + item.getCount() + " Total Cost:" + auction.getPricePerItem() * quantity); Log.LogAuctionHause(" create auction " + auction.getAuctionId() + " item: " + item.getName() + " Count: " + quantity + " Total Cost: " + auction.getPricePerItem() * quantity + "" , "AUCTION: ", seller); } private Auction addAuction(Player seller, int auctionId, ItemInstance item, long salePrice, long sellCount, AuctionItemTypes itemType) { Auction newAuction = new Auction(auctionId, seller.getObjectId(), seller.getName(), item, salePrice, sellCount, itemType); _auctions.put(auctionId, newAuction); return newAuction; } public void sendMessage(Player player, String message) { player.sendMessage(message); } private ItemInstance copyItem(ItemInstance oldItem, long quantity) { ItemInstance item = new ItemInstance(IdFactory.getInstance().getNextId(), oldItem.getItemId()); item.setOwnerId(-1); item.setCount(quantity); item.setEnchantLevel(oldItem.getEnchantLevel()); item.setLocation(ItemLocation.VOID); item.setLocData(-1); item.setCustomType1(oldItem.getCustomType1()); item.setCustomType2(oldItem.getCustomType2()); item.setLifeTime(oldItem.getLifeTime()); item.setCustomFlags(oldItem.getCustomFlags()); item.setAugmentationId(oldItem.getAugmentationId()); ItemAttributes oldAtt = oldItem.getAttributes(); ItemAttributes att = new ItemAttributes(oldAtt.getFire(), oldAtt.getWater(), oldAtt.getWind(), oldAtt.getEarth(), oldAtt.getHoly(), oldAtt.getUnholy()); item.setAttributes(att); item.setAgathionEnergy(oldItem.getAgathionEnergy()); item.setLocation(ItemLocation.VOID); return item; } private int getNewId() { return ++_lastId; } private boolean checkIfItsOk(Player seller, ItemInstance item, long quantity, long salePrice) { if (seller == null) return false; if (item == null) { sendMessage(seller, "The item you are trying to sell, doesn't exist!"); return false; } if (item.getLocation() != ItemInstance.ItemLocation.INVENTORY) { sendMessage(seller, "The item should be at your inventory!"); return false; } if (item.getOwnerId() != seller.getObjectId()) { sendMessage(seller, "The item you are trying to sell is no longer yours!"); return false; } if (item.isEquipped()) { sendMessage(seller, "You need to unequip that item first!"); return false; } if (item.isAugmented()) { sendMessage(seller, "You cannot sell Augmented weapons!"); return false; } if (!item.canBeSold(seller)) { sendMessage(seller, "You can't sell this item!"); return false; } if (!item.canBeTraded(seller)) { sendMessage(seller, "You can't sell this item!"); return false; } if (seller.isInStoreMode()) { sendMessage(seller, "You can't auction an item while in store mode!"); return false; } if (item.getTemplate().isQuest()) { sendMessage(seller, "You can't sell quest items!"); return false; } if (seller.getPet() != null && item.getItemType() == EtcItemType.PET_COLLAR) { sendMessage(seller, "Please unsummon your pet before trying to sell this item."); return false; } if (seller.getPet() != null && item.isSummon() && item.getTemplate().isForPet()) { sendMessage(seller, "Please unsummon your pet before trying to sell this item."); return false; } if (quantity < 1) { sendMessage(seller, "Quantity is too low!"); return false; } if (item.getCount() < quantity) { sendMessage(seller, "You don't have enough items to sell!"); return false; } if (seller.getAdena() < Config.AUCTION_FEE) { sendMessage(seller, "You don't have enough adena, to pay the fee!"); return false; } if (salePrice <= 0) { sendMessage(seller, "Sale price is too low!"); return false; } if (salePrice > 999999999999L) { sendMessage(seller, "Price is too high!"); return false; } if (getMyAuctions(seller).size() >= 10) { sendMessage(seller, "You can have just 10 auctions at the time!"); return false; } if (!Config.ALLOW_AUCTION_OUTSIDE_TOWN && !seller.isInPeaceZone()) { sendMessage(seller, "You cannot add new auction outside town!"); return false; } if (item.isStackable()) { for (Auction playerAuction : AuctionManager.getInstance().getMyAuctions(seller)) { if (playerAuction.getItem().getItemId() == item.getItemId()) { sendMessage(seller, "You can't sell same stackable item in auctions"); return false; } } } if (_lastMadeAuction.containsKey(seller.getObjectId())) { if (_lastMadeAuction.get(seller.getObjectId()) > System.currentTimeMillis()) { sendMessage(seller, "You cannot do it so often!"); return false; } } return true; } private AuctionItemTypes getItemGroup(ItemInstance item) { if (item.isEquipable()) { if (item.getBodyPart() == (ItemTemplate.SLOT_L_EAR | ItemTemplate.SLOT_R_EAR)) return AccessoryItemType.Earring; if (item.getBodyPart() == (ItemTemplate.SLOT_L_FINGER | ItemTemplate.SLOT_R_FINGER)) return AccessoryItemType.Ring; if (item.getBodyPart() == ItemTemplate.SLOT_NECK) return AccessoryItemType.Necklace; if (item.getBodyPart() == ItemTemplate.SLOT_L_BRACELET || item.getBodyPart() == ItemTemplate.SLOT_R_BRACELET) return AccessoryItemType.Bracelet; if (item.getBodyPart() == ItemTemplate.SLOT_HAIR || item.getBodyPart() == ItemTemplate.SLOT_HAIRALL || item.getBodyPart() == ItemTemplate.SLOT_DHAIR) return AccessoryItemType.Accessory; } if (item.isArmor()) { if (item.getBodyPart() == ItemTemplate.SLOT_HEAD) return ArmorItemType.Helmet; if (item.getBodyPart() == ItemTemplate.SLOT_CHEST) return ArmorItemType.Chest; if (item.getBodyPart() == ItemTemplate.SLOT_LEGS) return ArmorItemType.Legs; if (item.getBodyPart() == ItemTemplate.SLOT_GLOVES) return ArmorItemType.Gloves; if (item.getBodyPart() == ItemTemplate.SLOT_FEET) return ArmorItemType.Shoes; if (item.getTemplate().isCloak()) return ArmorItemType.Cloak; if (item.getTemplate().isUnderwear()) return ArmorItemType.Shirt; if (item.getTemplate().isBelt()) return ArmorItemType.Belt; } if (item.getTemplate().isEnchantScroll()) return EtcAuctionItemType.Enchant; if (item.getTemplate().isLifeStone()) return EtcAuctionItemType.Life_stone; if (item.getTemplate().isAttributeCrystal() || item.getTemplate().isAttributeStone()) return EtcAuctionItemType.Attribute; if (item.getTemplate().isCodexBook()) return EtcAuctionItemType.Codex; if (item.getTemplate().isForgottenScroll()) return EtcAuctionItemType.Forgotten_scroll; if (SoulCrystalHolder.getInstance().getCrystal(item.getItemId()) != null) return EtcAuctionItemType.SA_crystal; if (item.isPet()) return PetItemType.Pet; if (item.getItemType() == EtcItemType.PET_COLLAR) return PetItemType.Pet; if (item.getTemplate().isForPet()) return PetItemType.Gear; if (isBabyFoodOrShot(item.getItemId())) return PetItemType.Other; if (item.getItemType() == EtcItemType.POTION) return SuppliesItemType.Elixir; if (HennaHolder.getInstance().isHenna(item.getItemId())) return SuppliesItemType.Dye; if (item.getItemType() == EtcItemType.SCROLL) return SuppliesItemType.Scroll; if (item.getTemplate().isKeyMatherial()) return SuppliesItemType.Key_Material; if (item.getTemplate().isRecipe()) return SuppliesItemType.Recipe; if (item.getItemType() == EtcItemType.MATERIAL) return SuppliesItemType.Material; if (item.getItemType() instanceof EtcItemType) return SuppliesItemType.Miscellaneous; if (item.isWeapon()) { if (item.getItemType() == WeaponType.SWORD) return WeaponItemType.Sword; if (item.getItemType() == WeaponType.ANCIENTSWORD) return WeaponItemType.Ancient_sword; if (item.getItemType() == WeaponType.BIGSWORD) return WeaponItemType.Big_sword; if (item.getItemType() == WeaponType.BLUNT) return WeaponItemType.Blunt; if (item.getItemType() == WeaponType.BIGBLUNT) return WeaponItemType.Big_blunt; if (item.getItemType() == WeaponType.DAGGER) return WeaponItemType.Dagger; if (item.getItemType() == WeaponType.DUALDAGGER) return WeaponItemType.Dual_dagger; if (item.getItemType() == WeaponType.BOW) return WeaponItemType.Bow; if (item.getItemType() == WeaponType.CROSSBOW) return WeaponItemType.Crossbow; if (item.getItemType() == WeaponType.POLE) return WeaponItemType.Pole; if (item.getItemType() == WeaponType.DUALFIST) return WeaponItemType.Fists; if (item.getItemType() == WeaponType.RAPIER) return WeaponItemType.Rapier; return WeaponItemType.Other; } if (item.getBodyPart() == ItemTemplate.SLOT_L_HAND) { if (item.getItemType() == ArmorType.SIGIL) return ArmorItemType.Sigil; else return ArmorItemType.Shield; } return SuppliesItemType.Miscellaneous; } private static final int[] PET_FOOD_OR_SHOT = { 6316, 2515, 4038, 5168, 5169, 7582, 9668, 10425, 6645, 20332, 20329, 20326, 10515, 6647, 6646, 20334, 20333, 20331, 20330, 20329, 20327, 10517, 10516 }; private boolean isBabyFoodOrShot(int id) { for (int i : PET_FOOD_OR_SHOT) { if (i == id) return true; } return false; } public static AuctionManager getInstance() { if (_instance == null) _instance = new AuctionManager(); return _instance; } }
  3. Hello guys. I've been browsing through the possibilites and offers of some hosting companies, especially OVH. And my question would be the following: Let's say I have a High Five server with 400 - God forbid 800 players. (for exemple). Would be a VPS cloud with 12 or 24 GB Ram enough and stable? Or should I invest in a 32- 64 GB dedicated machine, if so why? I mean, L2 servers have been around for more than 10 years, long before these 32 gb+ dedicated servers. Yet, I can see quite a few servers with 500 or less online playesr that use such dedicated machines. Thanks in advance.
  4. How to set on l2jfrozen heroes every sunday 00:00 night?
  5. Hello, how to make only Giran castle siege and how to remove Chance Augment skills leave just passive/active?
  6. hello im using l2j h5 i want to remove the feuture from armor piece can handle 3 diffent part of attributes i want to make it to hold only one like older chronicles any ideas?
  7. Hello again i have a config that disables bows in some classes from a config as you can see below I need to make an exception on this code so in olympiad the players of those classes can use bow as retail and when olympiad game unequip the bow if geared! //Weapon if (Config.ALT_DISABLE_BOW_CLASSES) { if(item.getItem() instanceof L2Weapon && ((L2Weapon)item.getItem()).getItemType() == L2WeaponType.BOW) { if(Config.DISABLE_BOW_CLASSES.contains(activeChar.getClassId().getId()) && !(activeChar.isInOlympiadMode())){ activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION)); return; } } } If anyone have some time to spare to help me with it would be perfect! Thank you anyway!
  8. I would like to ask the java programmers a possible fix for the cheatEngine program because my pack is old and it works
  9. Πως μπορώ να βάλω μια if ώστε μετά τον έλεγχο που κάνει στο inventory να κάνει και έλεγχο εάν ο player έχει αγοράσει το skill ? server h5 if (event.startsWith("regalarSkillsFighter1")) { StringTokenizer st = new StringTokenizer(event, " "); st.nextToken(); // regalarSkills try { if (player.getInventory().getItemByItemId(ITEMD_ID).getCount() < ITEM_COUNT) { player.sendMessage("You don't have enough items! I need" + " " + ITEM_COUNT +" " + ITEM_NAME + " Per Skill"); } else { player.addSkill(SKILLSFIGHTER1.get(Integer.parseInt(st.nextToken())).getSkill(), true); player.destroyItemByItemId("consume", ITEMD_ID, ITEM_COUNT, player, true); player.broadcastStatusUpdate(); player.broadcastUserInfo(); player.sendPacket(new UserInfo(player)); player.sendPacket(new ExBrExtraUserInfo(player)); player.sendMessage("Page1: You have learned a new Fighter skill!"); return GenerateHtmlRegalosFighter1(player); } }
  10. Hello ! I've got a problem with pawnviewer I don't know why I have now 2 windows when I launch it ! https://ibb.co/cuRSx9 Someone know why ?
  11. NPC BUFFER He's walking alone when someone attacks him. how do you stop him from walking?
  12. Hi try to create new facelifting potion with new custom faces but I don't know how to do this. Someone can help me ?
  13. Hello, guys. As evryone saw long time ago there was placed H5 L2Mytharas files. so i have question. mby samone can tell/teach me, how to compile files like other projects (l2jserver/frozen and etc.) Cuz this comiple is different.
  14. hello guys i need someone with good knowledge on html that can help me with *slider pm me appreciated
  15. Hello guys, im trying to put a few mounts I found on the forum, like a lion and few horses, I put everything correct, on core, sql, gameside, what I can't fix is when I click to mount the lion for example it changes to strider, (because of the lineagemonster.u) the thing is if I put the lineagemonster.u updated all my mounts are turned into a lion even the normal striders, does anyone know about a guide of how to edit this lineagemonster.u I did my research and everything I found is that i have to decrypt and use HXD, until that step im good, but then I really dont have a clue of what I supposed to do there, what i should change to redirect the mounts properly to the monster? Thank you very much DeadEnd
  16. hello im using l2j lastest and i got this problem when char got high speed this happend on normal values speed too and go to pick up or attack something in the distance this happend like the video but for other chardistance is normal for the target char client only for the active char is bug this obviously is a client packet bug but im not sure at all https://youtu.be/AFAnAgQvh-I if someone can help me or a dev can fix it i can pay
  17. Does anyone know how I add a sell link to my gm shop?I have made the gm shop from A Different NPC so its not like I can add anything to java for this
  18. I have problem with Seven Signs register. How to fix it? Adding screens:
  19. http://www.part.lt/img/3c4d948465a25fd7ab1db3d76a671c41526.jpg Help me .
  20. Hello lads again, i have a problem now make my server online. on ip 127.0.0.1 its work no problem at all. maybe someone can help me with IP settings. Login server config: LoginserverHostname = 127.0.0.1 # Default: 2106 LoginserverPort = 2106 # The address on which login will listen for GameServers, use * to bind on all available IPs # WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u> # WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u> # Default: * (0.0.0.0) LoginHostname = 127.0.0.1 # The port on which login will listen for GameServers # Default: 9014 LoginPort = 9014 Game Server config: LoginHost = 127.0.0.1 # TCP port the login server listen to for gameserver connection requests # Default: 9014 LoginPort = 9014 # Bind address for gameserver. You should not need to change it in most cases. # WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u> # WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u> # Default: * (0.0.0.0) GameserverHostname = 127.0.0.1 # Default: 7777 GameserverPort = 7777 IpConfig File: <gameserver address="127.0.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="IPConfig.xsd"> <!-- Localhost here --> <define subnet="127.0.0.1/8" address="127.0.0.1" /> <!-- Internalhosts here (LANs IPs) --> <!-- <define subnet="10.0.0.0/8" address="10.0.0.0" /> --> <!-- <define subnet="172.16.0.0/19" address="172.16.0.0" /> --> <!-- <define subnet="192.168.0.0/16" address="192.168.0.0" /> --> </gameserver> My Host file in system 32 folder 127.0.0.1 localhost 127.0.0.1 l2authd.lineage2.com 127.0.0.1 nProtect.lineage2.com 109.255.197.158 L2authd.lineage2.com 216.107.250.194 nprotect.lineage2.com 109.255.197.158 nprotect.lineage.com ::1 localhost My IP is 109.255.197.158 anybody know how to setum this IP to make server online? please someone help me. Ill tryed many diffrent configs.Cheers
  21. when i got to shop and try to buy weapon please help java.lang.NullPointerException at com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance.showBuyWindow(L2MerchantInstance.java:107) at com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance.showBuyWindow(L2MerchantInstance.java:87) at handlers.bypasshandlers.Buy.useBypass(Buy.java:54) at com.l2jserver.gameserver.model.actor.L2Npc.onBypassFeedback(L2Npc.java:776) at com.l2jserver.gameserver.model.actor.instance.L2PetManagerInstance.onBypassFeedback(L2PetManagerInstance.java:164) at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:197) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:68) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) /* * Copyright (C) 2004-2016 L2J Server * * This file is part of L2J Server. * * L2J Server is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * L2J Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jserver.gameserver.model.actor.instance; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.l2jserver.gameserver.data.xml.impl.BuyListData; import com.l2jserver.gameserver.datatables.MerchantPriceConfigTable; import com.l2jserver.gameserver.datatables.MerchantPriceConfigTable.MerchantPriceConfig; import com.l2jserver.gameserver.enums.InstanceType; import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jserver.gameserver.model.buylist.L2BuyList; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.BuyList; import com.l2jserver.gameserver.network.serverpackets.ExBuySellList; /** * This class ... * @version $Revision: 1.10.4.9 $ $Date: 2005/04/11 10:06:08 $ */ public class L2MerchantInstance extends L2NpcInstance { private static final Logger LOG = LoggerFactory.getLogger(L2MerchantInstance.class); private MerchantPriceConfig _mpc; /** * Creates a merchant, * @param template the merchant NPC template */ public L2MerchantInstance(L2NpcTemplate template) { super(template); setInstanceType(InstanceType.L2MerchantInstance); } @Override public void onSpawn() { super.onSpawn(); _mpc = MerchantPriceConfigTable.getInstance().getMerchantPriceConfig(this); } @Override public String getHtmlPath(int npcId, int val) { String pom = ""; if (val == 0) { pom = "" + npcId; } else { pom = npcId + "-" + val; } return "data/html/merchant/" + pom + ".htm"; } /** * @return Returns the mpc. */ public MerchantPriceConfig getMpc() { return _mpc; } public final void showBuyWindow(L2PcInstance player, int val) { showBuyWindow(player, val, true); } public final void showBuyWindow(L2PcInstance player, int val, boolean applyTax) { final L2BuyList buyList = BuyListData.getInstance().getBuyList(val); if (buyList == null) { LOG.warn("BuyList not found! BuyListId: {}", val); player.sendPacket(ActionFailed.STATIC_PACKET); return; } if (!buyList.isNpcAllowed(getId())) { LOG.warn("Npc not allowed in BuyList! BuyListId: {} NpcId: {}", val, getId()); player.sendPacket(ActionFailed.STATIC_PACKET); return; } final double taxRate = (applyTax) ? getMpc().getTotalTaxRate() : 0; player.setInventoryBlockingStatus(true); if (player.isGM()) { player.sendMessage("Buy List [" + buyList.getListId() + "]"); } player.sendPacket(new BuyList(buyList, player.getAdena(), taxRate)); player.sendPacket(new ExBuySellList(player, taxRate, false)); player.sendPacket(ActionFailed.STATIC_PACKET); } }
  22. hello guys, i have problem with crystal scroll enchant, i have put crystall scroll enchant to +25 after +20 and when i make enchant with normal char to +25 im getting warning for illegal use and im getting kicked...
  23. Hello lads, i keep getting error with l2j H5 server files. no matter what kind of files i use i keep getting script folder error. any Ideas? ---------- 1. ERROR in \PinsAndPouchUnseal.java (at line 75) if (event.contains("_grade_")) ^^^^^^^^^^^^^^^^^^^^^^^^^ The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files ---------- 2. ERROR in \PinsAndPouchUnseal.java (at line 75) if (event.contains("_grade_")) ^^^^^^^^ The method contains(CharSequence) from the type String refers to the missing typ e CharSequence ---------- 2 problems (2 errors)The type java.lang.CharSequence cannot be resolved. It is i ndirectly referenced from required .class files The method contains(java.lang.CharSequence) from the type java.lang.String refer s to the missing type java.lang.CharSequence Failed executing script: C:\l2j\L2Server\data\scripts\custom\PinsAndPouchUnseal\ PinsAndPouchUnseal.java. See PinsAndPouchUnseal.java.error.log for details. Annotation processing got disabled, since it requires a 1.6 compliant JVM ---------- 1. ERROR in \SkillTransferValidator.java (at line 79) for (L2SkillLearn s : SkillTreesData.getInstance().getTransferSkillTree( player.getClassId()).values()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24. kalipsera pios mpori na me help na peraso ton kodika auton se acis 370 ida oti alazoune pola me to pach auto .. https://pastebin.com/cwi3SqmA
  25. Hi all, how i can make a simple HTML link in alt+b?
×