Jump to content
  • 0

CH_SOULCOLLECT


JulianA00

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  12/17/12
  • Last Seen:  

Hello,

I've already faced this problem in earlier versions of eAthena in 2008~2009, but it seems that those "fixes" aren't working in rAthena. As the topic title says, I'm trying to find a way to stop the possibility of Soul Collect(Hyper Spirit Spheres) skill to be used when the user already have 5 spheres casted.

So far I've already tried adding a second condition in skill.c file to check if there's already 5 spirits casted, but didn't work at all.

I've also found this thread in eAthena and implemented it, but it also didn't work. It displays the error message in the chat dialog but still casts the skill

http://eathena.ws/fo..._+soul +collect

This is how my skill.c looks right now:


case CH_SOULCOLLECT:
//Separated test
if(sd && sd->spiritball >= 5){
clif_displaymessage(sd->fd, "Soul Collect has failed.");
break; //return 0 gives the same result;
}

if(sd && sd->spiritball < 5) {
int limit = 5;
if( sd->sc.data[sC_RAISINGDRAGON] )
   limit += sd->sc.data[sC_RAISINGDRAGON]->val1;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
for (i = 0; i < limit; i++)
   pc_addspiritball(sd,skill_get_time(skillid,skilllv),limit);
}
break;

Is there already a definitive way to deal with this problem in rAthena?

Thanks a lot for the attention.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  


Index: map/skill.c
===================================================================
--- map/skill.c    (revision 17088)
+++ map/skill.c    (working copy)
@@ -632,7 +632,12 @@
                return 1;
            }
            break;
-
+        case CH_SOULCOLLECT:
+            if( sd->spiritball >=5 ) {
+                clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+                return 1;
+            }
+            break;
    }
    return (map[m].flag.noskill);
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  12/17/12
  • Last Seen:  

Worked! Thank you so much clydelion!

This thread can be tagged as Solved(I don't think I can tag it).

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