Not a member yet? Register for your free account!

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 01:05

  • Please register to post and access all features, it's quick, easy and FREE!

 

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

This is a discussion on [Release] How to change stat points per level and working stat resets within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category; ok i fixed stats evry level i get 11 points and when i reset wirh stat stone i get 11 ...

Reply
 
Thread Tools
Old   #11
 
Join Date: Jan 2011
Posts: 7
Received Thanks: 32
Quote:
Originally Posted by remnikalija View Post
ok i fixed stats evry level i get 11 points and when i reset wirh stat stone i get 11 to i fixed but skills i did something wrong it disconets me from game when i use skill reset stone i made like this
ADD WORD PTR DS:[EDI+13A],DX - ADD WORD PTR DS:[EDI+13A],7
LEA EDX,[EAX*4+EAX+5] - LEA EDX,[EAX*4+EAX+7]
The +5 is the skill points you get at the start of the game and you can't multiply eax by 7 you can only multiply eax by 2, 3, 4, 5, 8, 9 using LEA you would have to make a code cave to multiply it by 7 and using imul you can't add the +5

Here are the codes When using LEA

LEA EDX,[EAX+EAX+5] = 2 skill points for every level
LEA EDX,[EAX*2+EAX+5] = 3 skill points for every level
LEA EDX,[EAX*4+5] = 4 skill points for every level
LEA EDX,[EAX*4+EAX+5] = 5 skill points for every level
LEA EDX,[EAX*8+5] = 8 skill points for every level
LEA EDX,[EAX*8+EAX+5] = 9 skill points for every level

If anybody knows how to do it without making a code cave please feel free to post it.

__________________

Jasonbcobb is offline  
Thanks
1 User
remnikalija (05/12/2011)
Old   #12
 
Join Date: Apr 2010
Posts: 319
Received Thanks: 29
do for 7 skills points i need to do like that LEA EDX,[EAX*7+5] = 7 skill points for every level
remnikalija is offline  
Old   #13
 
Join Date: Dec 2010
Posts: 572
Received Thanks: 2,308
Quote:
Originally Posted by remnikalija View Post
do for 7 skills points i need to do like that LEA EDX,[EAX*7+5] = 7 skill points for every level
no you can't -- Jasonbcobb just told you.

"EAX*4+EAX+5" is a composite opcode that uses shift & add, it can only manage power of 2 and optional addition

ie
1 * x => EAX
2 * x => EAX * 2 = EAX << 1
3 * x => EAX * 2 + EAX = EAX << 1 | EAX (with bit carry propagation)

and so on to build the list provided by Jasonbcobb
castor4878 is offline  
Thanks
1 User
regvn (03/18/2014)
Old   #14
 
Join Date: Jan 2011
Posts: 7
Received Thanks: 32
You can't multiply by 7 using LEA to multiply by 7 you need to make a code cave you would have to make a jump from address 00480c30 to some empty code and the bottom and do it like this

IMUL EDX, EAX, 7
ADD EDX,5
MOV WORD PTR DS:[ESI+13A],DX

+ this will not fit where the code is now
Jasonbcobb is offline  
Old   #15
 
Join Date: Apr 2010
Posts: 319
Received Thanks: 29
cant make for skills to go more than 5
remnikalija is offline  
Old   #16
 
Join Date: Apr 2010
Posts: 319
Received Thanks: 29
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
remnikalija is offline  
Old   #17
 
Join Date: Dec 2010
Posts: 572
Received Thanks: 2,308
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.
castor4878 is offline  
Thanks
2 Users
adisportivul (05/17/2012), [ADMIN]Cryptic (01/23/2012)
Old   #18
 
Join Date: Apr 2010
Posts: 34
Received Thanks: 0
Why does it work but after my server restarts it goes back to giving the original stat points?
mixand is offline  
Old   #19
 
Join Date: Oct 2011
Posts: 97
Received Thanks: 61
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.
_-Phoenix-_ is offline  
Old   #20
 
Join Date: Sep 2012
Posts: 19
Received Thanks: 0
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.
drachentypi is offline  
Reply

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Request] How Change Mode Stat Points and Skill Points? sandolkakos Shaiya 49 05/09/2013 08:40
AP per minute $ stat points per level Shaiya Xtreme Shaiya Private Server 12 06/29/2011 23:54
Stat and Skill resets ZDH Shaiya Private Server 7 07/15/2010 23:33
[Small Release] Set players stat points command .Beatz CO2 PServer Guides & Releases 5 07/14/2010 01:24
How to change the stat/skill points for new modes? Paranoiapill Shaiya 3 06/29/2010 09:23



All times are GMT +1. The time now is 01:05.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.