• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] 255 Level the problem: Stats on items, and start HP (instant 255level)

Status
Not open for further replies.

Tommy

Founder
I think you need to update the stat value fields from smallint to int to support higher values in the item_template table. I mean, smallint does go to 32767 - -32767 and via stamina it is pretty close. I'm not sure what could be causing it besides the fact that some fields aren't made for level 255 and you need to go around updating them to a higher integer value.
 

Troya

Respected Member
I think you need to update the stat value fields from smallint to int to support higher values in the item_template table. I mean, smallint does go to 32767 - -32767 and via stamina it is pretty close. I'm not sure what could be causing it besides the fact that some fields aren't made for level 255 and you need to go around updating them to a higher integer value.

so can you tell me how to fix it, update or whatever..?
 

Tommy

Founder
so can you tell me how to fix it, update or whatever..?

I did, partially. item_template wise, just find the stat_value1-X columns and update smallint(6) to int(10). As I said on other inquires about level 255, I'm not entirely sure what else (integer wise) needs to be updated, as I haven't done a 255 server on TC.
 

Troya

Respected Member
I did, partially. item_template wise, just find the stat_value1-X columns and update smallint(6) to int(10). As I said on other inquires about level 255, I'm not entirely sure what else (integer wise) needs to be updated, as I haven't done a 255 server on TC.

I think i didnt understend you. can you show me on some pic or what?
 

Tommy

Founder
I think i didnt understend you. can you show me on some pic or what?

I understood. However, Foereaper just reminded me that the client doesn't support high-integer stats like that. Visually, you can make the stats show up correctly, but it won't change anything regardless.

BUT, for a future reference on you not knowing how to edit table column type(s):

(I'm using Navicat)

1. Right click the table and click 'Design Table'
2. Find the column you want to edit.
3. Change the type from type to type:

Example:

smallint(6):

MDZk0ld.png


to

int(10)
h191lUO.png


4. Save
 

Tok124

Respected Member
I think i didnt understend you. can you show me on some pic or what?
First of all, Before you do any changes to DB you need to edit the source.

Go to src/server/game/Globals/ObjectMGR.cpp

Find row 2274 and you should see the following code
Code:
        for (uint8 i = 0; i < itemTemplate.StatsCount; ++i)
        {
            itemTemplate.ItemStat[i].ItemStatType  = uint32(fields[28 + i*2].GetUInt8());
            itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i*2].GetInt16());
        }

Change that to

Code:
        for (uint8 i = 0; i < itemTemplate.StatsCount; ++i)
        {
            itemTemplate.ItemStat[i].ItemStatType  = uint32(fields[28 + i*2].GetUInt8());
            itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i*2].GetInt32());
        }

Aften you have done this changes you will need a recompile. When the server is recompiled start your MySQL Console. When MySQL Console is open then open HeidiSQL(i will only explain this for HeidiSQL).

find table "item_template" and then go to the tab "Table: item_template".

When you are on that tab scroll down until you see stat_value* (* means 1, 2, 3, 4 etc...).

When you find it you will see SmallINT next to it. Change the SmallINT to INT and save.
 

Troya

Respected Member
I understood. However, Foereaper just reminded me that the client doesn't support high-integer stats like that. Visually, you can make the stats show up correctly, but it won't change anything regardless.

BUT, for a future reference on you not knowing how to edit table column type(s):

(I'm using Navicat)

1. Right click the table and click 'Design Table'
2. Find the column you want to edit.
3. Change the type from type to type:

Example:

smallint(6):

MDZk0ld.png


to

int(10)
h191lUO.png


4. Save

Thanks.. i will test evrthing

- - - Updated - - -

First of all, Before you do any changes to DB you need to edit the source.

Go to src/server/game/Globals/ObjectMGR.cpp

Find row 2274 and you should see the following code
Code:
        for (uint8 i = 0; i < itemTemplate.StatsCount; ++i)
        {
            itemTemplate.ItemStat[i].ItemStatType  = uint32(fields[28 + i*2].GetUInt8());
            itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i*2].GetInt16());
        }

Change that to

Code:
        for (uint8 i = 0; i < itemTemplate.StatsCount; ++i)
        {
            itemTemplate.ItemStat[i].ItemStatType  = uint32(fields[28 + i*2].GetUInt8());
            itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i*2].GetInt32());
        }

Aften you have done this changes you will need a recompile. When the server is recompiled start your MySQL Console. When MySQL Console is open then open HeidiSQL(i will only explain this for HeidiSQL).

find table "item_template" and then go to the tab "Table: item_template".

When you are on that tab scroll down until you see stat_value* (* means 1, 2, 3, 4 etc...).

When you find it you will see SmallINT next to it. Change the SmallINT to INT and save.

Thanks it is work!! ok what is this? when on custom item in item_template in table scriptname is "internalitemhanler"?
 
Last edited:

Tommy

Founder
First of all, Before you do any changes to DB you need to edit the source.

Go to src/server/game/Globals/ObjectMGR.cpp

Find row 2274 and you should see the following code
Code:
        for (uint8 i = 0; i < itemTemplate.StatsCount; ++i)
        {
            itemTemplate.ItemStat[i].ItemStatType  = uint32(fields[28 + i*2].GetUInt8());
            itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i*2].GetInt16());
        }

Change that to

Code:
        for (uint8 i = 0; i < itemTemplate.StatsCount; ++i)
        {
            itemTemplate.ItemStat[i].ItemStatType  = uint32(fields[28 + i*2].GetUInt8());
            itemTemplate.ItemStat[i].ItemStatValue = int32(fields[29 + i*2].GetInt32());
        }

Aften you have done this changes you will need a recompile. When the server is recompiled start your MySQL Console. When MySQL Console is open then open HeidiSQL(i will only explain this for HeidiSQL).

find table "item_template" and then go to the tab "Table: item_template".

When you are on that tab scroll down until you see stat_value* (* means 1, 2, 3, 4 etc...).

When you find it you will see SmallINT next to it. Change the SmallINT to INT and save.

I was trying to find that to tell him to edit the load stuff, but I couldn't find it. :p
 
Status
Not open for further replies.
Top