[Release] How to change stat points per level and working stat resets

05/13/2011 22:54 remnikalija#16
Quote:
Originally Posted by ShaiyaOmega View Post
Reading is GOOD
ye i trayed with skill point 8 but i get disconected i trayed with 9 still disconected idk why only stat points when i make it works
05/14/2011 09:10 castor4878#17
Quote:
Originally Posted by remnikalija View Post
ye i trayed with skill point 8 but i get disconected i trayed with 9 still disconected idk why only stat points when i make it works
you can't have 8 * level + Cst this way.

the list of possible multiple compliant with LEA was right but it doesn't mean they are all valid there. and indeed expression like "r32 * n + Cst" codes Cst as a 32 bits values; "r32 * n + r32 + Cst" encode Cst as a 8-bit value.

in clear:
Code:
expression:		meaning		is coded
lea edx,[eax+eax+5]	2 lvl + 5	8D 54 00 05
lea edx,[eax+eax*2+5]	3 lvl + 5	8D 54 40 05
lea edx,[eax*4+5]	4 lvl + 5	8D 14 85 05000000
lea edx,[eax+eax*4+5]	5 lvl + 5	8D 54 80 05
lea edx,[eax*8+5]	8 lvl + 5	8D 14 C5 05000000
lea edx,[eax+eax*8+5]	9 lvl + 5	8D 54 C0 05
the original code "lea edx,[eax+eax*4+5]" needs 4 bytes; your modif certainly needs more and thus has shifted the code or corrupt it.
you can only use expressions that require 4 bytes or 3 bytes ("lea edx,[eax + eax * n]") + 1 NOP.

note that the 5 increment can be any value in 1..255, the value does not change the way expression is encoded.

so to achieve 8 * level:
Code:
replace

lea edx,ds:[eax+eax*4+5]	3E 8D 54 80 05
mov word ptr DS:[ESI+0x13A],DX

with:

imul	eax,eax,8		6B C0 08
add	al,5			04 05

mov	word ptr DS:[ESI+0x13A],AX (instead of DX)
in the "add al,Cst" Cst must be in 1..7 to not generate an overflow of AL register.
also note that EAX is loaded with ESI immediately after that code, so changing EAX (instead of EDX) has no bad side.
12/20/2011 11:02 mixand#18
Why does it work but after my server restarts it goes back to giving the original stat points?
01/26/2012 03:37 _-Phoenix-_#19
useing this i only had one error it is in the [ ADD WORD PTR DS:[EDI+13A],DX ] . i re done it to this [ ADD WORD PTR DS:[EDI+13A],9 ] and when i hit a mob i dced i looked at the server controle pannel the game had closed i looked in the log and it said there was trouble with the ps_game.exe. in the 0048aaa8 it was unable to read in a certian section. i was wondering if some one would tell me where i am messing up at.
04/08/2014 20:42 drachentypi#20
I have no idea of OllyDB so is there any tut to it or can sb directly explain me how to find the lines I have to change for editing Hard Mode and Normal mode, this Tut is very nice but it shows just the Ultimate Mode lines and don't tell us how to find them.
04/08/2017 01:00 Tenshii45#21
What is the expression for ps_game.exe and ep 6.4?