Jump to content

NPC shop open by item


Go to solution Solved by TryHard,

Recommended Posts

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 comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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