Jump to content
  • 0
Eross

Preserve Skill [Stalker]

Question

I want to request for a source modification that will change the Preserve skill behaviour like the following:

 

1. Can toggle On and Off

2. Wont deactivate on death and re-login 

 

I found a thread about toggle on and off but that was from year 2012 and I think the modification will not work on latest RA

 

Please help .. thankyou so much

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Okay, here we go:

Open skill.cpp and search:

	case ST_PRESERVE:

And comment this line. (adding //)

Then search:
 

	case TK_DODGE:

And add below case ST_PRESERVE:

	case TK_DODGE:
	case ST_PRESERVE:

Open status.cpp and search:
 

		/* Permanent effects */

And add below case SC_PRESERVE:
 

		/* Permanent effects */
		case SC_PRESERVE:

Then search:
 

			switch (i) { // Type 0: PC killed -> Place here statuses that do not dispel on death.
			case SC_ELEMENTALCHANGE: // Only when its Holy or Dark that it doesn't dispell on death
				if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK )
					break;

And add below case SC_PRESERVE:
 

			switch (i) { // Type 0: PC killed -> Place here statuses that do not dispel on death.
			case SC_ELEMENTALCHANGE: // Only when its Holy or Dark that it doesn't dispell on death
				if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK )
					break;
			case SC_PRESERVE:

Open map.cpp and search:

status_change_end(&sd->bl, SC_PRESERVE, INVALID_TIMER);

Comment this line adding //.

Now you done. Don't forget to recompile your emulator.

  • Upvote 1
Link to comment
Share on other sites

  • 0
7 hours ago, Easycore said:

Okay, here we go:

Open skill.cpp and search:

	case ST_PRESERVE:

And comment this line. (adding //)

Then search:
 

	case TK_DODGE:

And add below case ST_PRESERVE:

	case TK_DODGE:
	case ST_PRESERVE:

Open status.cpp and search:
 

		/* Permanent effects */

And add below case SC_PRESERVE:
 

		/* Permanent effects */
		case SC_PRESERVE:

Then search:
 

			switch (i) { // Type 0: PC killed -> Place here statuses that do not dispel on death.
			case SC_ELEMENTALCHANGE: // Only when its Holy or Dark that it doesn't dispell on death
				if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK )
					break;

And add below case SC_PRESERVE:
 

			switch (i) { // Type 0: PC killed -> Place here statuses that do not dispel on death.
			case SC_ELEMENTALCHANGE: // Only when its Holy or Dark that it doesn't dispell on death
				if( sc->data[i]->val2 != ELE_HOLY && sc->data[i]->val2 != ELE_DARK )
					break;
			case SC_PRESERVE:

Open map.cpp and search:

status_change_end(&sd->bl, SC_PRESERVE, INVALID_TIMER);

Comment this line adding //.

Now you done. Don't forget to recompile your emulator.

Hi ! I've already did some of this but I noticed that there are some steps I didnt done ... Can you point out what step is for not removing the buff on relogin in ... Thankyou so much btw sir

 

image.thumb.png.b523f3f2e53b25e493027f55d48ebda7.png

Edited by Origami
Link to comment
Share on other sites

  • 0
1 hour ago, Origami said:

Hi ! I've already did some of this but I noticed that there are some steps I didnt done ... Can you point out what step is for not removing the buff on relogin in ... Thankyou so much btw sir

 

image.thumb.png.b523f3f2e53b25e493027f55d48ebda7.png

Open map.cpp and search:

status_change_end(&sd->bl, SC_PRESERVE, INVALID_TIMER);
Link to comment
Share on other sites

  • 0
On 9/6/2021 at 8:15 PM, Scanty said:

Open map.cpp and search:

status_change_end(&sd->bl, SC_PRESERVE, INVALID_TIMER);

image.thumb.png.3889f9a6491e7f5d8a2fb6c923c9b927.pngIm getting error help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.