Jump to content
  • 0

double click announcer name to become the whisper target


Question

Posted (edited)

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

5 answers to this question

Recommended Posts

Posted (edited)

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
Posted

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

Posted (edited)

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
Posted

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

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...