27-05-2010, 04:53 AM
|
#1 (permalink)
|
|
Membro - Veterano
Registrado em: Sep 2009
Localização: Florianopolis (sc)
Posts: 591
Agradecido 724 Vezes em 241 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
|
[Share]L2PVPMerchant
Como fazer
adicione manualmente..
Temos que fazer NPC,
Vá ao banco de dados, tabela Npc selecionar e adicionar uma nova linha
Você pode copiar linha de um outro npc,
mas tera q mudar a classe na coluna pra 'L2PVPMerchant'
Crie uma pasta em html / dados com o nome PVPMerchant
Criar um arquivo HTML
Você está feito e você pode colocar arquivos multisell
Index: C:/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PVPMerchantInstance.java
===================================================================
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.model.actor.instance;
import java.util.StringTokenizer;
import net.sf.l2j.gameserver.model.L2Multisell;
import net.sf.l2j.gameserver.templates.L2NpcTemplate;
/**
* Author xAddytzu
*/
public class L2PVPMerchantInstance extends L2FolkInstance
{
public L2PVPMerchantInstance(int objectId, L2NpcTemplate template)
{
super(objectId, template);
}
@Override
public String getHtmlPath(int npcId, int val)
{
String pom = "";
if (val == 0) pom = "" + npcId;
else pom = npcId + "-" + val;
return "data/html/PVPMerchant/" + pom + ".htm";
}
@Override
public void onBypassFeedback(L2PcInstance player, String command)
{
StringTokenizer st = new StringTokenizer(command, " ");
String actualCommand = st.nextToken();
if (actualCommand.equalsIgnoreCase("Exc_Multisell"))
{
L2Multisell.getInstance().SeparateAndSend(Integer.parseInt(command.substring(9).trim()), player, true, getCastle().getTaxRate());
}
else if (actualCommand.equalsIgnoreCase("Multisell"))
{
L2Multisell.getInstance().SeparateAndSend(Integer.parseInt(command.substring(9).trim()), player, false, getCastle().getTaxRate());
}
else
{
super.onBypassFeedback(player, command);
}
}
}
Index: C:/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
else if (!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && this instanceof L2FishermanInstance)
{
if (showPkDenyChatWindow(player, "fisherman"))
return;
}
// Custom staff
+ else if (player.getPvpKills() >= Config.PVP_MIN)
+ {
+ if (this instanceof L2PVPMerchantInstance)
+ {
+ if (showPkDenyChatWindow(player, "PVPMerchant"))
+ return;
+ }
+ }
Index: C:/workspace/L2_GameServer_t1/java/net/sf/l2j/Config.java
===================================================================
+ //Custom stuff
+ public static int PVP_MIN;
@@
+ PVP_MIN = Integer.parseInt(otherSettings.getProperty("PVPMerchant", "100"));
}
catch (Exception e)
{
Index: C:/L2_GameServer/java/config/other.properties
===================================================================
+
+#------------------------------------------
+# If you have >= 100 points
+# You can buy usefull items
+#------------------------------------------
+PVPMerchant = 100
qual quer duvida so falar.
Credito : xAddytzu
|
|
|