Jump to content
  • 0

Preserve Skill [Stalker]


Eross

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

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

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  220
  • Reputation:   251
  • Joined:  04/08/13
  • Last Seen:  

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 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   21
  • Joined:  11/08/15
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/07/23
  • Last Seen:  

Hello! All fine?

This line does not exist in the latest version of the emulator... 

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

I made the rest of the changes and it partially worked.
1 - When I log out, it disappears and I need to reactivate it. (Does anyone know how to leave it fixed, disable using it again)
2 - When the Skill is copied and Preserve is not active, it copies other skills by adding new icons of the skills that are being copied without deleting the previous one, just by relogging the old ones they disappear)

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