Jump to content

Recommended Posts

hello I am installing offline shops, but I am getting an error:

Unknown Server Command StartOpeningOfflineShop 604800 500 | StartOpeningOfflineShop

char_item.cpp

Spoiler
#ifdef __ENABLE_OFFLINE_SHOP__
					case USE_OPEN_OFFLINE_SHOP:
						if (!UseItemOpenOfflineShop(item))
						{
							return false;
						}
						break;
					
					case USE_OFFLINE_SHOP_PREMIUM:
					{
						if (!IsLoadedAffect() || item->IsExchanging())
						{
							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot actually use it.", this));
							return false;
						}
						
						if (FindAffect(AFFECT_PREMIUM_OFFLINE_SHOP))
						{
							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Premium Offline Shops are actually active.", this));
							return false;
						}
						
						AddAffect(AFFECT_PREMIUM_OFFLINE_SHOP, POINT_NONE, 0, 0, INFINITE_AFFECT_DURATION, 0, false);
						item->SetCount(item->GetCount()-1);
					}
					break;
#endif

[...]
#ifdef __ENABLE_OFFLINE_SHOP__
bool CHARACTER::UseItemOpenOfflineShop(CItem* item)
{
	if (!item)
	{
		return false;
	}

	if (IsOpeningOfflineShop())
	{
		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You are already opening an offline shop.", this));
		return false;
	}

	item->Lock(true);
	SetOpeningOfflineShopState(true);
	SetOfflineShopOpeningItem(item);

	ChatPacket(CHAT_TYPE_COMMAND, "StartOpeningOfflineShop %d %d",
			   item->GetValue(COfflineShop::ITEM_TIME_IDX), item->GetValue(COfflineShop::ITEM_GOLD_IDX));

	return true;
}
#endif

 

 

Game.py 

Quote
	[...]	
		if app.ENABLE_OFFLINE_SHOP:
			serverCommandList["OfflineShop"] = self.__OfflineShop
			serverCommandList["OfflineShopDestroy"] = self.__OfflineShopDestroy
			serverCommandList["StartOpeningOfflineShop"] = self.__StartOpeningOfflineShop
			serverCommandList["CancelOpeningOfflineShop"] =  self.__CancelOpeningOfflineShop

		self.serverCommander=stringCommander.Analyzer()
		for serverCommandItem in serverCommandList.items():
			self.serverCommander.SAFE_RegisterCallBack(
				serverCommandItem[0], serverCommandItem[1]
			)
[...]
	if app.ENABLE_OFFLINE_SHOP:
		def __OfflineShop(self, id, name, *nameArgs):
			for namePart in nameArgs:
				name += " " + namePart
			uiOfflineShop.Manager.GetInstance().UpdateMyShop(id, name)

		def __OfflineShopDestroy(self, id):
			uiOfflineShop.Manager.GetInstance().DestroyMyShop(id)

		def __StartOpeningOfflineShop(self, openingTime, openingGold):
			openingTime = int(openingTime)
			self.interface.OpenOfflineShopBuilder(openingTime, openingGold)

		def __CancelOpeningOfflineShop(self):
			self.interface.CloseOfflineShopBuilder()

 

Interfacemodule.py

Quote
	if app.ENABLE_OFFLINE_SHOP:
		def OpenOfflineShopBuilder(self, openingTime, openingGold):
			if not self.wndOfflineShopBuilder:
				self.wndOfflineShopBuilder = uiOfflineShop.BuilderWindow()

			self.wndOfflineShopBuilder.Open(openingTime, openingGold)

		def CloseOfflineShopBuilder(self):
			if not self.wndOfflineShopBuilder:
				return

			self.wndOfflineShopBuilder.Close()

		def IsBuildingOfflineShop(self):
			return self.wndOfflineShopBuilder and self.wndOfflineShopBuilder.IsShow()
		
		def OpenShopSearchWindow(self):
			return

 


uiofflineshop.py FUL GHOSTBIN.me

uiofflineshop.Open

Quote
	def Open(self, openingTime, openingGold):
		self.__Reset()

		self.__openingTime.SetText("{}: {}".format(uiScriptLocale.PRIVATE_SHOP_LEFT_TIME, localeInfo.GetFormattedTimeString(openingTime)))
		self.__shopCost.SetText(localeInfo.NumberToMoneyStringOLD(openingGold))

		self.SetCenterPosition()
		self.Show()
		self.__SpawnPseudoShopKeeper()

 

 

Can anyone help me solve this problem?

Edited by root100
  • Metin2 Dev 1
Link to comment
https://metin2.dev/topic/31041-unknown-server-command/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.