Jump to content
  • 0

Show Heal in Chat!?


GmHeathcliff

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  12/24/14
  • Last Seen:  

Is there a way to Show the incoming and done Heal in Chat like it already is with dmg? Dont found anything about that

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

All parts works Fine just the following one brings mapserver to Crash when heal undead ! like before! but Looks much better with names of chars thx^^

 

 

Try replacing ...

	if (src->type == BL_PC) {
		sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
		clif_displaymessage(sd->fd, str);
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}

With:

	if (src->type == BL_PC) {
		if (target->type == BL_PC) {
			sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
			clif_displaymessage(sd->fd, str);
		}
		else {
			sprintf(str, "Target healed for %dhp!", hp);
			clif_displaymessage(sd->fd, str);
		}
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}
  • Upvote 1
  • Like 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

There's probably a better way to do this but until someone does it...

 

In skill.c after

int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) {
	int skill, hp = 0;
	struct map_session_data *sd = BL_CAST(BL_PC, src);
	struct map_session_data *tsd = BL_CAST(BL_PC, target);
	struct status_change *sc, *tsc;

Add

	char str[255];

Then before

	return hp;
}

Add

	if (src->type == BL_PC) {
		if (target->type == BL_PC) {
			sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
			clif_displaymessage(sd->fd, str);
		}
		else {
			sprintf(str, "Target healed for %dhp!", hp);
			clif_displaymessage(sd->fd, str);
		}
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  12/24/14
  • Last Seen:  

Great that what iam searched for :D thanks ! but iam intrested what "way" you are talking about !^^


OHHHH my mapserver crashes now if iam using Heal on an Undead !!! 

 

 

There's probably a better way to do this but until someone does it...

 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

Great that what iam searched for :D thanks ! but iam intrested what "way" you are talking about !^^

OHHHH my mapserver crashes now if iam using Heal on an Undead !!! 

 

 

 

I actually tested to see if that would happen... and it didn't on my server but try this...

 

Replace:

	sprintf(str, "You've healed %d!", hp);
	clif_displaymessage (sd->fd, str);
	sprintf(str, "You've been healed %d!", hp);
	clif_displaymessage (tsd->fd, str);

With:

	if (src->type == BL_PC) {
		sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
		clif_displaymessage(sd->fd, str);
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}

And change...

char str[32];

To

char str[255];
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  12/24/14
  • Last Seen:  

 

I actually tested to see if that would happen... and it didn't on my server but try this...

 

 

All parts works Fine just the following one brings mapserver to Crash when heal undead ! like before! but Looks much better with names of chars thx^^

Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  12/24/14
  • Last Seen:  

Ouhhh yeaa that works perfect ! Thx for the work  you got it :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  12/24/14
  • Last Seen:  

After all the time i reconized that if an Mob trys to use his heal tested on Fallen Bishop and Beelzebub it crashes mapserver ! after deleting it  mapserver works fine !  Maybe you or someonelse have an Solution.!?

i think sd&& tsd&& must be integrated but dunno right where!

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