PDA

View Full Version : [MU] Add NewPets Emu Season 4



muonlinegr2
04-11-17, 06:47 PM
Well this code was posted by Nemesis a long time ago I just changed the offsets to the main 1.05D, but for it to be 100% functional it would need to fix the Pet Moviment, MakePreview, Desipação, HP Bar and Position in inventory!
I have already set the Moviment, Desipação, HP Bar, Position in inventory and size inventory .... but still fixed still the MakePreview and the function of movement q I created this presenting a bug, it is duplicating the movement and passing to all the mounts as you can see in the video!
I will leave the source to add new pet, but my move function, who managed to fix the MakePreview and take the bug from the move will help mto



PetHook.h


#define ItemId(x, y) ((x * 512) + y)
#define pPreviewPetThis *(DWORD*)0x0079B9D48
#define LODWORD(h) ((DWORD)(__int64(h) & __int64(0xffffffff)))




enum eBugType
{
New_Pet= 7551,
};


typedef void (__thiscall *ObjCreatePet)(int ItemId);
extern ObjCreatePet gObjCreatePet;
// --
typedef int (__cdecl *ObjCreateBug)(int BugId, int Arg2, int Arg3, int Arg4, int Arg5);
extern ObjCreateBug gObjCreateBug;
// --
void gObjCreatePetExHook();






PetHook.cpp


#include "stdafx.h"
#include "PetHook.h"
#include "Util.h"
#include "Defines.h"
#include "TMemory.h"
#include "ToolKit.h"


ObjCreateBug gObjCreateBug = (ObjCreateBug)0x004A8271;
ObjCreatePet gObjCreatePet = (ObjCreatePet)0x00734652;


void gObjCreatePetEx(int ItemId)
{
int ItemSwitch = *(WORD*)ItemId;
int PetPreview = LODWORD(pPreviewPetThis) + 612;
// ----
switch (ItemSwitch)
{
case ItemId(13, 76):
gObjCreateBug(eBugType::New_Pet, PetPreview + 252, PetPreview, 0, 0);
break;
// ---
}
gObjCreatePet(ItemId);
}


__declspec(naked) void PetMoviment()
{
_asm
{
CMP DWORD PTR DS:[EAX+0x030],0x1D33
JE SHORT Pet
Pet:
CMP DWORD PTR DS:[EAX+0x030],New_Pet
JE SHORT Exit
Exit:
mov eax,0x004A9D22
jmp eax
}
}


void gObjCreatePetExHook()
{
SetHook((LPVOID)gObjCreatePetEx,(LPVOID)0x007155DE ,ASM::CALL);
SetHook((LPVOID)gObjCreatePetEx,(LPVOID)0x00732A1A ,ASM::CALL);
ToolKit.WriteJmp(0x004A9D09,(DWORD)&PetMoviment);


}




Main.cpp


#include "PetHook.h"

gObjCreatePetExHook();



Demonstração NewPet mais bug MakePreview e Moviment


<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>


Créditos
Nemesis
Boris160

tieugiao
03-10-18, 07:38 PM
cái này chế ra pet ss cao vao SCF dc ko ta hay là phải mò code ben source ss cao ta