Jump to content
  • 0

[Npc] Gm Shop


maganius

Question

Hello ppl

 

I need help with the npc GM SHOP.

 

I know how add,del,edit prices,items,. but I dont know if is possible change the price adena for a Coin.

 

Example:

 

Weapons NG - 200 adena.

 

Weapon C - 1000 adena

 

Weapon B - 5 coins

 

The npc not is a multisell, all items are editable from database.

 

Button example:

<button value="NG Weapons" action="bypass -h npc_%objectId%_Buy 350018" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

Server C5.

 

Srry for my english,

Thanks

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Hi te0x thanks for answering fast!

 

If I change the column price for the weapon always set it with Adena [57], I want change this weapon price for Coin [6xxx].

 

I dont know how to do.

Link to comment
Share on other sites

  • 0

Hi te0x thanks for answering fast!

 

If I change the column price for the weapon always set it with Adena [57], I want change this weapon price for Coin [6xxx].

 

I dont know how to do.

you should have a table item_id? something like this to change it in the item that you want

example. where 57 = 6673

57	2000	29	35	-1	-1	0	0

Link to comment
Share on other sites

  • 0

 

you should have a table item_id? something like this to change it in the item that you want

example. where 57 = 6673

57	2000	29	35	-1	-1	0	0

 

I dont have a table item_id.

 

In the merchant_buylist have this structure.

item_id   price   shop_id   order   count   currentCount   time   savetimer

Example sell Homunkulus's Sword:

84   2000  30018  1   -1   -1   0   0
Link to comment
Share on other sites

  • 0

 

I dont have a table item_id.

 

In the merchant_buylist have this structure.

item_id   price   shop_id   order   count   currentCount   time   savetimer

Example sell Homunkulus's Sword:

84   2000  30018  1   -1   -1   0   0

change the 84 to the item that you want.

item_id = the item that costs

price = the cost 5000? 2000? 15000?

Link to comment
Share on other sites

  • 0

If I change 84[Homu] to 6673[Coin] in GM Shop appear to buy the Coin.

 

I want sell the "Homunkulus's Sword" for Coin not adena.

ow u're right xD i suck on this too ;p 

why don't you make it better with multisell? it easier

Link to comment
Share on other sites

  • 0

ow u're right xD i suck on this too ;p 

why don't you make it better with multisell? it easier

 

Because the pack have a GM Shop ready for use, too I want use it to learn.

Link to comment
Share on other sites

  • 0

i don't know how you can change it from there xD I guess that is in core

 

I also think I need to change in core, but where? how? is my question :P

 

Thx for ur help anyway

Edited by maganius
Link to comment
Share on other sites

  • 0

I also think I need to change in core, but where? how? is my question :P

 

Thx for ur help anyway

You have a custom java gm shop? if yes, use shift+click on npc see the type name and search in your core on gameserver/model/actor/instance for the type of this npc

Link to comment
Share on other sites

  • 0

Hi nikosdevil20

 

This npc already come in pack.

 

I use ctrl+shift and class send me to:

xxx.gameserver.model.actor.instance.L2MerchantInstance

In the location have:

/*
 * 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 lt.equal.gameserver.model.actor.instance;

import java.util.StringTokenizer;

import javolution.text.TextBuilder;
import lt.equal.Config;
import lt.equal.gameserver.TradeController;
import lt.equal.gameserver.model.L2Multisell;
import lt.equal.gameserver.model.L2TradeList;
import lt.equal.gameserver.network.L2GameClient;
import lt.equal.gameserver.network.serverpackets.ActionFailed;
import lt.equal.gameserver.network.serverpackets.BuyList;
import lt.equal.gameserver.network.serverpackets.MyTargetSelected;
import lt.equal.gameserver.network.serverpackets.NpcHtmlMessage;
import lt.equal.gameserver.network.serverpackets.Ride;
import lt.equal.gameserver.network.serverpackets.SellList;
import lt.equal.gameserver.network.serverpackets.StatusUpdate;
import lt.equal.gameserver.network.serverpackets.WearList;
import lt.equal.gameserver.templates.L2NpcTemplate;


/**
 * This class ...
 * 
 * @version $Revision: 1.10.4.9 $ $Date: 2005/04/11 10:06:08 $
 */
public class L2MerchantInstance extends L2FolkInstance
{
	// private static Logger _log = Logger.getLogger(L2MerchantInstance.class.getName());

	/**
	 * @param template
	 */
	public L2MerchantInstance(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/merchant/" + pom + ".htm";
	}

	private void showWearWindow(L2PcInstance player, int val)
	{
		player.tempInvetoryDisable();

		if (Config.DEBUG)
			_log.fine("Showing wearlist");

		L2TradeList list = TradeController.getInstance().getBuyList(val);

		if (list != null)
		{
			WearList bl = new WearList(list, player.getAdena(), player.getExpertiseIndex());
			player.sendPacket(bl);
		}
		else
		{
			_log.warning("no buylist with id:" + val);
			player.sendPacket(new ActionFailed());
		}
	}

	private void showBuyWindow(L2PcInstance player, int val)
	{
		double taxRate = 0;

		if (getIsInTown())
			taxRate = getCastle().getTaxRate();

		player.tempInvetoryDisable();

		if (Config.DEBUG)
			_log.fine("Showing buylist");

		L2TradeList list = TradeController.getInstance().getBuyList(val);

		if (list != null && list.getNpcId().equals(String.valueOf(getNpcId())))
		{
			BuyList bl = new BuyList(list, player.getAdena(), taxRate);
			player.sendPacket(bl);
		}
		else
		{
			_log.warning("possible client hacker: " + player.getName() + " attempting to buy from GM shop! < Ban him!");
			_log.warning("buylist id:" + val);
		}

		player.sendPacket(new ActionFailed());
	}

	private void showSellWindow(L2PcInstance player)
	{
		if (Config.DEBUG)
			_log.fine("Showing selllist");

		player.sendPacket(new SellList(player));

		if (Config.DEBUG)
			_log.fine("Showing sell window");

		player.sendPacket(new ActionFailed());
	}

	@Override
	public void onBypassFeedback(L2PcInstance player, String command)
	{
		StringTokenizer st = new StringTokenizer(command, " ");
		String actualCommand = st.nextToken(); // Get actual command

		if (actualCommand.equalsIgnoreCase("Buy"))
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			showBuyWindow(player, val);
		}
		else if (actualCommand.equalsIgnoreCase("Sell"))
		{
			showSellWindow(player);
		}
		else if (actualCommand.equalsIgnoreCase("RentPet"))
		{
			if (Config.ALLOW_RENTPET)
			{
				if (st.countTokens() < 1)
				{
					showRentPetWindow(player);
				}
				else
				{
					int val = Integer.parseInt(st.nextToken());
					tryRentPet(player, val);
				}
			}
		}
		else if (actualCommand.equalsIgnoreCase("Wear") && Config.ALLOW_WEAR)
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			showWearWindow(player, val);
		}
		else if (actualCommand.equalsIgnoreCase("Multisell"))
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			L2Multisell.getInstance().SeparateAndSend(val, player, false, getCastle().getTaxRate());
		}
		else if (actualCommand.equalsIgnoreCase("Exc_Multisell"))
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			L2Multisell.getInstance().SeparateAndSend(val, player, true, getCastle().getTaxRate());
		}
		else
		{
			// this class dont know any other commands, let forward
			// the command to the parent class

			super.onBypassFeedback(player, command);
		}
	}

	public void showRentPetWindow(L2PcInstance player)
	{
		if (!Config.LIST_PET_RENT_NPC.contains(getTemplate().npcId))
			return;

		TextBuilder html1 = new TextBuilder("<html><body>Pet Manager:<br>");
		html1.append("You can rent a wyvern or strider for adena.<br>My prices:<br1>");
		html1.append("<table border=0><tr><td>Ride</td></tr>");
		html1.append("<tr><td>Wyvern</td><td>Strider</td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 1\">30 sec/1800 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 11\">30 sec/900 adena</a></td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 2\">1 min/7200 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 12\">1 min/3600 adena</a></td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 3\">10 min/720000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 13\">10 min/360000 adena</a></td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 4\">30 min/6480000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 14\">30 min/3240000 adena</a></td></tr>");
		html1.append("</table>");
		html1.append("</body></html>");

		insertObjectIdAndShowChatWindow(player, html1.toString());
	}

	public void tryRentPet(L2PcInstance player, int val)
	{
		if (player == null || player.getPet() != null || player.isMounted() || player.isRentedPet())
			return;
		if (!player.disarmWeapons())
			return;

		int petId;
		double price = 1;
		int cost[] =
		{ 1800, 7200, 720000, 6480000 };
		int ridetime[] =
		{ 30, 60, 600, 1800 };

		if (val > 10)
		{
			petId = 12526;
			val -= 10;
			price /= 2;
		}
		else
		{
			petId = 12621;
		}

		if (val < 1 || val > 4)
			return;

		price *= cost[val - 1];
		int time = ridetime[val - 1];

		if (!player.reduceAdena("Rent", (int) price, player.getLastFolkNPC(), true))
			return;

		Ride mount = new Ride(player.getObjectId(), Ride.ACTION_MOUNT, petId);
		player.broadcastPacket(mount);

		player.setMountType(mount.getMountType());
		player.startRentPet(time);
	}

	@Override
	public void onActionShift(L2GameClient client)
	{
		L2PcInstance player = client.getActiveChar();
		if (player == null)
			return;

		if (player.getAccessLevel() >= Config.GM_ACCESSLEVEL)
		{
			player.setTarget(this);

			MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel());
			player.sendPacket(my);

			if (isAutoAttackable(player))
			{
				StatusUpdate su = new StatusUpdate(getObjectId());
				su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp());
				su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
				player.sendPacket(su);
			}

			NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
			TextBuilder html1 = new TextBuilder("<html><body><table border=0>");
			html1.append("<tr><td>Current Target:</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			html1.append("<tr><td>Object ID: " + getObjectId() + "</td></tr>");
			html1.append("<tr><td>Template ID: " + getTemplate().npcId + "</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			html1.append("<tr><td>HP: " + getCurrentHp() + "</td></tr>");
			html1.append("<tr><td>MP: " + getCurrentMp() + "</td></tr>");
			html1.append("<tr><td>Level: " + getLevel() + "</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			html1.append("<tr><td>Class: " + getClass().getName() + "</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			// changed by terry 2005-02-22 21:45
			html1.append("</table><table><tr><td><button value=\"Edit NPC\" action=\"bypass -h admin_edit_npc " + getTemplate().npcId
					+ "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
			html1.append("<td><button value=\"Kill\" action=\"bypass -h admin_kill\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			html1.append("<tr><td><button value=\"Show DropList\" action=\"bypass -h admin_show_droplist " + getTemplate().npcId
					+ "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			html1.append("<td><button value=\"Delete\" action=\"bypass -h admin_delete\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			html1.append("</table>");

			if (player.isGM())
			{
				html1.append("<button value=\"View Shop\" action=\"bypass -h admin_showShop " + getTemplate().npcId + "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></br>");
				html1.append("<button value=\"Lease next week\" action=\"bypass -h npc_" + getObjectId() + "_Lease\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
				html1.append("<button value=\"Abort current leasing\" action=\"bypass -h npc_" + getObjectId() + "_Lease next\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
				html1.append("<button value=\"Manage items\" action=\"bypass -h npc_" + getObjectId() + "_Lease manage\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
			}

			html1.append("</body></html>");

			html.setHtml(html1.toString());
			player.sendPacket(html);
		}
		player.sendPacket(new ActionFailed());
	}

}

I dont found where my NPC GM Shop send order to server.

Link to comment
Share on other sites

  • 0

Hi nikosdevil20

 

This npc already come in pack.

 

I use ctrl+shift and class send me to:

xxx.gameserver.model.actor.instance.L2MerchantInstance

In the location have:

/*
 * 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 lt.equal.gameserver.model.actor.instance;

import java.util.StringTokenizer;

import javolution.text.TextBuilder;
import lt.equal.Config;
import lt.equal.gameserver.TradeController;
import lt.equal.gameserver.model.L2Multisell;
import lt.equal.gameserver.model.L2TradeList;
import lt.equal.gameserver.network.L2GameClient;
import lt.equal.gameserver.network.serverpackets.ActionFailed;
import lt.equal.gameserver.network.serverpackets.BuyList;
import lt.equal.gameserver.network.serverpackets.MyTargetSelected;
import lt.equal.gameserver.network.serverpackets.NpcHtmlMessage;
import lt.equal.gameserver.network.serverpackets.Ride;
import lt.equal.gameserver.network.serverpackets.SellList;
import lt.equal.gameserver.network.serverpackets.StatusUpdate;
import lt.equal.gameserver.network.serverpackets.WearList;
import lt.equal.gameserver.templates.L2NpcTemplate;


/**
 * This class ...
 * 
 * @version $Revision: 1.10.4.9 $ $Date: 2005/04/11 10:06:08 $
 */
public class L2MerchantInstance extends L2FolkInstance
{
	// private static Logger _log = Logger.getLogger(L2MerchantInstance.class.getName());

	/**
	 * @param template
	 */
	public L2MerchantInstance(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/merchant/" + pom + ".htm";
	}

	private void showWearWindow(L2PcInstance player, int val)
	{
		player.tempInvetoryDisable();

		if (Config.DEBUG)
			_log.fine("Showing wearlist");

		L2TradeList list = TradeController.getInstance().getBuyList(val);

		if (list != null)
		{
			WearList bl = new WearList(list, player.getAdena(), player.getExpertiseIndex());
			player.sendPacket(bl);
		}
		else
		{
			_log.warning("no buylist with id:" + val);
			player.sendPacket(new ActionFailed());
		}
	}

	private void showBuyWindow(L2PcInstance player, int val)
	{
		double taxRate = 0;

		if (getIsInTown())
			taxRate = getCastle().getTaxRate();

		player.tempInvetoryDisable();

		if (Config.DEBUG)
			_log.fine("Showing buylist");

		L2TradeList list = TradeController.getInstance().getBuyList(val);

		if (list != null && list.getNpcId().equals(String.valueOf(getNpcId())))
		{
			BuyList bl = new BuyList(list, player.getAdena(), taxRate);
			player.sendPacket(bl);
		}
		else
		{
			_log.warning("possible client hacker: " + player.getName() + " attempting to buy from GM shop! < Ban him!");
			_log.warning("buylist id:" + val);
		}

		player.sendPacket(new ActionFailed());
	}

	private void showSellWindow(L2PcInstance player)
	{
		if (Config.DEBUG)
			_log.fine("Showing selllist");

		player.sendPacket(new SellList(player));

		if (Config.DEBUG)
			_log.fine("Showing sell window");

		player.sendPacket(new ActionFailed());
	}

	@Override
	public void onBypassFeedback(L2PcInstance player, String command)
	{
		StringTokenizer st = new StringTokenizer(command, " ");
		String actualCommand = st.nextToken(); // Get actual command

		if (actualCommand.equalsIgnoreCase("Buy"))
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			showBuyWindow(player, val);
		}
		else if (actualCommand.equalsIgnoreCase("Sell"))
		{
			showSellWindow(player);
		}
		else if (actualCommand.equalsIgnoreCase("RentPet"))
		{
			if (Config.ALLOW_RENTPET)
			{
				if (st.countTokens() < 1)
				{
					showRentPetWindow(player);
				}
				else
				{
					int val = Integer.parseInt(st.nextToken());
					tryRentPet(player, val);
				}
			}
		}
		else if (actualCommand.equalsIgnoreCase("Wear") && Config.ALLOW_WEAR)
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			showWearWindow(player, val);
		}
		else if (actualCommand.equalsIgnoreCase("Multisell"))
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			L2Multisell.getInstance().SeparateAndSend(val, player, false, getCastle().getTaxRate());
		}
		else if (actualCommand.equalsIgnoreCase("Exc_Multisell"))
		{
			if (st.countTokens() < 1)
				return;

			int val = Integer.parseInt(st.nextToken());
			L2Multisell.getInstance().SeparateAndSend(val, player, true, getCastle().getTaxRate());
		}
		else
		{
			// this class dont know any other commands, let forward
			// the command to the parent class

			super.onBypassFeedback(player, command);
		}
	}

	public void showRentPetWindow(L2PcInstance player)
	{
		if (!Config.LIST_PET_RENT_NPC.contains(getTemplate().npcId))
			return;

		TextBuilder html1 = new TextBuilder("<html><body>Pet Manager:<br>");
		html1.append("You can rent a wyvern or strider for adena.<br>My prices:<br1>");
		html1.append("<table border=0><tr><td>Ride</td></tr>");
		html1.append("<tr><td>Wyvern</td><td>Strider</td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 1\">30 sec/1800 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 11\">30 sec/900 adena</a></td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 2\">1 min/7200 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 12\">1 min/3600 adena</a></td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 3\">10 min/720000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 13\">10 min/360000 adena</a></td></tr>");
		html1.append("<tr><td><a action=\"bypass -h npc_%objectId%_RentPet 4\">30 min/6480000 adena</a></td><td><a action=\"bypass -h npc_%objectId%_RentPet 14\">30 min/3240000 adena</a></td></tr>");
		html1.append("</table>");
		html1.append("</body></html>");

		insertObjectIdAndShowChatWindow(player, html1.toString());
	}

	public void tryRentPet(L2PcInstance player, int val)
	{
		if (player == null || player.getPet() != null || player.isMounted() || player.isRentedPet())
			return;
		if (!player.disarmWeapons())
			return;

		int petId;
		double price = 1;
		int cost[] =
		{ 1800, 7200, 720000, 6480000 };
		int ridetime[] =
		{ 30, 60, 600, 1800 };

		if (val > 10)
		{
			petId = 12526;
			val -= 10;
			price /= 2;
		}
		else
		{
			petId = 12621;
		}

		if (val < 1 || val > 4)
			return;

		price *= cost[val - 1];
		int time = ridetime[val - 1];

		if (!player.reduceAdena("Rent", (int) price, player.getLastFolkNPC(), true))
			return;

		Ride mount = new Ride(player.getObjectId(), Ride.ACTION_MOUNT, petId);
		player.broadcastPacket(mount);

		player.setMountType(mount.getMountType());
		player.startRentPet(time);
	}

	@Override
	public void onActionShift(L2GameClient client)
	{
		L2PcInstance player = client.getActiveChar();
		if (player == null)
			return;

		if (player.getAccessLevel() >= Config.GM_ACCESSLEVEL)
		{
			player.setTarget(this);

			MyTargetSelected my = new MyTargetSelected(getObjectId(), player.getLevel() - getLevel());
			player.sendPacket(my);

			if (isAutoAttackable(player))
			{
				StatusUpdate su = new StatusUpdate(getObjectId());
				su.addAttribute(StatusUpdate.CUR_HP, (int) getCurrentHp());
				su.addAttribute(StatusUpdate.MAX_HP, getMaxHp());
				player.sendPacket(su);
			}

			NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
			TextBuilder html1 = new TextBuilder("<html><body><table border=0>");
			html1.append("<tr><td>Current Target:</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			html1.append("<tr><td>Object ID: " + getObjectId() + "</td></tr>");
			html1.append("<tr><td>Template ID: " + getTemplate().npcId + "</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			html1.append("<tr><td>HP: " + getCurrentHp() + "</td></tr>");
			html1.append("<tr><td>MP: " + getCurrentMp() + "</td></tr>");
			html1.append("<tr><td>Level: " + getLevel() + "</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			html1.append("<tr><td>Class: " + getClass().getName() + "</td></tr>");
			html1.append("<tr><td><br></td></tr>");

			// changed by terry 2005-02-22 21:45
			html1.append("</table><table><tr><td><button value=\"Edit NPC\" action=\"bypass -h admin_edit_npc " + getTemplate().npcId
					+ "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
			html1.append("<td><button value=\"Kill\" action=\"bypass -h admin_kill\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			html1.append("<tr><td><button value=\"Show DropList\" action=\"bypass -h admin_show_droplist " + getTemplate().npcId
					+ "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			html1.append("<td><button value=\"Delete\" action=\"bypass -h admin_delete\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
			html1.append("</table>");

			if (player.isGM())
			{
				html1.append("<button value=\"View Shop\" action=\"bypass -h admin_showShop " + getTemplate().npcId + "\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></br>");
				html1.append("<button value=\"Lease next week\" action=\"bypass -h npc_" + getObjectId() + "_Lease\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
				html1.append("<button value=\"Abort current leasing\" action=\"bypass -h npc_" + getObjectId() + "_Lease next\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
				html1.append("<button value=\"Manage items\" action=\"bypass -h npc_" + getObjectId() + "_Lease manage\" width=100 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
			}

			html1.append("</body></html>");

			html.setHtml(html1.toString());
			player.sendPacket(html);
		}
		player.sendPacket(new ActionFailed());
	}

}

I dont found where my NPC GM Shop send order to server.

so you can find 1 shared gm shop and use multisells..

Link to comment
Share on other sites

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
Answer this question...

×   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...