Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Fix Purchase Cash Shop By Gold

Joined
Apr 9, 2012
Messages
2,359
Reaction score
442
Hello, this has been a problem, I almost forgot about this function :lol:
this function that let you purchase cash shop using gold was actually designed by CCR to be used on Test Server and not Open Server.
to enable the setting edit this files :
Zone Server\WorldInfo\WorldInfo.ini
and change to : BuyCashItemByGold = true
the problem happened when you purchase the item on game, it would crash the zone, it was caused by nonexistent Database Object,

there's two method to fix this crash issue:
1. For Beginner
open your zoneserver.exe using hex editor, go to offset 2ef5bf
change :
E8 46 7C D1 FF 0F B6 C0 85 C0 75
to
90 90 90 90 90 90 90 90 85 C0 EB
Pros: it's easy, fast anyone can do it without headache
Cons:
  • it's disabling the LOG feature
  • The gold in your inventory won't be updated, say you had 1000 Gold, and you purchase something which cost 700, your inventory Gold will remain 1000 after purchase, but your actual gold in server is 300, you will be able to update your gold if you purchase/sell something on NPC, this happened because the zone didn't send packet to update the gold

2. Using module
Pros:
  • you could fix/send update Gold packet
  • you could even write your own log ( I haven't write the code, so I just disabled it at the moment)
Cons: you need more knowledge and it might cause Headache for beginner

here's the snippet of the module:
Code:
void _buybygold_complete(void *_this, void *pOne, void *Send, void *pRecv, void *pSrc, void *pSheet, bool bCouponUse){
	//send alter money inform packet
	auto p = (void (__cdecl *)(void *, char ))0x1400DF070;
	p(pOne,0);


	//call original function
	auto ori = (void (__cdecl*)(void *, void *, void *, void *, void *, void *, bool )) 0x140300840;
	return ori(_this,pOne,Send,pRecv,pSrc,pSheet,bCouponUse);
}


bool CallProc_InsertCashItemLog(void *_this, unsigned int dwSerial, char byLv, char *szItemCode, char *szItemName, char byNum, unsigned int dwCost)
{
	//disable log, you had to write your own log/database connection yourself
	return true;
}


void CCashByGold::Init()
{
	WriteInstruction(0x140001FCD,(INT64)_buybygold_complete,0,0xE9);
	WriteInstruction(0x140007E0A,(INT64)CallProc_InsertCashItemLog,0,0xE9);
}



NOTE: this was supposed to be for Test Server, I haven't tested too deep about this, so use at your own risk, if you encounter any problem/another bug, you could write the comment bellow
 
Newbie Spellweaver
Joined
Jul 23, 2015
Messages
24
Reaction score
0
hello sir
I get this message when I want to buy from the store:

Cash related: Item price is diferent


likertuban - [Tutorial] Fix Purchase Cash Shop By Gold - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Mar 3, 2013
Messages
168
Reaction score
48
hello sir
I get this message when I want to buy from the store:

Cash related: Item price is diferent


likertuban - [Tutorial] Fix Purchase Cash Shop By Gold - RaGEZONE Forums

its 2.2.3.2 server ?
what you need to do are adjust the cash shop item price server side and client side .
server side : CashShop.dat and CashShop_str.dat
client side : Itemcash.edf and NDItemcash.edf

if you dont know how to do that , later i give mine .
 
Newbie Spellweaver
Joined
Jul 23, 2015
Messages
24
Reaction score
0
yes sir, I use 2.2.2.3 and I thank you for your offer because I'm very green in thisThank you
 
Junior Spellweaver
Joined
Mar 3, 2013
Messages
168
Reaction score
48
yes sir, I use 2.2.2.3 and I thank you for your offer because I'm very green in thisThank you

I m girl , dont call sir :p:
here the cashshop 2232 that i make before when adding some item 4.15 to 2232 .
in that cashshop , the item that listed at there are still default item .

link download :
 
Newbie Spellweaver
Joined
Jul 23, 2015
Messages
24
Reaction score
0
I m girl , dont call sir :p:
here the cashshop 2232 that i make before when adding some item 4.15 to 2232 .
in that cashshop , the item that listed at there are still default item .

link download :

thank you very much Miss ;)
 
Newbie Spellweaver
Joined
Jul 23, 2015
Messages
24
Reaction score
0
IvonaDP

Hello miss, I have changed the files that you have passed me and I still get the same message:

Cash related: Item price is diferent

REMOVED

still thank you for your help.Thank you
 
Last edited:
Back
Top