Jump to content
  • 0

SC_CUSTOMSTATUS for val1, val2, val3 and val4 - Where?


xRaisen

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   8
  • Joined:  03/10/12
  • Last Seen:  

Hello,

Its just a simple question, where I could find that class or method in the source? Id like to see it because I wanna add up something in the SC_CUSTOMSTATUS whenever it ends or the timer expired. I'd like to add this code below

clif_specialeffect(&sd->bl,255,AREA);
clif_displaymessage(sd->fd,"Your extra dex has started");

end when it expired, or the custom status ends,

clif_specialeffect(&sd->bl,255,AREA);
clif_displaymessage(sd->fd,"Your extra dex has ended");

Furthermore, I want to insert this code below whenever the time duration expire.

if(sc->data[sC_CUSTOMSTATUS]) {
clif_specialeffect(&sd->bl,255,AREA);
clif_displaymessage(sd->fd,"Your extra dex has ended");
}

No problem on the starting message + effects, but the end message + effects im having trouble with.

Any idea? Thank you!

Edited by xRaisen
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

What kind of trouble ? are you sure you trigger your condition on status_end ?

Didn't get what was the link with val1- val2 etc yet, beside that it's a status I mean.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   8
  • Joined:  03/10/12
  • Last Seen:  

What kind of trouble ? are you sure you trigger your condition on status_end ?

Didn't get what was the link with val1- val2 etc yet, beside that it's a status I mean.

The SC_CUSTOMSTATUS works perfect. Just that I want to locate the method that ends the custom statuses in order for me to add this whenever the status ends.

clif_specialeffect(&sd->bl,255,AREA);
clif_displaymessage(sd->fd,"Your extra dex has ended");

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Hmm ok I'll try to awser this :

In status.c : status_change_end_, you need to insert a new case, and add your lines.

And to call this you could just do, status_change_end(&sd->bl,SC_CUSTOMSTATUS,INVALID_TIMER); (this to force ending, otherwise he will finish when his duration expire).

Is that what u wanted ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   8
  • Joined:  03/10/12
  • Last Seen:  

unfortunately no. Hmmm.. I want to insert this code below whenever the time duration expire.

if(sc->data[sC_CUSTOMSTATUS]) {
clif_specialeffect(&sd->bl,255,AREA);
clif_displaymessage(sd->fd,"Your extra dex has ended");
}

That is why I want to locate that method that ends the statuses and filter it with this code condition above.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

If you're duration expire sc->data[sC_CUSTOMSTATUS] will be null.

On status_change_end_, after this

calc_flag = StatusChangeFlagTable[type];
   switch(type){

Put something like this :

case SC_CUSTOMSTATUS :
clif_specialeffect(&sd->bl,255,AREA);
clif_displaymessage(sd->fd,"Your extra dex has ended");

break;

You can even put that just after the switch before case SC_WEDDING: (line 8183), just make sure to break it corecly.

And as I said, if you want this effect at the end of duration, you don't need to worry since he will automatically called this status_change_end_, just give a try if you don't get it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  175
  • Reputation:   8
  • Joined:  03/10/12
  • Last Seen:  

Yeah, imma bit confuse with your last reply. And also a bit newbie of the source flow. Okay ill try this one out now. Get back to you whenever it succeeds or not, sir.

Thank you

Edit: My mom called. I got to test this tonight. But just thinking the status_change_end_, i knew it would work. I never thought of the status_change_end_ til' you explained it here.

(Later in the evening): Cool! It does work! Youre the man!

Edited by xRaisen
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...