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!

How to display newly added items in the Cash Shop? v83

Newbie Spellweaver
Joined
Feb 9, 2022
Messages
35
Reaction score
11
Good evening! I've been trying to add more items in the cash shop following tutorials but I can't seem to get it right. I tried to set the OnSale value to 1 for items that had it set to 0 in the commodity.img that's already there in the source (HeavenMS original source), but the item won't show up in the cash shop... dunno why. The item I'm taking as example is in the game, I can use the gm command to get it and wear it with no issues but to make the game feel natural without scrolling through IDs and using commands, I want to be able to purchase from the Cash Shop.

Can someone help me?

This is the item:



This is the code, it's HeavenMS code and there is something odd. not sure if my interpretation is right but... whenever I edit the Etc.wz in the client with the HaRepacker, setting the OnSale value to 1, having both client and server setted with 1, after opening the game and closing it, the value setted on the OnSale goes back to 0 in the .wz. the code is saying it creates a new Etc.wz, I'm thinking it's a clean one with no edits... But it should get the data from commodity.img, right? but the commodity in server keeps the value of 1, only in Etc.wz the value goes back to 0...



The item doesn't show up in the Cash Shop, that's the thing. :/
 
Newbie Spellweaver
Joined
Sep 27, 2018
Messages
93
Reaction score
20
Good evening! I've been trying to add more items in the cash shop following tutorials but I can't seem to get it right. I tried to set the OnSale value to 1 for items that had it set to 0 in the commodity.img that's already there in the source (HeavenMS original source), but the item won't show up in the cash shop... dunno why. The item I'm taking as example is in the game, I can use the gm command to get it and wear it with no issues but to make the game feel natural without scrolling through IDs and using commands, I want to be able to purchase from the Cash Shop.

Can someone help me?

This is the item:



This is the code, it's HeavenMS code and there is something odd. not sure if my interpretation is right but... whenever I edit the Etc.wz in the client with the HaRepacker, setting the OnSale value to 1, having both client and server setted with 1, after opening the game and closing it, the value setted on the OnSale goes back to 0 in the .wz. the code is saying it creates a new Etc.wz, I'm thinking it's a clean one with no edits... But it should get the data from commodity.img, right? but the commodity in server keeps the value of 1, only in Etc.wz the value goes back to 0...



The item doesn't show up in the Cash Shop, that's the thing. :/

It has to be changed in the WZ file as well, it can't be altered with the XML files alone.
A way to change this to make Cash Shop modifying easier is to have the Cash Shop load from a database table rather than reading it from the WZ/XML. It takes some work but after said work is done, it's SO much easier and much simpler to edit the Cash Shop... And it can be edited without even taking the server offline.

My server has an admin command (!reloadcs) that... Well... reloads the CS whenever an edit is made. However, it's advised that you make the command remove anyone in the CS and temporarily close it for several minutes.
 
Upvote 0
Newbie Spellweaver
Joined
Feb 9, 2022
Messages
35
Reaction score
11
Hey dude, sounds like a good tip! It's been a few years since I don't program or do anything DB-related but after I study these things again, I'll give it a shot. For now, I just got it to work by saving the file, then replacing with the original etc.wz. None of the tutorials have told me anything about the save feature, they were talking about extracting, and the classic format and then importing and other things when all I had to do was save it because I had the xml already... But thanks for the answer, I'll make sure to keep this tip in mind to apply later on when I get better at programming. :thumbup:
 
Upvote 0
Newbie Spellweaver
Joined
Feb 9, 2022
Messages
35
Reaction score
11
No, no... It was simpler. Since it was my first time to modify the game, I didn't know I had to edit both the .wz and xml to get cash shop items to show up... xml alone won't do it. Masaaku told me that, and when I tested, it worked. =)
 
Upvote 0
Newbie Spellweaver
Joined
Dec 21, 2010
Messages
59
Reaction score
2
No, no... It was simpler. Since it was my first time to modify the game, I didn't know I had to edit both the .wz and xml to get cash shop items to show up... xml alone won't do it. Masaaku told me that, and when I tested, it worked. =)

Oh ya, I understand your approach. Just wondering for Masaaku suggested approach, does he send all cash item's data in a packet
 
Upvote 0
Joined
Aug 3, 2008
Messages
173
Reaction score
26
Update the WZ files by adding your new nodes or updating existing ones with the correct itemId, and turning onSale to 1
Ensure there are no blockers in your code preventing certain itemIds or SNs from displaying
After WZ edits are done, dump the XMLs to your server-side wz folder
Restart server
 
Upvote 0
Back
Top