Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: ItemDrop Name (Function Decompiled)  (Visto 4553 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline stark98 Posteado: May 01, 2023, 08:34:53 AM | Modificado: May 01, 2023, 04:17:48 PM by stark98

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 131
  • Gracias recibida: 2436
  • fr
hello, today I want to share a little code with you!
This code is to show the name of the objects that fall from the monsters or that the player throws at them!
CAREFUL!!! IT IS JUST DECOMPILED!
I put it here for those who will be able to use or edit it!
Version : 1.04e

UPDATE: With this code u can change COLOR for all droped item)) jewel,zen,item + level , item+exe ... And more)) For more details only check code)) CODE WITH MU  this is Funny








My Define for who need!

###

#define pTextThis            ((LPVOID(*)()) 0x0041FE10)
#define pSetTextColor         ((void(__thiscall*)(LPVOID This, BYTE r, BYTE g, BYTE b, BYTE h)) 0x420040)
#define pSetBackgroundTextColor   ((void(__thiscall*)(LPVOID This, int r, int g, int b, int h)) 0x004200B0)
#define pSetFont            ((int(__thiscall*)(LPVOID This, int a2)) 0x420120)
#define pFontBold            *(HGDIOBJ*)0x00E8C58C
#define pRenderTextOut         ((int(__thiscall*)(int This, int a2, int a3, int a4, int a5, int a6, int a7, int a8))0x00420150)

CREDIT: All MU Comunity! and Me(BonnY) comiendo Have a Good Day! magia2 magia2 magia2 magia2 magia2 magia2



Be cool, and all will be ok))
Skype: sky.hack2
Discord: bonny9

Offline vlgtre #1 Posteado: May 01, 2023, 09:18:02 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 13
  • Gracias recibida: 6
  • br
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?


Offline stark98 #2 Posteado: May 01, 2023, 09:25:33 AM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 131
  • Gracias recibida: 2436
  • fr
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

Be cool, and all will be ok))
Skype: sky.hack2
Discord: bonny9

Gracias:


Offline komandirbk #3 Posteado: May 01, 2023, 04:34:19 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 60
  • Gracias recibida: 317
  • ua
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))
maybe you can share also offsets for 1.02p please? it's TAI main

Discord: brain_off

Offline usersa #4 Posteado: May 02, 2023, 06:13:15 AM

  • 0 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 190
  • Gracias recibida: 62
  • gr
Can we find how the stats color change like this
https://i.ibb.co/thFBsxv/1.jpg
This is a function used in higher seasons.

Great job by the way.
Keep it up like this.

Publicar un anuncio Mu Online gratis - Mu Online Community GRATIS.
Post free Mu Online ads - FREE Mu Online Community
https://www.facebook.com/groups/274190243227367/

Gracias:


Offline stark98 #5 Posteado: May 02, 2023, 07:37:57 AM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 131
  • Gracias recibida: 2436
  • fr
Can we find how the stats color change like this
https://i.ibb.co/thFBsxv/1.jpg
This is a function used in higher seasons.

Great job by the way.
Keep it up like this.

Can find this on other source with interface from s15 and other

Be cool, and all will be ok))
Skype: sky.hack2
Discord: bonny9

Offline realman #6 Posteado: May 02, 2023, 12:21:00 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:


Discord: mercurialxen
Final

Offline vcore30 #7 Posteado: May 02, 2023, 02:01:25 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?



Offline realman #8 Posteado: May 02, 2023, 02:40:20 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Discord: mercurialxen
Final

Gracias:


Offline vcore30 #9 Posteado: May 02, 2023, 02:51:49 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7


Offline realman #10 Posteado: May 02, 2023, 03:03:08 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

Discord: mercurialxen
Final

Gracias:


Offline vcore30 #11 Posteado: May 02, 2023, 03:08:42 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

do you have the complete ITEM_t s6 struct?


Offline realman #12 Posteado: May 02, 2023, 03:31:18 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

do you have the complete ITEM_t s6 struct?

typedef struct
{
   short  Key;
   ITEM   Item;
   OBJECT Object;
   char DropItemName[80];
   int ColorType;
   int FontType;
} ITEM_t;

Discord: mercurialxen
Final

Gracias:


Offline vcore30 #13 Posteado: May 02, 2023, 03:57:02 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

do you have the complete ITEM_t s6 struct?

typedef struct
{
   short  Key;
   ITEM   Item;
   OBJECT Object;
   char DropItemName[80];
   int ColorType;
   int FontType;
} ITEM_t;

Thanks for the structure, I didn't have it complete. Now the code looks like the original.

Something is missing in my Item structure, it has a size of 107 bytes. I have to do BYTE gap[3]. sueno

Code: [Select]
void RenderItemName(ITEM_t* Item, int SelectedItem, ObjectModel* o, int ItemLevel, int ItemOption, int ItemExtOption, char Sort)
{
HFONT Font;

if ( Item->FontType == 1 )
Font = pFontBold;
else
Font = pFontNormal;

pSetFont(pTextThis(), Font);
pSetTextColorRGBA(pTextThis(), 255, 255, 255, 255);
pSetBgColorRGBA(pTextThis(), 0, 0, 0, 255);

switch ( Item->ColorType )
{
  case 0:
    glColor3f(1.0, 1.0, 1.0);
    break;
  case 1:  //Yellow
    glColor3f(1.0, 0.8, 0.1);
    break;
  case 2:  //Orange
    glColor3f(0.9, 0.53, 0.13);
    break;
  case 3:
    glColor3f(0.7, 0.7, 0.7);
    break;
  case 4:
    glColor3f(1.0, 0.3, 0.3);
    break;
  case 5:
    glColor3f(0.3, 1.0, 0.3);
    break;
  case 6:
    glColor3f(0.3, 0.3, 1.0);
    break;
  case 7:
    glColor3f(1.0, 0.3, 1.0);
    break;
  case 8:  //Violet
    glColor3f(0.7, 0.4, 1.0);
    break;
  case 9:
    glColor3f(0.6, 0.4, 1.0);
    break;
  case 0xA:
    glColor3f(1.0, 0.1, 1.0);
    break;
  case 0xB:
    glColor3f(0.1, 1.0, 0.5);
    break;
  case 0xC:  //Level Blue
    glColor3f(0.4, 0.7, 1.0);
    break;
  case 0xD:  //Level White
    glColor3f(0.9, 0.9, 0.9);
    break;
  case 0xE:  //Level Orange
    glColor3f(1.0, 0.5, 0.2);
    break;
  default:
    glColor3f(1.0, 1.0, 1.0);
    break;
}

GLfloat fCurColor[4] = { 1.f, 1.f, 1.f, 0.0f };
glGetFloatv(GL_CURRENT_COLOR, fCurColor);

if ( fCurColor[0] < 0.9f || fCurColor[1] < 0.9f || fCurColor[2] < 0.9f )
{
pSetTextColorRGBA(pTextThis(), fCurColor[0] * 255, fCurColor[1] * 255, fCurColor[2] * 255, 255);
}

if ( ItemExtOption % 4 == 1 || ItemExtOption % 4 == 2 )
{
glColor3f(1.0, 1.0, 1.0);
pSetTextColorRGBA(pTextThis(),  0, 255, 0, 255);
pSetBgColorRGBA(pTextThis(), 60, 60, 200, 255);
}

if (Sort)
{
pDrawText(pTextThis(), o->ScreenX, o->ScreenY - 15, Item->DropItemName, 0, 0, 8, 0);
}
else
{
pDrawText(pTextThis(), pCursorX, pCursorY - 15, Item->DropItemName, 0, 0, 8, 0);
}
}


Offline realman #14 Posteado: May 02, 2023, 05:58:27 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

do you have the complete ITEM_t s6 struct?

typedef struct
{
   short  Key;
   ITEM   Item;
   OBJECT Object;
   char DropItemName[80];
   int ColorType;
   int FontType;
} ITEM_t;

Thanks for the structure, I didn't have it complete. Now the code looks like the original.

Something is missing in my Item structure, it has a size of 107 bytes. I have to do BYTE gap[3]. sueno

Code: [Select]
void RenderItemName(ITEM_t* Item, int SelectedItem, ObjectModel* o, int ItemLevel, int ItemOption, int ItemExtOption, char Sort)
{
HFONT Font;

if ( Item->FontType == 1 )
Font = pFontBold;
else
Font = pFontNormal;

pSetFont(pTextThis(), Font);
pSetTextColorRGBA(pTextThis(), 255, 255, 255, 255);
pSetBgColorRGBA(pTextThis(), 0, 0, 0, 255);

switch ( Item->ColorType )
{
  case 0:
    glColor3f(1.0, 1.0, 1.0);
    break;
  case 1:  //Yellow
    glColor3f(1.0, 0.8, 0.1);
    break;
  case 2:  //Orange
    glColor3f(0.9, 0.53, 0.13);
    break;
  case 3:
    glColor3f(0.7, 0.7, 0.7);
    break;
  case 4:
    glColor3f(1.0, 0.3, 0.3);
    break;
  case 5:
    glColor3f(0.3, 1.0, 0.3);
    break;
  case 6:
    glColor3f(0.3, 0.3, 1.0);
    break;
  case 7:
    glColor3f(1.0, 0.3, 1.0);
    break;
  case 8:  //Violet
    glColor3f(0.7, 0.4, 1.0);
    break;
  case 9:
    glColor3f(0.6, 0.4, 1.0);
    break;
  case 0xA:
    glColor3f(1.0, 0.1, 1.0);
    break;
  case 0xB:
    glColor3f(0.1, 1.0, 0.5);
    break;
  case 0xC:  //Level Blue
    glColor3f(0.4, 0.7, 1.0);
    break;
  case 0xD:  //Level White
    glColor3f(0.9, 0.9, 0.9);
    break;
  case 0xE:  //Level Orange
    glColor3f(1.0, 0.5, 0.2);
    break;
  default:
    glColor3f(1.0, 1.0, 1.0);
    break;
}

GLfloat fCurColor[4] = { 1.f, 1.f, 1.f, 0.0f };
glGetFloatv(GL_CURRENT_COLOR, fCurColor);

if ( fCurColor[0] < 0.9f || fCurColor[1] < 0.9f || fCurColor[2] < 0.9f )
{
pSetTextColorRGBA(pTextThis(), fCurColor[0] * 255, fCurColor[1] * 255, fCurColor[2] * 255, 255);
}

if ( ItemExtOption % 4 == 1 || ItemExtOption % 4 == 2 )
{
glColor3f(1.0, 1.0, 1.0);
pSetTextColorRGBA(pTextThis(),  0, 255, 0, 255);
pSetBgColorRGBA(pTextThis(), 60, 60, 200, 255);
}

if (Sort)
{
pDrawText(pTextThis(), o->ScreenX, o->ScreenY - 15, Item->DropItemName, 0, 0, 8, 0);
}
else
{
pDrawText(pTextThis(), pCursorX, pCursorY - 15, Item->DropItemName, 0, 0, 8, 0);
}
}

i dont have any idia why u use your code , if we posted normal working code

Discord: mercurialxen
Final

Offline vcore30 #15 Posteado: May 02, 2023, 06:49:17 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

do you have the complete ITEM_t s6 struct?

typedef struct
{
   short  Key;
   ITEM   Item;
   OBJECT Object;
   char DropItemName[80];
   int ColorType;
   int FontType;
} ITEM_t;

Thanks for the structure, I didn't have it complete. Now the code looks like the original.

Something is missing in my Item structure, it has a size of 107 bytes. I have to do BYTE gap[3]. sueno

Code: [Select]
void RenderItemName(ITEM_t* Item, int SelectedItem, ObjectModel* o, int ItemLevel, int ItemOption, int ItemExtOption, char Sort)
{
HFONT Font;

if ( Item->FontType == 1 )
Font = pFontBold;
else
Font = pFontNormal;

pSetFont(pTextThis(), Font);
pSetTextColorRGBA(pTextThis(), 255, 255, 255, 255);
pSetBgColorRGBA(pTextThis(), 0, 0, 0, 255);

switch ( Item->ColorType )
{
  case 0:
    glColor3f(1.0, 1.0, 1.0);
    break;
  case 1:  //Yellow
    glColor3f(1.0, 0.8, 0.1);
    break;
  case 2:  //Orange
    glColor3f(0.9, 0.53, 0.13);
    break;
  case 3:
    glColor3f(0.7, 0.7, 0.7);
    break;
  case 4:
    glColor3f(1.0, 0.3, 0.3);
    break;
  case 5:
    glColor3f(0.3, 1.0, 0.3);
    break;
  case 6:
    glColor3f(0.3, 0.3, 1.0);
    break;
  case 7:
    glColor3f(1.0, 0.3, 1.0);
    break;
  case 8:  //Violet
    glColor3f(0.7, 0.4, 1.0);
    break;
  case 9:
    glColor3f(0.6, 0.4, 1.0);
    break;
  case 0xA:
    glColor3f(1.0, 0.1, 1.0);
    break;
  case 0xB:
    glColor3f(0.1, 1.0, 0.5);
    break;
  case 0xC:  //Level Blue
    glColor3f(0.4, 0.7, 1.0);
    break;
  case 0xD:  //Level White
    glColor3f(0.9, 0.9, 0.9);
    break;
  case 0xE:  //Level Orange
    glColor3f(1.0, 0.5, 0.2);
    break;
  default:
    glColor3f(1.0, 1.0, 1.0);
    break;
}

GLfloat fCurColor[4] = { 1.f, 1.f, 1.f, 0.0f };
glGetFloatv(GL_CURRENT_COLOR, fCurColor);

if ( fCurColor[0] < 0.9f || fCurColor[1] < 0.9f || fCurColor[2] < 0.9f )
{
pSetTextColorRGBA(pTextThis(), fCurColor[0] * 255, fCurColor[1] * 255, fCurColor[2] * 255, 255);
}

if ( ItemExtOption % 4 == 1 || ItemExtOption % 4 == 2 )
{
glColor3f(1.0, 1.0, 1.0);
pSetTextColorRGBA(pTextThis(),  0, 255, 0, 255);
pSetBgColorRGBA(pTextThis(), 60, 60, 200, 255);
}

if (Sort)
{
pDrawText(pTextThis(), o->ScreenX, o->ScreenY - 15, Item->DropItemName, 0, 0, 8, 0);
}
else
{
pDrawText(pTextThis(), pCursorX, pCursorY - 15, Item->DropItemName, 0, 0, 8, 0);
}
}

i dont have any idia why u use your code , if we posted normal working code

I just showed how the code should look in a normal readable form. And if after a while I want to change something in it, add it, I won't have to think about what *(WORD *)(a3 + 40) or a1 + 760 is.


Offline realman #16 Posteado: May 02, 2023, 07:30:08 PM | Modificado: May 02, 2023, 07:42:50 PM by realman

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
I'm sorry if it's a lot to ask, but... Can you do it again, but teaching us?

Sorry but that is very hard action )) IDA and very much time to find what u need)) i learn it myself and now i can understand but not all)) ))
If u want to learn it u need to edit code))
Then u learn )) when u work in code))

too much bugs

here is fix for this code:
 

Let's organize a competition whose version is better  :D

And maybe someone knows what structure a3 points to? ItemTooltip?
 

this is wrong structure

original RenderItemName(ITEM_t* item, OBJECT* o, int ItemLevel, int ItemOption, int ItemExtOption, bool Sort)
asm RenderItemName(int a1, int a2, int a3, int a4, int a5, signed int a6, char a7)

Why does your function take a different number of parameters? As you show in original = 6 in asm = 7

это указатель, в ассемблере добавляется

do you have the complete ITEM_t s6 struct?

typedef struct
{
   short  Key;
   ITEM   Item;
   OBJECT Object;
   char DropItemName[80];
   int ColorType;
   int FontType;
} ITEM_t;

Thanks for the structure, I didn't have it complete. Now the code looks like the original.

Something is missing in my Item structure, it has a size of 107 bytes. I have to do BYTE gap[3]. sueno

Code: [Select]
void RenderItemName(ITEM_t* Item, int SelectedItem, ObjectModel* o, int ItemLevel, int ItemOption, int ItemExtOption, char Sort)
{
HFONT Font;

if ( Item->FontType == 1 )
Font = pFontBold;
else
Font = pFontNormal;

pSetFont(pTextThis(), Font);
pSetTextColorRGBA(pTextThis(), 255, 255, 255, 255);
pSetBgColorRGBA(pTextThis(), 0, 0, 0, 255);

switch ( Item->ColorType )
{
  case 0:
    glColor3f(1.0, 1.0, 1.0);
    break;
  case 1:  //Yellow
    glColor3f(1.0, 0.8, 0.1);
    break;
  case 2:  //Orange
    glColor3f(0.9, 0.53, 0.13);
    break;
  case 3:
    glColor3f(0.7, 0.7, 0.7);
    break;
  case 4:
    glColor3f(1.0, 0.3, 0.3);
    break;
  case 5:
    glColor3f(0.3, 1.0, 0.3);
    break;
  case 6:
    glColor3f(0.3, 0.3, 1.0);
    break;
  case 7:
    glColor3f(1.0, 0.3, 1.0);
    break;
  case 8:  //Violet
    glColor3f(0.7, 0.4, 1.0);
    break;
  case 9:
    glColor3f(0.6, 0.4, 1.0);
    break;
  case 0xA:
    glColor3f(1.0, 0.1, 1.0);
    break;
  case 0xB:
    glColor3f(0.1, 1.0, 0.5);
    break;
  case 0xC:  //Level Blue
    glColor3f(0.4, 0.7, 1.0);
    break;
  case 0xD:  //Level White
    glColor3f(0.9, 0.9, 0.9);
    break;
  case 0xE:  //Level Orange
    glColor3f(1.0, 0.5, 0.2);
    break;
  default:
    glColor3f(1.0, 1.0, 1.0);
    break;
}

GLfloat fCurColor[4] = { 1.f, 1.f, 1.f, 0.0f };
glGetFloatv(GL_CURRENT_COLOR, fCurColor);

if ( fCurColor[0] < 0.9f || fCurColor[1] < 0.9f || fCurColor[2] < 0.9f )
{
pSetTextColorRGBA(pTextThis(), fCurColor[0] * 255, fCurColor[1] * 255, fCurColor[2] * 255, 255);
}

if ( ItemExtOption % 4 == 1 || ItemExtOption % 4 == 2 )
{
glColor3f(1.0, 1.0, 1.0);
pSetTextColorRGBA(pTextThis(),  0, 255, 0, 255);
pSetBgColorRGBA(pTextThis(), 60, 60, 200, 255);
}

if (Sort)
{
pDrawText(pTextThis(), o->ScreenX, o->ScreenY - 15, Item->DropItemName, 0, 0, 8, 0);
}
else
{
pDrawText(pTextThis(), pCursorX, pCursorY - 15, Item->DropItemName, 0, 0, 8, 0);
}
}

i dont have any idia why u use your code , if we posted normal working code

I just showed how the code should look in a normal readable form. And if after a while I want to change something in it, add it, I won't have to think about what *(WORD *)(a3 + 40) or a1 + 760 is.

*(DWORD*)(a1 + 840) its item->ColorType
a1+760  its item->DropItemName
*(WORD *)(a3 + 40) its MouseX



#pragma pack(push, 1)
typedef struct tagITEM  //-> Complete (size: 107)
{
 /*+0*/      short   ItemID;
  /*+2*/    int   Level;
  /*+6*/    BYTE  Part;
  /*+7*/    BYTE  Class;
  /*+8*/    bool  TwoHand;
  /*+9*/    WORD  DamageMin;
  /*+11*/   WORD  DamageMax;
  /*+13*/   BYTE  SuccessfulBlocking;
  /*+14*/   WORD  Defense;
  /*+16*/   WORD  MagicDefense;
  /*+18*/   BYTE  MagicPower;
  /*+19*/   BYTE  WeaponSpeed;
  /*+20*/   WORD  WalkSpeed;
  /*+22*/   BYTE  Durability;
  /*+23*/   BYTE  Option1;
  /*+24*/   BYTE  ExtOption;
  /*+25*/   WORD  RequireStrength;
  /*+27*/   WORD  RequireDexterity;
  /*+29*/   WORD  RequireEnergy;
  /*+31*/   WORD  RequireVitality;
  /*+33*/   WORD  RequireCharisma;
  /*+35*/   WORD  RequireLevel;
  /*+37*/   BYTE  SpecialNum;
  /*+38*/   WORD  Special[MAX_ITEM_SPECIAL];
  /*+54*/   BYTE  SpecialValue[MAX_ITEM_SPECIAL];
  /*+62*/   DWORD UniqueID;
  /*+66*/   BYTE  bySelectedSlotIndex;
  /*+67*/   BYTE  PosX;
  /*+68*/   BYTE  PosY;
  /*+69*/   WORD  Jewel_Of_Harmony_Option;
  /*+71*/   WORD  Jewel_Of_Harmony_OptionLevel;
  /*+73*/   bool  option_380;
  /*+74*/   BYTE  bySocketOption[MAX_SOCKETS];
  /*+79*/   BYTE  SocketCount;
  /*+80*/   BYTE  SocketSeedID[MAX_SOCKETS];
  /*+85*/   BYTE  SocketSphereLv[MAX_SOCKETS];
  /*+90*/   BYTE  SocketSeedSetOption;
  int   Number;
  BYTE  Color;
  /*+96*/   BYTE  byColorState;
  /*+97*/   bool  PeriodItem;
  /*+98*/   bool  ExpiredItem;
  /*+99*/   int   lExpireTime;
  /*+103*/  int   RefCount;
} ITEM;

SERIALIZED_OBJECT_ON
struct MuObjectItemData
{
  public:
    unsigned char level() {
        return ( Level >> 3 ) & 0x0F;
    }
    unsigned char addopt() {
        return ( Unknown6 >> 4 ) & 0x0F;
    }

  public:
    /*+00*/  short            ItemID;
    /*+02*/  int              Level;
    /*+06*/  char             Unknown6;
    /*+07*/  char             Unknown7;
    /*+08*/  char             Unknown8;
    /*+09*/  short            DamageMin;
    /*+11*/  short            DamageMax;
    /*+13*/  char             Unknown13;
    /*+14*/  short            Unknown14;
    /*+16*/  short            Unknown16;
    /*+18*/  char             Unknown18;
    /*+19*/  char             Unknown19;
    /*+20*/  short            Unknown20;
    /*+22*/  char             Durability;
    /*+23*/  char             ExcellentOption;
    /*+24*/  char             AncientOption;
    /*+25*/  short            ReqStrenght;
    /*+27*/  short            ReqDextirity;
    /*+29*/  short            ReqEnergy;
    /*+31*/  short            ReqVitality;
    /*+33*/  short            ReqCommand;
    /*+35*/  short            ReqLevel;
    /*+37*/  char             SpecialCount;
    /*+38*/  unsigned short   SpecialType[8];
    /*+54*/  unsigned char    SpecialValue[8];
    /*+62*/  int              UniqueID;
    /*+66*/  char             CurrentActiveSlotIndex;
    /*+67*/  char             PosX;
    /*+68*/  char             PosY;
    /*+69*/  unsigned short   HarmonyType;
    /*+71*/  short            HarmonyValue;
    /*+73*/  char             Is380Item;
    /*+74*/  char             SocketOption[5];
    /*+79*/  char             Unknown79;
    /*+80*/  char             SocketSeedIndex[5];
    /*+85*/  char             SocketSphereLevel[5];
    /*+90*/  char             SocketSet;
    /*+91*/  unsigned char    gap01[5];
    /*+96*/  char             DurabilityState;
    /*+97*/  char             PeriodItem;
    /*+98*/  char             ExpiredItem;
    /*+99*/  int              ExpireDateConvert;
    /*+103*/ int              MaybeRefCount;
};
SERIALIZED_OBJECT_OFF


its maximum fully structures of items that you can find for s6

Discord: mercurialxen
Final

Offline vcore30 #17 Posteado: May 03, 2023, 04:34:48 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
shouldn't the ITEM structure be 110 Byte in size?


Offline realman #18 Posteado: May 03, 2023, 06:17:36 AM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1413
  • md
shouldn't the ITEM structure be 110 Byte in size?

dont know
its original from s5

#pragma pack(push, 1)
typedef struct tagITEM
{
   short Type;
   int   Level;
   BYTE  Part;
   BYTE  Class;
   bool  TwoHand;
   WORD  DamageMin;
   WORD  DamageMax;
   BYTE  SuccessfulBlocking;
   WORD  Defense;
   WORD  MagicDefense;
   BYTE  MagicPower;
   BYTE  WeaponSpeed;
   WORD  WalkSpeed;
   BYTE  Durability;
   BYTE  Option1;
   BYTE  ExtOption;
   WORD  RequireStrength;
   WORD  RequireDexterity;
   WORD  RequireEnergy;
   WORD  RequireVitality;
   WORD  RequireCharisma;
   WORD  RequireLevel;
   BYTE  SpecialNum;
#ifdef PBG_ADD_NEWCHAR_MONK_SKILL
   WORD  Special     [MAX_ITEM_SPECIAL];
#else //PBG_ADD_NEWCHAR_MONK_SKILL
   BYTE  Special     [MAX_ITEM_SPECIAL];
#endif //PBG_ADD_NEWCHAR_MONK_SKILL
   BYTE  SpecialValue[MAX_ITEM_SPECIAL];
   DWORD Key;   //client olny
   
#ifdef LDS_FIX_OUTPUT_WRONG_COUNT_EQUIPPEDSETITEMOPTIONVALUE
   BYTE bySelectedSlotIndex;
#endif // LDS_FIX_OUTPUT_WRONG_COUNT_EQUIPPEDSETITEMOPTIONVALUE

   union
   {
      BYTE  x;    //client olny
      BYTE  lineal_pos;   // ј±Зь А§ДЎ(==y*column+x)
   };
   union
   {
      BYTE  y;    //client olny
      BYTE  ex_src_type;   // ѕЖАМЕЫ ёЮґПБ®ё¦ ЕлЗПБц ѕКґВ staticЗС ѕЖАМЕЫАЗ °жїм АМ єЇјц·О ±ёєРЗСґЩ.
      // 0: ѕшАЅ, 1: АОєҐЕдё® АеєсГў
   };
   WORD  Jewel_Of_Harmony_Option;//їЙјЗ Бѕ·щ
   WORD  Jewel_Of_Harmony_OptionLevel;//їЙјЗ ·№є§( °ЄАМ ѕЖґФ )
   bool option_380;
#ifdef SOCKET_SYSTEM
   BYTE bySocketOption[MAX_SOCKETS];   // јТДП Б¤єё (ј­№цїЎј­ №ЮАє°Н ±Чґл·О АъАе-ј­№цїЎ АзАьјЫїл)
   BYTE SocketCount;               // јТДП °іјц (0~MAX_SOCKETS), 0: јТДП ѕЖАМЕЫ ѕЖґФ
   BYTE SocketSeedID[MAX_SOCKETS];      // ЅГµе °нАЇ№шИЈ (0~49), SOCKET_EMPTY: єу јТДП
   BYTE SocketSphereLv[MAX_SOCKETS];   // ЅєЗЗѕо ·№є§ (1~5)
   BYTE SocketSeedSetOption;         // ЅГµе јјЖ® їЙјЗ (јТДП АеВшЅГ °бБ¤µЗґВ)
#endif   // SOCKET_SYSTEM
   
   // Б¤ё®ЗТ ¶§ БцїцѕЯ ЗПґВ јТЅє
   int   Number;   //. UI_RENEW_INVENTORY_BASE: »зїлЗПБц ѕКА» ї№Б¤
   BYTE  Color;   //. UI_RENEW_INVENTORY_BASE: »зїлЗПБц ѕКА» ї№Б¤
   
   BYTE byColorState;      // ѕЖАМЕЫ №ШїЎ ±тё®ґВ Д®¶у јјЖГ
   
#ifdef KJH_ADD_PERIOD_ITEM_SYSTEM
   bool   bPeriodItem;   // ±в°ЈБ¦ ѕЖАМЕЫАО°Ў?
   bool   bExpiredPeriod;   // ±в°ЈАМ ёё·бµЗѕъіЄ?
   //DWORD   dwLeftTime;      // ±в°ЈБ¦ ѕЖАМЕЫАП¶§ іІАєЅГ°Ј (ґЬА§ : ГК)   - Renderїл
   long   lExpireTime;   // ±в°Ј ёё·б ЅГ°Ј.
   //DWORD   dwPastSystemTime;   // Бці­SystemЅГ°Ј      - °и»кїл
#endif // KJH_ADD_PERIOD_ITEM_SYSTEM

private:
   friend class SEASON3B::CNewUIItemMng;
   int   RefCount;      //. їА·ОБц CNewUIItemMng їЎј­ёё Бў±Щ °ЎґЙ
} ITEM;
#pragma pack(pop)

Discord: mercurialxen
Final

Offline vcore30 #19 Posteado: May 03, 2023, 07:19:03 AM | Modificado: May 03, 2023, 07:22:11 AM by vcore30

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 907
  • ru
It turns out that in s6 the structure has a size larger by 3 byte.

I wrote with a mistake. From 112 Byte, you need to subtract the size of short Key 2 Byte.  Size Struct item = 110 byte



Code: [Select]
#pragma pack(push, 1)
typedef struct
{
/*+0*/  short  Key;
/*+2*/   ObjectItem   Item;  //Size 107 Byte
/*+108*/   BYTE gap01[3];
/*+112*/   ObjectModel Object; //Size 648 Byte
/*+760*/   char DropItemName[80];
/*+840*/   int ColorType;
/*+844*/   int FontType;
} ITEM_t;  //Size 848 Byte
#pragma pack(pop)

Gracias:


Offline komandirbk #20 Posteado: May 28, 2023, 03:39:39 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 60
  • Gracias recibida: 317
  • ua
Maybe someone can share offsets for 1.02p?

Discord: brain_off

Offline Bladimir1 #21 Posteado: August 15, 2024, 10:26:21 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 105
  • Gracias recibida: 1843
  • au
tank you work fine how to create background style s8 for item drop, i tests but see of this form.

https://imgur.com/a/81Kccsv


Offline Bladimir1 #22 Posteado: August 16, 2024, 11:41:38 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 105
  • Gracias recibida: 1843
  • au
for add back ground in specific map add it

if (pMapNumber2 == 2 )//devias
   {
      pSetBackgroundTextColor(pTextThis(), 0, 0, 0, -1);
   }
   else if (pMapNumber2 == 57) //raklion
       
      {
      pSetBackgroundTextColor(pTextThis(), 0, 0, 0, -1);
   }
   else {
      pSetBackgroundTextColor(pTextThis(), 0, 0, 0, -1);// this is for the rest map
   }


//if you whis continue add single map copy and paste else if and add you color and background

#define pMapNumber2               *(int*)0x0E61E18

Gracias:


Offline dizzys #23 Posteado: February 09, 2025, 01:48:50 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 69
  • Gracias recibida: 10
  • be
Is there a way to do border radius? like highter seasons with this function? :)


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
3419 Views
Last post July 12, 2019, 12:11:00 PM
by screamofheartless
31 Replies
10945 Views
Last post August 12, 2019, 05:43:55 PM
by InFamous
0 Replies
1390 Views
Last post July 04, 2019, 12:26:21 PM
by screamofheartless
7 Replies
9353 Views
Last post April 04, 2025, 09:15:53 AM
by dizzys
1 Replies
1362 Views
Last post September 10, 2023, 04:12:22 AM
by vnshell