Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 04:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Mini-Release] OfflineShop - Function open <Bug fix>

Discussion on [Mini-Release] OfflineShop - Function open <Bug fix> within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
VegaS ♆'s Avatar
 
elite*gold: 10
Join Date: Jul 2013
Posts: 93
Received Thanks: 416
[Mini-Release] OfflineShop - Function open <Bug fix>

- [ File: /Src/common/service.h ]

#1.) Add this:


Code:
#define __OFFLINE_SHOP_FIX_OPEN	
#define __OFFLINE_SHOP_VALUE_MAX 2000000000
#define __OFFLINE_SHOP_WARNING "[Protect Offline] Have more than 2.000.000.000 Yang!"
- [ File: /Src/game/src/char.cpp ]

#1.) Search function:

Code:
​
	if (!LC_IsBrazil())
	{
		DWORD nTotalMoney = 0;
		for (BYTE n = 0; n < bItemCount; ++n)
			nTotalMoney += (pTable + n)->price;

		if (GOLD_MAX - 1 <= nTotalMoney)
		{
			sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName());
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다"));
			return;
		}
	}

​
#2.) Replace function with this:

Code:
​
#ifdef __OFFLINE_SHOP_FIX_OPEN
	int64_t szTotalMoney = 0;

	for (int n = 0; n < bItemCount; ++n)
	{
		szTotalMoney += static_cast<int64_t>((pTable+n)->price);
	}
	std::auto_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT money FROM player.player WHERE id = %u", GetPlayerID()));
	if (pMsg->Get()->uiNumRows == 0)
		return;	
	
	DWORD dwCurrentMoney = 0;
	MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
	str_to_number(dwCurrentMoney, row[0]);	

	szTotalMoney += static_cast<int64_t>(dwCurrentMoney);
	if (__OFFLINE_SHOP_VALUE_MAX <= szTotalMoney)
	{
		ChatPacket(CHAT_TYPE_INFO, __OFFLINE_SHOP_WARNING);
		return;
	}
#else		
	if (!LC_IsBrazil())
	{
		DWORD nTotalMoney = 0;
		for (BYTE n = 0; n < bItemCount; ++n)
			nTotalMoney += (pTable + n)->price;
		if (GOLD_MAX - 1 <= nTotalMoney)
		{
			sys_err("[OVERFLOW_GOLD] Overflow (GOLD_MAX) id %u name %s", GetPlayerID(), GetName());
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("20억 냥을 초과하여 상점을 열수가 없습니다"));
			return;
		}
	}
#endif	

​
VegaS ♆ is offline  
Thanks
5 Users
Old 06/21/2016, 11:01   #2
 
VegaS ♆'s Avatar
 
elite*gold: 10
Join Date: Jul 2013
Posts: 93
Received Thanks: 416
#old#epic#****#
VegaS ♆ is offline  
Thanks
2 Users
Old 06/21/2016, 12:44   #3
 
elite*gold: 0
Join Date: Nov 2010
Posts: 43
Received Thanks: 10
Quote:
Originally Posted by [SGA]Vegas View Post
Man does not know which of us fell in the comment shit to me.

But it can be seen as an imbecile because you're a parallel world, and you do not read this topic well.

I said at the beginning of the topic as clear: A boy came up to me if I could help him with his problem solving. I told myself: * Why not buy the latest update from ken, because it's system can not help you with this .. *

And the guy told me that Ken disappeared several months and only provides support, we a lot people in the list that we have solved the problems on the ground that he is gone. You do not see how you retarded?

And I did that for free! I help a lot of people on skype and forums and what I was led to do this.

Why did I release this fixed? Because I specified that this type after I offered the resolution and went on forums in Romania, being a country of shit and I hate their own country, went and did topic in advertisements with the headline: * Sell Fixed exploit shop offline ken *, you seems normal to someone this? once you've helped free? I say no.

I did this money? 90% of people who own online shop is his ken, so I said if he disappeared and he has not fixed it yet on that version, I wanted to paint it a free fixed net. In the last update he increased the limit to shopoffline yang, but this bug still exists even in the latest version of.


If you think that this topic please influences with something nice to do a request for its removal, but do not think it is needed.

Ken is my friend, not an enemy, I have nothing against him and I will not have money for asking if this could fix me swear all day, but I did it for free and it made me a fix.

If you have something personal with me, I invite Skype 24/24 subject to debate.
If you just wanted you to go with me in mind, a good day.
Google translate detected
aok96boom is offline  
Thanks
1 User
Old 06/21/2016, 14:51   #4
 
VegaS ♆'s Avatar
 
elite*gold: 10
Join Date: Jul 2013
Posts: 93
Received Thanks: 416
Quote:
Originally Posted by aok96boom View Post
Google translate detected
I do not like people hating.

Code:
My English is ****.
You make +1 message for say that? you and your friend. Stop with this ****, child.
I do not really like the language, but are forced to speak.
Have a nice day hater.
VegaS ♆ is offline  
Thanks
2 Users
Old 06/21/2016, 18:03   #5
 
elite*gold: 26
Join Date: Oct 2011
Posts: 1,262
Received Thanks: 1,064
Quote:
Originally Posted by BizepsSupportAccount View Post
First of all.

Your not stupid or? Ahm i think your not Stupid.
Do you ever thought about Ken? Its his System which was leaked and People like you should burn in
hell xD
Nobody wishes death upon anyone
Just sad because you paid 150,- for a system that isn't worth its price?

Why would you use Kens system anyway?
Direct queries and code flaws everywhere + not utilizing the dbcache correctly.

Selling systems always bears the risk that said system gets leaked.
He won't complain and I wouldn't do either, because he made enough money with it.
(150€/sale - ~2 hrs worktime -> 75€/h)

Why would you be mad anyway if someone publishes a fix for Kens Offlineshop system?
Without the source of the offlineshop (just google it, "offlineshop metin2 c++" - not easy to miss )
the fix is useless anyway.
He3o Crysis is offline  
Thanks
1 User
Old 06/21/2016, 20:10   #6
 
Gl0bal's Avatar
 
elite*gold: 8
Join Date: Oct 2010
Posts: 564
Received Thanks: 906
Quote:
Originally Posted by BizepsSupportAccount View Post
halt die Schn* geh dahin wo du hergekommen bist.

Alles klar.
Du bringst uns weiter.

Wer einigermaßen C++ beherrscht (also nicht du) sieht nun mal, dass dieser Ansatz für die Offlineshops nicht alt zu gut ist und der Code an sich auch eher mittelmäßig ist. Dafür ist der Preis tatsächlich recht hoch.

MfG Gl0bal
Gl0bal is offline  
Thanks
3 Users
Old 06/21/2016, 20:37   #7
 
VegaS ♆'s Avatar
 
elite*gold: 10
Join Date: Jul 2013
Posts: 93
Received Thanks: 416
I specified, sir BizepsSupportAccount if you have something personal with me or one of the members here please nice to talk these things over Skype. No need to live in a topic of mine and make off-topic just to get into especially as a child.

Have a wonderful day you and your hell.

#A moderator please clean this topic.
VegaS ♆ is offline  
Reply

Tags
c++, epvp, fix offline, metin2, offline shop


Similar Threads Similar Threads
Cube Open Function
01/19/2013 - Metin2 Private Server - 6 Replies
I have an bug at my p-server . When i insert function at an npc script ,npc don't work ,but when i installed serverfiles ,he is work good . Function : command ( "cube open" ) cube.start.0.script say_title ( "Baek-Go" ) say ( "My text " ) say ( "My text" ) say ( "My text" )
[D3D Menu] Open url Function | Request
01/06/2012 - C/C++ - 7 Replies
Hey, Ich brauche eine Source, womit ich in einem D3D Menu - HACK die Menüfunktion einbetten kann, das wenn ich z.B. von "Visit Homepage" von Off auf On gehe, und somit sich die Homepage öffnet... Also im Browser... Hat da jemand was für mich? Also so ähnlich wie ShellExecute... Es handelt sich um das Spiel WarRock in dem ich diese Funktion einfügen wollen würde... !



All times are GMT +2. The time now is 04:24.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.