[How To]Change Blacksmith Prices

03/26/2011 00:05 nevak#1
Hi!
I'm not sure if this has been already explained here, however if it has, just let me know and I will delete this =).

This is not a detailed step by step guide on how to do it, however you will get enough information to do it if you use a bit your brain ^^

First of all, let you know that we need to edit both client (game.exe) and server (ps_game.exe). The BS prices are hard coded in both sides.

First, lets go with the server side, which is easier:
  1. Open ps_game.exe with your hex editor (I used HxD)
  2. Now, search for "LENASOFTFOREVER". I would also like to know why that is written there...
  3. Have a look at the values just under that line, those are all the BS prices in hex (obviously) and also written backwards. Check the snapshot:

    [Only registered and activated users can see links. Click Here To Register...]

    Every group of 4 bytes is a price, so the first one is "E8 03 00 00" which in fact is "000003E8" so in decimal will be 1000, next will be "00000FFF" and so on...
    For example, in the last line you see "A0 25 26 00" which in decimal is 2500000. This one is the price for weapon enchant =)

Now lets go with the client, there are more methods to do this but I think this one is the easier
  1. Start your game, and attach to game.exe (or whatever is the name) with ollyDbg
  2. Go to this address (right click - go to - expression) 004C63A8. You should see something like this:

    [Only registered and activated users can see links. Click Here To Register...]

    This is a switch-case structure containing all the possible BS services and prices. This subroutine puts in EAX register the price so is easy to see that for each case you have a different price.
  3. Now have a look at the values for EAX which are the same that in ps_game.exe and change them to whatever you want. Lets take the previous example, if you want to change weapon enchant price to 1000000 you should edit instruction at 004C63FC to MOV EAX, F4240
  4. Finally just "right click - edit - copy to executable" and save =)

Note that the addresses may vary from a game to another so that will require extra work to find them.

If people request it I will write a detailed guide about this.

Have fun :)
03/26/2011 00:51 castor4878#2
Quote:
Originally Posted by nevak View Post
Hi!
I'm not sure if this has been already explained here, however if it has, just let me know and I will delete this =).
don't !! that's very interesting.

during coding of the lapis editor, i saw that the used cost & success rate was defined by the ReqIg value of the lapis.
of course (!?!) the used ReqIg are not 1, 2, 3, 4, ... but they start at 30 and jump (somewhere) to 98+

here are the values i can associate:

Code:
0003E8	    1.000	reqIg: 30 (50%)
000FFF	    4.095	reqIg: 31 (46%)
002BF2	   11.250	reqIg: 32 (40%)
0059B5	   22.965	reqIg: 33 (32%)
00A140	   41.280	reqIg: 34 (24%)
021AAC	  137.900	reqIg: 35 (16%)
0591C8	  365.000	reqIg: 36 ( 8%)
075300	  480.000	reqIg: 37 ( 2%)
099138	  627.000	reqIg: 38 (~1%)
0C6BB0	  814.000	reqIg: 39 ( 1%)
0FDE80	1.040.000	reqIg: 40 (<1%)
2625A0	2.500.000	reqIg: ??
3567E0	3.500.000	reqIg: ??
53EC60	5.500.000	reqIg: 98
7270E0	7.500.000	reqIg: 99
958940	9.800.000	reqIg: ??
- did you trace how ECX was settled ? (how data at DS:ECX+4C6490 was defined)

Edit: the point is: how a RegIg value (if it's actually used) is processed to obtain a valid index (among the ones listed here), and finally be sure that the RegIg values used in interface are valid.

- did you also find the success rate array ? (it's not the following bytes or they are widely shake to give the percents).

Edit2:

the full list of allowed ReqIg values is so:
Code:
    1.000	reqIg: 30 (50%)
    4.095	reqIg: 31 (46%)
   11.250	reqIg: 32 (40%)
   22.965	reqIg: 33 (32%)
   41.280	reqIg: 34 (24%)
  137.900	reqIg: 35 (16%)
  365.000	reqIg: 36 ( 8%)
  480.000	reqIg: 37 ( 2%)
  627.000	reqIg: 38 (~1%)
  814.000	reqIg: 39 ( 1%)
1.040.000	reqIg: 40 (<1%)
2.500.000	reqIg: 96
3.500.000	reqIg: 97
5.500.000	reqIg: 98
7.500.000	reqIg: 99
9.800.000	reqIg: 100
Credit and thanks go to Nevak.
03/26/2011 11:14 nevak#3
You are absolutely right Earth, also be careful with Guild House BS since he does price drops.
Later today I will try to find out more about this and also to see if Im able to answer Castor's questions :)
03/26/2011 18:38 Bаne#4
Hmm, good guide, you might also want to post more on subjects like this since it is teh most unknown thing on how to do haha...most people just use Ss now though.
01/18/2012 16:34 giorgixgio11#5
trueth no idea what u just did :D