Hexedit Shop.dat to replace Items
Here ill show you how to hexedit the shopping mall to replace items, not adding new ones, cause i don't get success in it yet.
First we need a good hexeditor, i use winhex:
copy your shop.dat from your client to your desktop (and make a backup of it in case you screw it up)
Launch winhex.exe and open the shop.dat file, this is the main screen of it:
Ok now go to menu Search -> Text and put in the box the word VIP
it will bring you there:
As you can see i maded i litle legend for you to find the first things and understand the hex code of the shopping mall, now we go deeper in this.
Look the first item that i made a green circle its value in hex is D2 1F 0B 00
To understand what item it is we just do this, go to tools menu and choose Hex Converter (F8)
in the left box enter the hex code of the first item, but here its an important step for all your editings, the code must be inversed! What i mean ?
As we saw above the first item hex code is D2 1F 0B 00 ok ? if we inverse it, it gives 00 0B 1F D2, simple no ? think like a mirror trick, very easy. ok now we put in the left box of the Hex converter the code that we inversed so type in it
00 0B 1F D2 and hit the Enter button, in the right box it will give you 729042
Search for this item in database or all the txt files out there with all the items, you will find this: Redstone Pack
If you login in game you will see that in fact its your first item !
Screen for all that above:
Easy no ? Ok lets continue
All the things below the VIP mark are items - eggs - equipments that are in shopping mall, in fact if you look closer you will see that each item got always another hex value next to it. lets see this...
The first item D2 1F 0B 00 has next to it another value that is 69 74 65 6D wich means that it tells to client that this is an item, for eggs you will see next to an egg item the word egg wich value is 65 67 67 00
Ok so now we want to change an item !
Lets change the first one (The RedstonePack)
As we saw above its value is in shopping mall D2 1F 0B 00 so we locate it in the hexeditor
Lets say we want to replace the RedstonePack with the Super Amber gem
we search first the decimal value(ID) of the Super Amber Gem item, ok we search and find it: 1038170
Now we need to convert it into hex value so we open again in hexeditor the hex converter by going in Tools menu -> Hex Converter or use F8.
In the right box this time we enter the value of the Super Amber gem, enter 1038170 and hit Enter:
Ok now we got the hex value of the Super Amber gem its FD75A
You may ask what happend why less numbers and letters ?
Simple, the converter don't show the zero's so we add them.
Now we need the inverse that code before we replace the item in shopping mall.
FD75A will become 5A D7 0F 00
As you can see the zeros are to be added only on the first left, never on the right so A will not be A0 but F will be 0F.
Here is now the final part of the replacing item method:
We simply change D2 1F 0B 00 to 5A D7 0F 00 and done !
Save your shop.dat (don't forget to put it in client ini folder)
See here the result of the hex:
To make this item buyable now we need to add it into the database also!
Go to your database through Navicat or whatever you use and open cq_goods table.
I think the picture shows all, in the id we add a custom id, in the ownerid we add 1207 for Shopping Mall and in itemtype the ID of the item.
Voila, restart your server and login and open Shopping Mall you can buy Super Amber now from this shop.
To replace more items just scroll on hexeditor and see where it says item, next to it is the hexcode of the item we wanna change, do always the same for all items, for eggs you have to replace by eggs, for equipment same, i tried to replace an egg with an item it didn't worked so always replace all the stuff by the same stuff and it will be ok.
I hope you understand my guide and get success with your own Shopping Mall
Cheers, Cyberghoser1
Guide to add new item can be found here, thanks to E.M.E
Note: The items could be different in your shop.dat so ill upload mine so you can train yourself with it.
Simple shell.dat hexedit mini guide for newbies
This operation is very easy, open winhex again and locate the shell.dat file in your gameserver folder and open it, it might look like this or have different values, its ok since we gonna see how to change them:
Now as you can see mine got 127.0.0.1 and under that power.... as servername and below root then test , what all that means ?
127.0.0.1 is the ip of server
power.... is the name of my server
root is the login of my mysql connection
test is the pass of my mysql connection
Picture of all that:
Now to edit those values we dont need to do it by puting hex codes but just on clicking on the simple values, such as on the ip then servername then mysql. One thing to remember is that in the ip at the end after the last number we must add a dot, in fact in hex code a dot is interpreted 2E as you can see in my picture the ip is 127.0.0.1 and if you look on the left window where all are hex codes you see at the en 2E, this is the last dot to add. For servername just change it and for mysql also change only the login and the pass then save this file and you are set, remember that those values must match your ini files also, this is my final edit, just remember the dot after the last number of the ip:
Here ill show you how to hexedit the shopping mall to replace items, not adding new ones, cause i don't get success in it yet.
First we need a good hexeditor, i use winhex:
copy your shop.dat from your client to your desktop (and make a backup of it in case you screw it up)
Launch winhex.exe and open the shop.dat file, this is the main screen of it:
Ok now go to menu Search -> Text and put in the box the word VIP
it will bring you there:
As you can see i maded i litle legend for you to find the first things and understand the hex code of the shopping mall, now we go deeper in this.
Look the first item that i made a green circle its value in hex is D2 1F 0B 00
To understand what item it is we just do this, go to tools menu and choose Hex Converter (F8)
in the left box enter the hex code of the first item, but here its an important step for all your editings, the code must be inversed! What i mean ?
As we saw above the first item hex code is D2 1F 0B 00 ok ? if we inverse it, it gives 00 0B 1F D2, simple no ? think like a mirror trick, very easy. ok now we put in the left box of the Hex converter the code that we inversed so type in it
00 0B 1F D2 and hit the Enter button, in the right box it will give you 729042
Search for this item in database or all the txt files out there with all the items, you will find this: Redstone Pack
If you login in game you will see that in fact its your first item !
Screen for all that above:
Easy no ? Ok lets continue
All the things below the VIP mark are items - eggs - equipments that are in shopping mall, in fact if you look closer you will see that each item got always another hex value next to it. lets see this...
The first item D2 1F 0B 00 has next to it another value that is 69 74 65 6D wich means that it tells to client that this is an item, for eggs you will see next to an egg item the word egg wich value is 65 67 67 00
Ok so now we want to change an item !
Lets change the first one (The RedstonePack)
As we saw above its value is in shopping mall D2 1F 0B 00 so we locate it in the hexeditor
Lets say we want to replace the RedstonePack with the Super Amber gem
we search first the decimal value(ID) of the Super Amber Gem item, ok we search and find it: 1038170
Now we need to convert it into hex value so we open again in hexeditor the hex converter by going in Tools menu -> Hex Converter or use F8.
In the right box this time we enter the value of the Super Amber gem, enter 1038170 and hit Enter:
Ok now we got the hex value of the Super Amber gem its FD75A
You may ask what happend why less numbers and letters ?
Simple, the converter don't show the zero's so we add them.
Now we need the inverse that code before we replace the item in shopping mall.
FD75A will become 5A D7 0F 00
As you can see the zeros are to be added only on the first left, never on the right so A will not be A0 but F will be 0F.
Here is now the final part of the replacing item method:
We simply change D2 1F 0B 00 to 5A D7 0F 00 and done !
Save your shop.dat (don't forget to put it in client ini folder)
See here the result of the hex:
To make this item buyable now we need to add it into the database also!
Go to your database through Navicat or whatever you use and open cq_goods table.
I think the picture shows all, in the id we add a custom id, in the ownerid we add 1207 for Shopping Mall and in itemtype the ID of the item.
Voila, restart your server and login and open Shopping Mall you can buy Super Amber now from this shop.
To replace more items just scroll on hexeditor and see where it says item, next to it is the hexcode of the item we wanna change, do always the same for all items, for eggs you have to replace by eggs, for equipment same, i tried to replace an egg with an item it didn't worked so always replace all the stuff by the same stuff and it will be ok.
I hope you understand my guide and get success with your own Shopping Mall
Cheers, Cyberghoser1
Guide to add new item can be found here, thanks to E.M.E
Note: The items could be different in your shop.dat so ill upload mine so you can train yourself with it.
Simple shell.dat hexedit mini guide for newbies
This operation is very easy, open winhex again and locate the shell.dat file in your gameserver folder and open it, it might look like this or have different values, its ok since we gonna see how to change them:
Now as you can see mine got 127.0.0.1 and under that power.... as servername and below root then test , what all that means ?
127.0.0.1 is the ip of server
power.... is the name of my server
root is the login of my mysql connection
test is the pass of my mysql connection
Picture of all that:
Now to edit those values we dont need to do it by puting hex codes but just on clicking on the simple values, such as on the ip then servername then mysql. One thing to remember is that in the ip at the end after the last number we must add a dot, in fact in hex code a dot is interpreted 2E as you can see in my picture the ip is 127.0.0.1 and if you look on the left window where all are hex codes you see at the en 2E, this is the last dot to add. For servername just change it and for mysql also change only the login and the pass then save this file and you are set, remember that those values must match your ini files also, this is my final edit, just remember the dot after the last number of the ip: