Jump to content
  • 0

double click announcer name to become the whisper target


QQfoolsorellina

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

Is It passable to use on announcer  script command?

 

I had tried  the below snippet   but  the result was failed

 

 


announce strcharinfo(0) + ": " + @megaphone$,bc_all,0xFF0000;

 

any idea?

Edited by QQfoolsorellina
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

I think the announce script command does the equivalent of a "nameless broadcast" (GM client command /nb).

/nb sends the name differently than /b (broadcast with name).

Edit: oops, @broadcast and 'announce' both use intif_broadcast

	sprintf(atcmd_output, "%s: %s", sd->status.name, message);
	intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, 0);
Edited by Brian
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

I think the announce script command does the equivalent of a "nameless broadcast" (GM client command /nb).

/nb sends the name differently than /b (broadcast with name).

If there isn't a script command that uses the same clif_ function as /b, maybe do one of these:

atcommand "@broadcast " + @megaphone$;

atcommand "@kamic FF0000 " + @megaphone$;

 

 

Thanks for help  /thx  , but after tested  both was not working

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I don't get what you want to do

 

Something like ?

you click one time on the npc, it broadcast an announce for all, double click and it broadcast an announce just for the player ?

prontera,155,155,5	script	dfhnnn	56,{
	@ann_type = !@ann_type;
	announce strcharinfo(0) +": gnagna "+ @ann_type, ( @ann_type ? bc_all : bc_self ), 0xff0000;
	end;
}
Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Thanks for help  /thx  , but after tested  both was not working

I found the function that sends normal chat messages (those are the messages right? where you can double click their name and it will paste in the Whisper To box?)

trunk/src/map/clif.c clif_parse_GlobalMessage

	// send message to others (using the send buffer for temp. storage)
	WFIFOHEAD(fd, 8 + textlen);
	WFIFOW(fd,0) = 0x8d;
	WFIFOW(fd,2) = 8 + textlen;
	WFIFOL(fd,4) = sd->bl.id;
	safestrncpy((char*)WFIFOP(fd,8), is_fake ? fakename : text, textlen);
	//FIXME: chat has range of 9 only
	clif_send(WFIFOP(fd,0), WFIFOW(fd,2), &sd->bl, sd->chatID ? CHAT_WOS : AREA_CHAT_WOC);
Maybe you could make a new script command that used this code, but instead of AREA_CHAT_WOC, send to ALL_CLIENT.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

I don't get what you want to do

 

Something like ?

you click one time on the npc, it broadcast an announce for all, double click and it broadcast an announce just for the player ?

prontera,155,155,5	script	dfhnnn	56,{
	@ann_type = !@ann_type;
	announce strcharinfo(0) +": gnagna "+ @ann_type, ( @ann_type ? bc_all : bc_self ), 0xff0000;
	end;
}

 

What I mean is  double click  the broadcaster name and  he will become my whisper target.

In official server that behavior can be done.

 

RmCpc.jpg

Thanks for help  /thx  , but after tested  both was not working

I found the function that sends normal chat messages (those are the messages right? where you can double click their name and it will paste in the Whisper To box?)

trunk/src/map/clif.c clif_parse_GlobalMessage

	// send message to others (using the send buffer for temp. storage)
	WFIFOHEAD(fd, 8 + textlen);
	WFIFOW(fd,0) = 0x8d;
	WFIFOW(fd,2) = 8 + textlen;
	WFIFOL(fd,4) = sd->bl.id;
	safestrncpy((char*)WFIFOP(fd,8), is_fake ? fakename : text, textlen);
	//FIXME: chat has range of 9 only
	clif_send(WFIFOP(fd,0), WFIFOW(fd,2), &sd->bl, sd->chatID ? CHAT_WOS : AREA_CHAT_WOC);
Maybe you could make a new script command that used this code, but instead of AREA_CHAT_WOC, send to ALL_CLIENT.

 

ok ,I will try latter....  thanks /thx

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