Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Development] MuEmu Working main 1.05D

Joined
Mar 13, 2008
Messages
758
Reaction score
1,005
Change price of PcPointsShop

Code:
int PricePcPoint(int a1,int a2)
{
    int ItemId=*(WORD*)a1;
    int ItemLvl = *(WORD*)(a1+2);


    if(ItemId==GET_ITEM(12,30) && ItemLvl == 0)
    {
        return 10; // return 10 = 10 pcpoint price
    }
    else if(ItemId==GET_ITEM(12,30) && ItemLvl == 8)
    {
        return 15;
    }
    else if(ItemId==GET_ITEM(12,30) && ItemLvl == 16)
    {
        return 20;
    }
    else if(ItemId==GET_ITEM(12,31) && ItemLvl == 0)
    {
        return 10;
    }
    else if(ItemId==GET_ITEM(12,31) && ItemLvl == 8)
    {
        return 15;
    }
    else if(ItemId==GET_ITEM(12,31) && ItemLvl == 16)
    {
        return 20;
    }
    else if(ItemId==GET_ITEM(12,15) && ItemLvl == 0)
    {
        return 1;
    }


    else
    {
        return 0;
        //return CALL 005056D2
    }
}

Code:
SetCompleteHook(0xE8,0x05863DA,&PricePcPoint); //Hook Price item pc point shop

Set Monster to NPC or NPC to Monster...


Code:
int SetMonsterNPC(OBJECTSTRUCT *gObj, signed int MonsterID)
{
  int result; // eax@1
  signed int i; // [sp+4h] [bp-Ch]@7
  signed int v4; // [sp+Ch] [bp-4h]@1


  result = pMAPNUMBER - 9;
  v4 = pMAPNUMBER - 9;
  if ( pMAPNUMBER - 9 > 0 && v4 <= 8 && MonsterID >= 84 && MonsterID <= 143 )
  {
    gObj->unk0x5A = 0;
    result = (int)gObj;
    gObj->SizeObj = (double)(v4 / 3) * 0.050000001 + gObj->SizeObj;
  }
  if ( gObj )
  {
   /* for ( i = 0; i < 512; ++i )
    {
      if ( MonsterID == (unsigned __int16)word_79B9E78[27 * i] )
      {
        gObjSetMonsterName(gObj->Name, (int)((char *)&unk_79B9E7A + 54 * i));
        break;
      }
    }*/
    NPCTEXT * pNPCTEXT= (NPCTEXT*)0x79B9E78;
    
        for(int i=0; i<512;i++)
        {
            if(pNPCTEXT[i].MonsterID==MonsterID)
            {
                 gObjSetMonsterName(gObj->Name,(DWORD)pNPCTEXT[i].Name);
                break;
            }
        }
  
     gObj->objID = MonsterID;
    result = (int)gObj;
    gObj->unk0x278 = 0;
    gObj->unk0x58 = *(WORD*)0x7FE8DD4;
    if ( MonsterID == 200 )
    {
      result = (int)&gObj->unk0x264;
      gObj->TypePlayer = 2;
    }
    if ( MonsterID == 200 )
    {
      result = (int)&gObj->unk0x264;
      gObj->TypePlayer = 2;
    }
    else if ( MonsterID < 260 )
    {
      if ( MonsterID <= 200 )
      {
        if ( MonsterID < 150 )
        {
          if ( MonsterID <= 110 )
          {
            if ( MonsterID < 100 )
            {
              result = (int)&gObj->unk0x264;
              gObj->TypePlayer = 2;
            }
            else
            {
              gObj->TypePlayer = 8;
            }
          }
          else
          {
            gObj->TypePlayer = 2;
          }
        }
        else
        {
          result = (int)&gObj->unk0x264;
          gObj->TypePlayer = 2;
        }
      }
      else
      {
        gObj->TypePlayer = 4;
      }
    }
    else
    {
      gObj->TypePlayer = 2;
    }
    if ( MonsterID == 368 || MonsterID == 369 || MonsterID == 370 )
      gObj->TypePlayer = 4;
    if ( MonsterID == 367
      || MonsterID == 371
      || MonsterID == 376
      || MonsterID == 377
      || MonsterID == 379
      || MonsterID == 380
      || MonsterID == 381
      || MonsterID == 382
      || MonsterID == 383
      || MonsterID == 384
      || MonsterID == 385
      || MonsterID == 406
      || MonsterID == 407
      || MonsterID == 408
      || MonsterID == 414
      || MonsterID == 415
      || MonsterID == 416
      || MonsterID == 417
      || MonsterID == 450
      || MonsterID == 452
      || MonsterID == 453
      || MonsterID == 464
      || MonsterID == 465
      || MonsterID == 467
      || MonsterID == 468
      || MonsterID == 469
      || MonsterID == 470
      || MonsterID == 471
      || MonsterID == 472
      || MonsterID == 473
      || MonsterID == 474
      || MonsterID == 475
      || MonsterID == 478 )
      gObj->TypePlayer = 4;
    if ( MonsterID == 451 )
    {
      result = (int)&gObj->unk0x264;
      gObj->TypePlayer = -128;
    }
  }
  return result;
}


Header for SetMonsterNpc


Code:
#define pMAPNUMBER *(DWORD*)0x84253C

#pragma pack(push, 1)
struct OBJECTSTRUCT
{
  
  BYTE gap0[4];
  BYTE unk0x04;
  char gap_5[3];
  DWORD unk0x08;
  char gap_C[2];
  char IsSafeZone;
  char unk0xF;
  BYTE byte10;
  char unk0x11;
  char gap_12[1];
  BYTE Class;
  char unk0x14;
  char unk0x15;
  char unk0x16;
  char gap_17[1];
  char unk0x18;
  char unk0x19;
  char unk0x1A;
  char unk0x1B;
  char unk0x1C;
  char unk0x1D;
  char unk0x1E;
  BYTE objPkState;
  char unk0x20;
  char unk0x21;
  char gap_22[1];
  char unk0x23;
  char unk0x24;
  char gap_25[1];
  WORD unk0x26;
  char gap_28[1];
  char unk0x29;
  char unk0x2A;
  char gap_2B[1];
  char unk0x2C;
  char gobjX;
  char gobjY;
  char gap_2F[9];
  char Name[24];
  char unk0x50;
  char gap_51[1];
  char unk0x52;
  char gap_53[1];
  WORD unk0x54;
  WORD m_index;
  WORD unk0x58;
  WORD unk0x5A;
  WORD objID;
  char gap_5E[4];
  WORD objSpeed;
  char gap_64[4];
  DWORD unk0x68;
  DWORD unk0x6C;
  char gap_70[4];
  DWORD unk0x74;
  char gap_78[12];
  DWORD unk0x84;
  DWORD unk0x88;
  DWORD unk0x8C;
  char gap_90[4];
  DWORD unk0x94;
  char gap_98[12];
  DWORD unk0xA4;
  char gap_A8[12];
  DWORD R;
  DWORD G;
  DWORD B;
  char gap_C0[32];
  WORD objHelm;
  BYTE objHelmLvl;
  BYTE gapE3[29];
  WORD objArmor;
  BYTE objArmorLvl;
  BYTE gap103[29];
  WORD objPants;
  BYTE objPantsLvl;
  BYTE gap123[29];
  WORD objGloves;
  BYTE objGlovesLvl;
  BYTE gap143[29];
  WORD objBoots;
  BYTE objBootsLvl;
  BYTE gap163[29];
  WORD WeaponRight;
  BYTE WeaponRightLvl;
  BYTE WeaponRightOpt;
  char gap_184[1];
  char unk0x185;
  char gap_186[26];
  WORD WeaponLeft;
  BYTE WeaponLeftLvl;
  char gap_1A3[2];
  char unk0x1A5;
  char gap_1A6[26];
  WORD objWings;
  char gap_1C2[30];
  WORD objPet;
  char gap_1E2[30];
  WORD unk0x200;
  char gap_202[30];
  BYTE unk0x220;
  char gap_221[1];
  char unk0x222;
  char gap_223[41];
  DWORD unk0x24C;
  DWORD unk0x250;
  char gap_254[12];
  WORD unk0x260;
  char unk0x262;
  char gap_263[1];
  DWORD unk0x264;
  BYTE Visible;
  BYTE gap269[2];
  BYTE unk0x26B;
  BYTE ShadowEnable;
  BYTE unk0x26D;
  char unk0x26E;
  char gap_26F[1];
  BYTE unk0x270;
  char unk0x271;
  char unk0x272;
  char unk0x273;
  char gap_274[1];
  char unk0x275;
  char CurrentAnimation;
  char unk0x277;
  BYTE unk0x278;
  char unk0x279;
  BYTE TypePlayer;
  char gap_27B[4];
  char unk0x27F;
  char gap_280[2];
  char unk0x282;
  char unk0x283;
  char gap_284[16];
  DWORD TypeObj;
  DWORD unk0x298;
  DWORD dword29C;
  DWORD unk0x2A0;
  DWORD dword2A4;
  DWORD unk0x2A8;
 char gap_2AC[12];
  DWORD unk2B8;
  char gap_2BC[8];
  float SizeObj;
  float unk0x2C8;
  float unk0x2CC;
  float unk0x2D0;
  float unk0x2D4;
  float unk0x2D8;
  DWORD unk0x2DC;
  float unk0x2E0;
  DWORD unk0x2E4;
  char gap_2E8[8];
  float unk0x2F0;
  float unk0x2F4;
  float Opacity2;
  float Opacity;
  DWORD unk0x300;
  DWORD unk0x304;
  DWORD unk0x308;
  char gap_30C[36];
  float unk0x330;
  float unk0x334;
  float unk0x338;
  float dword33C;
  float dword340;
  float dword344;
  char gap_348[24];
  float PositionX;
  float PositionY;
  float PositionZ;
  float RotateX;
  float RotateY;
  float RotateZ;
  char gap_378[144];
  DWORD unk0x408;
  char gap_40C[60];
  char unk0x448;
  char gap_449[23];
  DWORD dword460;
};
#pragma pack(pop)

struct NPCTEXT
{
    WORD MonsterID;
    //BYTE Enable;
    char Name[52];
};extern NPCTEXT pNPCTEXT[512];

#define gObjSetMonsterName ((void(__cdecl*)(char* a1,DWORD unk))0x7DF6D0)
int SetMonsterNPC(OBJECTSTRUCT *gObj, signed int MonsterID);


Code:
#define SearchLineText    ((int(__thiscall*)(LPVOID This, int a2)) 0x4024D0)
#define SearchLineTextThis 0x79F5190


#define CopyText    ((int(__cdecl*)(int a1,int a2)) 0x4B23E0)
#define sub_7169E9    ((int(__thiscall*)(LPVOID* This, int a2,int a3,int a4,int a5,int a6,int a7)) 0x07169E9)

class PETS
{
public:
        char __thiscall PetBarHP(int a1, int a2);
        void PetAddEffect();
        void Hook();


};extern PETS cPets;


Code:
PETS cPets;
char PETS::PetBarHP(int a1, int a2)
{
  int v2; 
  char result; // al@17
  char PetName[254]; // [sp+14h] [bp-100h]@7




 OBJECTSTRUCT * gObj  = (OBJECTSTRUCT *)( *(DWORD*)0x79B9D48);


  if (gObj->objPet < 7475 || gObj->objPet > 7479
    && gObj->objPet != 0x1D73
    && gObj->objPet != 0x1D74
    && gObj->objPet != 0x1D76
    && gObj->objPet != 0x1D58 )
  {
    result = 0;
  }
  else
  {
    
    switch ( gObj->objPet )
    {
      case 0x1D33:
        v2 = SearchLineText((LPVOID)SearchLineTextThis,353);
        CopyText((int)&PetName, v2);
        break;
      case 0x1D34:
        CopyText((int)&PetName, (84 * gObj->objPet - 0x333) +*(DWORD*)0x79FAE58);
        break;
      case 0x1D35:
        v2 = SearchLineText((LPVOID)SearchLineTextThis,355);
        CopyText((int)&PetName, v2);
        break;
      case 0x1D36:
        v2 = SearchLineText((LPVOID)SearchLineTextThis,354);
        CopyText((int)&PetName, v2);
        break;
      case 0x1D37:
        v2 = SearchLineText((LPVOID)SearchLineTextThis,1187);
        CopyText((int)&PetName, v2);
        break;
      case 0x1D58:
        v2 = SearchLineText((LPVOID)SearchLineTextThis,1916);
        CopyText((int)&PetName, v2);
        break;
      case 0x1D73:
        CopyText((int)&PetName, *(DWORD*)0x79FAE58 + 0x89D00);
        break;
      case 0x1D74:
        CopyText((int)&PetName, *(DWORD*)0x79FAE58 + 0x89D54);
        break;
      case 0x1D76:
        CopyText((int)&PetName, *(DWORD*)0x79FAE58 + 0x89DFC);
        break;
      default:
        break;
    }
    sub_7169E9((LPVOID*)this,a1, a2, (int)&PetName, *(BYTE *)(*(DWORD*)0x79FAE5C + 0x13DE), 0xFF, 0);
    result = 1;
  }
  return result;
}

void PETS::Hook()
{
    
    SetCompleteHook(0xE9,0x0716CF3,&PETS::PetBarHP); 
}


Simple windows for QUEST

Pinkof - [Development] MuEmu Working main 1.05D - RaGEZONE Forums


Source code:
 
Last edited by a moderator:
Junior Spellweaver
Joined
Sep 8, 2015
Messages
187
Reaction score
42
realy nice. thanks) but i made something looks like that)
 
Joined
Oct 29, 2007
Messages
1,290
Reaction score
1,311
now will release "Game Engine mega plus re edition deluxe" with "Can change price to pc point shop" and "Can add new npc monster" XD

I have added Custom Monsters and NPC in the past.. sincerely.. it's not necesary this struct to make this, the GameEngine is for: 1.04d GMO main.exe, then this struct is not util for me I can make this and more, sincerely nothing is new here. but the complete struct made by pinkof it's fine... I can see some cool things on this that are on really from: ZzzBMD.h Class definitions, anyways.. Good Luck for all

PS: And yes, I'm working on New GameEngine Version 1.9.0.0, with more cool things than: 1.8.0.0

PS 2: I'm working too on: Season 4 but Japan Protocol, + Season 3, + Pre-Season 1
 
Last edited:
Joined
Mar 13, 2008
Messages
758
Reaction score
1,005
Pinkof: Can you decompile this function ? ->

Code:
[URL]http://forum.ragezone.com/f508/pet-hp-bar-asm-client-1091049/[/URL]

:cool::cool::cool::cool::cool::cool::cool::cool::cool:

Here you have.. not is hard.. ¬¬ and please dont sell it is free!!!
#define SearchLineText ((int(__thiscall*)(LPVOID This, int a2)) 0x4024D0)
#define SearchLineTextThis ((LPVOID(*)()) 0x79F5190)


#define sub_4B23E0 ((int(__cdecl*)(int a1,int a2)) 0x4B23E0)
#define sub_7169E9 ((int(__thiscall*)(LPVOID This, int a2,int a3,int a4,int a5,int a6)) 0x07169E9)

char PetBarHP(LPVOID This,int a1, int a2)
{
int v2; // eax@8
int v3; // eax@10
int v4; // eax@11
int v5; // eax@12
int v6; // eax@13
char result; // al@17
char v8; // [sp+14h] [bp-100h]@7
char v9; // [sp+15h] [bp-FFh]@7
__int16 v10; // [sp+111h] [bp-3h]@7
char v11; // [sp+113h] [bp-1h]@7


OBJECTSTRUCT * gObj = (OBJECTSTRUCT *)( *(DWORD*)0x79B9D48);
if (gObj->objPet < 7475 || gObj->objPet > 7479
&& gObj->objPet != 0x1D73
&& gObj->objPet != 0x1D74
&& gObj->objPet != 0x1D76
&& gObj->objPet != 0x1D58 )
{
result = 0;
}
else
{
v8 = 0;
memset(&v9, 0, 0xFCu);
v10 = 0;
v11 = 0;
switch ( gObj->objPet )
{
case 0x1D33:
v2 = SearchLineText(SearchLineTextThis(),353);
sub_4B23E0((int)&v8, v2); // May be draw text name of pet over hp bar pet interface
break;
case 0x1D34:
sub_4B23E0((int)&v8, 84 * gObj->objPet - 0x333) +*(DWORD*)0x79FAE58);
break;
case 0x1D35:
v3 = SearchLineText(SearchLineTextThis(),355);
sub_4B23E0((int)&v8, v3);
break;
case 0x1D36:
v4 = SearchLineText(SearchLineTextThis(),354);
sub_4B23E0((int)&v8, v4);
break;
case 0x1D37:
v5 = SearchLineText(SearchLineTextThis(),1187);
sub_4B23E0((int)&v8, v5);
break;
case 0x1D58:
v6 = SearchLineText(SearchLineTextThis(),1916);
sub_4B23E0((int)&v8, v6);
break;
case 0x1D73:
sub_4B23E0((int)&v8, *(DWORD*)0x79FAE58 + 0x89D00);
break;
case 0x1D74:
sub_4B23E0((int)&v8, *(DWORD*)0x79FAE58 + 0x89D54);
break;
case 0x1D76:
sub_4B23E0((int)&v8, *(DWORD*)0x79FAE58 + 0x89DFC);
break;
default:
break;
}
sub_7169E9(This,a1, a2, (int)&v8, *(BYTE *)*(DWORD*)0x79FAE5C + 0x13DE), 0xFF, 0);
result = 1;
}
return result;
}
hook here.. 0x0716CF3 ////$ 55 PUSH EBP

i dont test it but i think that is working..

good luck

PD: may be tomorrow i will do it most clean.. XD
 
Last edited:
Joined
Oct 29, 2007
Messages
1,290
Reaction score
1,311
Here you have.. not is hard.. ¬¬ and please dont sell it is free!!!

hook here.. 0x0716CF3 ////$ 55 PUSH EBP

i dont test it but i think that is working..

good luck

PD: may be tomorrow i will do it most clean.. XD

Incredible.. I make something like this too, but for 1.03K JPN main.exe and.. sincerely I make so many times this function, because don't work properly.. and you make this on only some minutes.. :eek:tt::eek:tt::eek:tt::eek:tt: I love you Pinkof xD, you are great! :D:

PS: Maybe you can make COMPLETE Custom Pets Work, like me ? :D:

Here related to Pets work my decompilation (Old) from 1.03K Add pets Effects

Code:
typedef int(*Objsub_85151D)();
extern Objsub_85151D gObjsub_85151D;

typedef char(__cdecl *Objsub_5AB975)(float Arg1, float Arg2, float Arg3);
extern Objsub_5AB975 gObjsub_5AB975;

typedef bool(__thiscall *Objsub_604FCD)(LPVOID This, char Arg2);
extern Objsub_604FCD gObjsub_604FCD;

typedef void(__cdecl *Objsub_5B81A9)(int Arg1, char Arg2, int Arg3, int Arg4);
extern Objsub_5B81A9 gObjsub_5B81A9;

typedef int(__cdecl *CreateSpriteEx)(int Arg1, int Arg2, int Arg3, int Arg4, int Arg5, int Arg6, int Arg7);
extern CreateSpriteEx pCreateSpriteEx;

typedef int(__cdecl *CreateParticleEx)(int Arg1, int Arg2, int Arg3, int Arg4, int Arg5, float Arg6, int Arg7);
extern CreateParticleEx pCreateParticleEx;

Code:
CreateSpriteEx pCreateSpriteEx = (CreateSpriteEx)0x006BABF2;
CreateParticleEx pCreateParticleEx = (CreateParticleEx)0x0069BCD9;

Objsub_5AB975 gObjsub_5AB975 = (Objsub_5AB975)0x005AB975;
Objsub_604FCD gObjsub_604FCD = (Objsub_604FCD)0x00604FCD;
Objsub_5B81A9 gObjsub_5B81A9 = (Objsub_5B81A9)0x005B81A9;
Objsub_85151D gObjsub_85151D = (Objsub_85151D)0x0085151D;

char CreatePetEffect(int Arg1, char Arg2)
{
    float v2; // ST14_4@3
    float v3; // ST10_4@3
    char v5; // [sp+17h] [bp-15h]@3
    int v6; // [sp+18h] [bp-14h]@18
    float v7; // [sp+1Ch] [bp-10h]@21
    float v8; // [sp+20h] [bp-Ch]@21
    float v9; // [sp+24h] [bp-8h]@21
    float v10; // [sp+28h] [bp-4h]@20

    vec3_t Color;
    Vector(0.f, 0.f, 0.f, Color);

    vec3_t Color2;
    Vector(0.f, 0.f, 0.f, Color2);

    vec3_t Color3;
    Vector(0.f, 0.f, 0.f, Color3);

    vec3_t Color4;
    Vector(0.f, 0.f, 0.f, Color4);

    vec3_t Color5;
    Vector(0.f, 0.f, 0.f, Color5);

    if (*(BYTE*)(Arg1 + 4))
    {
        if (Arg2)
        {
            v5 = 1;
        }
        else
        {
            v2 = *(float *)(Arg1 + 256) * 0.0099999998;
            v3 = *(float *)(Arg1 + 252) * 0.0099999998;
            v5 = gObjsub_5AB975(v3, v2, -20.0);
        }
        *(BYTE*)(Arg1 + 12) = v5;
        if (*(BYTE*)(Arg1 + 12))
        {
            if (*(DWORD*)(*(DWORD*)(Arg1 + 472) + 48) != 826 && *(DWORD*)(Arg1 + 48) != 7490 && *(DWORD*)(Arg1 + 48) != ObjectId(13,106) && *(DWORD*)(Arg1 + 48) != ObjectId(13,123))
                return 1;
            if (Arg2)
            {
                *(DWORD*)(Arg1 + 96) = *(DWORD*)(Arg1 + 96);
            }
            else if (*(DWORD*)(Arg1 + 48) == ObjectId(13, 97))
            {
                *(DWORD*)(Arg1 + 96) = 1065353216;
            }
            else if (pPlayerState == 4)
            {
                *(DWORD*)(Arg1 + 96) = 1065353216;
            }
            else if (*(DWORD*)(Arg1 + 48) != eMauntType::BlackFenrir 
                && *(DWORD*)(Arg1 + 48) != eMauntType::BlueFenrir 
                && *(DWORD*)(Arg1 + 48) != eMauntType::RedFenrir 
                && *(DWORD*)(Arg1 + 48) != eMauntType::GoldenFenrir 
                && *(DWORD*)(Arg1 + 48) != eSpecialMauntType::DarkWolf 
                && *(DWORD*)(Arg1 + 48) != eSpecialMauntType::FangSable
                && *(DWORD*)(Arg1 + 48) != eSpecialMauntType::MisticTiger 
                && *(DWORD*)(Arg1 + 48) != eMauntType::OrangeFenrir 
                && *(DWORD*)(Arg1 + 48) != ePetSystemType::Skeleton 
                && *(DWORD*)(Arg1 + 48) != ePetSystemType::Unicorn)
            {
                *(DWORD*)(Arg1 + 96) = 1065353216;
            }
            v6 = 0;
            if (gObjsub_604FCD((void*)(*(DWORD*)(Arg1 + 472) + 484), 18))
                v6 = 10;
            gObjsub_5B81A9(Arg1, 0, 0, v6);
            v10 = (double)(gObjsub_85151D() % 30 + 70) * 0.0099999998;
            // ----
            if (*(DWORD*)(Arg1 + 48) == ObjectId(13, 0))
            {
                v7 = v10 * 0.5;
                v8 = v10 * 0.80000001;
                v9 = v10 * 0.60000002;
                Vector(0.94, 0.812f, 0.5358f, Color);
                pCreateSpriteEx(32002, Arg1 + 252, 1065353216, (int)&Color, Arg1, 0, 0);
            }
            // ----
            else if (*(DWORD*)(Arg1 + 48) == ObjectId(13, 106))
            {
                Vector(0.5358f, 0.812f, 0.94f, Color);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)Color, 11, 0.5f, Arg1);
                Vector(0.94f, 0.834f, 0.553f, Color2);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)Color2, 11, 0.4f, Arg1);
                Vector(0.553f, 0.94f, 0.84f, Color3);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)Color3, 11, 0.3f, Arg1);
                Vector(0.235f, 0.125f, 0.85f, Color4);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)Color4, 11, 0.2f, Arg1);
                Vector(0.85689f, 0.23541f, 0.9635f, Color5);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)Color5, 11, 0.1f, Arg1);
            }
            // ----
            else if (*(DWORD*)(Arg1 + 48) == ObjectId(13, 123))
            {
                Vector(0.f, 1.f, 0.0167f, Color);
                pCreateParticleEx(32269, Arg1 + 252, Arg1 + 264, (int)Color, 3, 0.5f, Arg1);
                Vector(0.f, 1.f, 0.0178f, Color2);
                pCreateParticleEx(32269, Arg1 + 252, Arg1 + 264, (int)Color2, 3, 0.6f, Arg1);
                Vector(0.f, 1.f, 0.0187f, Color3);
                pCreateParticleEx(32269, Arg1 + 252, Arg1 + 264, (int)Color3, 3, 0.7f, Arg1);
            }
            // ----
            else if (*(DWORD*)(Arg1 + 48) == ObjectId(13, 110))
            {
                Vector(0.4095f, 0.7598f, 0.91f, Color);
                pCreateParticleEx(32269, Arg1 + 252, Arg1 + 264, (int)&Color, 3, 0.5f, Arg1);
                Vector(0.4025f, 0.8598f, 0.98f, Color2);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)&Color2, 11, 0.5f, Arg1);
            }
            // ----
            else if (*(DWORD*)(Arg1 + 48) == ObjectId(13, 109))
            {
                Vector(0.4095f, 0.7598f, 0.91f, Color);
                pCreateParticleEx(32269, Arg1 + 252, Arg1 + 264, (int)&Color, 3, 0.5f, Arg1);
                Vector(1.f, 1.f, 0.98f, Color2);
                pCreateParticleEx(32033, Arg1 + 252, Arg1 + 264, (int)&Color2, 11, 0.5f, Arg1);
            }
        }
    }
    return 1;
}

Results ? Yes, something like this:

yLB7EsM - [Development] MuEmu Working main 1.05D - RaGEZONE Forums


NDkEFHQ - [Development] MuEmu Working main 1.05D - RaGEZONE Forums


PS 2: Sorry hook place is here:

Code:
SetHook((LPVOID)CreatePetEffect, (LPVOID)0x0046C305, ASM::CALL);
SetHook((LPVOID)CreatePetEffect, (LPVOID)0x004AE2EC, ASM::CALL);

PS 3: On Arg1 in really exists 1 struct... and Arg1 is in really a Pointer to this fuckin* struct -.-! but I don't like make structs on decompilation process anyways :D: (maybe is the same struct from pinkof) xD.

PS 4: for vec3_t definitions see this thread: http://forum.ragezone.com/f508/glow-source-1-03k-1086720/


 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Mar 13, 2008
Messages
758
Reaction score
1,005
first post updated

Added PetBarHp code with this we can add new pets (need add it to gameserver too)

PETS cPets;
char PETS::petBarHP(int a1, int a2)
{
int v2;
char result; // al@17
char PetName[254]; // [sp+14h] [bp-100h]@7




OBJECTSTRUCT * gObj = (OBJECTSTRUCT *)( *(DWORD*)0x79B9D48);


if (gObj->objPet < 7475 || gObj->objPet > 7479
&& gObj->objPet != 0x1D73
&& gObj->objPet != 0x1D74
&& gObj->objPet != 0x1D76
&& gObj->objPet != 0x1D58 )
{
result = 0;
}
else
{

switch ( gObj->objPet )
{
case 0x1D33:
v2 = SearchLineText((LPVOID)SearchLineTextThis,353);
CopyText((int)&PetName, v2);
break;
case 0x1D34:
CopyText((int)&PetName, (84 * gObj->objPet - 0x333) +*(DWORD*)0x79FAE58);
break;
case 0x1D35:
v2 = SearchLineText((LPVOID)SearchLineTextThis,355);
CopyText((int)&PetName, v2);
break;
case 0x1D36:
v2 = SearchLineText((LPVOID)SearchLineTextThis,354);
CopyText((int)&PetName, v2);
break;
case 0x1D37:
v2 = SearchLineText((LPVOID)SearchLineTextThis,1187);
CopyText((int)&PetName, v2);
break;
case 0x1D58:
v2 = SearchLineText((LPVOID)SearchLineTextThis,1916);
CopyText((int)&PetName, v2);
break;
case 0x1D73:
CopyText((int)&PetName, *(DWORD*)0x79FAE58 + 0x89D00);
break;
case 0x1D74:
CopyText((int)&PetName, *(DWORD*)0x79FAE58 + 0x89D54);
break;
case 0x1D76:
CopyText((int)&PetName, *(DWORD*)0x79FAE58 + 0x89DFC);
break;
default:
break;
}
sub_7169E9((LPVOID*)this,a1, a2, (int)&PetName, *(BYTE *)(*(DWORD*)0x79FAE5C + 0x13DE), 0xFF, 0);
result = 1;
}
return result;
}

void PETS::Hook()
{

SetCompleteHook(0xE9,0x0716CF3,&PETS::petBarHP);
}

First Post with full code.
 
Back
Top