hakuren Posted February 9, 2014 Posted February 9, 2014 is there any way that a chatroom retrives all the ids of the chatroom i dont know how but i saw it on clif.c void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd) { int fd; int i,t; nullpo_retv(sd); nullpo_retv(cd); fd = sd->fd; if (!session_isActive(fd)) return; t = (int)(cd->owner->type == BL_NPC); WFIFOHEAD(fd, 8 + (28*(cd->users+t))); WFIFOW(fd, 0) = 0xdb; WFIFOW(fd, 2) = 8 + (28*(cd->users+t)); WFIFOL(fd, 4) = cd->bl.id; if(cd->owner->type == BL_NPC){ char name[NAME_LENGTH+1]; char *pos; strcpy(name, ((struct npc_data *)cd->owner)->name); pos = strchr(name, '#'); if ( pos != NULL ) *pos = '\0'; WFIFOL(fd, 30) = 1; WFIFOL(fd, 8) = 0; memcpy(WFIFOP(fd, 12), name, NAME_LENGTH); for (i = 0; i < cd->users; i++) { WFIFOL(fd, 8+(i+1)*28) = 1; memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd->status.name, NAME_LENGTH); } } else for (i = 0; i < cd->users; i++) { WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC); memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd->status.name, NAME_LENGTH); } WFIFOSET(fd, WFIFOW(fd, 2)); } Quote
WhiteEagle Posted February 9, 2014 Posted February 9, 2014 I've it not tested, but try it like this way. I don't know what you trying out exactly, so I script only an excample. map,x,y,0 script Test Room#IPcheck 837,{ end; OnInt: waitingroom "Channel Name",20,"Test Room#IPcheck::OnStart",1; end; OnStart: attachrid($@accountid[0]); end; } Quote
hakuren Posted February 9, 2014 Author Posted February 9, 2014 (edited) I've it not tested, but try it like this way. I don't know what you trying out exactly, so I script only an excample. map,x,y,0 script Test Room#IPcheck 837,{ end; OnInt: waitingroom "Channel Name",20,"Test Room#IPcheck::OnStart",1; end; OnStart: attachrid($@accountid[0]); end; } what i mean if the player is created chat? how to retrive the account_id? Edited February 9, 2014 by hakuren Quote
AnnieRuru Posted February 9, 2014 Posted February 9, 2014 http://rathena.org/board/topic/78291-modification-of-bg-emp/?p=177387 Quote
hakuren Posted February 10, 2014 Author Posted February 10, 2014 http://rathena.org/board/topic/78291-modification-of-bg-emp/?p=177387 ma'am is this can be done if the player creates the chat room? example player 1 creates the chatroom and player 2 join it will say to the player 1 as attachrid($@accountid[0]); dispbottom "player player 2(name) is join to your chatroom? Quote
AnnieRuru Posted February 11, 2014 Posted February 11, 2014 LOL NO that modification only for npc's chatroom I think your idea needs to do totally in source modification chat_joinchat inside chat.c function Quote
hakuren Posted February 11, 2014 Author Posted February 11, 2014 LOL NO that modification only for npc's chatroom I think your idea needs to do totally in source modification chat_joinchat inside chat.c function but maam is this possible? Quote
AnnieRuru Posted February 13, 2014 Posted February 13, 2014 (edited) [paste=74qo3zthrrcz] - script OnPCJoinChatEvent -1,{ pc_getwaitingroomlist $@waitingroomowner; dispbottom $@waitingroomcount +""; // for ( .@i = 0; .@i < $@waitingroomcount; .@i++ ) // dispbottom ( .@i +1 )+". "+ rid2name( $@waitingroomaid[.@i] ); announce rid2name( $@waitingroomaid[$@waitingroomcount -1] )+" has join "+ rid2name( $@waitingroomaid[0] ) +"'s waitingroom", bc_all; end; }I wrote this based on hercules emulator =/so try convert it into rathena source code Edited February 13, 2014 by AnnieRuru Quote
hakuren Posted February 13, 2014 Author Posted February 13, 2014 (edited) [paste=74qo3zthrrcz] - script OnPCJoinChatEvent -1,{ pc_getwaitingroomlist $@waitingroomowner; dispbottom $@waitingroomcount +""; // for ( .@i = 0; .@i < $@waitingroomcount; .@i++ ) // dispbottom ( .@i +1 )+". "+ rid2name( $@waitingroomaid[.@i] ); announce rid2name( $@waitingroomaid[$@waitingroomcount -1] )+" has join "+ rid2name( $@waitingroomaid[0] ) +"'s waitingroom", bc_all; end; }I wrote this based on hercules emulator =/so try convert it into rathena source code maam it works now thank you somuch!!!!!!!!!!!!!!!!!!!!!! Edited February 14, 2014 by hakuren Quote
Question
hakuren
is there any way that a chatroom retrives all the ids of the chatroom
i dont know how but i saw it on clif.c
8 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.