QQfoolsorellina Posted March 12, 2013 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted March 12, 2013 (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 March 12, 2013 by QQfoolsorellina Quote Link to comment Share on other sites More sharing options...
Brian Posted March 12, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted March 12, 2013 (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 March 12, 2013 by Brian Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted March 12, 2013 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Author Share Posted March 12, 2013 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 , but after tested both was not working Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 12, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted March 12, 2013 (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 March 12, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
Brian Posted March 12, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted March 12, 2013 Thanks for help , but after tested both was not workingI 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. Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted March 12, 2013 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Author Share Posted March 12, 2013 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. Thanks for help , but after tested both was not workingI 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 Quote Link to comment Share on other sites More sharing options...
Question
QQfoolsorellina
Is It passable to use on announcer script command?
I had tried the below snippet but the result was failed
any idea?
Edited by QQfoolsorellinaLink to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.