Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

Help on Weapon Source


Question

Posted (edited)

 

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® (see edit history)
Link to post

10 answers to this question

Recommended Posts

  • 0
Posted (edited)

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 (see edit history)
Link to post
  • 0
Posted (edited)
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® (see edit history)
Link to post
  • 0
Posted (edited)
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 (see edit history)
Link to post
  • 0

No.

 

I'm not very good at explaining but gonna try:

m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_EVOLUTION4;

Mean:

SourceVariable = PlayersettingmoduleEffect

 

Link to post
  • 0

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 post
  • 0
Posted (edited)

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 (see edit history)
Link to post
  • 0

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:

Spoiler

 Any ideas what to fix?

Link to post
  • 0

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 post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.