Hi my friends i create this full source code base for change any set, item of monsters . This base have more funtion use you imagination :D i only create it for fun and use only for change npc set, sword and monset set, armor.. maybe too you cant change sound of monsters, dont test but give the offset for sound monster too. this code is for 1.04J
https://imgur.com/a/FEs4SOc
Create CustomMonsters.ccp
add
#include "stdafx.h"
#include "CustomMonsters.h"
#include "Util.h"
#include "Common.h"
#include "Offset.h"
Monster gMonster;
#define MonsterSound ((void(__cdecl*)(int a1, DWORD* a2, float* a3, float* a4, int a5, DWORD* a6, float a7, __int16 a8, unsigned __int8 a9, char a10, int a11, DWORD* a12))0x006C4750)
void Monster::Load()
{
SetCompleteHook(0xE8, 0x0052D982, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052D9C3, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DA04, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DA45, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DA86, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DAC7, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DB08, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DB49, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DB8A, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DBCB, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DC10, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x0052DC55, &Monster::MonsterAttribute);
SetCompleteHook(0xE8, 0x00531817, &Monster::MonsterAttribute);
}
void ShowMonster()
{
}
void Monster::MonsterAttribute(DWORD Object, signed int MonsterID)
{
if (Object)
{
switch (MonsterID)
{
case 34://Cursed Wizard
*(_WORD*)(Object + 816) = ITEM_GET(12, 37);
*((_WORD*)Object + 296) = ITEM_GET(7, 22);
*((_BYTE*)Object + 594) = 13;
*(_BYTE*)(Object + 595) = 1;
*((_WORD*)Object + 312) = ITEM_GET(8,22);
*((_BYTE*)Object + 626) = 13;
*(_BYTE*)(Object + 627) = 1;
*((_WORD*)Object + 328) = ITEM_GET(9,22);
*((_BYTE*)Object + 658) = 13;
*(_BYTE*)(Object + 659) = 1;
*((_WORD*)Object + 344) = ITEM_GET(10,22);
*((_BYTE*)Object + 690) = 13;
*(_BYTE*)(Object + 691) = 1;
*((_WORD*)Object + 360) = ITEM_GET(11,22);
*((_BYTE*)Object + 722) = 13;
*(_BYTE*)(Object + 723) = 1;
*((_WORD*)Object + 376) = ITEM_GET(5,13);
*((_BYTE*)Object + 754) = 13;
*((_WORD*)Object + 392) = ITEM_GET(6,15);
*(_BYTE*)(Object + 786) = 13;
break;
case 58://Tantalos
case 59://zaikan
if (MonsterID == 58)
{
*((_WORD*)Object + 376) = ITEM_GET(0, 19);
*((_BYTE*)Object + 754) = 13;
}
else
{
*((_DWORD*)Object + 1) = 1;
*((_WORD*)Object + 376) = ITEM_GET(0, 19);
*((_BYTE*)Object + 754) = 13;
}
break;
case 229: //Marlon
*(_WORD*)(Object + 816) = ITEM_GET(12, 36);
*((_WORD*)Object + 296) = ITEM_GET(7, 17);
*((_BYTE*)Object + 594) = 13;
*(_BYTE*)(Object + 595) = 1;
*((_WORD*)Object + 312) = ITEM_GET(8, 17);
*((_BYTE*)Object + 626) = 13;
*(_BYTE*)(Object + 627) = 1;
*((_WORD*)Object + 328) = ITEM_GET(9, 17);
*((_BYTE*)Object + 658) = 13;
*(_BYTE*)(Object + 659) = 1;
*((_WORD*)Object + 344) = ITEM_GET(10, 17);
*((_BYTE*)Object + 690) = 13;
*(_BYTE*)(Object + 691) = 1;
*((_WORD*)Object + 360) = ITEM_GET(11, 17);
*((_BYTE*)Object + 722) = 13;
*(_BYTE*)(Object + 723) = 1;
*((_WORD*)Object + 376) = ITEM_GET(0, 19);;
*((_BYTE*)Object + 754) = 13;
*((_WORD*)Object + 392) = ITEM_GET(0, 19);
*(_BYTE*)(Object + 786) = 13;
break;
case 247: //CrossGuard
*(_WORD*)(Object + 816) = ITEM_GET(12, 36);
*((_WORD*)Object + 296) = ITEM_GET(7, 17);
*((_BYTE*)Object + 594) = 13;
*(_BYTE*)(Object + 595) = 1;
*((_WORD*)Object + 312) = ITEM_GET(8, 17);
*((_BYTE*)Object + 626) = 13;
*(_BYTE*)(Object + 627) = 1;
*((_WORD*)Object + 328) = ITEM_GET(9, 17);
*((_BYTE*)Object + 658) = 13;
*(_BYTE*)(Object + 659) = 1;
*((_WORD*)Object + 344) = ITEM_GET(10, 17);
*((_BYTE*)Object + 690) = 13;
*(_BYTE*)(Object + 691) = 1;
*((_WORD*)Object + 360) = ITEM_GET(11, 17);
*((_BYTE*)Object + 722) = 13;
*(_BYTE*)(Object + 723) = 1;
*((_WORD*)Object + 376) = ITEM_GET(4, 18);
*((_BYTE*)Object + 754) = 15;
*((_BYTE*)Object + 755) = 1;
break;
case 249: //Guard
*(_WORD*)(Object + 816) = ITEM_GET(12, 36);
*((_WORD*)Object + 296) = ITEM_GET(7, 17);
*((_BYTE*)Object + 594) = 13;
*(_BYTE*)(Object + 595) = 1;
*((_WORD*)Object + 312) = ITEM_GET(8, 17);
*((_BYTE*)Object + 626) = 13;
*(_BYTE*)(Object + 627) = 1;
*((_WORD*)Object + 328) = ITEM_GET(9, 17);
*((_BYTE*)Object + 658) = 13;
*(_BYTE*)(Object + 659) = 1;
*((_WORD*)Object + 344) = ITEM_GET(10, 17);
*((_BYTE*)Object + 690) = 13;
*(_BYTE*)(Object + 691) = 1;
*((_WORD*)Object + 360) = ITEM_GET(11, 17);
*((_BYTE*)Object + 722) = 13;
*(_BYTE*)(Object + 723) = 1;
*((_WORD*)Object + 376) = ITEM_GET(0, 16);
*((_BYTE*)Object + 754) = 13;
*((_WORD*)Object + 392) = ITEM_GET(0, 16);
*(_BYTE*)(Object + 786) = 13;
break;
case 371://Leo the Helper
*(_WORD*)(Object + 816) = ITEM_GET(12, 36);
*((_WORD*)Object + 296) = ITEM_GET(7, 1);
*((_BYTE*)Object + 594) = 13;
*(_BYTE*)(Object + 595) = 1;
*((_WORD*)Object + 312) = ITEM_GET(8, 1);
*((_BYTE*)Object + 626) = 13;
*(_BYTE*)(Object + 627) = 1;
*((_WORD*)Object + 328) = ITEM_GET(9, 1);
*((_BYTE*)Object + 658) = 13;
*(_BYTE*)(Object + 659) = 1;
*((_WORD*)Object + 344) = ITEM_GET(10, 1);
*((_BYTE*)Object + 690) = 13;
*(_BYTE*)(Object + 691) = 1;
*((_WORD*)Object + 360) = ITEM_GET(11, 1);
*((_BYTE*)Object + 722) = 13;
*(_BYTE*)(Object + 723) = 1;
*((_WORD*)Object + 376) = ITEM_GET(0, 22);
*((_BYTE*)Object + 754) = 13;
*((_WORD*)Object + 392) = ITEM_GET(0, 22);
*(_BYTE*)(Object + 786) = 13;
break;
case 414://Leo the Helper
*(_WORD*)(Object + 816) = ITEM_GET(12, 3);
*((_WORD*)Object + 296) = ITEM_GET(7, 14);
*((_BYTE*)Object + 594) = 13;
*(_BYTE*)(Object + 595) = 1;
*((_WORD*)Object + 312) = ITEM_GET(8, 14);
*((_BYTE*)Object + 626) = 13;
*(_BYTE*)(Object + 627) = 1;
*((_WORD*)Object + 328) = ITEM_GET(9, 14);
*((_BYTE*)Object + 658) = 13;
*(_BYTE*)(Object + 659) = 1;
*((_WORD*)Object + 344) = ITEM_GET(10, 14);
*((_BYTE*)Object + 690) = 13;
*(_BYTE*)(Object + 691) = 1;
*((_WORD*)Object + 360) = ITEM_GET(11, 14);
*((_BYTE*)Object + 722) = 13;
*(_BYTE*)(Object + 723) = 1;
*((_WORD*)Object + 376) = ITEM_GET(4, 22);
*((_BYTE*)Object + 754) = 13;
//*((_WORD*)Object + 392) = ITEM_GET(0, 22);
//*(_BYTE*)(Object + 786) = 13;
break;
}
}
pSettingMonster(Object, MonsterID);
}
now create CustomMonsters.h
add
#ifndef MONSTER_H
#define MONSTER_H
#pragma once
class Monster
{
public:
void Load();
static void MonsterAttribute(DWORD a1, signed int a2);
};
extern Monster gMonster;
#endif
now go to main.ccp
add
#include "CustomMonsters.h"
gMonster.Load();
in offset.h add
#define _BYTE BYTE
#define _WORD WORD
#define _DWORD DWORD
#define _FLOAT FLOAT
If this fix is not used, the size of the custom monsters added will not work in conjunction with this code, to fix this you just have to disable this
in custommonsters.ccp
void Monster::Load()
{
remplace
SetCompleteHook(0xE8, 0x0052D9C3, &Monster::MonsterAttribute);
for
//SetCompleteHook(0xE8, 0x0052D9C3, &Monster::MonsterAttribute);
now work 100% :D
https://imgur.com/a/inh6ROk