Jump to content

Private Shop Search System


Recommended Posts

  • 2 weeks later...
  • 1 month later...
37 minutes ago, metin2team said:

@Kaso just ignore it :) it just prints the (name vnum xcount) price to the sys_log. you can ignore it.

Thanks =)

So i can just add that somewhere in the shop.cpp ?

Spoiler

Add in under:
        if (IsPCShop())
            InsertInMysql(m_pkPC, pkItem, iPos, item.price);
 

 

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 months later...

help please...i'am don't know were tu modifi for this error whene i compilate my source

input_main.cpp: In member function 'virtual int CInputMain::Analyze(DESC*, BYTE, const char*)':
input_main.cpp:3706: error: duplicate case value
input_main.cpp:3702: error: previously used here

https://metin2.download/picture/ZcjSYKn121bHwA14IVCm3FZlk5N6942Q/.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...
  • 9 months later...

Hey i have Ken Offline shop

who helps me to get up to speed I give him 50€ to paypal for fix

Code
  1. Server syserr:
  2. Shop2: Item Search Query Failed, Rows couldn't get
  3. Shop2: Item Search Query Failed, Rows couldn't get
  4. Shop2: Item Search Query Failed, Rows couldn't get
  5. Shop2: Item Search Query Failed, Rows couldn't get

 

Link to comment
Share on other sites

  • 1 month later...

It works to make search from offline shop but effect do not appear. Like this.

[tests] is not the seller.

35ef26e.jpg

I think need change from normal shop to offline shop traget, but i don't know how.

I have ken offline shop

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...
  • 2 weeks later...

please hellp! i have shop ofline ken ... 

 

SYSERR: Dec  6 03:24:56 :: Shop2: Item Search Query Failed, Rows couldn't get
SYSERR: Dec  6 03:25:00 :: Shop2: Item Search Query Failed, Rows couldn't get
SYSERR: Dec  6 03:25:04 :: Shop2: Item Search Query Failed, Rows couldn't get
SYSERR: Dec  6 03:25:05 :: Shop2: Item Search Query Failed, Rows couldn't get
SYSERR: Dec  6 03:25:05 :: Shop2: Item Search Query Failed, Rows couldn't get
SYSERR: Dec  6 03:25:06 :: Shop2: Item Search Query Failed, Rows couldn't get
SYSERR: Dec  6 03:25:06 :: Shop2: Item Search Query Failed, Rows couldn't get

Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...
  • Silver

My problem is, that that CHAT_TYPE_COMMAND to Search is way to long.

Core downer with on this function void CHARACTER::ChatPacket(BYTE type, const char * format, ...)

With this line : int len = vsnprintf(chatbuf, sizeof(chatbuf), format, args);

When i reduce the CHAT_TYPE_COMMAND  then everything is fine.

 

Next problem is, that shop_onsales_items does not read items on boot. So it is empty when i restart Server.

@Koray

 

If you want to find 1 Hand Weapons

input_main.cpp

void CInputMain::Shop2(LPCHARACTER ch, const char * data)

change:

				if (table && p->iJob == 0 && (table->dwAntiFlags & ITEM_ANTIFLAG_ASSASSIN && table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN && table->dwAntiFlags & ITEM_ANTIFLAG_SURA) ||
					table && p->iJob == 1 && (table->dwAntiFlags & ITEM_ANTIFLAG_WARRIOR  && table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN && table->dwAntiFlags & ITEM_ANTIFLAG_SURA) ||
					table && p->iJob == 2 && (table->dwAntiFlags & ITEM_ANTIFLAG_ASSASSIN && table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN && table->dwAntiFlags & ITEM_ANTIFLAG_WARRIOR) ||
					table && p->iJob == 3 && (table->dwAntiFlags & ITEM_ANTIFLAG_ASSASSIN && table->dwAntiFlags & ITEM_ANTIFLAG_WARRIOR && table->dwAntiFlags & ITEM_ANTIFLAG_SURA) ||)

to:

				if (table && p->iJob == 0 && (table->dwAntiFlags & ITEM_ANTIFLAG_ASSASSIN && table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN && table->dwAntiFlags & ITEM_ANTIFLAG_SURA) ||
					table && p->iJob == 1 && (table->dwAntiFlags & ITEM_ANTIFLAG_WARRIOR  && table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN && table->dwAntiFlags & ITEM_ANTIFLAG_SURA) ||
					table && p->iJob == 2 && (table->dwAntiFlags & ITEM_ANTIFLAG_ASSASSIN && table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN && table->dwAntiFlags & ITEM_ANTIFLAG_WARRIOR) ||
					table && p->iJob == 3 && (table->dwAntiFlags & ITEM_ANTIFLAG_ASSASSIN && table->dwAntiFlags & ITEM_ANTIFLAG_WARRIOR && table->dwAntiFlags & ITEM_ANTIFLAG_SURA) ||
					table && p->iJob == 0 && (table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN) || table && p->iJob == 1 && (table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN) || 
					table && p->iJob == 2 && (table->dwAntiFlags & ITEM_ANTIFLAG_SHAMAN)
					)

Next Fix :D

If you want to search Items without typing name:

input_main.cpp

search:

if (strlen(p->cItemNameForSearch) && strstr(c_szItemName, c_szItemNameForSearch)){
...
}

Add unter:

else if (strlen(p->cItemNameForSearch)<1 ) {
* same code like above*
}

 

  • Love 1
Link to comment
Share on other sites

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.