Jump to content

Recommended Posts

 

Hi There Guys

I have this code 

			if (dwEvolution >= 6000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
			else if (dwEvolution >= 4000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
			else if (dwEvolution >= 2000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
			else if (dwEvolution >= 1000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;
			else
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;

This code is giving my weapons a shining when reach a certain level of points in evolution.

The shining is right on point, but i want both shinings appearing. The normal one +7/+8/+9 + The new one.

Can anyone help me in what to change here to that happend?

I tried a lot of alternatives but none worked :S

Please I really need some help.

Thank you.

Best Regards.

 

Edited by SøηGøku®
Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Contributor

You have to create a m_swordRefineEffectRight2 based on the existing and you can do this after:

			if (dwEvolution >= 6000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
			else if (dwEvolution >= 4000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
			else if (dwEvolution >= 2000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
			else if (dwEvolution >= 1000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;
                        m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
Edited by TMP4
Link to comment
Share on other sites

27 minutes ago, TMP4 said:

You have to create a m_swordRefineEffectRight2 based on the existing and you can do this after:


			if (dwEvolution >= 6000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
			else if (dwEvolution >= 4000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
			else if (dwEvolution >= 2000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
			else if (dwEvolution >= 1000)
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;
                        m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;

But that won't add 2 shinings on the weapon... that will create a different shinning...

This function is adding the normal shining if the parameters above dont apply

else
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;

Creating a different one won't change anything...

I tried this.. but didn't work

if (dwEvolution >= 6000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else if (dwEvolution >= 4000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else if (dwEvolution >= 2000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else if (dwEvolution >= 1000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
else
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;

 

Edited by SøηGøku®
Link to comment
Share on other sites

  • Contributor
Quote

But that won't add 2 shinings on the weapon... that will create a different shinning...

 

Bro.. if you create a different shining, that plus the original is equal 2 just what you want.

You doesn't even understand how it works. You cannot reuse m_swordRefineEffectRight because when you set a value to it again, the previous one gone. You need a second m_swordRefineEffectRight! (The m_swordRefineEffectRight2)

 

In the source there is only 

m_swordRefineEffectRight

So you cannot achieve what you want without a 

m_swordRefineEffectRight2

Also check my comment again, the m_swordRefineEffectRight2 was without an else so every weapon will got the m_swordRefineEffectRight2

 

To make things clear, you can keep the m_swordRefineEffectRight for the normal effect, and m_swordRefineEffectRight2 for your new:

                         
                        //It will applied to every weapon (The normal effects)
                        m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7; 
             
                        //The second will only apply to your evultion system requirments
                        if (dwEvolution >= 6000)
				m_swordRefineEffectRight2= EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
			else if (dwEvolution >= 4000)
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
			else if (dwEvolution >= 2000)
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
			else if (dwEvolution >= 1000)
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;

You can simply copy paste m_swordRefineEffectRight to m_swordRefineEffectRight2 with notepad++ search in documents function.

It is about 5 min work. Good luck, i'm out.

Edited by TMP4
Link to comment
Share on other sites

I don't know where in source i have to create m_swordRefineEffectRight2 or I just simply edit that part and its done?

Made it this away, Still didn't work m8:

			if (dwEvolution >= 6000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else if (dwEvolution >= 4000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else if (dwEvolution >= 2000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else if (dwEvolution >= 1000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
			}
			else
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
		}

 

I tried this way like you said, didn't work


                        if (dwEvolution >= 6000)
				m_swordRefineEffectRight2= EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
			else if (dwEvolution >= 4000)
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
			else if (dwEvolution >= 2000)
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
			else if (dwEvolution >= 1000)
				m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;

 

Link to comment
Share on other sites

  • Contributor

Open Instancebase.cpp and instancebase.h

Search for m_swordRefineEffectRight

Copy paste to m_swordRefineEffectRight2.

 

At .h there is only one

DWORD m_swordRefineEffectRight; copy paste --> DWORD m_swordRefineEffectRight2;

 

At cpp, there are more occurance.

 

Then you can use m_swordRefineEffectRight2.

 

Here are an example at cpp what you should do:

    if (m_swordRefineEffectRight)
    {
        __DetachEffect(m_swordRefineEffectRight);
        m_swordRefineEffectRight = 0;
    }

Copy and rename like:

    if (m_swordRefineEffectRight2)
    {
        __DetachEffect(m_swordRefineEffectRight2);
        m_swordRefineEffectRight2 = 0;
    }

 

If you still don't know what you should do, then upload that 2 files...

Edited by TMP4
Link to comment
Share on other sites

I did what you said and went like this on: Instance.cpp

			if (dwEvolution >= 6000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;
				__AttachEffect(m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7);
			}
			else if (dwEvolution >= 4000)
			{
			m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION3;
			__AttachEffect(m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7);
			}
			else if (dwEvolution >= 2000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION2;
				__AttachEffect(m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7);
			}
			else if (dwEvolution >= 1000)
			{
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION1;
				__AttachEffect(m_swordRefineEffectRight2 = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7);
			}
			else
				m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;

And this part:

		if (m_swordRefineEffectRight)
			m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
		if (m_swordRefineEffectLeft)
			m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
		if (m_swordRefineEffectRight2)
			m_swordRefineEffectRight2 = __AttachEffect(m_swordRefineEffectRight2);

and this part:

		if (m_swordRefineEffectRight)
			m_swordRefineEffectRight = __AttachEffect(m_swordRefineEffectRight);
		if (m_swordRefineEffectLeft)
			m_swordRefineEffectLeft = __AttachEffect(m_swordRefineEffectLeft);
		if (m_swordRefineEffectRight2)
			m_swordRefineEffectRight2 = __AttachEffect(m_swordRefineEffectRight2);

		break;

On the InstanteBase.h like this:

		DWORD					m_swordRefineEffectRight;
		DWORD					m_swordRefineEffectLeft;
		DWORD					m_armorRefineEffect;
		DWORD					m_swordRefineEffectRight2;

The end result is great, but with 1 bug... after i take off the weapon it stays shining without the weapon like this:

 Any ideas what to fix?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor

You did attached m_swordRefineEffectRight2 when you only had to declare.

You have to attach and deattach m_swordRefineEffectRight2 where m_swordRefineEffectRight is attached/deattached.

 

If you follow m_swordRefineEffectRight's meta with m_swordRefineEffectRight2 then you will not have that bug.

So just copy paste, but not rethink unless you know what you're doing.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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