[Development] MuEmu Working main 1.05D
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
https://s32.postimg.org/ndkovmrv9/Sc...13_00_0000.jpg
Source code: Quest_Source
re: [Development] MuEmu Working main 1.05D
re: [Development] MuEmu Working main 1.05D
@Pinkor can you find CharObject?
re: [Development] MuEmu Working main 1.05D
realy nice. thanks) but i made something looks like that)
re: [Development] MuEmu Working main 1.05D
Some items does not have pcpoint, you need check this too.
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
SmileYzn
Some items does not have pcpoint, you need check this too.
Just, add some "if" and enjoy!
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
007jodex
Just, add some "if" and enjoy!
hola jodex :P
re: [Development] MuEmu Working main 1.05D
This is a pseudo code anyways.. but OK pinkof is better than nothing..
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
Kiosani
This is a pseudo code anyways.. but OK pinkof is better than nothing..
And better that write it in assembler
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
Pinkof
And better that write it in assembler
why did you name the title working main 1.05D? i think its a little bit different of what you contributed with the offsets / sources :O
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
Kiosani
This is a pseudo code anyways.. but OK pinkof is better than nothing..
Its a working code... u can make it more "beautiful"
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
josesp
Its a working code... u can make it more "beautiful"
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
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
007jodex
Just, add some "if" and enjoy!
Did you tested first bro? NO i guess.
Quote:
Originally Posted by
Pinkof
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 already have this monsters on season 4 with some bugs. If someone here need help i am here too :D
re: [Development] MuEmu Working main 1.05D
re: [Development] MuEmu Working main 1.05D
Quote:
Originally Posted by
Pinkof
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