Jump to content
  • 0

NPC shop open by item


TryHard
Go to solution Solved by TryHard,

Question

Hello guys ,,, 

 

I make an item , when I use it , I can open NPC shop :

			when 71000.use begin
                            setskin(NOWINDOW)
                            npc.open_shop(9001)

 

but shop doesn't open , its open only when I'm close to NPC
 

this is NPC open shop function in source , I try to edit but It doesn't work

	ALUA(npc_open_shop)
	{
		int iShopVnum = 0;

		if (lua_gettop(L) == 1)
		{
			if (lua_isnumber(L, 1))
				iShopVnum = (int) lua_tonumber(L, 1);
		}

		if (CQuestManager::instance().GetCurrentNPCCharacterPtr())
			CShopManager::instance().StartShopping(CQuestManager::instance().GetCurrentCharacterPtr(), CQuestManager::instance().GetCurrentNPCCharacterPtr(), iShopVnum);
		return 0;
	}


any one know how I can solve it ?

I try to edit npc_vnum in shop table but it doesn't work too

 



 

Link to post

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.