Jump to content

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Through this piece of code you will be able to attach the specular on NPCs and Monsters.

 

// 1. Search:
bool CInstanceBase::Create(const SCreateData& c_rkCreateData)
{
	[...]
	return true;
}

// 2. Add this piece of code above the return true;

struct SAttachSpecularData
{
	DWORD race;
	float specularPower;
};

const int SPECULAR_MAX_NUM = 5;
static SAttachSpecularData structInfo[SPECULAR_MAX_NUM] =
{
	{ 101,	0.09f },
	{ 102,	0.06f },
	{ 9001,	0.04f },
	{ 9002,	0.01f },
	{ 9005,	0.09f },
//	{ npc_vnum,	specular }, Warning: When you add new NPCs / Monsters inside the structure, you must increase the SPECULAR_MAX_NUM
};

for (DWORD i = 0; i < SPECULAR_MAX_NUM; i++)
{
	if (GetRace() == structInfo[i].race)
	{
		SMaterialData data;
		data.pImage = NULL;
		data.isSpecularEnable = TRUE;
		data.fSpecularPower = structInfo[i].specularPower;
		data.bSphereMapIndex = 1;
		m_GraphicThingInstance.SetMaterialData(0, NULL, data);
	}
}

 

Credit: @VegaS™

  • Metin2 Dev 91
  • Eyes 1
  • Think 2
  • Confused 2
  • Good 38
  • Love 12
  • Love 48
Link to comment
https://metin2.dev/topic/25048-enable-specular-on-npcs-and-monsters/
Share on other sites

  • Forum Moderator

 

54 minutes ago, Await said:


struct SAttachSpecularData
{
	DWORD race;
	float specularPower;
};

const int SPECULAR_MAX_NUM = 5;
static SAttachSpecularData structInfo[SPECULAR_MAX_NUM] =
{
	{ 101,	0.09f },
	{ 102,	0.06f },
	{ 9001,	0.04f },
	{ 9002,	0.01f },
	{ 9005,	0.09f },
//	{ npc_vnum,	specular }, Warning: When you add new NPCs / Monsters inside the structure, you must increase the SPECULAR_MAX_NUM
};

for (DWORD i = 0; i < SPECULAR_MAX_NUM; i++)
{
	if (GetRace() == structInfo[i].race)
	{
		SMaterialData data;
		data.pImage = NULL;
		data.isSpecularEnable = TRUE;
		data.fSpecularPower = structInfo[i].specularPower;
		data.bSphereMapIndex = 1;
		m_GraphicThingInstance.SetMaterialData(0, NULL, data);
	}
}

 


Thanks for my release from 2016, soon 5 years since it has been done.
Shame on you... making copy-paste and uploading the code on GitHub, won't make you a "programmer".


spacer.png

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Not Good 1
  • Lmao 11
  • Love 1
  • 7 months later...
13 minutes ago, ASIKOO said:

I haven't deleted anything..

i Posted something there, and some one delete it ?

that's not cool ASIKOO..

it's okay, it's your board and your Rules.

Edited by Ace
1 hour ago, ASIKOO said:

If your post was deleted by VegaS, it was because it wasn't really useful...
It's not against you and nothing to do with the rules.

So doesn't it make sense to say thanks for a release?

 

Ridiculous answer.

 

Thank you very much for your understanding.

Edited by Ace
  • Lmao 1
3 minutes ago, ASIKOO said:

You just wanted to boast because you've made something first... ?
We can thank for a release without bragging. ?

brag? to be honest, no. Anyway, my dear administrator of Metin2Dev, I think it's a real shame ... It's pretty sad.

  • Metin2 Dev 3
  • Dislove 1
  • Confused 1
  • Lmao 2
  • Forum Moderator
2 hours ago, Ace said:

brag? to be honest, no. Anyway, my dear administrator of Metin2Dev, I think it's a real shame ... It's pretty sad.

Hi, please read this: https://metin2.dev/board/rules/

 

252730RedInfo.pngLinks to competing forums are only tolerated if the content of the link is related to the latest posts, for example: a response to a request for help if Metin2 Dev does not have the information, during a public debate... Keep in mind that this is tolerated, if you abuse it for no good reason you can be penalized. Take advantage of missing content to improve Metin2 Dev by creating a new tutorial.

No hidden advertising will be approved.

Also, I invite all of the people who will see their posts deleted to read all rules, then flame the staff.

  • Your post it had included a link to a competitive forum.
  • You made a post that has nothing related to the subject, just talking about that you did it first back in 2015 but it's a different implementation and how it works here.

I was talking in my first reply that this guy copied 1/1 of my tutorial from other forums, not even changing a variable name or the implementation. (see it here)
I didn't give you a warning, I have just hidden your post because I thought you didn't do it intentionally and we forgive you, somehow.
But from your reactions and how you treat the staff now, I think you would have deserved it.

Thanks.

  • Metin2 Dev 4
  • Angry 1
  • Not Good 1
  • Confused 1
  • Lmao 3
  • Good 9
  • Love 2
  • Love 2

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.