Jump to content
  • 0

How do I add extra SC Cash Food/Buff aka. INCAGI, Blessing?


Alexandrite

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

I know that there are 6 Type of Str - Luk Cash

		sc_start SC_FOOD_STR_CASH, (@runtime*60000), 10;
		sc_start SC_FOOD_AGI_CASH, (@runtime*60000), 10;
		sc_start SC_FOOD_VIT_CASH, (@runtime*60000), 10;
		sc_start SC_FOOD_INT_CASH, (@runtime*60000), 10;
		sc_start SC_FOOD_DEX_CASH, (@runtime*60000), 10;
		sc_start SC_FOOD_LUK_CASH, (@runtime*60000), 10;

But there no CASH version of

		sc_start SC_HITFOOD, (@runtime*60000),30;
		sc_start SC_FLEEFOOD, (@runtime*60000),30;
		sc_start SC_BATKFOOD, (@runtime*60000), 10;
		sc_start SC_MATKFOOD, (@runtime*60000), 10;

		sc_start SC_INCREASEAGI, (@runtime*60000) ,10;	
		sc_start SC_BLESSING,(@runtime*60000),10;
		sc_start SC_MAGNIFICAT,(@runtime*60000),5;		
		sc_start SC_ANGELUS,(@runtime*60000),10;		
		sc_start SC_GLORIA,(@runtime*60000),5;		

I want HITFOOD FLEEFOOD BATKFOOD MATKFOOD INCREASEAGI BLESSING MAGNIFICAT ANGELUS GLORIA

as a _CASH

 

how do I add them

I mean I want 9 later Buff with the effect that it won't lose upon death (CASH Version)

 

at the moment this 9 buff are lost when u die , I want to add cash version of this 9 effect?

 

Can anyone suggest me how to do it?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  97
  • Reputation:   10
  • Joined:  01/21/13
  • Last Seen:  

Idk if it'll work, but you can try do this:

Go to scr/map/status.cpp

Open with notepad++ and search for this:

switch (i) { // Type 0: PC killed -> Place here statuses that do not dispel on death.

Now you can do something like this:

break;
			case SC_HITFOOD:
			case SC_FLEEFOOD:
			case SC_BATKFOOD:
			case SC_MATKFOOD:
			case SC_WEIGHT50:
			case SC_WEIGHT90:
			case SC_EDP:

You'll need recompile after this.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

it's work but that's not what i want....

I want to add manual SC_*

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   57
  • Joined:  11/24/16
  • Last Seen:  

i dont think you can do this without source edit.

Edited by Hurtsky
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

I know that :V

that's why i ask for guide

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

I like the idea. I think this should be moved to src support.

Anyways, I will try to produce this one tomorrow and I will let you know. I won't promise but I will try. @Alexandrite

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

Wrong section. Moved to "Source Support".

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

I tried to take a peek on your request, however, when I reached status.h, I realized that this will be really tedious to do since this requires making a new SC. This will require both server and client mod. Unless you have time and patience, this can be done but I don't since I'm also busy with mine.

 

For example you want to add SC_BLESSING_CASH, You want to create a new sc by copying all SC_BLESSING codes in status.c paste it them to where they belong add _CASH in the end.

if(sc->data[SC_BLESSING]) {
		if(sc->data[SC_BLESSING]->val2)
			str += sc->data[SC_BLESSING]->val2;
		else
			str >>= 1;
	}
// Add this right below
if(sc->data[SC_BLESSING_CASH]) {
		if(sc->data[SC_BLESSING_CASH]->val2)
			str += sc->data[SC_BLESSING_CASH]->val2;
		else
			str >>= 1;
	}
if (status_isimmune(bl)) {
		switch (type) {
			case SC_DECREASEAGI:
			case SC_SILENCE:
			case SC_COMA:
			case SC_INCREASEAGI:
			case SC_BLESSING:
			case SC_BLESSING_CASH: // add this
	if(status_has_mode(status,MD_STATUS_IMMUNE) && !(flag&SCSTART_NOAVOID)) {
		if (type>=SC_COMMON_MIN && type <= SC_COMMON_MAX)
			return 0;
		switch (type) {
			case SC_BLESSING:
            case SC_BLESSING_CASH: // add this
			case SC_DECREASEAGI:
			case SC_PROVOKE:
			case SC_COMA:
// Before overlapping fail, one must check for status cured.
	switch (type) {
	case SC_BLESSING_CASH: // add this
	case SC_BLESSING:
		// !TODO: Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
		// !but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
		if ((!undead_flag && status->race != RC_DEMON) || bl->type == BL_PC) {
			if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
				status_change_end(bl, SC_STONE, INVALID_TIMER);
			if (sc->data[SC_CURSE]) {
					status_change_end(bl, SC_CURSE, INVALID_TIMER);
					return 1; // End Curse and do not give stat boost
			}
		}
		if(sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_HIGH)
			status_change_end(bl, SC_SPIRIT, INVALID_TIMER);
		break;

and repeat the process until all SC_BLESSING Codes are added with custom SC_BLESSING_CASH (NOTE: I DID NOT PUT EVERYTHING YOU NEED TO PUT, YOU HAVE TO DO IT YOURSELF)

Then for "_CASH" parts, find all then add your custom _CASH below for example:

case SC_2011RWC_SCROLL:
		status_change_end(bl,SC_FOOD_STR_CASH,INVALID_TIMER);
		status_change_end(bl,SC_FOOD_AGI_CASH,INVALID_TIMER);
		status_change_end(bl,SC_FOOD_VIT_CASH,INVALID_TIMER);
		status_change_end(bl,SC_FOOD_INT_CASH,INVALID_TIMER);
		status_change_end(bl,SC_FOOD_DEX_CASH,INVALID_TIMER);
		status_change_end(bl,SC_FOOD_LUK_CASH,INVALID_TIMER);
		status_change_end(bl,SC_BLESSING_CASH,INVALID_TIMER); // add this
		break;
if(type == 0) {
			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_WEIGHT50:
			......
			case SC_FOOD_STR_CASH:
			case SC_FOOD_AGI_CASH:
			case SC_FOOD_VIT_CASH:
			case SC_FOOD_DEX_CASH:
			case SC_FOOD_INT_CASH:
			case SC_FOOD_LUK_CASH:
			case SC_BLESSING_CASH: // add this
			

You must get my point from here:

Then add status ICON (Which will require CLIENT MODS TOO) - I think there is a guide in doing this just use the search engine:

	StatusIconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
	StatusIconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
	StatusIconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
	StatusIconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
	StatusIconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
	StatusIconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
	StatusIconChangeTable[SC_BLESSING_CASH] = SI_BLESSING_CASH; // You need to add status Icon file named as SI_BLESSING_CASH

And the SCB effects:

	StatusChangeFlagTable[SC_FOOD_STR_CASH] |= SCB_STR;
	StatusChangeFlagTable[SC_FOOD_AGI_CASH] |= SCB_AGI;
	StatusChangeFlagTable[SC_FOOD_VIT_CASH] |= SCB_VIT;
	StatusChangeFlagTable[SC_FOOD_DEX_CASH] |= SCB_DEX;
	StatusChangeFlagTable[SC_FOOD_INT_CASH] |= SCB_INT;
	StatusChangeFlagTable[SC_FOOD_LUK_CASH] |= SCB_LUK;
	StatusChangeFlagTable[SC_ATTHASTE_CASH] |= SCB_ASPD;
	StatusChangeFlagTable[SC_BLESSING_CASH] |= SCB_123123; // aadd this with SCB of SC_BLESSING (im not gonna put it myself)

Then find a free spot at status.h

This is more than enough to say that this is really tedious. Well, not impossible tho. @Alexandrite

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

I did that and it just made my character "stone" :V  @pajodex

Edited by Alexandrite
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

You have to check "everything" in your code /heh 

Its nearly impossible for me to know the problem because your the one who coded it. Try to check from top to bottom, you must have missed a part or you added them in the wrong part of the code.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

I didn't miss anything .... still put me in stone

well I'm doing INCREASEAGI btw...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/19/14
  • Last Seen:  

I put script_constants.hpp


    export_constant(SC_INCREASEAGI);
    export_constant(SC_INCREASEAGI_CASH);

then I got

Untitled.png.af1867cfd1e3744cf41c86515022d605.png

But then my server crash

Untitled.png.e05b04b87adf3246ccdc7351487ba449.png

my Sc_DATA

Untitled2.png.d8dca9aaeab7a69a0a383660916934fd.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

Did you edit status.hpp,too?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  57
  • Reputation:   9
  • Joined:  03/05/18
  • Last Seen:  

hi @pajodex..I tried to follow the steps, but I did on enchantarms...i got an error says unknown identifier when compiling...

I put in:

  • status.cpp
  • status.hpp
  • script_constants.hpp

There must be another place to put this new SC since the compiler cannot identify it

 

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