Jump to content

Recommended Posts

Posted

How to do

1. Apply the patch

* Manualy not Automaticaly

2. We have to do NPC

2-1. Go into Database, select Npc table and add a new line

2-2. You can copy line from another npc but

* Need to change Class column in L2PVPMerchant

3. Create a folder in html/data with PVPMerchant name

3-1. Create html file

3-2. You're done and you can put multisell file

Any questions ?

 


 

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



Tested and what i can say... Working for me :) Really great job and very usefull. :) Thank you again. :)

Posted

Xe, nice one :D With this guide imposible to create a lot of npc... For example wich talk with hero, noble, 76+ level, faction even V.I.P :D Nice job :) Gonna test and write work or no :)

Posted

Xe, nice one :D With this guide imposible to create a lot of npc... For example wich talk with hero, noble, 76+ level, faction even V.I.P :D Nice job :) Gonna test and write work or no :)

Ok, Waiting mode :D

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...