Jump to content

Enable specular on NPCs and Monsters


Recommended Posts

M2 Download Center

Hidden Content

    Give reaction to this post to see the hidden content.
( 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 1
  • Love 2
  • Love 10
  • Good 6
  • Confused 2
Link to comment
  • 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

 

  • Lmao 11
  • Not Good 1
Link to comment

🙂 Good job, delete my Posts.

 

Thank you very much for this System.

Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2014. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
  • Administrator

The purpose is similar...
The code looks different between you and VegaS :

094006Sans-titre-1.png

logo_0.png

Link to comment

but why did you delete my Post?

You treat me really badly here 🙂

I just wanted to draw attention to the fact that I also had something releasing in 2015 🙂

Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2014. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Posted (edited)
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
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2014. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
  • Administrator

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.

  • Love 1
  • Dislove 1

logo_0.png

Link to comment
Posted (edited)
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
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2014. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
  • Administrator

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

  • Not Good 1

logo_0.png

Link to comment
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

Hidden Content

    Give reaction to this post to see the hidden content.
, I think it's a real shame ... It's pretty sad.

  • Metin2 Dev 1
  • Lmao 2
  • Dislove 1
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2014. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
  • Moderator
2 hours ago, Ace said:

brag? to be honest, no. Anyway, my dear administrator of

Hidden Content

    Give reaction to this post to see the hidden content.
, 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

Hidden Content

    Give reaction to this post to see the hidden content.
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

Hidden Content

    Give reaction to this post to see the hidden content.
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 rulesthen 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.

Hidden Content

    Give reaction to this post to see the hidden content.

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 1
  • Love 1
  • Love 2
  • Good 5
  • Lmao 3
  • Confused 1
  • Not Good 1
  • Angry 1
Link to comment
Guest
This topic is now closed to further replies.


  • Read our Rules
  • Activity

    1. 85

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    2. 0

      Help. switchbot system not working

    3. 8

      Haumea2 - Are you ready to fight? | Balanced FunPvP | Leagues | Daily events and more... Start: 14/07

    4. 7

      Question about delay of death

    5. 7

      Question about delay of death

    6. 7

      Question about delay of death

    7. 0

      DDMT2 - The Oldest Currently Running Metin2 Private Server

  • Recently Browsing

    No registered users viewing this page.

×
×
  • 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.