Jump to content

l2jkain

Members
  • Posts

    207
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by l2jkain

  1. Hello I changed the item to buy clan hall but wanted to leave whenever the id change the name change automatic in html but ta showing the name and id of the item. I put it like this: html.replace("%item%", (ItemTable.getInstance().getTemplate(Config.ITEM_ID_BUY_CLAN_HALL).getName()));
  2. ### 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());
  3. and you're right I did not know the null parameter he quoted could close the resoved topic thank you.
  4. set.getInteger("enchantmentLevel") so that this part is what makes the option to add in the xml in MultisellData it calls it so // Feed with a new ingredient. entry.addIngredient (new Ingredient (set));
  5. I already tried to change it set.getInteger("enchantmentLevel") for 0 When I go to buy the item, do not come ++
  6. Hello, I'm testing here but it does not work on Ingredient.java has this _enchantmentLevel but is incomplete more when I add the error! package net.sf.l2j.gameserver.model.multisell; import net.sf.l2j.gameserver.data.ItemTable; import net.sf.l2j.gameserver.model.item.kind.Armor; import net.sf.l2j.gameserver.model.item.kind.Item; import net.sf.l2j.gameserver.model.item.kind.Weapon; import net.sf.l2j.gameserver.templates.StatsSet; /** * A datatype which is part of multisell system. It is either the "result" or the "required part" of a multisell action. */ public class Ingredient { private int _itemId; private int _itemCount; private int _enchantmentLevel; private boolean _isTaxIngredient; private boolean _maintainIngredient; private Item _template = null; public Ingredient(StatsSet set) { this(set.getInteger("id"), set.getInteger("count"), set.getInteger("enchantmentLevel"), set.getBool("isTaxIngredient", false), set.getBool("maintainIngredient", false)); } public Ingredient(int itemId, int itemCount, int enchantmentLevel, boolean isTaxIngredient, boolean maintainIngredient) { _itemId = itemId; _itemCount = itemCount; _enchantmentLevel = enchantmentLevel; _isTaxIngredient = isTaxIngredient; _maintainIngredient = maintainIngredient; if (_itemId > 0) _template = ItemTable.getInstance().getTemplate(_itemId); } /** * @return a new Ingredient instance with the same values as this. */ public Ingredient getCopy() { return new Ingredient(_itemId, _itemCount, _enchantmentLevel, _isTaxIngredient, _maintainIngredient); } public final int getItemId() { return _itemId; } public final void setItemId(int itemId) { _itemId = itemId; } public final int getItemCount() { return _itemCount; } public final void setItemCount(int itemCount) { _itemCount = itemCount; } public final int getEnchantLevel() { return _enchantmentLevel; } public final void setEnchantLevel(int enchantmentLevel) { _enchantmentLevel = enchantmentLevel; } public final boolean isTaxIngredient() { return _isTaxIngredient; } public final void setIsTaxIngredient(boolean isTaxIngredient) { _isTaxIngredient = isTaxIngredient; } public final boolean getMaintainIngredient() { return _maintainIngredient; } public final void setMaintainIngredient(boolean maintainIngredient) { _maintainIngredient = maintainIngredient; } public final Item getTemplate() { return _template; } public final boolean isStackable() { return (_template == null) ? true : _template.isStackable(); } public final boolean isArmorOrWeapon() { return (_template == null) ? false : (_template instanceof Armor) || (_template instanceof Weapon); } public final int getWeight() { return (_template == null) ? 0 : _template.getWeight(); } }
  7. There is no such thing right now? How do I make my mistake I have to create this?
  8. Hello, I'm trying to put the top pvp to be announced when entering however my code only announces the players that have pvp. private static void announceTopPvp(Player activeChar) { String name = null; try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("SELECT char_name, pvpkills FROM characters WHERE accesslevel=0 ORDER BY pvpkills DESC LIMIT 1"); ResultSet rset = statement.executeQuery(); while (rset.next()) { int pvpKills = rset.getInt("pvpkills"); name = rset.getString("char_name"); if (activeChar.getName().equals(name)) Broadcast.announceToOnlinePlayers(name +" Top PVP Is Now Online with " + pvpKills+ "."); } rset.close(); statement.close(); } catch (Exception e) { _log.log(Level.WARNING,"Erro Top Player Pvp!",e); } }
  9. I use Google Translate... I wanted to know if I have access to souce 370 and difs right up to 379
  10. in the case will vim source 370 with the difs up to 379?
  11. If I buy access to C, am I entitled to what updates? I do not want to get free font more ... If I buy now gain upgrade from 361 to 374?
  12. Hello, I'm doing a protection for tvt event, but I'm trying to get someone to help me? if removing else does not work public static void AddTvTSpawnInfo(String name, int _x, int _y, int _z) { if(!CheckTvTSpawnInfo(name)) { String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1"; TvTPlayerList.add(temp); } else { Object[] elements = TvTPlayerList.toArray(); for(int i=0; i < elements.length ; i++) { Splitter = ((String) elements[i]).split(":"); String nameVal = Splitter[0]; if (name.equals(nameVal)) { GetTvTSpawnInfo(name); if (_x == xx && _y == yy && _z == zz && _player.isAttackingNow() == false && _player.isCastingNow() == false && _player.isOnline() == true) { ++SameLoc; if (SameLoc >= 4)//Kick after 4 same x/y/z, location checks { //kick here TvTPlayerList.remove(i); _player.logout(); return; } else { TvTPlayerList.remove(i); String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":" + SameLoc; TvTPlayerList.add(temp); return; } } TvTPlayerList.remove(i); String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1"; TvTPlayerList.add(temp); } } } }
  13. is giving error saying that count does not exist
  14. Hello I put event monument in my acis however the player only wins the item if you have online if the player had ofline appears that mistake someone help me? private static void addReward(int obj_id, boolean duple) { Player player = World.getInstance().getPlayer(obj_id); if(player != null && player.isOnline()) { InventoryUpdate iu = new InventoryUpdate(); final Item reward = ItemTable.getInstance().getTemplate(Config.EVENT_MONUMENT_STATUET_REWARD_ID); player.getInventory().addItem("top", Config.EVENT_MONUMENT_STATUET_REWARD_ID, duple ? Config.EVENT_MONUMENT_STATUET_REWARD_AMOUNT * 2 : Config.EVENT_MONUMENT_STATUET_REWARD_AMOUNT,player, null); player.sendMessage("Voce ganhou " + reward.getName() + "."); player.getInventory().updateDatabase(); player.sendPacket(iu); } else { addOfflineItem(obj_id, Config.EVENT_MONUMENT_STATUET_REWARD_ID, duple ? Config.EVENT_MONUMENT_STATUET_REWARD_AMOUNT * 2 : Config.EVENT_MONUMENT_STATUET_REWARD_AMOUNT); } } private static void addOfflineItem(int owner_id, int item_id, int count) { try(Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement st = con.prepareStatement("SELECT count FROM items WHERE item_id = ? and owner_id = ?"); st.setInt(1,item_id); st.setInt(2,owner_id); ResultSet rs = st.executeQuery(); int total = 0; while (rs.next()) { total = rs.getInt("count"); } st.close(); rs.close(); st = con.prepareStatement("SELECT MAX(object_id) as objid FROM items"); st.executeQuery(); rs = st.executeQuery(); int obj_id = 0; while (rs.next()) { obj_id = rs.getInt("objid") + 1000; } st.close(); rs.close(); if(total == 0) { st = con.prepareStatement("INSERT INTO items VALUES (?, ?, ?, ?, 0, 'INVENTORY', 0, 0, 0, NULL, 0, 0, -1)"); st.setLong(1,owner_id); st.setLong(2,obj_id); st.setInt(3,item_id); st.setInt(4, count); st.execute(); st.close(); } else { st = con.prepareStatement("UPDATE items SET count = ? WHERE owner_id = ? and item_id = ? "); st.setInt(1, total + count); st.setLong(2, owner_id); st.setLong(3, item_id); st.execute(); st.close(); } } catch (SQLException e) { _log.severe("Could not update item char: " + e); } }
  15. I have a tutorial I searched for more I found a lot of things
  16. Is there any way to encrypt jserver lib to anyone decompiling with jd-gui?
  17. Hello I changed the tvt event manager tvt to announce every minute passes however the time gets a delay of 1:45 minutes to teleport the players and to go back to the village when it finishes someone help me? code original : Code modified
  18. Would anyone have an idea for this mistake?
  19. this raid boss is missing on the acis or on the acis version do not have that?
  20. hello I would like to know why every frintezza script gets caught in the parts of the video this same code was tested in version 344 works without error when putting in the 360 is locked
  21. I would like to know if I would change anything by >> if (st.getInt("cond") < 6) { st.set("cond", "6"); } being thus if (st.getInt("cond") < 6) st.set("cond", "6");
×
×
  • Create New...