Jump to content
  • 0

Skill Name above head during cast time instead of after?


LadyNanuia

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   2
  • Joined:  02/25/19
  • Last Seen:  

So as the topic states, as we all know when a skill is finished it'll do "SKill name" above the characters head, an example would monster's casting Earth Quake, however my question is how would i go about making this text appear during the cast time instead of when its finished? id like to make monsters shout what they are casting so people can play around it rather than just wait till its too late

 

i hope my question makes sense

TLDR - Skill name above head during cast rather than on finish?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   2
  • Joined:  02/25/19
  • Last Seen:  

bump

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

There's an easy trick to achieve somewhat of a similar result, but it won't be perfect since it will say the skill name twice (before and after casting) because it is hard coded into the client to display skill name when "clif_skill"(tells client to display casting sprite animation and effects) is sent.

in unit.cpp

Find:

	// In official this is triggered even if no cast time.
	clif_skillcasting(src, src->id, target_id, 0,0, skill_id, skill_get_ele(skill_id, skill_lv), casttime);

Change it to:

	if(src->type == BL_MOB)
		clif_showscript(src, skill_get_desc(skill_id), AREA);

	// In official this is triggered even if no cast time.
	clif_skillcasting(src, src->id, target_id, 0,0, skill_id, skill_get_ele(skill_id, skill_lv), casttime);

That should show the skill name before casting for mobs only.

And if you want it to work on certain skills only, change it to this:

	if(src->type == BL_MOB){
		switch(skill_id){
			case NPC_EARTHQUAKE:
			case NPC_DARKBREATH:
			case NPC_HALLUCINATION:
			// Add skill here
				clif_showscript(src, skill_get_desc(skill_id), AREA);
				break;
		}
	}

	// In official this is triggered even if no cast time.
	clif_skillcasting(src, src->id, target_id, 0,0, skill_id, skill_get_ele(skill_id, skill_lv), casttime);

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   2
  • Joined:  02/25/19
  • Last Seen:  

On 5/1/2023 at 6:21 AM, joecalis said:

There's an easy trick to achieve somewhat of a similar result, but it won't be perfect since it will say the skill name twice (before and after casting) because it is hard coded into the client to display skill name when "clif_skill"(tells client to display casting sprite animation and effects) is sent.

in unit.cpp

Find:

	// In official this is triggered even if no cast time.
	clif_skillcasting(src, src->id, target_id, 0,0, skill_id, skill_get_ele(skill_id, skill_lv), casttime);

Change it to:

	if(src->type == BL_MOB)
		clif_showscript(src, skill_get_desc(skill_id), AREA);

	// In official this is triggered even if no cast time.
	clif_skillcasting(src, src->id, target_id, 0,0, skill_id, skill_get_ele(skill_id, skill_lv), casttime);

That should show the skill name before casting for mobs only.

And if you want it to work on certain skills only, change it to this:

	if(src->type == BL_MOB){
		switch(skill_id){
			case NPC_EARTHQUAKE:
			case NPC_DARKBREATH:
			case NPC_HALLUCINATION:
			// Add skill here
				clif_showscript(src, skill_get_desc(skill_id), AREA);
				break;
		}
	}

	// In official this is triggered even if no cast time.
	clif_skillcasting(src, src->id, target_id, 0,0, skill_id, skill_get_ele(skill_id, skill_lv), casttime);

 

Thank you for your reponse, ill look into this but its already been solved however ?

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