Jump to content
  • 0

Wear (ShopPreviewList) at Community Board - HELP


SOWH2
 Share

Question

Hello friends, I am working on a personal project L2j Homunculus. After several days trying to run an appearance tester for the CB, I go to consult here.

 

I'm using the base of the "wear" command from some old NPCs, but somewhat reduced.

 

	if (command.equals("_bbsequipment"))
	{
		player.sendPacket(new ShopPreviewList(BuyListData.getInstance().getBuyList(3013500), player.getAdena()));
	}

 

After configuring the buttons, it opens the window with the items that I want to try but when I want to buy them, it does not give me the item or any message in the game, but in the Gameserver console it announces "null merchant".

 

Community Board - Services

Window for test

Shop Preview Window

Console Announcement

 

Could someone give me a hand? Thank you.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
4 hours ago, SOWH2 said:

Thanks for taking the time to respond, Kara, is what I envisioned. I'm new to this, would you give me a nudge with some way to bypass NPC verification? Anyway, thank you very much, have a nice day.

 

First of all you have to dig the messages in console to understand which java file has the "problem". An example can be the following:

 

Search for L2Buylist in your project and you locate what files are using this class. 

For example in RequestBuyItem.java you can find the following check:

 

if (!player.isGM())
{
	if (!(target instanceof L2MerchantInstance) || !player.isInsideRadius(target, INTERACTION_DISTANCE, true, false) || player.getInstanceId() != target.getInstanceId())
	{
		sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

	merchant = (L2Character) target;
}

 

This can stop your code since there is no merchant around you to buy item. It might have more checks

(Consider these are from L2JServer, i don't bother work or check amateur trash packs such as Mythras, Scripts e.t.c.)

 

PS. You can also join my discord's community. It's mostly for clients but i have also people from MAXC.

 

 

Check in my topic you will find the invitation link

Edited by Kara
  • Like 1
Link to comment
Share on other sites

  • 0
14 minutes ago, SOWH2 said:

Hello friends, I am working on a personal project L2j Homunculus. After several days trying to run an appearance tester for the CB, I go to consult here.

 

I'm using the base of the "wear" command from some old NPCs, but somewhat reduced.

 


	if (command.equals("_bbsequipment"))
	{
		player.sendPacket(new ShopPreviewList(BuyListData.getInstance().getBuyList(3013500), player.getAdena()));
	}

 

After configuring the buttons, it opens the window with the items that I want to try but when I want to buy them, it does not give me the item or any message in the game, but in the Gameserver console it announces "null merchant".

 

Community Board - Services

Window for test

Shop Preview Window

Console Announcement

 

Could someone give me a hand? Thank you.

 

Buylist require NPC which is defined inside the SQL along with the buylist id.

Upon your click code check that there is no NPC hence the message you get.

 

You need dig into the BuyListData and their code and make a new method which ignore the npcID check. 

Link to comment
Share on other sites

  • 0
1 hour ago, Kara said:

 

Buylist require NPC which is defined inside the SQL along with the buylist id.

Upon your click code check that there is no NPC hence the message you get.

 

You need dig into the BuyListData and their code and make a new method which ignore the npcID check. 

Thanks for taking the time to respond, Kara, is what I envisioned. I'm new to this, would you give me a nudge with some way to bypass NPC verification? Anyway, thank you very much, have a nice day.

Link to comment
Share on other sites

  • 0

 

4 hours ago, Kara said:

 

First of all you have to dig the messages in console to understand which java file has the "problem". An example can be the following:

 

Search for L2Buylist in your project and you locate what files are using this class. 

For example in RequestBuyItem.java you can find the following check:

 



if (!player.isGM())
{
	if (!(target instanceof L2MerchantInstance) || !player.isInsideRadius(target, INTERACTION_DISTANCE, true, false) || player.getInstanceId() != target.getInstanceId())
	{
		sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

	merchant = (L2Character) target;
}

 

This can stop your code since there is no merchant around you to buy item. It might have more checks

(Consider these are from L2JServer, i don't bother work or check amateur trash packs such as Mythras, Scripts e.t.c.)

 

PS. You can also join my discord's community. It's mostly for clients but i have also people from MAXC.

 

 

Check in my topic you will find the invitation link

Thanks Kara, I'm going to enter the discord. Greetings.

Edited by SOWH2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock