Ir para conteúdo
  • Cadastre-se

johnn

Membro
  • Total de itens

    129
  • Registro em

  • Última visita

Sobre johnn

  • Data de Nascimento 05/25/1994

Profile Information

  • Gênero
    Masculino

Últimos Visitantes

O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.

johnn's Achievements

Aprendiz de Novato

Aprendiz de Novato (1/14)

  • Uma Semana Completa Rare
  • Um Mês Completo Rare
  • Um Ano Completo Rare

Recent Badges

7

Reputação

  1. johnn

    Comando GMShoop

    protected void runImpl() { final L2PcInstance player = getClient().getActiveChar(); if (player == null) return; if (!getClient().getFloodProtectors().getTransaction().tryPerformAction("buy")) { player.sendMessage("You buying too fast."); return; } // Alt game - Karma punishment if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && player.getKarma() > 0) return; final L2Object target = player.getTarget(); if (!player.isGM() && (target == null // No target (ie GM Shop) || !(target instanceof L2MerchantInstance || target instanceof L2FishermanInstance || target instanceof L2MercManagerInstance || target instanceof L2ClanHallManagerInstance || target instanceof L2CastleChamberlainInstance) // Target not a merchant, fisherman or mercmanager || !player.isInsideRadius(target, L2NpcInstance.INTERACTION_DISTANCE, false, false) // Distance is too far )) return; boolean ok = true; String htmlFolder = ""; if (target != null) { if (target instanceof L2MerchantInstance) { htmlFolder = "merchant"; } else if (target instanceof L2FishermanInstance) { htmlFolder = "fisherman"; } else if (target instanceof L2MercManagerInstance) { ok = true; } else if (target instanceof L2ClanHallManagerInstance) { ok = true; } else if (target instanceof L2CastleChamberlainInstance) { ok = true; } else { ok = false; } } else { ok = false; } L2NpcInstance merchant = null; if (ok) { merchant = (L2NpcInstance) target; } else if (!ok && !player.isGM()) { player.sendMessage("Invalid Target: Seller must be targetted"); return; } L2TradeList list = null; if (merchant != null) { final List<L2TradeList> lists = TradeController.getInstance().getBuyListByNpcId(merchant.getNpcId()); if (!player.isGM()) { if (lists == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id.", Config.DEFAULT_PUNISH); return; } for (final L2TradeList tradeList : lists) { if (tradeList.getListId() == _listId) { list = tradeList; } } } else { list = TradeController.getInstance().getBuyList(_listId); } } else { list = TradeController.getInstance().getBuyList(_listId); } if (list == null) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id.", Config.DEFAULT_PUNISH); return; } _listId = list.getListId(); if (_listId > 1000000) // lease { if (merchant != null && merchant.getTemplate().npcId != _listId - 1000000) { sendPacket(ActionFailed.STATIC_PACKET); return; } } if (_count < 1) { sendPacket(ActionFailed.STATIC_PACKET); return; } double taxRate = 0; if (merchant != null && merchant.getIsInTown()) { taxRate = merchant.getCastle().getTaxRate(); } long subTotal = 0; int tax = 0; // Check for buylist validity and calculates summary values long slots = 0; long weight = 0; for (int i = 0; i < _count; i++) { final int itemId = _items[i * 2 + 0]; final int count = _items[i * 2 + 1]; int price = -1; if (!list.containsItemId(itemId)) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id.", Config.DEFAULT_PUNISH); return; } final L2Item template = ItemTable.getInstance().getTemplate(itemId); if (template == null) { continue; } // Check count if (count > Integer.MAX_VALUE || !template.isStackable() && count > 1) { // Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase invalid quantity of items at the same time.", Config.DEFAULT_PUNISH); SystemMessage sm = new SystemMessage(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED); sendPacket(sm); sm = null; return; } if (_listId < 1000000) { // list = TradeController.getInstance().getBuyList(_listId); price = list.getPriceForItemId(itemId); if (itemId >= 3960 && itemId <= 4026) { price *= Config.RATE_SIEGE_GUARDS_PRICE; } } /* * TODO: Disabled until Leaseholders are rewritten ;-) } else { L2ItemInstance li = merchant.findLeaseItem(itemId, 0); if (li == null || li.getCount() < cnt) { cnt = li.getCount(); if (cnt <= 0) { items.remove(i); continue; } items.get(i).setCount((int)cnt); } price = * li.getPriceToSell(); // lease holder sells the item weight = li.getItem().getWeight(); } */ if (price < 0) { LOGGER.warn("ERROR, no price found .. wrong buylist ??"); sendPacket(ActionFailed.STATIC_PACKET); return; } if (price == 0 && !player.isGM() && Config.ONLY_GM_ITEMS_FREE) { player.sendMessage("Ohh Cheat dont work? You have a problem now!"); Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried buy item for 0 adena.", Config.DEFAULT_PUNISH); return; } subTotal += (long) count * price; // Before tax tax = (int) (subTotal * taxRate); // Check subTotal + tax if (subTotal + tax > Integer.MAX_VALUE) { // Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to purchase over " + Integer.MAX_VALUE + " adena worth of goods.", Config.DEFAULT_PUNISH); SystemMessage sm = new SystemMessage(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED); sendPacket(sm); sm = null; return; } weight += (long) count * template.getWeight(); if (!template.isStackable()) { slots += count; } else if (player.getInventory().getItemByItemId(itemId) == null) { slots++; } } if (weight > Integer.MAX_VALUE || weight < 0 || !player.getInventory().validateWeight((int) weight)) { sendPacket(new SystemMessage(SystemMessageId.WEIGHT_LIMIT_EXCEEDED)); return; } if (slots > Integer.MAX_VALUE || slots < 0 || !player.getInventory().validateCapacity((int) slots)) { sendPacket(new SystemMessage(SystemMessageId.SLOTS_FULL)); return; } // Charge buyer and add tax to castle treasury if not owned by npc clan if (subTotal < 0 || !player.reduceAdena("Buy", (int) (subTotal + tax), player.getLastFolkNPC(), false)) { sendPacket(new SystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA)); return; } if (merchant != null && merchant.getIsInTown() && merchant.getCastle().getOwnerId() > 0) { merchant.getCastle().addToTreasury(tax); } // Proceed the purchase for (int i = 0; i < _count; i++) { final int itemId = _items[i * 2 + 0]; int count = _items[i * 2 + 1]; if (count < 0) { count = 0; } if (!list.containsItemId(itemId)) { Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " sent a false BuyList list_id.", Config.DEFAULT_PUNISH); return; } if (list.countDecrease(itemId)) { if (!list.decreaseCount(itemId, count)) { SystemMessage sm = new SystemMessage(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED); sendPacket(sm); sm = null; return; } } // Add item to Inventory and adjust update packet player.getInventory().addItem("Buy", itemId, count, player, merchant); /* * TODO: Disabled until Leaseholders are rewritten ;-) // Update Leaseholder list if (_listId >= 1000000) { L2ItemInstance li = merchant.findLeaseItem(item.getItemId(), 0); if (li == null) continue; if (li.getCount() < item.getCount()) item.setCount(li.getCount()); * li.setCount(li.getCount() - item.getCount()); li.updateDatabase(); price = item.getCount() + li.getPriceToSell(); L2ItemInstance la = merchant.getLeaseAdena(); la.setCount(la.getCount() + price); la.updateDatabase(); player.getInventory().addItem(item); item.updateDatabase(); } */ } if (merchant != null) { final String html = HtmCache.getInstance().getHtm("data/html/" + htmlFolder + "/" + merchant.getNpcId() + "-bought.htm"); if (html != null) { final NpcHtmlMessage boughtMsg = new NpcHtmlMessage(merchant.getObjectId()); boughtMsg.setHtml(html.replaceAll("%objectId%", String.valueOf(merchant.getObjectId()))); player.sendPacket(boughtMsg); } } final StatusUpdate su = new StatusUpdate(player.getObjectId()); su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad()); player.sendPacket(su); player.sendPacket(new ItemList(player, true)); } @Override public String getType() { return "[C] 1F RequestBuyItem"; } } Essa e classe toda la em requestbuyitem.java
  2. johnn

    Comando GMShoop

    Ja retirei do if em diante e nada..
  3. johnn

    Comando GMShoop

    Boa noite estou criando Community Board com opção para comprar items, ate agora tive sucesso porem tem um restrição na l2jfrozen que não me permite comprar se não estiver no target de algum INPC alguém poderia me ajudar ? ja deletei tudo relacionado, ja alterei fiz muitas coisas mas nada! alguém saberia como fazer funcionar para comprar no community e no comando .gmshop sem precisar de target de npc? CODIGO QUE ACHEI EM REQUESTBUYITEM.JAVA: final L2Object target = player.getTarget(); if (!player.isGM() && (target == null // No target (ie GM Shop) || !(target instanceof L2MerchantInstance || target instanceof L2FishermanInstance || target instanceof L2MercManagerInstance || target instanceof L2ClanHallManagerInstance || target instanceof L2CastleChamberlainInstance) // Target not a merchant, fisherman or mercmanager || !player.isInsideRadius(target, L2NpcInstance.INTERACTION_DISTANCE, false, false) // Distance is too far )) return;
  4. Adaptei para l2jfrozen caso alguém ainda queira e só trocar o código do L2Bufferinstance.java por esse código abaixo: /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.model.actor.instance; import java.util.StringTokenizer; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.ai.CtrlIntention; import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; import com.l2jfrozen.gameserver.network.serverpackets.MagicSkillUser; import com.l2jfrozen.gameserver.network.serverpackets.MoveToPawn; import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.network.serverpackets.SocialAction; import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation; import com.l2jfrozen.gameserver.templates.L2NpcTemplate; import com.l2jfrozen.util.random.Rnd; /** * @author KDerD64 */ public final class L2BufferInstance extends L2NpcInstance { public L2BufferInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); int buffid = 0; int bufflevel = 1; String nextWindow = null; if (st.countTokens() == 3) { buffid = Integer.valueOf(st.nextToken()); bufflevel = Integer.valueOf(st.nextToken()); nextWindow = st.nextToken(); } else if (st.countTokens() == 1) buffid = Integer.valueOf(st.nextToken()); if (actualCommand.equalsIgnoreCase("getbuff")) { if (buffid != 0) { MagicSkillUser mgc = new MagicSkillUser(this, player, buffid, bufflevel, -1, 0); SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); showMessageWindow(player); player.broadcastPacket(mgc); showChatWindow(player, nextWindow); } } else if (actualCommand.equalsIgnoreCase("restore")) { player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp()); player.setCurrentCp(player.getMaxCp()); showMessageWindow(player); } else if (actualCommand.equalsIgnoreCase("cancel")) { player.stopAllEffects(); showMessageWindow(player); } else super.onBypassFeedback(player, command); } @Override public void onAction(L2PcInstance player) { if (this != player.getTarget()) { player.setTarget(this); player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel())); player.sendPacket(new ValidateLocation(this)); } else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false)) { SocialAction sa = new SocialAction(this.getObjectId(), (int) Rnd.get()); broadcastPacket(sa); player.sendPacket(new MoveToPawn(player, this, 150)); showMessageWindow(player); player.sendPacket(ActionFailed.STATIC_PACKET); } else { player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); player.sendPacket(ActionFailed.STATIC_PACKET); } } private void showMessageWindow(L2PcInstance player) { String filename = "data/html/buffer/" + getNpcId() + ".htm"; filename = getHtmlPath(getNpcId(), 0); NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(filename); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%npcname%", getName()); html.replace("%servername%", String.valueOf(Config.ALT_Server_Name)); player.sendPacket(html); } @Override public String getHtmlPath(int npcId, int val) { String pom = ""; if (val == 0) pom = "" + npcId; else pom = npcId + "-" + val; return "data/html/buffer/" + pom + ".htm"; } }
  5. johnn

    Blacksmith of mammon

    Como configurado errado ^^ Autospawn e configuravel ? onde pois eu nao mexi em nada simplesmente ele nao aparece.. apenas o merchant mammon
  6. johnn

    Community Board

    NO caso se tem que editar isso no Java...
  7. johnn

    Mod .gmshop

    Alguém poderia me ajudar? então depois de tanto trabalho descobrir onde esta o error, o comando .gmshop so funciona se você estiver no target do npc definido no power pack no caso o npc id 53 (GM SHOP) somente compra no target desse npc, então sabendo disso qual e como editar no código do .gmshop para permitir comprar sem estar no target do npc ?
  8. johnn

    Manor não funciona

    Olá a todos ainda nao conseguir fazer funcionar, configurei tudo no castelo esperei ate o dia seguinte e não tem seeds para comprar :/ detalhe aparece o period mas não aparece as seeds. outra coisa que reparei nas tabelas do manor mesmo configurando os preços no castelo na tabela mostra valor 0
  9. Alguem conseguiu fazer o manor funcionar l2jfrozen 1132 ? esperei ate segunda feira para ver se funciona e nada ate agora, alguem sabe o que pode ser ? as sementes não aparecem para poder comprar!
  10. te amo cara eu tinha tentado esse metodo ai sem o " ! " ai fioquei louco kkk atras de ajuda muito obrigado mesmo voce me salvou muitos aqui recusaram me ajudar ate chegaram a fala em $$ mas voce e pessoa de bem agradeco a vc e que Deus te abencoe.
  11. na frozen tem o powerpack certo ? entao no power pack voce pode definir comandos para usar gmshop gkglobal e npc buff de onde quiser certo ? eu quero bloquear isso para player normais e apenas vip consguir usar os comandos entendeu ^^ dessa forma que voce me falou se a pessoa for vip ela nao usa o comando ali sao as restricoes se caso a pessoa for vip, ou estiver emmodo de atck etc.. ainda nao resolveu mais obrigado pela tentantiva ^^ se ainda tiver outra idea estou disponivel maow vlw EDIT mano me desculpa deu tudo certinho ^^ e por causa que ja tinha tentado dessejeito sera que e por que eu colocarva sem isso no active Char " ! "
  12. alguém pode colocar esses comando do power pack da frozen para somente players com acesso VIP (isVip) ? ja tenho o mod vip instalado no java esse aqui https://www.l2jbrasil.com/index.php?/topic/58400-l2jfrozen-vip-system/page-2&do=findComment&comment=502980 quero integrar ao powerpack ^^ GM SHOP: GKGLOBAL: BUFFER
  13. johnn

    Erro no GameServer

    Mano eu tirei do ddns agora esta no ip direto da maquina e continua o error, onde eu configuro para nao dar esse error mais?
  14. johnn

    Critical Error

    Bom pessoal estou com seguinte problema os player que estão espoliando em pt ( exemplo : anão usa SPOIL FESTIVAL ai quando o mago mata ai o anão usa a skill SWEPPER de recolher o item da critico no mago que esta não PT, resumindo todos que estão em PARTY tomando critical quando o anão usa a skill de espoliar. imagem do critical error >> MEUS SERVER ESTA ONLINE QUEM ME AJUDAR DESDE JÁ AGRADEÇO! SWEPPER O PREBLEMA E NESSA SKILL AO USAR ELA DA CRITICAL NA PT TODA!! ALGUEM COM ERRO PARECIDO E QUE POSSA AJUDAR! DETALHE NAO TEM ERROR NO GAMESERVER
  15. johnn

    Mod .gmshop

    Mano a multisell ainda funciona o problema e a html não funciona a paginação so abre a pagina inicial e os botões não funciona :/ Alem desse problema os player estão reclamando que estão tomando critical quando estão em pt com um spoiler e o spoiler usa a skill todos na pt toma dc ou critical, menos o spoiler
×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.