Jump to content
  • 0

Please help! Dangerous Soul Collect Champ Bug?


RedMonkey

Question


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  87
  • Reputation:   2
  • Joined:  03/30/16
  • Last Seen:  

Hello,

 

Dangerous Soul Collect is spammable? It is still casting even I have already 5 spheres..

How can I make it like Call Spirits that if there is already five speheres.. The skill will fail

Something like

 

if Spheres < 5 then Allow else Fail

 

Technically, after casting Dangerous Soul collect which generates 5 spheres already, I want it to be "skill failed" unless the spheres are less than 5.

 

Someone out there can help me?

 

Thanks in advance!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  816
  • Reputation:   236
  • Joined:  01/30/13
  • Last Seen:  

I can give you some general pointers.

 

1. If you want it to fail before cast you have to go to map/unit.c and find the function unit_skilluse_id2. That's basically everything that happens before cast.

 

2. Find a section that checks for if(sd) and switch through different skills. It's important that if(sd) is checked otherwise your server might crash.

 

3. You can figure out the number of spiritballs the caster has with sd->spiritball.

 

4. How to make a skill fail in this function you can see for example here:

			case BD_ENCORE:
				// Prevent using the dance skill if you no longer have the skill in your tree.
				if(!sd->skill_id_dance || pc_checkskill(sd,sd->skill_id_dance)<=0) {
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
					return 0;
				}

If you don't want the "skill has failed" message on the client you can also just return 0.

 

5. If you want the skill to fail AFTER cast. You have to do this in skill.c instead (just search for CH_SOULCOLLECT).

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  87
  • Reputation:   2
  • Joined:  03/30/16
  • Last Seen:  

Thanks man! You are indeed an angel send by God. I will try it.

 

Edit:

The idea was there, But i ended editing skill.c

Thank you!

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